Package: flightgear
Version: 3.0.0-2
Severity: important

On several occasions while flying the Beechcraft 1900D, FlightGear
entered a deadlock; the screen would no longer refresh, CPU usage would
drop to 0% and FlightGear would no longer respond to any input.  I
attached a debugger and found this:

(gdb) thread apply all bt

Thread 6 (Thread 0x7f4ee3838700 (LWP 20382)):
#0  0x00007f4eef5e103f in pthread_cond_wait@@GLIBC_2.3.2 () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4eeee9e29b in simgear::SGTerraSync::SvnThread::runInternal() () 
from /usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#2  0x00007f4eeee9e535 in simgear::SGTerraSync::SvnThread::run() () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#3  0x00007f4eeee7aeea in SGThread::PrivateData::start_routine(void*) () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#4  0x00007f4eef5dd062 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f4eea07dc1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 5 (Thread 0x7f4ebd046700 (LWP 20386)):
#0  0x00007f4eea07290d in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4ebc5a0c26 in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2  0x00007f4eefd23be8 in ?? () from /usr/lib/x86_64-linux-gnu/libopenal.so.1
#3  0x00007f4eefd1b54a in ?? () from /usr/lib/x86_64-linux-gnu/libopenal.so.1
#4  0x00007f4eef5dd062 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f4eea07dc1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 4 (Thread 0x7f4ee701f700 (LWP 20387)):
#0  0x00007f4eef5e103f in pthread_cond_wait@@GLIBC_2.3.2 () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4eeedba5db in LogStreamPrivate::run() () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#2  0x00007f4eeee7aeea in SGThread::PrivateData::start_routine(void*) () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#3  0x00007f4eef5dd062 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007f4eea07dc1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7f4ebb4a1700 (LWP 20388)):
#0  0x00007f4eef5e103f in pthread_cond_wait@@GLIBC_2.3.2 () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4eed0aad9e in OpenThreads::Condition::wait(OpenThreads::Mutex*) () 
from /usr/lib/libOpenThreads.so.14
#2  0x00007f4eee5c85c8 in osgDB::DatabasePager::DatabaseThread::run() () from 
/usr/lib/libosgDB.so.99
#3  0x00007f4eed0aa82b in OpenThreads::ThreadPrivateActions::StartThread(void*) 
() from /usr/lib/libOpenThreads.so.14
#4  0x00007f4eef5dd062 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f4eea07dc1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7f4ebaca0700 (LWP 20389)):
#0  0x00007f4eef5e103f in pthread_cond_wait@@GLIBC_2.3.2 () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4eed0aad9e in OpenThreads::Condition::wait(OpenThreads::Mutex*) () 
from /usr/lib/libOpenThreads.so.14
#2  0x00007f4eee5c85c8 in osgDB::DatabasePager::DatabaseThread::run() () from 
/usr/lib/libosgDB.so.99
#3  0x00007f4eed0aa82b in OpenThreads::ThreadPrivateActions::StartThread(void*) 
() from /usr/lib/libOpenThreads.so.14
#4  0x00007f4eef5dd062 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f4eea07dc1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7f4ef013c7c0 (LWP 20375)):
#0  0x00007f4eef5e103f in pthread_cond_wait@@GLIBC_2.3.2 () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4eeee1f52b in naSemDown () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#2  0x00007f4eeee165af in ?? () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#3  0x00007f4eeee16b67 in naGC_swapfree () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#4  0x00007f4eeee17189 in ?? () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#5  0x00007f4eeee172da in naHash_set () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#6  0x00007f4eeee11ddd in ?? () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#7  0x00007f4eeee13bc0 in naCall () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#8  0x0000000000919f3a in FGNasalSys::wrappedPropsNode(SGPropertyNode*) ()
#9  0x000000000092013d in NasalCommand::operator()(SGPropertyNode const*) ()
#10 0x00007f4eeee6dade in SGCommandMgr::execute(std::string const&, 
SGPropertyNode const*) const () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#11 0x000000000091bd68 in ?? ()
#12 0x00007f4eeee112ad in ?? () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#13 0x00007f4eeee1241c in ?? () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#14 0x00007f4eeee13bc0 in naCall () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#15 0x00007f4eeee13e60 in naCallMethodCtx () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#16 0x0000000000919d59 in FGNasalSys::callWithContext(Context*, naRef, int, 
naRef*, naRef) ()
#17 0x000000000091b5d9 in FGNasalSys::handleCommand(char const*, char const*, 
char const*, SGPropertyNode const*) ()
#18 0x0000000000919617 in FGNasalSys::handleCommand(SGPropertyNode const*) ()
#19 0x00007f4eeee453bb in SGBinding::innerFire() const () from 
/usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#20 0x00007f4eeee45f47 in fireBindingList(std::vector<SGSharedPtr<SGBinding>, 
std::allocator<SGSharedPtr<SGBinding> > > const&, SGPropertyNode*) ()
   from /usr/lib/x86_64-linux-gnu/libSimGearCore.so.3.0.0
