Bug 341296 - knotify crash when a network change occurs
Summary: knotify crash when a network change occurs
Status: RESOLVED FIXED
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: KDE platform plugin (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-11-26 16:58 UTC by Felipe Sologuren
Modified: 2014-11-27 01:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Sologuren 2014-11-26 16:58:43 UTC
Application: plasma-desktop (4.11.13)
KDE Platform Version: 4.14.2
Qt Version: 4.8.6
Operating System: Linux 3.16.0-4-amd64 x86_64
Distribution: Debian GNU/Linux testing (jessie)

-- Information about the crash:
- What I was doing when the application crashed:
I started virt-manager

-system:
Linux pegasus 3.16.0-4-amd64 #1 SMP Debian 3.16.7-2 (2014-11-06) x86_64 GNU/Linux
libc6:amd64 Version: 2.19-13

The crash can be reproduced sometimes.

-- Backtrace:
Application: Shell de escritorio Plasma (plasma-desktop), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f0c76ad1800 (LWP 4610))]

Thread 11 (Thread 0x7f0c49430700 (LWP 4613)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0c6f4d0afa in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007f0c6f4d0b29 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007f0c69cff0a4 in start_thread (arg=0x7f0c49430700) at pthread_create.c:309
#4  0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 10 (Thread 0x7f0bbe20b700 (LWP 4614)):
#0  0x00007f0c69420384 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f0c693dbe99 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f0c693dbffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f0c72e84507 in QEventDispatcherGlib::processEvents (this=0x7f0bb80008e0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f0c72e53ae1 in QEventLoop::processEvents (this=this@entry=0x7f0bbe20ad80, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f0c72e53e45 in QEventLoop::exec (this=this@entry=0x7f0bbe20ad80, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f0c72d48b89 in QThread::exec (this=this@entry=0x2f36e90) at thread/qthread.cpp:538
#7  0x00007f0c72e34483 in QInotifyFileSystemWatcherEngine::run (this=0x2f36e90) at io/qfilesystemwatcher_inotify.cpp:265
#8  0x00007f0c72d4b3ef in QThreadPrivate::start (arg=0x2f36e90) at thread/qthread_unix.cpp:349
#9  0x00007f0c69cff0a4 in start_thread (arg=0x7f0bbe20b700) at pthread_create.c:309
#10 0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 9 (Thread 0x7f0bbcd95700 (LWP 3896)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0c72d4b946 in wait (time=18446744073709551615, this=0x2feebe0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x30d2bb8, mutex=0x2fc6310, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f0c6e73086c in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x30d2b90, th=0x6552b20) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#4  0x00007f0c6e733743 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2fb6990, th=0x6552b20, previous=0x2823610) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#5  0x00007f0c6e73222f in ThreadWeaver::Thread::run (this=0x6552b20) at ../../../threadweaver/Weaver/Thread.cpp:98
#6  0x00007f0c72d4b3ef in QThreadPrivate::start (arg=0x6552b20) at thread/qthread_unix.cpp:349
#7  0x00007f0c69cff0a4 in start_thread (arg=0x7f0bbcd95700) at pthread_create.c:309
#8  0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 8 (Thread 0x7f0c4d6f3700 (LWP 3897)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0c72d4b946 in wait (time=18446744073709551615, this=0x2feebe0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x30d2bb8, mutex=0x2fc6310, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f0c6e73086c in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x30d2b90, th=0x62406b0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#4  0x00007f0c6e733743 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2fb6990, th=0x62406b0, previous=0x62ce3a0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#5  0x00007f0c6e73222f in ThreadWeaver::Thread::run (this=0x62406b0) at ../../../threadweaver/Weaver/Thread.cpp:98
#6  0x00007f0c72d4b3ef in QThreadPrivate::start (arg=0x62406b0) at thread/qthread_unix.cpp:349
#7  0x00007f0c69cff0a4 in start_thread (arg=0x7f0c4d6f3700) at pthread_create.c:309
#8  0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 7 (Thread 0x7f0b9ab63700 (LWP 3898)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0c72d4b946 in wait (time=18446744073709551615, this=0x2feebe0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x30d2bb8, mutex=0x2fc6310, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f0c6e73086c in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x30d2b90, th=0x34ed390) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#4  0x00007f0c6e733743 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2fb6990, th=0x34ed390, previous=0x0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#5  0x00007f0c6e73375c in ThreadWeaver::WorkingHardState::applyForWork (this=0x2fb6990, th=0x34ed390, previous=0x66b72c0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#6  0x00007f0c6e73222f in ThreadWeaver::Thread::run (this=0x34ed390) at ../../../threadweaver/Weaver/Thread.cpp:98
#7  0x00007f0c72d4b3ef in QThreadPrivate::start (arg=0x34ed390) at thread/qthread_unix.cpp:349
#8  0x00007f0c69cff0a4 in start_thread (arg=0x7f0b9ab63700) at pthread_create.c:309
#9  0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 6 (Thread 0x7f0b9a362700 (LWP 3899)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0c72d4b946 in wait (time=18446744073709551615, this=0x2feebe0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x30d2bb8, mutex=0x2fc6310, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f0c6e73086c in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x30d2b90, th=0x60f2d60) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#4  0x00007f0c6e733743 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2fb6990, th=0x60f2d60, previous=0x54b2660) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#5  0x00007f0c6e73222f in ThreadWeaver::Thread::run (this=0x60f2d60) at ../../../threadweaver/Weaver/Thread.cpp:98
#6  0x00007f0c72d4b3ef in QThreadPrivate::start (arg=0x60f2d60) at thread/qthread_unix.cpp:349
#7  0x00007f0c69cff0a4 in start_thread (arg=0x7f0b9a362700) at pthread_create.c:309
#8  0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 5 (Thread 0x7f0b99b61700 (LWP 3900)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0c72d4b946 in wait (time=18446744073709551615, this=0x2feebe0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x30d2bb8, mutex=0x2fc6310, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f0c6e73086c in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x30d2b90, th=0x33d63c0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#4  0x00007f0c6e733743 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2fb6990, th=0x33d63c0, previous=0x4325440) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#5  0x00007f0c6e73222f in ThreadWeaver::Thread::run (this=0x33d63c0) at ../../../threadweaver/Weaver/Thread.cpp:98
#6  0x00007f0c72d4b3ef in QThreadPrivate::start (arg=0x33d63c0) at thread/qthread_unix.cpp:349
#7  0x00007f0c69cff0a4 in start_thread (arg=0x7f0b99b61700) at pthread_create.c:309
#8  0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f0b98f32700 (LWP 3901)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0c72d4b946 in wait (time=18446744073709551615, this=0x2feebe0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x30d2bb8, mutex=0x2fc6310, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f0c6e73086c in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x30d2b90, th=0x5568fd0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#4  0x00007f0c6e733743 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2fb6990, th=0x5568fd0, previous=0x0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#5  0x00007f0c6e73222f in ThreadWeaver::Thread::run (this=0x5568fd0) at ../../../threadweaver/Weaver/Thread.cpp:98
#6  0x00007f0c72d4b3ef in QThreadPrivate::start (arg=0x5568fd0) at thread/qthread_unix.cpp:349
#7  0x00007f0c69cff0a4 in start_thread (arg=0x7f0b98f32700) at pthread_create.c:309
#8  0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7f0b83fff700 (LWP 3902)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0c72d4b946 in wait (time=18446744073709551615, this=0x2feebe0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x30d2bb8, mutex=0x2fc6310, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f0c6e73086c in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x30d2b90, th=0x60cc720) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#4  0x00007f0c6e733743 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2fb6990, th=0x60cc720, previous=0x0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#5  0x00007f0c6e73222f in ThreadWeaver::Thread::run (this=0x60cc720) at ../../../threadweaver/Weaver/Thread.cpp:98
#6  0x00007f0c72d4b3ef in QThreadPrivate::start (arg=0x60cc720) at thread/qthread_unix.cpp:349
#7  0x00007f0c69cff0a4 in start_thread (arg=0x7f0b83fff700) at pthread_create.c:309
#8  0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f0b837fe700 (LWP 3903)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f0c72d4b946 in wait (time=18446744073709551615, this=0x2feebe0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x30d2bb8, mutex=0x2fc6310, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f0c6e73086c in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x30d2b90, th=0x5fc63b0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#4  0x00007f0c6e733743 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2fb6990, th=0x5fc63b0, previous=0x5c9fa50) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#5  0x00007f0c6e73222f in ThreadWeaver::Thread::run (this=0x5fc63b0) at ../../../threadweaver/Weaver/Thread.cpp:98
#6  0x00007f0c72d4b3ef in QThreadPrivate::start (arg=0x5fc63b0) at thread/qthread_unix.cpp:349
#7  0x00007f0c69cff0a4 in start_thread (arg=0x7f0b837fe700) at pthread_create.c:309
#8  0x00007f0c763c8ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f0c76ad1800 (LWP 4610)):
[KCrash Handler]
#6  callSetOutputDevice (dev=..., d=0x6442070) at ../../phonon/audiooutput.cpp:61
#7  Phonon::AudioOutputPrivate::_k_deviceListChanged (this=0x6442070) at ../../phonon/audiooutput.cpp:423
#8  0x00007f0c72e69f4c in QMetaObject::activate (sender=sender@entry=0x4351810, m=m@entry=0x7f0c6def3340 <Phonon::Factory::Sender::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3567
#9  0x00007f0c6dca5476 in availableAudioOutputDevicesChanged (this=0x4351810) at ./moc_factory_p.cpp:112
#10 Phonon::FactoryPrivate::objectDescriptionChanged (this=this@entry=0x4351810, type=Phonon::AudioOutputDeviceType) at ../../phonon/factory.cpp:370
#11 0x00007f0c6dca56f7 in Phonon::FactoryPrivate::qt_static_metacall (_o=0x4351810, _c=<optimized out>, _id=2, _a=0x7fff0e70a7f0) at ./factory.moc:53
#12 0x00007f0c72e69f4c in QMetaObject::activate (sender=0x2690fd0, m=m@entry=0x7f0c4fb5ec00 <Phonon::KdePlatformPlugin::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff0e70a7f0) at kernel/qobject.cpp:3567
#13 0x00007f0c4f9541c4 in objectDescriptionChanged (_t1=Phonon::AudioOutputDeviceType, this=<optimized out>) at ./kdeplatformplugin.moc:102
#14 Phonon::KdePlatformPlugin::qt_static_metacall (_o=<optimized out>, _a=<optimized out>, _id=<optimized out>, _c=<optimized out>) at ./kdeplatformplugin.moc:49
#15 0x00007f0c72e69f4c in QMetaObject::activate (sender=sender@entry=0x6f81070, m=m@entry=0x7f0c4fb5e940 <Phonon::DeviceListing::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff0e70a930) at kernel/qobject.cpp:3567
#16 0x00007f0c4f953d5e in Phonon::DeviceListing::objectDescriptionChanged (this=this@entry=0x6f81070, _t1=_t1@entry=Phonon::AudioOutputDeviceType) at moc_devicelisting.cpp:103
#17 0x00007f0c4f95922a in Phonon::DeviceListing::timerEvent (this=0x6f81070, e=<optimized out>) at ../../../phonon/platform_kde/devicelisting.cpp:157
#18 0x00007f0c72e6e513 in QObject::event (this=0x6f81070, e=<optimized out>) at kernel/qobject.cpp:1253
#19 0x00007f0c721a929c in QApplicationPrivate::notify_helper (this=this@entry=0x1e09060, receiver=receiver@entry=0x6f81070, e=e@entry=0x7fff0e70acd0) at kernel/qapplication.cpp:4570
#20 0x00007f0c721afda8 in QApplication::notify (this=this@entry=0x1df9d60, receiver=receiver@entry=0x6f81070, e=e@entry=0x7fff0e70acd0) at kernel/qapplication.cpp:4356
#21 0x00007f0c73b7909a in KApplication::notify (this=0x1df9d60, receiver=0x6f81070, event=0x7fff0e70acd0) at ../../kdeui/kernel/kapplication.cpp:311
#22 0x00007f0c72e54f8d in QCoreApplication::notifyInternal (this=0x1df9d60, receiver=0x6f81070, event=event@entry=0x7fff0e70acd0) at kernel/qcoreapplication.cpp:955
#23 0x00007f0c72e86b6b in sendEvent (event=0x7fff0e70acd0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#24 QTimerInfoList::activateTimers (this=0x1e071c0) at kernel/qeventdispatcher_unix.cpp:621
#25 0x00007f0c72e83b91 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:186
#26 0x00007f0c693dbc5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007f0c693dbf48 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007f0c693dbffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f0c72e844ed in QEventDispatcherGlib::processEvents (this=0x1d20b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#30 0x00007f0c7224db96 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#31 0x00007f0c72e53ae1 in QEventLoop::processEvents (this=this@entry=0x7fff0e70af50, flags=...) at kernel/qeventloop.cpp:149
#32 0x00007f0c72e53e45 in QEventLoop::exec (this=this@entry=0x7fff0e70af50, flags=...) at kernel/qeventloop.cpp:204
#33 0x00007f0c72e598b9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1227
#34 0x00007f0c766cc4bd in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_plasma-desktop.so
#35 0x00007f0c76304b45 in __libc_start_main (main=0x4006f0, argc=1, argv=0x7fff0e70b1a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff0e70b198) at libc-start.c:287
#36 0x000000000040071e in _start ()

Reported using DrKonqi
Comment 1 Harald Sitter 2014-11-26 22:29:18 UTC
Git commit ec5f8fc79338e15b69d24fd89b9fccf93049624f by Harald Sitter.
Committed on 26/11/2014 at 22:28.
Pushed by sitter into branch '4.8'.

do not assume we have a backend when setting an output device

random suggestion du jour: since debianesque distros are the only ones
allowing running without a backend (to my knowledge anyway), this fix
should be adopted there at the earliest convenient time.

this change prevents a crash when run without a backend and getting device
changes as the Iface handling later on would directly call the cast output
without checking its validity. since the cast would always be null when
there is no backend we can just as well save time and return early.

note: this is ultimately fallout from too excessive init() setup
when there is no backend, so the ideal fix would have been to abort the
setup there. given the limited testing exposure of alsa+phononserver+phonon
this less invasive fix is deemed more suitable for the existing code base
though.
(this lineup only happens with phononserver in the picture and that
 bugger has already been killed off for plasma5)
CCMAIL: pkg-kde-talk@lists.alioth.debian.org

M  +3    -0    phonon/audiooutput.cpp

http://commits.kde.org/phonon/ec5f8fc79338e15b69d24fd89b9fccf93049624f