First Last Prev Next    No search results available
Details
: ACE_Dev_Poll_Reactor : Sigfault on multithreading
Bug#: 2740
: ACE
: ACE Core
Status: RESOLVED
Resolution: FIXED
: x86
: Linux
: 5.5.4
: P3
: normal
: ---

:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: paolo volpi <paolo.volpi@tvblob.com>
Assigned To: DOC Center Support List (internal) <tao-support@dre.vanderbilt.edu>
:

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2006-12-05 09:29
I've written an example composed by a simple echo server and a client app 
that create 2000 connection on that server and start to send messages and 
waiting echo responses. If I kill the client and restart it several times,
the server receives a sigfault. This event happen only if the reactor loop
is runned by more than one thread (with only one thread the server never
sigfault, i've tested it for 48 hours coninously with a script that launch
the client app and kill it after a random time)
Below the code and gdb core-dump inspection:


REPEAT BY:

#include <ace/Reactor.h>
#include <ace/Dev_Poll_Reactor.h>
#include <ace/Connector.h>
#include <ace/SOCK_Connector.h>
#include <ace/Acceptor.h>
#include <ace/SOCK_Acceptor.h>
#include <ace/Svc_Handler.h>

const ACE_Time_Value MAX_CLIENT_TIMEOUT(30);  // 30 secs

class ClientSvcHandler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>
{
public:
    int open(void* factory);
    int handle_input(ACE_HANDLE handle = ACE_INVALID_HANDLE);
    int handle_timeout(const ACE_Time_Value &now, const void *act = 0);
    int handle_close(ACE_HANDLE handle = ACE_INVALID_HANDLE, ACE_Reactor_Mask
mask = 0);

protected:
    ACE_Thread_Mutex m_mtx;
    unsigned long m_clTimeOut;
};

class ServerSvcHandler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>
{
public:
    int handle_input(ACE_HANDLE handle = ACE_INVALID_HANDLE);
    int handle_close(ACE_HANDLE handle = ACE_INVALID_HANDLE, ACE_Reactor_Mask
mask = 0);

protected:
    ACE_Thread_Mutex m_mtx;
};

