pthread_mutex_lock fails

pthread_mutex_lock fails

Post by satish » Thu, 01 Mar 2001 20:19:37



Hi ,

    what could be the cause of assert(pthread_mutex_lock(&mutex)==0));
The initialization is proper.

Thanx

 
 
 

pthread_mutex_lock fails

Post by jmvdval » Thu, 01 Mar 2001 22:51:56


I suppose this is your statement:

if (assert(pthread_mutex_lock(&mutex)==0));
  stuff_to_do_if_lock_fails;

Lose the first semicolon.

** Jan Maarten



Quote:> Hi ,

>     what could be the cause of assert(pthread_mutex_lock(&mutex)==0));
> The initialization is proper.

> Thanx


 
 
 

1. SIGSEGV in pthread_mutex_lock in RedHat 7.2 gcc 2.95.3

Complete error message and backtrace is below

I'm porting a working program from Linux 8.0 and have a case where
propagating an exception that is covered by a try {} catch{}
a couple of levels up the stack leads to the mentioned SIGSEGV.
This is on RedHat Linux 7.2 on IBM zSeries.

I also have RedHat Linux 7.2 on Intel with gcc 2.96 and this
works correctly.

Any ideas? Might this be the compiler?

Jim
____________________________________________________________________
Program received signal SIGSEGV, Segmentation fault.
0x403eb2d6 in __pthread_mutex_lock (mutex=0x410) at mutex.c:99
99      mutex.c: No such file or directory.
         in mutex.c
Current language:  auto; currently c
(gdb) backtrace
#0  0x403eb2d6 in __pthread_mutex_lock (mutex=0x410) at mutex.c:99
#1  0x402da138 in __libc_free (mem=0x410) at malloc.c:3152
#2  0x00410d46 in __builtin_vec_delete (ptr=0x410) at
../../gcc/cp/new2.cc:62
#3  0x00416a36 in SmException::~SmException (this=0x7ffff988,
__in_chrg=2) at src/cpp/SmException_c.h:65
#4  0x0040e19e in main (argc=1, argv=0x7ffffad4) at src/sample/sample.cpp:21

2. beginner needs info

3. why is pthread_mutex_lock a wrapper?

4. x86 boot enhancements, boot bean counting 8/11

5. pthread_mutex_lock() problem

6. DiskSuite Question re: /dev/md/admin

7. thread waiting on pthread_mutex_lock() forever (for mutex of type PTHREAD_MUTEX_ERRORCHECK)

8. CSLIP: fast one-way, slow the other

9. pthread_mutex_lock-dual processor-Address out of bounds

10. pthread_mutex_lock() bug ??

11. pthread_mutex_lock() question

12. crashes from pthread_mutex_lock ()

13. pthread_mutex_lock() causes vfork call?!