1
1

Add a bunch more [conditional] debugging output.

This commit was SVN r15643.
Этот коммит содержится в:
Jeff Squyres 2007-07-26 18:46:46 +00:00
родитель 60df8be1a7
Коммит 8e9c71282d

@ -180,6 +180,7 @@ static void orte_iof_base_endpoint_read_handler(int fd, short flags, void *cbdat
} }
/* Error on the connection */ /* Error on the connection */
opal_output(orte_iof_base.iof_output, "iof_base_endpoint: read handler, error on read");
orte_iof_base_endpoint_closed(endpoint); orte_iof_base_endpoint_closed(endpoint);
/* Fall through to send 0 byte message to other side /* Fall through to send 0 byte message to other side
indicating that the endpoint is now closed. */ indicating that the endpoint is now closed. */
@ -188,6 +189,7 @@ static void orte_iof_base_endpoint_read_handler(int fd, short flags, void *cbdat
/* peer has closed connection (will fall through to send a 0 /* peer has closed connection (will fall through to send a 0
byte message, therefore telling the RML side that the fd byte message, therefore telling the RML side that the fd
side has closed its connection) */ side has closed its connection) */
opal_output(orte_iof_base.iof_output, "iof_base_endpoint: read handler, peer closed fd");
orte_iof_base_endpoint_closed(endpoint); orte_iof_base_endpoint_closed(endpoint);
} }
@ -212,7 +214,7 @@ static void orte_iof_base_endpoint_read_handler(int fd, short flags, void *cbdat
/* if window size has been exceeded - disable forwarding */ /* if window size has been exceeded - disable forwarding */
endpoint->ep_seq += frag->frag_len; endpoint->ep_seq += frag->frag_len;
if(ORTE_IOF_BASE_SEQDIFF(endpoint->ep_seq,endpoint->ep_ack) > orte_iof_base.iof_window_size) { if (ORTE_IOF_BASE_SEQDIFF(endpoint->ep_seq,endpoint->ep_ack) > orte_iof_base.iof_window_size) {
opal_output(orte_iof_base.iof_output, "iof_base_endpoint read handler: window exceeded -- reading disabled"); opal_output(orte_iof_base.iof_output, "iof_base_endpoint read handler: window exceeded -- reading disabled");
opal_event_del(&endpoint->ep_event); opal_event_del(&endpoint->ep_event);
} }
@ -223,6 +225,7 @@ static void orte_iof_base_endpoint_read_handler(int fd, short flags, void *cbdat
OBJ_RETAIN(endpoint); OBJ_RETAIN(endpoint);
/* start non-blocking RML call to forward received data */ /* start non-blocking RML call to forward received data */
opal_output(orte_iof_base.iof_output, "iof_base_endpoint read handler: sending data to svc");
rc = orte_rml.send_nb( rc = orte_rml.send_nb(
orte_iof_base.iof_service, orte_iof_base.iof_service,
frag->frag_iov, frag->frag_iov,
@ -254,6 +257,7 @@ static void orte_iof_base_endpoint_write_handler(int sd, short flags, void *user
/* close connection on zero byte message */ /* close connection on zero byte message */
if(frag->frag_len == 0) { if(frag->frag_len == 0) {
opal_output(orte_iof_base.iof_output, "iof_base_endpoint: write handler, peer closed fd");
orte_iof_base_endpoint_closed(endpoint); orte_iof_base_endpoint_closed(endpoint);
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock); OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
return; return;
@ -272,6 +276,7 @@ static void orte_iof_base_endpoint_write_handler(int sd, short flags, void *user
/* All other errors -- to include sigpipe -- mean that /* All other errors -- to include sigpipe -- mean that
Something Bad happened and we should abort in Something Bad happened and we should abort in
despair. */ despair. */
opal_output(orte_iof_base.iof_output, "iof_base_endpoint: write handler, error on fd");
orte_iof_base_endpoint_closed(endpoint); orte_iof_base_endpoint_closed(endpoint);
/* Send a ACK-AND-CLOSE back to the service so that it /* Send a ACK-AND-CLOSE back to the service so that it
@ -515,6 +520,10 @@ void orte_iof_base_endpoint_closed(orte_iof_base_endpoint_t* endpoint)
written down the fd (because the process on the other side of written down the fd (because the process on the other side of
the fd is no longer there -- we're just about to close the the fd is no longer there -- we're just about to close the
fd). */ fd). */
opal_output(orte_iof_base.iof_output,
"orte_iof_base_endpoint_closed: mode %s, origin [%ld,%ld,%ld], tag %d",
(ORTE_IOF_SOURCE == endpoint->ep_mode) ? "SOURCE" : "SINK",
ORTE_NAME_ARGS(&endpoint->ep_origin), endpoint->ep_tag);
if (ORTE_IOF_SINK == endpoint->ep_mode) { if (ORTE_IOF_SINK == endpoint->ep_mode) {
while (NULL != opal_list_remove_first(&(endpoint->ep_sink_frags))){ while (NULL != opal_list_remove_first(&(endpoint->ep_sink_frags))){
continue; continue;
@ -629,6 +638,7 @@ int orte_iof_base_endpoint_forward(
(ACKs are based on fragment length; an ACK of 0 (ACKs are based on fragment length; an ACK of 0
bytes would do nothing) */ bytes would do nothing) */
ORTE_IOF_BASE_FRAG_RETURN(frag); ORTE_IOF_BASE_FRAG_RETURN(frag);
opal_output(orte_iof_base.iof_output, "iof_base_endpoint: forward: peer closed fd");
orte_iof_base_endpoint_closed(endpoint); orte_iof_base_endpoint_closed(endpoint);
OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock); OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock);
return ORTE_SUCCESS; return ORTE_SUCCESS;
@ -636,6 +646,7 @@ int orte_iof_base_endpoint_forward(
rc = write(endpoint->ep_fd,data,len); rc = write(endpoint->ep_fd,data,len);
if(rc < 0) { if(rc < 0) {
if (errno != EAGAIN && errno != EINTR) { if (errno != EAGAIN && errno != EINTR) {
opal_output(orte_iof_base.iof_output, "iof_base_endpoint: forward: write error");
orte_iof_base_endpoint_closed(endpoint); orte_iof_base_endpoint_closed(endpoint);
/* Send a ACK-AND-CLOSE back to the service so /* Send a ACK-AND-CLOSE back to the service so