int
ClientSvcHandler::open(void* factory)
{
    if (ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>::open(factory) == 0)
    {
        m_clTimeOut = reactor()->schedule_timer(this, NULL, MAX_CLIENT_TIMEOUT);

        char buffer[] = "1234567890123456789012345678901234567890";
        ssize_t len = static_cast<ssize_t>(sizeof(buffer));
        ssize_t sent = this->peer().send_n(buffer, len);
        if (sent != len)
            ACE_ERROR_RETURN((LM_ERROR, "ClientSvcHandler::open[h(%d)] : error
sending bytes on socket %p\n", this->peer().get_handle(), "err"), -1);
        return 0;
    }
    else
        return -1;
}

int
ClientSvcHandler::handle_input(ACE_HANDLE handle)
{
    ACE_DEBUG((LM_TRACE, "ClientSvcHandler::handle_input[h(%d)]\n", handle));

    ACE_GUARD_RETURN(ACE_SYNCH_MUTEX, monitor, m_mtx, -1);

    // Get socket data
    char buffer[ACE_DEFAULT_MAX_SOCKET_BUFSIZ];
    ssize_t bc;
    bc = this->peer().recv(buffer, sizeof(buffer));
    if (bc > 0)
    {
        // Reset Client timeout timer
        this->reactor()->cancel_timer(m_clTimeOut);
        m_clTimeOut = reactor()->schedule_timer(this, NULL, MAX_CLIENT_TIMEOUT);
        ssize_t sent = this->peer().send_n(buffer, bc);
        if (sent != bc)
            ACE_ERROR_RETURN((LM_ERROR, "ClientSvcHandler::handle_input[h(%d)] :
error sending bytes on socket %p\n", handle, "err"), -1);
    }
    else if (bc == 0) // Socket was closed by server
    {
        ACE_ERROR_RETURN((LM_TRACE, "ClientSvcHandler::handle_input[h(%d)] :
socket closed\n", handle), -1);
    }
    else if (errno == EWOULDBLOCK) // no data ready on socket
    {
        ACE_ERROR_RETURN((LM_TRACE, "ClientSvcHandler::handle_input[h(%d)] :
recv no data on socket\n", handle), 0);
    }
    else if (errno == EINTR) // An interrupt was arrived before any data could
be received
    {
        ACE_DEBUG((LM_TRACE, "ClientSvcHandler::handle_input[h(%d)] : recv
Interrupted\n", handle));
        // return 0 so the handler will be rescheduled
        return 0;
    }
    else
        ACE_ERROR_RETURN((LM_ERROR, "SkEvtHandler::handle_input[h(%d)] : recv
%p\n", handle, "err"), -1);

    return 0;
}

int
ClientSvcHandler::handle_timeout(const ACE_Time_Value &now, const void* act)
{
    ACE_GUARD_RETURN(ACE_SYNCH_MUTEX, monitor, m_mtx, -1);

    ACE_UNUSED_ARG(now);
    ACE_UNUSED_ARG(act);

    ACE_DEBUG((LM_TRACE, "ClientSvcHandler::handle_timeout[h(%d)]\n",
this->peer().get_handle()));
    reactor()->remove_handler(this, ACE_Event_Handler::ALL_EVENTS_MASK);

    return 0;
}

int
ClientSvcHandler::handle_close(ACE_HANDLE handle, ACE_Reactor_Mask mask)
{
    ACE_DEBUG((LM_TRACE, "ClientSvcHandler::handle_close[h(%d)]\n", handle));
    return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>::handle_close(handle,
mask);
}

int
ServerSvcHandler::handle_input(ACE_HANDLE handle)
{
    ACE_DEBUG((LM_TRACE, "ServerSvcHandler::handle_input[h(%d)]\n", handle));

    ACE_GUARD_RETURN(ACE_SYNCH_MUTEX, monitor, m_mtx, -1);

    // Get socket data
    char buffer[ACE_DEFAULT_MAX_SOCKET_BUFSIZ];
    ssize_t bc;
    bc = this->peer().recv(buffer, sizeof(buffer));
    if (bc > 0)
    {
        ssize_t sent = this->peer().send_n(buffer, bc);
        if (sent != bc)
            ACE_ERROR_RETURN((LM_ERROR, "ServerSvcHandler::handle_input[h(%d)] :
error sending bytes on socket %p\n", handle, "err"), -1);
    }
    else if (bc == 0) // Socket was closed by client
    {
        ACE_ERROR_RETURN((LM_TRACE, "ServerSvcHandler::handle_input[h(%d)] :
socket closed\n", handle), -1);
    }
    else if (errno == EWOULDBLOCK) // no data ready on socket
    {
        ACE_ERROR_RETURN((LM_TRACE, "ServerSvcHandler::handle_input[h(%d)] :
recv no data on socket\n", handle), 0);
    }
    else if (errno == EINTR) // An interrupt was arrived before any data could
be received
    {
        ACE_DEBUG((LM_TRACE, "ServerSvcHandler::handle_input[h(%d)] : recv
Interrupted\n", handle));
        // return 0 so the handler will be rescheduled
        return 0;
    }
    else
        ACE_ERROR_RETURN((LM_ERROR, "ServerSvcHandler::handle_input[h(%d)] :
recv %p\n", handle, "err"), -1);

    return 0;
}

int
ServerSvcHandler::handle_close(ACE_HANDLE handle, ACE_Reactor_Mask mask)
{
    ACE_DEBUG((LM_TRACE, "ServerSvcHandler::handle_close[h(%d)]\n", handle));
    return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>::handle_close(handle,
mask);
}


ACE_THR_FUNC_RETURN
event_loop(void *arg)
{
    ACE_Reactor *reactor = ACE_static_cast(ACE_Reactor*, arg);

    reactor->run_reactor_event_loop();

    ACE_ERROR((LM_ERROR, "event_loop exit\n"));
    return 0;
}

int main(int argc, char* argv[])
{
    ACE_Dev_Poll_Reactor* rctImpl(new ACE_Dev_Poll_Reactor);
    delete ACE_Reactor::instance(new ACE_Reactor(rctImpl));
    ACE_Thread_Manager thManager;

    if (std::strcmp(argv[1], "client") == 0)
    {
        ACE_Connector<ClientSvcHandler, ACE_SOCK_Connector>
connector(ACE_Reactor::instance(), ACE_NONBLOCK);
        ACE_SOCK_Connector::PEER_ADDR server_addr;
        server_addr.set(5220, "192.168.72.18");

        ACE_Reactor::instance()->open(30000);
        thManager.spawn_n(10, event_loop, ACE_Reactor::instance());

        for(unsigned long i=0; i<2000; ++i)
        {
            ClientSvcHandler* pEvtHandler(NULL);
            ACE_ASSERT(pEvtHandler == NULL);
            connector.connect(pEvtHandler, server_addr);
            usleep(1000);
        }

        ACE_DEBUG((LM_INFO, "All client connected\n"));
        for(;;)
            sleep(5);
    }
    else
    {
        ACE_Acceptor<ServerSvcHandler, ACE_SOCK_Acceptor>
acceptor(ACE_Reactor::instance(), ACE_NONBLOCK);
        ACE_SOCK_Acceptor::PEER_ADDR server_addr;

        server_addr.set(5220, "192.168.72.18");

        acceptor.open(server_addr);
        ACE_Reactor::instance()->open(30000);
        thManager.spawn_n(10, event_loop, ACE_Reactor::instance());

        ACE_DEBUG((LM_INFO, "server started\n"));
        for(;;)
            sleep(5);
    }

    return 0;
}

gdb call stack:
thread 1:
#0  0x00000000 in ?? ()
#1  0xb7e47bef in ACE_Dev_Poll_Reactor::dispatch_io_event (this=0x8056580,
guard=@0xb70953a4)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Dev_Poll_Reactor.inl:180
#2  0xb7e47d7c in ACE_Dev_Poll_Reactor::dispatch (this=0x8056580,
guard=@0xb70953a4) at Dev_Poll_Reactor.cpp:1243
#3  0xb7e47e96 in ACE_Dev_Poll_Reactor::handle_events_i (this=0x8056580,
max_wait_time=0x0, guard=@0xb70953a4)
    at Dev_Poll_Reactor.cpp:1217
#4  0xb7e47f61 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1172
#5  0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#6  0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#7  0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805db48) at
Thread_Adapter.cpp:146
#8  0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805db48) at
Thread_Adapter.cpp:95
#9  0xb7e2cf41 in ace_thread_adapter (args=0x805db48) at Base_Thread_Adapter.cpp:116
#10 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#11 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 2:
#0  0xb7d7ac01 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb7e355dc in ACE_Condition_Thread_Mutex::wait (this=0xb30952d0, mutex=@0x0,
abstime=0x0)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/OS_NS_Thread.inl:410
#2  0xb7e3561b in ACE_Condition_Thread_Mutex::wait (this=0xb30952d0,
abstime=0x0) at Condition_Thread_Mutex.cpp:107
#3  0xb7ea74b5 in ACE_Token::shared_acquire (this=0x80565a0,
    sleep_hook_func=0xb7e449b0 <(anonymous
namespace)::polite_sleep_hook(void*)>, arg=0x0, timeout=0x0,
    op_type=ACE_Token::READ_TOKEN) at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:130
#4  0xb7e459ce in ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly
(this=0xb30953a4, max_wait=0x0)
    at /home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:91
#5  0xb7e47f01 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1160
#6  0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#7  0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#8  0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805dd18) at
Thread_Adapter.cpp:146
#9  0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805dd18) at
Thread_Adapter.cpp:95
#10 0xb7e2cf41 in ace_thread_adapter (args=0x805dd18) at Base_Thread_Adapter.cpp:116
#11 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#12 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 3:
#0  0xb7d7ac01 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb7e355dc in ACE_Condition_Thread_Mutex::wait (this=0xb3895240, mutex=@0x0,
abstime=0x0)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/OS_NS_Thread.inl:410
#2  0xb7e3561b in ACE_Condition_Thread_Mutex::wait (this=0xb3895240,
abstime=0x0) at Condition_Thread_Mutex.cpp:107
#3  0xb7ea74b5 in ACE_Token::shared_acquire (this=0x80565a0, sleep_hook_func=0,
arg=0x0, timeout=0x0,
    op_type=ACE_Token::WRITE_TOKEN) at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:130
#4  0xb7ea76c9 in ACE_Token::acquire (this=0x80565a0, timeout=0x0) at Token.cpp:341
#5  0xb7e47943 in ACE_Dev_Poll_Reactor::remove_handler (this=0x8056580,
handle=380, mask=1)
    at /home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Guard_T.inl:12
#6  0xb7e47c15 in ACE_Dev_Poll_Reactor::dispatch_io_event (this=0x8056580,
guard=@0xb38953a4) at Dev_Poll_Reactor.cpp:1453
#7  0xb7e47d7c in ACE_Dev_Poll_Reactor::dispatch (this=0x8056580,
guard=@0xb38953a4) at Dev_Poll_Reactor.cpp:1243
#8  0xb7e47e96 in ACE_Dev_Poll_Reactor::handle_events_i (this=0x8056580,
max_wait_time=0x0, guard=@0xb38953a4)
    at Dev_Poll_Reactor.cpp:1217
#9  0xb7e47f61 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1172
#10 0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#11 0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#12 0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805e1a0) at
Thread_Adapter.cpp:146
#13 0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805e1a0) at
Thread_Adapter.cpp:95
#14 0xb7e2cf41 in ace_thread_adapter (args=0x805e1a0) at Base_Thread_Adapter.cpp:116
#15 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#16 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 4:
#0  0xb7d7ac01 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb7e355dc in ACE_Condition_Thread_Mutex::wait (this=0xb40952d0, mutex=@0x0,
abstime=0x0)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/OS_NS_Thread.inl:410
#2  0xb7e3561b in ACE_Condition_Thread_Mutex::wait (this=0xb40952d0,
abstime=0x0) at Condition_Thread_Mutex.cpp:107
#3  0xb7ea74b5 in ACE_Token::shared_acquire (this=0x80565a0,
    sleep_hook_func=0xb7e449b0 <(anonymous
namespace)::polite_sleep_hook(void*)>, arg=0x0, timeout=0x0,
    op_type=ACE_Token::READ_TOKEN) at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:130
#4  0xb7e459ce in ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly
(this=0xb40953a4, max_wait=0x0)
    at /home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:91
#5  0xb7e47f01 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1160
#6  0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#7  0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#8  0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805e0b8) at
Thread_Adapter.cpp:146
#9  0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805e0b8) at
Thread_Adapter.cpp:95
#10 0xb7e2cf41 in ace_thread_adapter (args=0x805e0b8) at Base_Thread_Adapter.cpp:116
#11 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#12 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 5:
#0  0xb7d7ac01 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb7e355dc in ACE_Condition_Thread_Mutex::wait (this=0xb48952d0, mutex=@0x0,
abstime=0x0)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/OS_NS_Thread.inl:410
#2  0xb7e3561b in ACE_Condition_Thread_Mutex::wait (this=0xb48952d0,
abstime=0x0) at Condition_Thread_Mutex.cpp:107
#3  0xb7ea74b5 in ACE_Token::shared_acquire (this=0x80565a0,
    sleep_hook_func=0xb7e449b0 <(anonymous
namespace)::polite_sleep_hook(void*)>, arg=0x0, timeout=0x0,
    op_type=ACE_Token::READ_TOKEN) at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:130
#4  0xb7e459ce in ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly
(this=0xb48953a4, max_wait=0x0)
    at /home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:91
#5  0xb7e47f01 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1160
#6  0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#7  0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#8  0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805dfd0) at
Thread_Adapter.cpp:146
#9  0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805dfd0) at
Thread_Adapter.cpp:95
#10 0xb7e2cf41 in ace_thread_adapter (args=0x805dfd0) at Base_Thread_Adapter.cpp:116
#11 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#12 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 6:
#0  0xb7d7ac01 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb7e355dc in ACE_Condition_Thread_Mutex::wait (this=0xb50952d0, mutex=@0x0,
abstime=0x0)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/OS_NS_Thread.inl:410
#2  0xb7e3561b in ACE_Condition_Thread_Mutex::wait (this=0xb50952d0,
abstime=0x0) at Condition_Thread_Mutex.cpp:107
#3  0xb7ea74b5 in ACE_Token::shared_acquire (this=0x80565a0,
    sleep_hook_func=0xb7e449b0 <(anonymous
namespace)::polite_sleep_hook(void*)>, arg=0x0, timeout=0x0,
    op_type=ACE_Token::READ_TOKEN) at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:130
