From: Stephan B. <sbe...@re...> - 2016-10-27 07:57:25
|
When building Firebird 3.0 as part of LibreOffice (on Linux), it occasionally happens that the build fails with ... > rm -f ../../gen/examples/employee.fdb > ./empbuild ../../gen/examples/employee.fdb > creating database ../../gen/examples/employee.fdb > Turning forced writes off > Couldn't turn forced writes off (139) > Makefile.examples:125: recipe for target '../../gen/examples/employee.fdb' failed (I've patched examples/empbuild/empbuild.e to print the failed process's exit status, 139 i.e. SIGSEGV, <https://cgit.freedesktop.org/libreoffice/core/commit/?id=128e7ce3ffa50b11b2d5ff9777a27b095a84e5d7> "external/firebird: Try track down 'Couldn't turn forced writes off' failure"). Looking at the core file of the SIGSEGV'ed 'gfix -write async ../../gen/examples/employee.fdb' (see below), it smells like thread 1 is executing code in some .so while another hread called dlcose on that .so (there's a call to dlcose in ~DlfcnModule in src/common/os/posix/mod_loader.cpp). Is this a known problem/could my assumption be right? > Core was generated by `gfix -write async ../../gen/examples/employee.fdb'. > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0x00002b2bd3305343 in ?? () > [Current thread is 1 (Thread 0x2b2bd7b5f700 (LWP 29777))] > (gdb) t a a bt > > Thread 3 (Thread 0x2b2bcabc9c80 (LWP 29773)): > #0 0x00002b2bcbfcf2f7 in sched_yield () at ../sysdeps/unix/syscall-template.S:84 > #1 0x00002b2bcaee7fad in Thread::yield () at /data/lo/core/workdir/UnpackedTarball/firebird/src/common/ThreadStart.cpp:244 > #2 0x00002b2bcae18864 in Why::Dispatcher::shutdown (this=0x2b2bcaba2268, userStatus=0x7fff2b6ca790, timeout=36000000, reason=-7) at /data/lo/core/workdir/UnpackedTarball/firebird/src/yvalve/why.cpp:5911 > #3 0x00002b2bcae0c4f3 in fb_shutdown (timeout=5000, reason=-7) at /data/lo/core/workdir/UnpackedTarball/firebird/src/yvalve/why.cpp:3725 > #4 0x00002b2bcae5a7e0 in Firebird::PluginManager::unregisterModule (this=0x2b2bcb20d2a0 <Why::MasterImplementation::getPluginManager()::manager+16>, cleanup=0x2b2bcac4d988) at /data/lo/core/workdir/UnpackedTarball/firebird/src/yvalve/PluginManager.cpp:1060 > #5 0x00002b2bcae6c9a0 in Firebird::IPluginManagerBaseImpl<Firebird::PluginManager, Firebird::CheckStatusWrapper, Firebird::IVersionedImpl<Firebird::PluginManager, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IPluginManager> > >::cloopunregisterModuleDispatcher (self=0x2b2bcb20d2a8 <Why::MasterImplementation::getPluginManager()::manager+24>, cleanup=0x2b2bcac4d988) at /data/lo/core/workdir/UnpackedTarball/firebird/src/include/firebird/IdlFbInterfaces.h:6450 > #6 0x00002b2bd4334790 in ?? () > #7 0x00007fff2b6ca9e0 in ?? () > #8 0x00002b2bcae6c950 in ?? () at /data/lo/core/workdir/UnpackedTarball/firebird/src/include/../common/../common/classes/ImplementHelper.h:48 from /data/lo/core/instdir/program/libfbclient.so.2 > #9 0x00002b2bcac4d988 in ?? () > #10 0x00002b2bcb20d2a8 in Why::MasterImplementation::getPluginManager()::manager () from /data/lo/core/instdir/program/libfbclient.so.2 > #11 0x00007fff2b6caa50 in ?? () > #12 0x00002b2bd43340a6 in ?? () > #13 0x0000000000000001 in ?? () > #14 0x00002b2bcabcd460 in ?? () > #15 0x00002b2bcb20d2a8 in Why::MasterImplementation::getPluginManager()::manager () from /data/lo/core/instdir/program/libfbclient.so.2 > #16 0x000000000041f6f9 in Firebird::MemoryPool::deallocate (this=0x2b2bcb20d2a8 <Why::MasterImplementation::getPluginManager()::manager+24>, block=0x2b2bcac4d988) at /data/lo/core/workdir/UnpackedTarball/firebird/src/common/classes/alloc.cpp:2499 > Backtrace stopped: previous frame inner to this frame (corrupt stack?) > > Thread 2 (Thread 0x2b2bd3043700 (LWP 29774)): > #0 0x00002b2bcbcd5957 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x2b2bcab9f048) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 > #1 do_futex_wait (sem=sem@entry=0x2b2bcab9f048, abstime=0x0) at sem_waitcommon.c:111 > #2 0x00002b2bcbcd5a04 in __new_sem_wait_slow (sem=0x2b2bcab9f048, abstime=0x0) at sem_waitcommon.c:181 > #3 0x00002b2bcbcd5aaa in __new_sem_wait (sem=<optimized out>) at sem_wait.c:29 > #4 0x00002b2bcaf11bcd in Firebird::SignalSafeSemaphore::enter (this=0x2b2bcab9f048) at /data/lo/core/workdir/UnpackedTarball/firebird/src/common/classes/semaphore.cpp:163 > #5 0x00002b2bcae20ee3 in (anonymous namespace)::shutdownThread () at /data/lo/core/workdir/UnpackedTarball/firebird/src/yvalve/why.cpp:810 > #6 0x00002b2bcaee7c89 in (anonymous namespace)::ThreadArgs::run (this=0x2b2bd3042e08) at /data/lo/core/workdir/UnpackedTarball/firebird/src/common/ThreadStart.cpp:78 > #7 0x00002b2bcaee7b68 in threadStart (arg=0x2b2bcab9f0a8) at /data/lo/core/workdir/UnpackedTarball/firebird/src/common/ThreadStart.cpp:93 > #8 0x00002b2bcbccd6ca in start_thread (arg=0x2b2bd3043700) at pthread_create.c:333 > #9 0x00002b2bcbfebf6f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105 > > Thread 1 (Thread 0x2b2bd7b5f700 (LWP 29777)): > #0 0x00002b2bd3305343 in ?? () > #1 0x00002b2bd7b5eb28 in ?? () > #2 0x00002b2bcabf3728 in ?? () > #3 0x0000000100000000 in ?? () > #4 0x00002b2bcabf3728 in ?? () > #5 0x00002b2bd7b5edc0 in ?? () > #6 0x00002b2bd33913f2 in ?? () > #7 0x0000000000000000 in ?? () |