bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multi thread libg++ problem


From: News
Subject: multi thread libg++ problem
Date: Tue, 31 Oct 2000 20:53:45 +0100

Hello Folks

We are using gnu compiler and library version 2.7.2 in a multi thread
environment (solarais 2.5.1) and encountered a problem when closing two
fstreams more or less simultanously. From time to time the application just
hangs in _IO_un_link (genops.c). Unfortunately the complete stack trace is
not available at the moment, the trace is saved on a customer machine which
will be down for at least one more week due to internal relocations ...

We also tried run purify on a test application closing streams in two
different threads und got the output given below. But the ABR, FMR errors do
not look really good ...

Maybe someone else is more familiar to the problem and already now what is
wrong or we did wrong. Additionally I should say that upgrading to a newer
version of the library e.g. libg++.so.8.1.0 etc is not a solution to our
problem. We are really stick to this version of the library!!

Thanks in advance!

Regards
Alex

********************************************************************
PS: purify output

> ****  Purify instrumented threadTest (pid 96 at Thu Sep 28 10:29:57 2000)
>   * Purify 5.1 Solaris 2 (32-bit), Copyright (C) 1992-2000 Rational
Software
> Corp. All rights reserved.
>   * For contact information type: "purify -help"
>   * For TTY output, use the option "-windows=no"
>   * Command-line: threadTest
>   * Options settings: -g++=yes -purify -best-effort \
>     -purify-home=/tools/pure/purify -threads=yes -use-internal-locks=yes \
>     -thread_stack_change=0x4000 -mt_safe_malloc=yes
>
> ****  Purify instrumented threadTest (pid 96)  ****
> ABR: Array bounds read (2 times):
>   * This is occurring while in thread 5:
>  _IO_un_link    [genops.c:39]
>  _IO_file_close_it [fileops.c:125]
>  filebuf::close() [filebuf.cc:166]
>  fstreambase::close() [fstream.cc:90]
>  run(void*)     [threadTest.cc:37]
>  THR_Thread::start_routine() [libTHR.so.8.5.1]
>   * Reading 4 bytes from 0x8a938 in the heap.
>   * Address 0x8a938 is 145 bytes past end of a malloc'd block at 0x8a860
of
> 72 bytes.
>   * This block was allocated from:
>  malloc         [rtlib.o]
>  __bUiLtIn_nEw  [libgcc.a]
>  __builtin_new  [rtlib.o]
>  THR_Thread???  [libTHR.so.8.5.1]
>  THR_UnBoundThread??? [libTHR.so.8.5.1]
>  startNewThread() [threadTest.cc:56]
>
> ****  Purify instrumented threadTest (pid 96)  ****
> ABR: Array bounds read (2 times):
>   * This is occurring while in thread 5:
>  _IO_un_link    [genops.c:40]
>  _IO_file_close_it [fileops.c:125]
>  filebuf::close() [filebuf.cc:166]
>  fstreambase::close() [fstream.cc:90]
>  run(void*)     [threadTest.cc:37]
>  THR_Thread::start_routine() [libTHR.so.8.5.1]
>   * Reading 4 bytes from 0x8a938 in the heap.
>   * Address 0x8a938 is 145 bytes past end of a malloc'd block at 0x8a860
of
> 72 bytes.
>   * This block was allocated from:
>  malloc         [rtlib.o]
>  __bUiLtIn_nEw  [libgcc.a]
>  __builtin_new  [rtlib.o]
>  THR_Thread???  [libTHR.so.8.5.1]
>  THR_UnBoundThread??? [libTHR.so.8.5.1]
>  startNewThread() [threadTest.cc:56]
>
> ****  Purify instrumented threadTest (pid 96)  ****
> ABR: Array bounds read (2 times):
>   * This is occurring while in thread 5:
>  _IO_un_link    [genops.c:39]
>  _IO_file_close_it [fileops.c:125]
>  filebuf::close() [filebuf.cc:166]
>  fstreambase::close() [fstream.cc:90]
>  run(void*)     [threadTest.cc:37]
>  THR_Thread::start_routine() [libTHR.so.8.5.1]
>   * Reading 4 bytes from 0x8a938 in the heap.
>   * Address 0x8a938 is 145 bytes past end of a malloc'd block at 0x8a860
of
> 72 bytes.
>   * This block was allocated from:
>  malloc         [rtlib.o]
>  __bUiLtIn_nEw  [libgcc.a]
>  __builtin_new  [rtlib.o]
>  THR_Thread???  [libTHR.so.8.5.1]
>  THR_UnBoundThread??? [libTHR.so.8.5.1]
>  startNewThread() [threadTest.cc:56]
>
> ****  Purify instrumented threadTest (pid 96)  ****
> FMR: Free memory read (720 times):
>   * This is occurring while in thread 8:
>  _IO_un_link    [genops.c:39]
>  _IO_file_close_it [fileops.c:125]
>  filebuf::close() [filebuf.cc:166]
>  fstreambase::close() [fstream.cc:90]
>  run(void*)     [threadTest.cc:37]
>  THR_Thread::start_routine() [libTHR.so.8.5.1]
>   * Reading 4 bytes from 0xe3b28 in the heap.
>   * Address 0xe3b28 is 856 bytes into a freed  block at 0xe37d0 of 8192
> bytes.
>   * This block was allocated from thread 5:
>  malloc         [rtlib.o]
>  _IO_file_doallocate [filedoalloc.c:95]
>  filebuf::doallocate() [filebuf.cc:142]
>  _IO_doallocbuf [genops.c:297]
>  _IO_file_seekoff [fileops.c:404]
>  *unknown func* [pc=0xe3860]
>   * There have been 3146 frees since this block was freed thread 5.
>
> ****  Purify instrumented threadTest (pid 96)  ****
> FMR: Free memory read (717 times):
>   * This is occurring while in thread 8:
>  _IO_un_link    [genops.c:40]
>  _IO_file_close_it [fileops.c:125]
>  filebuf::close() [filebuf.cc:166]
>  fstreambase::close() [fstream.cc:90]
>  run(void*)     [threadTest.cc:37]
>  THR_Thread::start_routine() [libTHR.so.8.5.1]
>   * Reading 4 bytes from 0xe3b28 in the heap.
>   * Address 0xe3b28 is 856 bytes into a freed  block at 0xe37d0 of 8192
> bytes.
>   * This block was allocated from thread 5:
>  malloc         [rtlib.o]
>  _IO_file_doallocate [filedoalloc.c:95]
>  filebuf::doallocate() [filebuf.cc:142]
>  _IO_doallocbuf [genops.c:297]
>  _IO_file_seekoff [fileops.c:404]
>  *unknown func* [pc=0xe3860]
>   * There have been 3146 frees since this block was freed thread 5.
>
> ****  Purify instrumented threadTest (pid 96)  ****
> FMR: Free memory read (721 times):
>   * This is occurring while in thread 8:
>  _IO_un_link    [genops.c:39]
>  _IO_file_close_it [fileops.c:125]
>  filebuf::close() [filebuf.cc:166]
>  fstreambase::close() [fstream.cc:90]
>  run(void*)     [threadTest.cc:37]
>  THR_Thread::start_routine() [libTHR.so.8.5.1]
>   * Reading 4 bytes from 0xe3b28 in the heap.
>   * Address 0xe3b28 is 856 bytes into a freed  block at 0xe37d0 of 8192
> bytes.
>   * This block was allocated from thread 5:
>  malloc         [rtlib.o]
>  _IO_file_doallocate [filedoalloc.c:95]
>  filebuf::doallocate() [filebuf.cc:142]
>  _IO_doallocbuf [genops.c:297]
>  _IO_file_seekoff [fileops.c:404]
>  *unknown func* [pc=0xe3860]
>   * There have been 3146 frees since this block was freed thread 5.
>
> ****  Purify instrumented threadTest (pid 96)  ****
> UMR: Uninitialized memory read (9 times):
>   * This is occurring while in thread 8:
>  _IO_un_link    [genops.c:40]
>  _IO_file_close_it [fileops.c:125]
>  filebuf::close() [filebuf.cc:166]
>  fstreambase::close() [fstream.cc:90]
>  run(void*)     [threadTest.cc:37]
>  THR_Thread::start_routine() [libTHR.so.8.5.1]
>   * Reading 4 bytes from 0xe3b28 in the heap.
>   * Address 0xe3b28 is 856 bytes into a freed  block at 0xe37d0 of 8192
> bytes.
>   * This block was allocated from thread 5:
>  malloc         [rtlib.o]
>  _IO_file_doallocate [filedoalloc.c:95]
>  filebuf::doallocate() [filebuf.cc:142]
>  _IO_doallocbuf [genops.c:297]
>  _IO_file_seekoff [fileops.c:404]
>  *unknown func* [pc=0xe3860]
>   * There have been 3262 frees since this block was freed thread 5.
>
> ****  Purify instrumented threadTest (pid 96)  ****
> UMR: Uninitialized memory read (6 times):
>   * This is occurring while in thread 8:
>  _IO_un_link    [genops.c:39]
>  _IO_file_close_it [fileops.c:125]
>  filebuf::close() [filebuf.cc:166]
>  fstreambase::close() [fstream.cc:90]
>  run(void*)     [threadTest.cc:37]
>  THR_Thread::start_routine() [libTHR.so.8.5.1]
>   * Reading 4 bytes from 0xe3b28 in the heap.
>   * Address 0xe3b28 is 7736 bytes into a malloc'd block at 0xe1cf0 of 8192
> bytes.
>   * This block was allocated from thread 5:
>  malloc         [rtlib.o]
>  _IO_file_doallocate [filedoalloc.c:95]
>  filebuf::doallocate() [filebuf.cc:142]
>  _IO_doallocbuf [genops.c:297]
>  _IO_file_seekoff [fileops.c:404]
>  filebuf::seekoff(long,ios::seek_dir,int) [filebuf.cc:161]
>
> ****  Purify instrumented threadTest (pid 96)  ****
> UMR: Uninitialized memory read (4 times):
>   * This is occurring while in thread 8:
>  _IO_un_link    [genops.c:39]
>  _IO_file_close_it [fileops.c:125]
>  filebuf::close() [filebuf.cc:166]
>  fstreambase::close() [fstream.cc:90]
>  run(void*)     [threadTest.cc:37]
>  THR_Thread::start_routine() [libTHR.so.8.5.1]
>   * Reading 4 bytes from 0xe3b28 in the heap.
>   * Address 0xe3b28 is 856 bytes into a freed  block at 0xe37d0 of 8192
> bytes.
>   * This block was allocated from thread 5:
>  malloc         [rtlib.o]
>  _IO_file_doallocate [filedoalloc.c:95]
>  filebuf::doallocate() [filebuf.cc:142]
>  _IO_doallocbuf [genops.c:297]
>  _IO_file_seekoff [fileops.c:404]
>  *unknown func* [pc=0xe3860]
>   * There have been 3874 frees since this block was freed thread 5.
>
> ****  Purify instrumented threadTest (pid 96)  ****
> SIG: Signal handled:
>   * This is occurring while in:
>  _p955static    [crtn.o]
>  select         [libc.so.1]
>  SYS_Calls::sleep(unsigned int) [libSYS.so.8.5.1]
>  main           [threadTest.cc:78]
>  _start         [crt1.o]
>   * Received signal 2 (SIGINT - Interrupt)
>   * Signal mask: (SIGINT)
>   * Pending signals:
>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]