#4  0xb7e459ce in ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly
(this=0xb50953a4, max_wait=0x0)
    at /home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:91
#5  0xb7e47f01 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1160
#6  0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#7  0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#8  0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805dee8) at
Thread_Adapter.cpp:146
#9  0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805dee8) at
Thread_Adapter.cpp:95
#10 0xb7e2cf41 in ace_thread_adapter (args=0x805dee8) at Base_Thread_Adapter.cpp:116
#11 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#12 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 7:
#0  0xb7d7ac01 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb7e355dc in ACE_Condition_Thread_Mutex::wait (this=0xb58952d0, mutex=@0x0,
abstime=0x0)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/OS_NS_Thread.inl:410
#2  0xb7e3561b in ACE_Condition_Thread_Mutex::wait (this=0xb58952d0,
abstime=0x0) at Condition_Thread_Mutex.cpp:107
#3  0xb7ea74b5 in ACE_Token::shared_acquire (this=0x80565a0,
    sleep_hook_func=0xb7e449b0 <(anonymous
namespace)::polite_sleep_hook(void*)>, arg=0x0, timeout=0x0,
    op_type=ACE_Token::READ_TOKEN) at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:130
#4  0xb7e459ce in ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly
(this=0xb58953a4, max_wait=0x0)
    at /home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:91
