Hi,

I compile program with asan, set ASAN_OPTIONS = disable_core = 0: 
unmap_shadow_on_exit = 1: abort_on_error = 1 and run a few hours, the 
program may be in a deadlock condition. 
if not set ASAN_OPTIONS = disable_core = 0: unmap_shadow_on_exit = 1: 
abort_on_error = 1, the program works well.


env:
gcc version 4.9.2 (GCC)
2.6.32-358.23.2.el6.x86_64

gdb output:
(gdb) info thread
  Id   Target Id         Frame
* 1    Thread 0x7f141bff1480 (LWP 22564) 0x00007f141b5e000d in nanosleep () 
from /lib64/libpthread.so.0
  2    Thread 0x7f0e32021700 (LWP 38354) 0x00007f141b5d92fd in pthread_join 
() from /lib64/libpthread.so.0
  3    Thread 0x7f0e33115700 (LWP 38355) 0x00007f141b5d92fd in pthread_join 
() from /lib64/libpthread.so.0
  4    Thread 0x7f0e42edf700 (LWP 38359) 0x00007f141b5e000d in nanosleep () 
from /lib64/libpthread.so.0
  5    Thread 0x7f0e395bb700 (LWP 38362) 0x00007f141b5df334 in 
__lll_lock_wait () from /lib64/libpthread.so.0
  6    Thread 0x7f0e50b2c700 (LWP 38363) 0x0000000000717680 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  7    Thread 0x7f0e38eae700 (LWP 38364) 0x0000000000758177 in 
__sanitizer::internal_sched_yield() ()
  8    Thread 0x7f0e38aa7700 (LWP 38365) 0x0000000000717680 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  9    Thread 0x7f0e389a6700 (LWP 38366) 0x0000000000758d1e in 
__sanitizer::BlockingMutex::Lock() ()
  10   Thread 0x7f0e37ba6700 (LWP 38367) 0x0000000000717682 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  11   Thread 0x7f0e3779f700 (LWP 38368) 0x00007f141b5df334 in 
__lll_lock_wait () from /lib64/libpthread.so.0
  12   Thread 0x7f0e37398700 (LWP 38369) 0x00007f141b5df334 in 
__lll_lock_wait () from /lib64/libpthread.so.0
  13   Thread 0x7f0e36f91700 (LWP 38370) 0x0000000000717682 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  14   Thread 0x7f0e36b8a700 (LWP 38371) 0x00007f141b5df334 in 
__lll_lock_wait () from /lib64/libpthread.so.0
  15   Thread 0x7f0e36783700 (LWP 38372) 0x00007f141b5df334 in 
__lll_lock_wait () from /lib64/libpthread.so.0
  16   Thread 0x7f0e36682700 (LWP 38373) 0x00007f141b5df334 in 
__lll_lock_wait () from /lib64/libpthread.so.0
  17   Thread 0x7f0e35720700 (LWP 38374) 0x00007f141b5df334 in 
__lll_lock_wait () from /lib64/libpthread.so.0
  18   Thread 0x7f0e35319700 (LWP 38375) 0x0000000000717680 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  19   Thread 0x7f0e34f12700 (LWP 38376) 0x0000000000717682 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  20   Thread 0x7f0e34b0b700 (LWP 38377) 0x0000000000717682 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  21   Thread 0x7f0e36581700 (LWP 38378) 0x0000000000717680 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  22   Thread 0x7f0e33f0b700 (LWP 38379) 0x0000000000717682 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  23   Thread 0x7f0e33e0a700 (LWP 38380) 0x0000000000717680 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  24   Thread 0x7f0e14ca6700 (LWP 38381) 0x0000000000717680 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  25   Thread 0x7f0e14497700 (LWP 38382) 0x00007f141b5df334 in 
__lll_lock_wait () from /lib64/libpthread.so.0
  26   Thread 0x7f0e13f8e700 (LWP 38383) 0x0000000000717682 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  27   Thread 0x7f0e13983700 (LWP 38384) 0x00007f141b5df334 in 
__lll_lock_wait () from /lib64/libpthread.so.0
  28   Thread 0x7f0e13378700 (LWP 38385) 0x0000000000717680 in 
__sanitizer::StaticSpinMutex::LockSlow() ()
  29   Thread 0x7f0e12b34700 (LWP 38386) 0x0000000000717682 in 
__sanitizer::StaticSpinMutex::LockSlow() ()

program output:
==22564==ERROR: AddressSanitizer failed to deallocate 0x82000 (532480) 
bytes at address 0x7effe9c39000
==22564==AddressSanitizer CHECK failed: 
../../.././libsanitizer/sanitizer_common/sanitizer_posix.cc:77 "(("unable 
to unmap" && 0)) != (0)" (0x0, 0x0)
==22564==ERROR: AddressSanitizer failed to deallocate 0x42000 (270336) 
bytes at address 0x7efffcdf3000
==22564==AddressSanitizer CHECK failed: 
../../.././libsanitizer/sanitizer_common/sanitizer_posix.cc:77 "(("unable 
to unmap" && 0)) != (0)" (0x0, 0x0)
==22564==ERROR: AddressSanitizer failed to deallocate 0x22000 (139264) 
bytes at address 0x7f0000867000
==22564==AddressSanitizer CHECK failed: 
../../.././libsanitizer/sanitizer_common/sanitizer_posix.cc:77 "(("unable 
to unmap" && 0)) != (0)" (0x0, 0x0)
==22564==ERROR: AddressSanitizer failed to deallocate 0x102000 (1056768) 
bytes at address 0x7effdc8ea000
==22564==AddressSanitizer CHECK failed: 
../../.././libsanitizer/sanitizer_common/sanitizer_posix.cc:77 "(("unable 
to unmap" && 0)) != (0)" (0x0, 0x0)
==22564==ERROR: AddressSanitizer failed to deallocate 0x22000 (139264) 
bytes at address 0x7effdf88f000
==22564==AddressSanitizer CHECK failed: 
../../.././libsanitizer/sanitizer_common/sanitizer_posix.cc:77 "(("unable 
to unmap" && 0)) != (0)" (0x0, 0x0)



Thanks,

Evan

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to