This is a discussion on singal get lost while shuting down Apache within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi everyone. I'm developing an Apache 2.0.52 module that executed on Linux 2.4.9-e.3smp. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi everyone.
I'm developing an Apache 2.0.52 module that executed on Linux 2.4.9-e.3smp. The module starts a new thread for each child process that does some work and then waits on a condition variable for a signal. The signal is sent when the Apache calls the callback method for the destruction of the pool on the child process. >From some reason the signal gets lost, and the thread does not exit cleanly, which causes the Apache to generate the following core dump for each child process: #0 0x4011ed87 in pthread_mutex_lock () from /lib/libpthread.so.0 #1 0x4022b4b8 in free () from /lib/libc.so.6 #2 0x4010f6e9 in apr_allocator_destroy (allocator=0x811f080) at apr_pools.c:109 #3 0x40110241 in apr_pool_destroy (pool=0x8169228) at apr_pools.c:780 #4 0x0807f40c in clean_child_exit (code=0) at prefork.c:192 #5 0x401213fb in sigaction () from /lib/libpthread.so.0 #6 0x401d8a28 in killpg () from /lib/libc.so.6 #7 0x40120c19 in pthread_kill_other_threads_np () from /lib/libpthread.so.0 #8 0x4011cddc in pthread_cond_wait () from /lib/libpthread.so.0 #9 0x4035fc11 in ot::ConditionVariable::wait(ot::RecursiveMutex&) ( this=0x811f114, mutex=@0x811f0f4) at base/ConditionVariable.cpp:174 #10 0x40033976 in ChukuThread::run() (this=0x811f128) at ContextPerServer.cpp:43 #11 0x4036705a in ot::Thread::doRun() (this=0x811f128) at base/Thread.cpp:211 #12 0x40366eae in OpenTopThreadFunc (pArg=0x811f128) at base/Thread.cpp:190 #13 0x4011dfaf in pthread_exit () from /lib/libpthread.so.0 I'd be glad if someone could help me with ideas how to signal the waiting thread, or find another way to kill it. Thanks, Yaron. |
|
|||
|
steingold@gmail.com wrote:
> Hi everyone. > I'm developing an Apache 2.0.52 module that executed on Linux > 2.4.9-e.3smp. > The module starts a new thread for each child process that does some > work Apache uses APR threads. Running threads other than through APR in your module is going to need lots of care (on linux, APR threads are implemented using pthreads). > and then waits on a condition variable for a signal. The signal is What signal? Not one of the signals Apache uses itself? > I'd be glad if someone could help me with ideas how to signal the > waiting thread, or find another way to kill it. Use APR threads. Get cross-platform portability for free! -- Nick Kew |
|
|||
|
Nick Kew wrote:
> steingold@gmail.com wrote: > > Hi everyone. > > I'm developing an Apache 2.0.52 module that executed on Linux > > 2.4.9-e.3smp. > > The module starts a new thread for each child process that does some > > work > > Apache uses APR threads. Running threads other than through APR in > your module is going to need lots of care (on linux, APR threads are > implemented using pthreads). > > > and then waits on a condition variable for a signal. The signal is > > What signal? Not one of the signals Apache uses itself? > > > I'd be glad if someone could help me with ideas how to signal the > > waiting thread, or find another way to kill it. > > Use APR threads. Get cross-platform portability for free! > > -- > Nick Kew I've also tried using the APR signals, mutexes and threads but the signal still gets lost. I used the APR's apr_thread_cond_signal function that does not have a signal number as a parameter. the functions I used were : apr_thread_cond_create apr_thread_mutex_create apr_thread_create apr_thread_cond_wait Yaron |
| Thread Tools | |
| Display Modes | |
|
|