#5  0xb7e47f01 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1160
#6  0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#7  0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#8  0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805de00) at
Thread_Adapter.cpp:146
#9  0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805de00) at
Thread_Adapter.cpp:95
#10 0xb7e2cf41 in ace_thread_adapter (args=0x805de00) at Base_Thread_Adapter.cpp:116
#11 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#12 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 8:
#0  0xb7d7ac01 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb7e355dc in ACE_Condition_Thread_Mutex::wait (this=0xb58952d0, mutex=@0x0,
abstime=0x0)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/OS_NS_Thread.inl:410
#2  0xb7e3561b in ACE_Condition_Thread_Mutex::wait (this=0xb58952d0,
abstime=0x0) at Condition_Thread_Mutex.cpp:107
#3  0xb7ea74b5 in ACE_Token::shared_acquire (this=0x80565a0,
    sleep_hook_func=0xb7e449b0 <(anonymous
namespace)::polite_sleep_hook(void*)>, arg=0x0, timeout=0x0,
    op_type=ACE_Token::READ_TOKEN) at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:130
#4  0xb7e459ce in ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly
(this=0xb58953a4, max_wait=0x0)
    at /home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:91
#5  0xb7e47f01 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1160
#6  0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#7  0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#8  0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805de00) at
Thread_Adapter.cpp:146
#9  0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805de00) at
Thread_Adapter.cpp:95
#10 0xb7e2cf41 in ace_thread_adapter (args=0x805de00) at Base_Thread_Adapter.cpp:116
#11 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#12 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 9:
#0  0xb7d7ac01 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb7e355dc in ACE_Condition_Thread_Mutex::wait (this=0xb68952d0, mutex=@0x0,
abstime=0x0)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/OS_NS_Thread.inl:410
#2  0xb7e3561b in ACE_Condition_Thread_Mutex::wait (this=0xb68952d0,
abstime=0x0) at Condition_Thread_Mutex.cpp:107
#3  0xb7ea74b5 in ACE_Token::shared_acquire (this=0x80565a0,
    sleep_hook_func=0xb7e449b0 <(anonymous
namespace)::polite_sleep_hook(void*)>, arg=0x0, timeout=0x0,
    op_type=ACE_Token::READ_TOKEN) at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:130
