Boost logo

Boost Users :

From: Raúl Huertas (raulh39_at_[hidden])
Date: 2006-09-20 15:18:23


Pavel Syomin escribió:
> ...
> (gdb) run
> Starting program: /home/syomin/boost-test
> [Thread debugging using libthread_db enabled]
> [New Thread 1076168384 (LWP 11562)]
>
> [There I press Ctrl+C]
>
> Program received signal SIGINT, Interrupt.
> [Switching to Thread 1076168384 (LWP 11562)]
> 0xffffe410 in __kernel_vsyscall ()
> (gdb) bt
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0x4013028e in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0
> #2 0x4012d040 in _L_mutex_lock_34 () from /lib/tls/libpthread.so.0
> #3 0x4000ce90 in _dl_runtime_resolve () from /lib/ld-linux.so.2
> #4 0x0804a7e7 in scoped_lock (this=0x804c5d4, m=@0x4024d8a0)
> at lwm_pthreads.hpp:73
> #5 0x0804a7e7 in scoped_lock (this=0xbfffdeb0, m=@0x804c5d4)
> at lwm_pthreads.hpp:73
>

That's weird.
It seems that the library has created two mutex and it is blocked in one
of them.

Can you try this program?:
--------------<cut>------
/*
g++ mux_bloq.cc -o mux_bloq -pthread
*/

#include <pthread.h>

int main()
{
    pthread_mutex_t m1;
    pthread_mutex_t m2;

    pthread_mutex_init(&m1, 0);
    pthread_mutex_init(&m2, 0);

    pthread_mutex_lock(&m1);
    pthread_mutex_lock(&m2);
}
----------------<end cut>-----------

As you can see, this program should not hang. It tries to simulate
what's going on in the program you e-mail.

If it hangs, then the problem is in your SUSE.

If it doesn't hang then... well, then I don't know. ;) Sorry.

Hope it helps,
Raul.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net