From 259b2d9c354fe022608da7137b9c0c9af692206a Mon Sep 17 00:00:00 2001 From: Tim Prins Date: Fri, 6 Aug 2004 19:12:26 +0000 Subject: [PATCH] A temporary workaround to avoid segfaults when the tcp oob is cleaning up. This simply removes the event handler deletions from the clean up code. This commit was SVN r1929. --- src/mca/oob/tcp/oob_tcp.c | 4 +++- src/mca/oob/tcp/oob_tcp_peer.c | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/mca/oob/tcp/oob_tcp.c b/src/mca/oob/tcp/oob_tcp.c index 734f27a824..0249707c0d 100644 --- a/src/mca/oob/tcp/oob_tcp.c +++ b/src/mca/oob/tcp/oob_tcp.c @@ -315,7 +315,9 @@ int mca_oob_tcp_finalize(void) "mca_oob_tcp_finalize: setsockopt(SO_REUSEADDR) failed with errno=%d\n", errno); } - ompi_event_del(&mca_oob_tcp_component.tcp_recv_event); + /*** temporarily disable the removal of the revieve event + * to prevent segfaults + * ompi_event_del(&mca_oob_tcp_component.tcp_recv_event); */ if(0 != close(mca_oob_tcp_component.tcp_listen_sd)) { ompi_output(0, "mca_oob_tcp_finalize: error closing listen socket. errno=%d", errno); } diff --git a/src/mca/oob/tcp/oob_tcp_peer.c b/src/mca/oob/tcp/oob_tcp_peer.c index a5c5a6c811..d473821673 100644 --- a/src/mca/oob/tcp/oob_tcp_peer.c +++ b/src/mca/oob/tcp/oob_tcp_peer.c @@ -55,7 +55,14 @@ static void mca_oob_tcp_peer_construct(mca_oob_tcp_peer_t* peer) */ static void mca_oob_tcp_peer_destruct(mca_oob_tcp_peer_t * peer) { - mca_oob_tcp_peer_close(peer); + /* temporarily not delete the events to prevent segfaults + * mca_oob_tcp_peer_close(peer); */ + if(peer->peer_state != MCA_OOB_TCP_CLOSED && + peer->peer_sd >= 0) { + ompi_event_del(&peer->peer_send_event); + close(peer->peer_sd); + peer->peer_sd = -1; + } OBJ_DESTRUCT(&(peer->peer_send_queue)); OBJ_DESTRUCT(&(peer->peer_lock)); }