#4  0xb7e459ce in ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly
(this=0xb68953a4, max_wait=0x0)
    at /home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:91
#5  0xb7e47f01 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1160
#6  0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#7  0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#8  0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805dc30) at
Thread_Adapter.cpp:146
#9  0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805dc30) at
Thread_Adapter.cpp:95
#10 0xb7e2cf41 in ace_thread_adapter (args=0x805dc30) at Base_Thread_Adapter.cpp:116
#11 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#12 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 10:
#0  0xb7d7ac01 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb7e355dc in ACE_Condition_Thread_Mutex::wait (this=0xb78952d0, mutex=@0x0,
abstime=0x0)
    at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/OS_NS_Thread.inl:410
#2  0xb7e3561b in ACE_Condition_Thread_Mutex::wait (this=0xb78952d0,
abstime=0x0) at Condition_Thread_Mutex.cpp:107
#3  0xb7ea74b5 in ACE_Token::shared_acquire (this=0x80565a0,
    sleep_hook_func=0xb7e449b0 <(anonymous
namespace)::polite_sleep_hook(void*)>, arg=0x0, timeout=0x0,
    op_type=ACE_Token::READ_TOKEN) at
/home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:130
#4  0xb7e459ce in ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly
(this=0xb78953a4, max_wait=0x0)
    at /home/volpi/backend3/backend/extlibs/ACE_wrappers-5.5.4/ace/Token.inl:91
