emeryberger/DieHard

Hang at startup on linux gcc x64 stuck in syscall()

Opened this issue · 0 comments

First time install on linux x86-64 machines both in regular and debug builds. Everything builds well. However setting LD_PRELOAD to the library reliably hang even in a small test case calling malloc at:

(gdb) bt
#0 0x0000003da88e5309 in syscall () from /lib64/libc.so.6
#1 0x0000003dc42bcf82 in __cxa_guard_acquire () from /usr/lib64/libstdc++.so.6
#2 0x00007fc6acff3a33 in getCustomHeap () at source/libdieharder.cpp:59
#3 0x00007fc6acff3ad4 in xxmalloc (sz=32) at source/libdieharder.cpp:70
#4 0x00007fc6acff35ca in operator new (sz=32) at Heap-Layers/wrappers/wrapper.cpp:406
#5 0x0000003dc429c3c9 in std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) () from /usr/lib64/libstdc++.so.6
#6 0x0000003dc429cde5 in ?? () from /usr/lib64/libstdc++.so.6
#7 0x0000003dc429cf33 in std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) () from /usr/lib64/libstdc++.so.6
#8 0x00007fc6acff3f01 in RealRandomValue::value () at include/rng/realrandomvalue.h:29
#9 0x00007fc6acff4551 in DieHardHeap<8, 7, 65536, false, false>::DieHardHeap (this=0x7fc6ad350288 <getCustomHeap()::buf+8>) at include/diehardheap.h:58
#10 0x00007fc6acff42fa in CombineHeap<DieHardHeap<8, 7, 65536, false, false>, TheLargeHeap>::CombineHeap (this=0x7fc6ad350280 <getCustomHeap()::buf>) at include/layers/combineheap.h:11
#11 0x00007fc6acff4317 in HL::LockedHeap<HL::PosixLockType, CombineHeap<DieHardHeap<8, 7, 65536, false, false>, TheLargeHeap> >::LockedHeap (this=0x7fc6ad350280 <getCustomHeap()::buf>)
at Heap-Layers/heaps/threads/lockedheap.h:36
#12 0x00007fc6acff4376 in HL::ANSIWrapper<HL::LockedHeap<HL::PosixLockType, CombineHeap<DieHardHeap<8, 7, 65536, false, false>, TheLargeHeap> > >::ANSIWrapper (
this=0x7fc6ad350280 <getCustomHeap()::buf>) at Heap-Layers/wrappers/ansiwrapper.h:35
#13 0x00007fc6acff426a in TheCustomHeapType::TheCustomHeapType (this=0x7fc6ad350280 <getCustomHeap()::buf>) at source/libdieharder.cpp:54
#14 0x00007fc6acff3a63 in getCustomHeap () at source/libdieharder.cpp:59
#15 0x00007fc6acff3ad4 in xxmalloc (sz=42) at source/libdieharder.cpp:70
#16 0x00007fc6acff3023 in custommalloc (sz=42) at Heap-Layers/wrappers/wrapper.cpp:142
#17 0x00000000004006a8 in main () at test.c:5
(gdb)

I tried on both newer Ubuntu 18.10 (GNU/Linux 5.2.0 x86_64) as well as RedHat Enterprise 6.8 and the same problem happens. No crash, just hanging.

Is this a problem you've seen before? I couldnt find any reference to it from your project page or open issues.

Thanks for your help.

Julien