Fixes trac:921
* Do not empty the list of in-flight frags during _close(); the OOB callback will still occur (_send_cb()) and try to remove the frag from the list, which will then result in an assert failure (debug builds). * Add one more fix for a possible problem -- add an extra RETAIN / RELEASE pair on the endpoint to ensure that it is not actually freed before all in-flight frags have drained. This commit was SVN r13953. The following Trac tickets were found above: Ticket 921 --> https://svn.open-mpi.org/trac/ompi/ticket/921
Этот коммит содержится в:
родитель
333357f4cc
Коммит
c000ee5328
@ -118,6 +118,11 @@ static void orte_iof_base_endpoint_send_cb(
|
|||||||
orte_iof_base_endpoint_t* endpoint = frag->frag_owner;
|
orte_iof_base_endpoint_t* endpoint = frag->frag_owner;
|
||||||
opal_list_remove_item(&endpoint->ep_frags, &frag->super.super);
|
opal_list_remove_item(&endpoint->ep_frags, &frag->super.super);
|
||||||
ORTE_IOF_BASE_FRAG_RETURN(frag);
|
ORTE_IOF_BASE_FRAG_RETURN(frag);
|
||||||
|
|
||||||
|
/* Decrement the refcount on the endpoint; matches the RETAIN for
|
||||||
|
when this frag's send was initiated in
|
||||||
|
orte_iof_base_endpoint_read_handler() */
|
||||||
|
OBJ_RELEASE(endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -188,6 +193,10 @@ static void orte_iof_base_endpoint_read_handler(int fd, short flags, void *cbdat
|
|||||||
}
|
}
|
||||||
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
|
||||||
|
|
||||||
|
/* Increment the refcount on the endpoint so that it doesn't get
|
||||||
|
deleted before the frag */
|
||||||
|
OBJ_RETAIN(endpoint);
|
||||||
|
|
||||||
/* start non-blocking OOB call to forward received data */
|
/* start non-blocking OOB call to forward received data */
|
||||||
rc = orte_rml.send_nb(
|
rc = orte_rml.send_nb(
|
||||||
orte_iof_base.iof_service,
|
orte_iof_base.iof_service,
|
||||||
@ -448,8 +457,6 @@ int orte_iof_base_endpoint_delete(
|
|||||||
|
|
||||||
void orte_iof_base_endpoint_closed(orte_iof_base_endpoint_t* endpoint)
|
void orte_iof_base_endpoint_closed(orte_iof_base_endpoint_t* endpoint)
|
||||||
{
|
{
|
||||||
opal_list_item_t* item;
|
|
||||||
|
|
||||||
/* Special case: if we're a sink and one of the special streams
|
/* Special case: if we're a sink and one of the special streams
|
||||||
(stdout or stderr), don't close anything because we don't want
|
(stdout or stderr), don't close anything because we don't want
|
||||||
to *actually* close stdout or stderr just because a remote
|
to *actually* close stdout or stderr just because a remote
|
||||||
@ -477,12 +484,6 @@ void orte_iof_base_endpoint_closed(orte_iof_base_endpoint_t* endpoint)
|
|||||||
/* close associated file descriptor */
|
/* close associated file descriptor */
|
||||||
close(endpoint->ep_fd);
|
close(endpoint->ep_fd);
|
||||||
endpoint->ep_fd = -1;
|
endpoint->ep_fd = -1;
|
||||||
|
|
||||||
/* Can't complete any pending operations so cleanup all datastructures */
|
|
||||||
endpoint->ep_ack = endpoint->ep_seq;
|
|
||||||
while(NULL != (item = opal_list_remove_first(&endpoint->ep_frags))) {
|
|
||||||
ORTE_IOF_BASE_FRAG_RETURN(item)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user