#5  0xb7e47f01 in ACE_Dev_Poll_Reactor::handle_events (this=0x8056580,
max_wait_time=0x0) at Dev_Poll_Reactor.cpp:1160
#6  0xb7e87ae2 in ACE_Reactor::run_reactor_event_loop (this=0x805c8d8, eh=0) at
Reactor.cpp:233
#7  0x0804abe7 in event_loop (arg=0x805c8d8) at epoll_test.cpp:175
#8  0xb7e9f808 in ACE_Thread_Adapter::invoke_i (this=0x805da60) at
Thread_Adapter.cpp:146
#9  0xb7e9f9d6 in ACE_Thread_Adapter::invoke (this=0x805da60) at
Thread_Adapter.cpp:95
#10 0xb7e2cf41 in ace_thread_adapter (args=0x805da60) at Base_Thread_Adapter.cpp:116
#11 0xb7d780bd in start_thread () from /lib/tls/libpthread.so.0
#12 0xb7b9d92e in clone () from /lib/tls/libc.so.6

thread 11:
#0  0xb7b5ffac in nanosleep () from /lib/tls/libc.so.6
#1  0xb7b5fdde in sleep () from /lib/tls/libc.so.6
#2  0x0804b1ac in main (argc=3, argv=0x235f4934) at epoll_test.cpp:243
------- Comment #1 From Steve Huston 2009-05-29 10:59:13 -------
Mine. I have added Bug_2740_Regression_Test using the reported test case as a
start. It doesn't always crash but does show (at least sometimes) a bad handle
being read from.
------- Comment #2 From Steve Huston 2009-06-11 20:25:11 -------
Fixed: Fri Jun 12 00:45:09 UTC 2009  Steve Huston  <shuston@riverace.com>

First Last Prev Next    No search results available