#21 0x00000000007489d1 in FGKeyboardInput::doKey(int, int, int, int) ()
#22 0x0000000000acec18 in 
flightgear::FGEventHandler::handle(osgGA::GUIEventAdapter const&, 
osgGA::GUIActionAdapter&) ()
#23 0x00007f4eedaa9a77 in osgViewer::Viewer::eventTraversal() () from 
/usr/lib/libosgViewer.so.99
#24 0x00007f4eedaab219 in osgViewer::ViewerBase::frame(double) () from 
/usr/lib/libosgViewer.so.99
#25 0x0000000000ad3eaa in fgOSMainLoop() ()
#26 0x00000000005e150c in fgMainInit(int, char**) ()
#27 0x00000000005a43f1 in main ()


This looks very much like a deadlock; all threads are waiting for a
condition variable; one thread is polling in libasound.so.

The last time this deadlock occurred while after pressing 'v' several
times to cycle though all the views.  Presumably, this is what
FGKeyboardInput::doKey(int, int, int, int) () (frame #21 in thread 1)
was trying to do.  If the deadlock occurs again, I'll compare the stack
traces and report back here.

I am not certain whether the airplane being flown is part of the trigger
for this problem (but IIRC, Nasal is the scripting system of FlightGear
and thread 1 appears to be running some sort of Nasal script).  I
suppose the best way to resolve this deadlock is to audit the source
code of FlightGear to see which threads are waiting for the same
condition variable and to run FlightGear with a breakpoint on one of
these threads.

I'll keep a core dump handy for anyone willing to investigate.

-- 
Ludovic Brenta.


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (10000, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages flightgear depends on:
ii  flightgear-data-all       3.0.0-1
ii  freeglut3                 2.8.1-2
ii  libc6                     2.18-7
ii  libdbus-1-3               1.8.2-1
ii  libgcc1                   1:4.9.0-5
ii  libgl1-mesa-glx [libgl1]  10.1.4-1
ii  libglu1-mesa [libglu1]    9.0.0-2
ii  libgsm1                   1.0.13-4
ii  libice6                   2:1.0.8-2
ii  libjpeg8                  8d-2
ii  libopenal1                1:1.14-4
ii  libopenscenegraph99       3.2.0~rc1-5.1
ii  libopenthreads14          3.2.0~rc1-5.1
ii  libplib1                  1.8.5-7
ii  libpng12-0                1.2.50-1
ii  libsimgearcore3.0.0       3.0.0-3
ii  libsimgearscene3.0.0      3.0.0-3
ii  libsm6                    2:1.2.1-2
ii  libspeex1                 1.2~rc1.1-1
ii  libspeexdsp1              1.2~rc1.1-1
ii  libsqlite3-0              3.8.4.3-3
ii  libstdc++6                4.9.0-5
ii  libudev1                  204-8
ii  libx11-6                  2:1.6.2-2
ii  libxext6                  2:1.3.2-1
ii  libxi6                    2:1.7.2-1
ii  libxmu6                   2:1.1.2-1
ii  zlib1g                    1:1.2.8.dfsg-1

flightgear recommends no packages.

flightgear suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to