Bug 334479 - Amarok crashes when searching the Icecast directory
Summary: Amarok crashes when searching the Icecast directory
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Services/Podcast Directory (show other bugs)
Version: 2.8.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: 2.9
Assignee: Matěj Laitl
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-05-07 18:33 UTC by zulurumu
Modified: 2014-11-02 20:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.9
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zulurumu 2014-05-07 18:33:57 UTC
Application: amarok (2.8.0)
KDE Platform Version: 4.12.4
Qt Version: 4.8.6
Operating System: Linux 3.14.2-200.fc20.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:Opening the player went to the section of the Internet, and there Icecast.org listing in the search box scored genre Interisuyut radiostantsiy.Posle which the application crashed.

-- Backtrace:
Application: Amarok (amarok), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
81	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7fb2e6389900 (LWP 18811))]

Thread 14 (Thread 0x7fb2d4d7f700 (LWP 18814)):
#0  0x00000034ea8ea9dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x0000003135e32b91 in poll_func () from /lib64/libpulse.so.0
#2  0x0000003135e23dec in pa_mainloop_poll () from /lib64/libpulse.so.0
#3  0x0000003135e2447e in pa_mainloop_iterate () from /lib64/libpulse.so.0
#4  0x0000003135e24530 in pa_mainloop_run () from /lib64/libpulse.so.0
#5  0x0000003135e32b26 in thread () from /lib64/libpulse.so.0
#6  0x000000313624bbd8 in internal_thread_func () from /usr/lib64/pulseaudio/libpulsecommon-4.0.so
#7  0x00000034eb007f33 in start_thread (arg=0x7fb2d4d7f700) at pthread_create.c:309
#8  0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 13 (Thread 0x7fb2cd4f9700 (LWP 18816)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007fb2ce021302 in inline_mysql_cond_timedwait (src_file=0x7fb2ce4af6a0 "/builddir/build/BUILD/mariadb-5.5.37/storage/maria/ma_servicethread.c", src_line=119, abstime=0x7fb2cd4f8c20, mutex=0x7fb2cf0a2180 <LOCK_checkpoint>, that=0x7fb2cf0a2140 <COND_checkpoint>) at /usr/src/debug/mariadb-5.5.37/include/mysql/psi/mysql_thread.h:1020
#2  my_service_thread_sleep (control=control@entry=0x7fb2ce863140 <checkpoint_control>, sleep_time=<optimized out>) at /usr/src/debug/mariadb-5.5.37/storage/maria/ma_servicethread.c:118
#3  0x00007fb2cde38b97 in ma_checkpoint_background (arg=0x1e) at /usr/src/debug/mariadb-5.5.37/storage/maria/ma_checkpoint.c:705
#4  0x00000034eb007f33 in start_thread (arg=0x7fb2cd4f9700) at pthread_create.c:309
#5  0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 12 (Thread 0x7fb2c6e30700 (LWP 18817)):
#0  0x00000034ea8e67fd in write () at ../sysdeps/unix/syscall-template.S:81
#1  0x00000034ed08984f in g_wakeup_signal (wakeup=0x1864430) at gwakeup.c:238
#2  0x00000034ed045d0b in g_main_context_remove_poll_unlocked (context=context@entry=0x19680a0, fd=fd@entry=0x1b83150) at gmain.c:4196
#3  0x00000034ed047427 in g_source_remove_poll (source=0x1968160, fd=0x1b83150) at gmain.c:1382
#4  0x000000312f3b6490 in QEventDispatcherGlib::unregisterSocketNotifier (this=<optimized out>, notifier=<optimized out>) at kernel/qeventdispatcher_glib.cpp:503
#5  0x000000312f3a49ee in QSocketNotifier::~QSocketNotifier (this=0x2691050, __in_chrg=<optimized out>) at kernel/qsocketnotifier.cpp:227
#6  0x000000312f3a4a19 in QSocketNotifier::~QSocketNotifier (this=0x2691050, __in_chrg=<optimized out>) at kernel/qsocketnotifier.cpp:228
#7  0x000000313051df3f in KDirWatchPrivate::famEventReceived (this=this@entry=0x268f5b0) at /usr/src/debug/kdelibs-4.12.4/kdecore/io/kdirwatch.cpp:1528
#8  0x000000313051e069 in KDirWatchPrivate::useFAM (this=this@entry=0x268f5b0, e=e@entry=0x7fb2b400d188) at /usr/src/debug/kdelibs-4.12.4/kdecore/io/kdirwatch.cpp:627
#9  0x000000313051dd9b in useFAM (e=0x7fb2b400d188, this=0x268f5b0) at /usr/src/debug/kdelibs-4.12.4/kdecore/io/kdirwatch.cpp:932
#10 KDirWatchPrivate::addWatch (this=this@entry=0x268f5b0, e=e@entry=0x7fb2b400d188) at /usr/src/debug/kdelibs-4.12.4/kdecore/io/kdirwatch.cpp:958
#11 0x000000313051b897 in KDirWatchPrivate::addEntry (this=this@entry=0x268f5b0, instance=instance@entry=0x2070b90, _path=..., sub_entry=sub_entry@entry=0x0, isDir=isDir@entry=true, watchModes=...) at /usr/src/debug/kdelibs-4.12.4/kdecore/io/kdirwatch.cpp:916
#12 0x000000313051c002 in KDirWatchPrivate::addEntry (this=0x268f5b0, instance=0x2070b90, _path=..., sub_entry=sub_entry@entry=0x0, isDir=isDir@entry=true, watchModes=...) at /usr/src/debug/kdelibs-4.12.4/kdecore/io/kdirwatch.cpp:912
#13 0x000000313051eabb in KDirWatch::addDir (this=<optimized out>, _path=..., watchModes=...) at /usr/src/debug/kdelibs-4.12.4/kdecore/io/kdirwatch.cpp:1797
#14 0x00000031409a7a74 in AbstractDirectoryWatcher::run (this=0x262b8b0) at /usr/src/debug/amarok-2.8.0/src/scanner/AbstractDirectoryWatcher.cpp:95
#15 0x000000313920ca42 in ThreadWeaver::JobRunHelper::runTheJob (this=this@entry=0x7fb2c6e2fc90, th=th@entry=0x1bd7ea0, job=job@entry=0x262b8b0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:106
#16 0x000000313920cc2e in ThreadWeaver::Job::execute (this=0x262b8b0, th=0x1bd7ea0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:135
#17 0x000000313920c40b in ThreadWeaver::Thread::run (this=0x1bd7ea0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Thread.cpp:108
#18 0x000000312f27c6bf in QThreadPrivate::start (arg=0x1bd7ea0) at thread/qthread_unix.cpp:349
#19 0x00000034eb007f33 in start_thread (arg=0x7fb2c6e30700) at pthread_create.c:309
#20 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 11 (Thread 0x7fb2c662f700 (LWP 18818)):
#0  0x00000034ea8ea9dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00000034ed0495b4 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fb2ac0021b0, timeout=-1, context=0x7fb2ac0009a0) at gmain.c:4007
#2  g_main_context_iterate (context=context@entry=0x7fb2ac0009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3708
#3  0x00000034ed0496dc in g_main_context_iteration (context=0x7fb2ac0009a0, may_block=1) at gmain.c:3774
#4  0x000000312f3b5af6 in QEventDispatcherGlib::processEvents (this=0x7fb2ac0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#5  0x000000312f38595f in QEventLoop::processEvents (this=this@entry=0x7fb2c662ec80, flags=...) at kernel/qeventloop.cpp:149
#6  0x000000312f385cad in QEventLoop::exec (this=this@entry=0x7fb2c662ec80, flags=...) at kernel/qeventloop.cpp:204
#7  0x000000312f279e8f in QThread::exec (this=this@entry=0x2694cb0) at thread/qthread.cpp:538
#8  0x000000312f3662e3 in QInotifyFileSystemWatcherEngine::run (this=0x2694cb0) at io/qfilesystemwatcher_inotify.cpp:265
#9  0x000000312f27c6bf in QThreadPrivate::start (arg=0x2694cb0) at thread/qthread_unix.cpp:349
#10 0x00000034eb007f33 in start_thread (arg=0x7fb2c662f700) at pthread_create.c:309
#11 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 10 (Thread 0x7fb2c57a9700 (LWP 18819)):
#0  0x00000034ea8e67fd in write () at ../sysdeps/unix/syscall-template.S:81
#1  0x00000034ed08984f in g_wakeup_signal (wakeup=0x1864430) at gwakeup.c:238
#2  0x000000312f38a92e in QCoreApplication::postEvent (receiver=0x7fb2a00910f0, event=event@entry=0x7fb2b00f9ed0, priority=priority@entry=0) at kernel/qcoreapplication.cpp:1399
#3  0x000000312f38a9f7 in QCoreApplication::postEvent (receiver=<optimized out>, event=event@entry=0x7fb2b00f9ed0) at kernel/qcoreapplication.cpp:1311
#4  0x000000312f39bcac in queued_activate (argv=0x7fb2c57a8b90, c=0x7fb2a0091320, signal=7, sender=0x7fb2a00910f0) at kernel/qobject.cpp:3447
#5  QMetaObject::activate (sender=sender@entry=0x7fb2a00910f0, m=m@entry=0x3140e9ef60 <MetaProxy::Worker::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fb2c57a8b90) at kernel/qobject.cpp:3523
#6  0x00000031407c4c22 in MetaProxy::Worker::finishedLookup (this=this@entry=0x7fb2a00910f0, _t1=...) at /usr/src/debug/amarok-2.8.0/x86_64-redhat-linux-gnu/src/moc_MetaProxyWorker.cpp:112
#7  0x00000031409416d0 in MetaProxy::Worker::run (this=0x7fb2a00910f0) at /usr/src/debug/amarok-2.8.0/src/core-impl/meta/proxy/MetaProxyWorker.cpp:48
#8  0x000000313920ca42 in ThreadWeaver::JobRunHelper::runTheJob (this=this@entry=0x7fb2c57a8c90, th=th@entry=0x2768f10, job=job@entry=0x7fb2a00910f0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:106
#9  0x000000313920cc2e in ThreadWeaver::Job::execute (this=0x7fb2a00910f0, th=0x2768f10) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:135
#10 0x000000313920c40b in ThreadWeaver::Thread::run (this=0x2768f10) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Thread.cpp:108
#11 0x000000312f27c6bf in QThreadPrivate::start (arg=0x2768f10) at thread/qthread_unix.cpp:349
#12 0x00000034eb007f33 in start_thread (arg=0x7fb2c57a9700) at pthread_create.c:309
#13 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 9 (Thread 0x7fb2c4fa8700 (LWP 18820)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x000000312f27cbf6 in wait (time=18446744073709551615, this=0x3ab04e0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=mutex@entry=0x3533120, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x000000312f278b5b in QSemaphore::acquire (this=this@entry=0x481c680, n=n@entry=1) at thread/qsemaphore.cpp:144
#4  0x0000003140923561 in Playlists::PlaylistFileLoaderJob::run (this=0x481c640) at /usr/src/debug/amarok-2.8.0/src/core-impl/playlists/types/file/PlaylistFileLoaderJob.cpp:92
#5  0x000000313920ca42 in ThreadWeaver::JobRunHelper::runTheJob (this=this@entry=0x7fb2c4fa7c90, th=th@entry=0x27d18d0, job=job@entry=0x481c640) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:106
#6  0x000000313920cc2e in ThreadWeaver::Job::execute (this=0x481c640, th=0x27d18d0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:135
#7  0x000000313920c40b in ThreadWeaver::Thread::run (this=0x27d18d0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Thread.cpp:108
#8  0x000000312f27c6bf in QThreadPrivate::start (arg=0x27d18d0) at thread/qthread_unix.cpp:349
#9  0x00000034eb007f33 in start_thread (arg=0x7fb2c4fa8700) at pthread_create.c:309
#10 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 8 (Thread 0x7fb2abfff700 (LWP 18821)):
#0  0x00000034ea8e67fd in write () at ../sysdeps/unix/syscall-template.S:81
#1  0x00000034ed08984f in g_wakeup_signal (wakeup=0x1864430) at gwakeup.c:238
#2  0x000000312f38a92e in QCoreApplication::postEvent (receiver=0x7fb2a007d010, event=event@entry=0x7fb2a0114700, priority=priority@entry=0) at kernel/qcoreapplication.cpp:1399
#3  0x000000312f38a9f7 in QCoreApplication::postEvent (receiver=<optimized out>, event=event@entry=0x7fb2a0114700) at kernel/qcoreapplication.cpp:1311
#4  0x000000312f39bcac in queued_activate (argv=0x7fb2abffeb90, c=0x7fb2a007d170, signal=7, sender=0x7fb2a007d010) at kernel/qobject.cpp:3447
#5  QMetaObject::activate (sender=sender@entry=0x7fb2a007d010, m=m@entry=0x3140e9ef60 <MetaProxy::Worker::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fb2abffeb90) at kernel/qobject.cpp:3523
#6  0x00000031407c4c22 in MetaProxy::Worker::finishedLookup (this=this@entry=0x7fb2a007d010, _t1=...) at /usr/src/debug/amarok-2.8.0/x86_64-redhat-linux-gnu/src/moc_MetaProxyWorker.cpp:112
#7  0x00000031409416d0 in MetaProxy::Worker::run (this=0x7fb2a007d010) at /usr/src/debug/amarok-2.8.0/src/core-impl/meta/proxy/MetaProxyWorker.cpp:48
#8  0x000000313920ca42 in ThreadWeaver::JobRunHelper::runTheJob (this=this@entry=0x7fb2abffec90, th=th@entry=0x2067d50, job=job@entry=0x7fb2a007d010) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:106
#9  0x000000313920cc2e in ThreadWeaver::Job::execute (this=0x7fb2a007d010, th=0x2067d50) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:135
#10 0x000000313920c40b in ThreadWeaver::Thread::run (this=0x2067d50) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Thread.cpp:108
#11 0x000000312f27c6bf in QThreadPrivate::start (arg=0x2067d50) at thread/qthread_unix.cpp:349
#12 0x00000034eb007f33 in start_thread (arg=0x7fb2abfff700) at pthread_create.c:309
#13 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 7 (Thread 0x7fb29cba2700 (LWP 18822)):
#0  0x00000034ea8e67fd in write () at ../sysdeps/unix/syscall-template.S:81
#1  0x00000034ed08984f in g_wakeup_signal (wakeup=0x1864430) at gwakeup.c:238
#2  0x000000312f38a92e in QCoreApplication::postEvent (receiver=0x7fb2b0064c90, event=event@entry=0x7fb29810dc80, priority=priority@entry=0) at kernel/qcoreapplication.cpp:1399
#3  0x000000312f38a9f7 in QCoreApplication::postEvent (receiver=<optimized out>, event=event@entry=0x7fb29810dc80) at kernel/qcoreapplication.cpp:1311
#4  0x000000312f39bcac in queued_activate (argv=0x7fb29cba1b90, c=0x7fb2b0064df0, signal=7, sender=0x7fb2b0064c90) at kernel/qobject.cpp:3447
#5  QMetaObject::activate (sender=sender@entry=0x7fb2b0064c90, m=m@entry=0x3140e9ef60 <MetaProxy::Worker::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fb29cba1b90) at kernel/qobject.cpp:3523
#6  0x00000031407c4c22 in MetaProxy::Worker::finishedLookup (this=this@entry=0x7fb2b0064c90, _t1=...) at /usr/src/debug/amarok-2.8.0/x86_64-redhat-linux-gnu/src/moc_MetaProxyWorker.cpp:112
#7  0x00000031409416d0 in MetaProxy::Worker::run (this=0x7fb2b0064c90) at /usr/src/debug/amarok-2.8.0/src/core-impl/meta/proxy/MetaProxyWorker.cpp:48
#8  0x000000313920ca42 in ThreadWeaver::JobRunHelper::runTheJob (this=this@entry=0x7fb29cba1c90, th=th@entry=0x2747f50, job=job@entry=0x7fb2b0064c90) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:106
#9  0x000000313920cc2e in ThreadWeaver::Job::execute (this=0x7fb2b0064c90, th=0x2747f50) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:135
#10 0x000000313920c40b in ThreadWeaver::Thread::run (this=0x2747f50) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Thread.cpp:108
#11 0x000000312f27c6bf in QThreadPrivate::start (arg=0x2747f50) at thread/qthread_unix.cpp:349
#12 0x00000034eb007f33 in start_thread (arg=0x7fb29cba2700) at pthread_create.c:309
#13 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 6 (Thread 0x7fb28dae2700 (LWP 18823)):
#0  0x00000034ea8e67fd in write () at ../sysdeps/unix/syscall-template.S:81
#1  0x00000034ed08984f in g_wakeup_signal (wakeup=0x1864430) at gwakeup.c:238
#2  0x000000312f38a92e in QCoreApplication::postEvent (receiver=0x7fb2880cb480, event=event@entry=0x7fb288150ba0, priority=priority@entry=0) at kernel/qcoreapplication.cpp:1399
#3  0x000000312f38a9f7 in QCoreApplication::postEvent (receiver=<optimized out>, event=event@entry=0x7fb288150ba0) at kernel/qcoreapplication.cpp:1311
#4  0x000000312f39bcac in queued_activate (argv=0x7fb28dae1b90, c=0x7fb2880cc1f0, signal=7, sender=0x7fb2880cb480) at kernel/qobject.cpp:3447
#5  QMetaObject::activate (sender=sender@entry=0x7fb2880cb480, m=m@entry=0x3140e9ef60 <MetaProxy::Worker::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fb28dae1b90) at kernel/qobject.cpp:3523
#6  0x00000031407c4c22 in MetaProxy::Worker::finishedLookup (this=this@entry=0x7fb2880cb480, _t1=...) at /usr/src/debug/amarok-2.8.0/x86_64-redhat-linux-gnu/src/moc_MetaProxyWorker.cpp:112
#7  0x00000031409416d0 in MetaProxy::Worker::run (this=0x7fb2880cb480) at /usr/src/debug/amarok-2.8.0/src/core-impl/meta/proxy/MetaProxyWorker.cpp:48
#8  0x000000313920ca42 in ThreadWeaver::JobRunHelper::runTheJob (this=this@entry=0x7fb28dae1c90, th=th@entry=0x2f3cae0, job=job@entry=0x7fb2880cb480) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:106
#9  0x000000313920cc2e in ThreadWeaver::Job::execute (this=0x7fb2880cb480, th=0x2f3cae0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:135
#10 0x000000313920c40b in ThreadWeaver::Thread::run (this=0x2f3cae0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Thread.cpp:108
#11 0x000000312f27c6bf in QThreadPrivate::start (arg=0x2f3cae0) at thread/qthread_unix.cpp:349
#12 0x00000034eb007f33 in start_thread (arg=0x7fb28dae2700) at pthread_create.c:309
#13 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 5 (Thread 0x7fb28d2e1700 (LWP 18824)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x000000312f27cbf6 in wait (time=18446744073709551615, this=0x8c47ad0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=mutex@entry=0x8bb57a0, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x000000312f278b5b in QSemaphore::acquire (this=this@entry=0x8c443a0, n=n@entry=1) at thread/qsemaphore.cpp:144
#4  0x0000003140923561 in Playlists::PlaylistFileLoaderJob::run (this=0x8c44360) at /usr/src/debug/amarok-2.8.0/src/core-impl/playlists/types/file/PlaylistFileLoaderJob.cpp:92
#5  0x000000313920ca42 in ThreadWeaver::JobRunHelper::runTheJob (this=this@entry=0x7fb28d2e0c90, th=th@entry=0x2e851d0, job=job@entry=0x8c44360) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:106
#6  0x000000313920cc2e in ThreadWeaver::Job::execute (this=0x8c44360, th=0x2e851d0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:135
#7  0x000000313920c40b in ThreadWeaver::Thread::run (this=0x2e851d0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Thread.cpp:108
#8  0x000000312f27c6bf in QThreadPrivate::start (arg=0x2e851d0) at thread/qthread_unix.cpp:349
#9  0x00000034eb007f33 in start_thread (arg=0x7fb28d2e1700) at pthread_create.c:309
#10 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7fb28cae0700 (LWP 18825)):
#0  0x00000034ea8e67fd in write () at ../sysdeps/unix/syscall-template.S:81
#1  0x00000034ed08984f in g_wakeup_signal (wakeup=0x1864430) at gwakeup.c:238
#2  0x000000312f38a92e in QCoreApplication::postEvent (receiver=0x7fb2a009bb70, event=event@entry=0x7fb2840ab320, priority=priority@entry=0) at kernel/qcoreapplication.cpp:1399
#3  0x000000312f38a9f7 in QCoreApplication::postEvent (receiver=<optimized out>, event=event@entry=0x7fb2840ab320) at kernel/qcoreapplication.cpp:1311
#4  0x000000312f39bcac in queued_activate (argv=0x7fb28cadfc10, c=0x7fb284001e10, signal=5, sender=0x7fb28cadfc90) at kernel/qobject.cpp:3447
#5  QMetaObject::activate (sender=sender@entry=0x7fb28cadfc90, m=m@entry=0x3139416360 <ThreadWeaver::JobRunHelper::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fb28cadfc10) at kernel/qobject.cpp:3523
#6  0x000000313920cae7 in done (_t1=0x7fb2a009bb70, this=0x7fb28cadfc90) at /usr/src/debug/kdelibs-4.12.4/x86_64-redhat-linux-gnu/threadweaver/Weaver/Job_p.moc:111
#7  ThreadWeaver::JobRunHelper::runTheJob (this=this@entry=0x7fb28cadfc90, th=th@entry=0x2fb76e0, job=job@entry=0x7fb2a009bb70) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:119
#8  0x000000313920cc2e in ThreadWeaver::Job::execute (this=0x7fb2a009bb70, th=0x2fb76e0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Job.cpp:135
#9  0x000000313920c40b in ThreadWeaver::Thread::run (this=0x2fb76e0) at /usr/src/debug/kdelibs-4.12.4/threadweaver/Weaver/Thread.cpp:108
#10 0x000000312f27c6bf in QThreadPrivate::start (arg=0x2fb76e0) at thread/qthread_unix.cpp:349
#11 0x00000034eb007f33 in start_thread (arg=0x7fb28cae0700) at pthread_create.c:309
#12 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7fb23ed9d700 (LWP 18828)):
#0  0x00000034ea8ea9dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00000034ed0495b4 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fb230001eb0, timeout=5304, context=0x7fb2300009a0) at gmain.c:4007
#2  g_main_context_iterate (context=context@entry=0x7fb2300009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3708
#3  0x00000034ed0496dc in g_main_context_iteration (context=0x7fb2300009a0, may_block=1) at gmain.c:3774
#4  0x000000312f3b5af6 in QEventDispatcherGlib::processEvents (this=0x7fb2300008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#5  0x000000312f38595f in QEventLoop::processEvents (this=this@entry=0x7fb23ed9ccd0, flags=...) at kernel/qeventloop.cpp:149
#6  0x000000312f385cad in QEventLoop::exec (this=this@entry=0x7fb23ed9ccd0, flags=...) at kernel/qeventloop.cpp:204
#7  0x000000312f279e8f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:538
#8  0x000000312f27c6bf in QThreadPrivate::start (arg=0x2fb8620) at thread/qthread_unix.cpp:349
#9  0x00000034eb007f33 in start_thread (arg=0x7fb23ed9d700) at pthread_create.c:309
#10 0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7fb23df1a700 (LWP 18829)):
#0  0x00000034ea8bc98d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1  0x00000034ea8bc824 in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:137
#2  0x0000003137f8eee2 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x313828df00 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2363
#3  0x0000003137f8ef69 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#4  0x00000034eb007f33 in start_thread (arg=0x7fb23df1a700) at pthread_create.c:309
#5  0x00000034ea8f4ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7fb2e6389900 (LWP 18811)):
[KCrash Handler]
#6  deref (this=0x167be3c0) at /usr/include/QtCore/qatomic_x86_64.h:133
#7  ~KSharedPtr (this=<synthetic pointer>, __in_chrg=<optimized out>) at /usr/include/kde4/ksharedptr.h:90
#8  ScriptableService::addTrack (this=0x3f5d010, track=track@entry=0xb3e0a20) at /usr/src/debug/amarok-2.8.0/src/services/scriptable/ScriptableService.cpp:294
#9  0x00000031407d8b05 in ScriptableService::insertItem (this=<optimized out>, level=level@entry=0, parentId=parentId@entry=-1, name=..., infoHtml=..., callbackData=..., playableUrl=..., albumOverride=..., artistOverride=..., genreOverride=..., composerOverride=..., yearOverride=yearOverride@entry=0, coverUrl=...) at /usr/src/debug/amarok-2.8.0/src/services/scriptable/ScriptableService.cpp:133
#10 0x00000031407dc18b in ScriptableServiceManager::insertItem (this=0x35eb3d0, serviceName=..., level=level@entry=0, parentId=parentId@entry=-1, name=..., infoHtml=..., callbackData=..., playableUrl=..., albumOverride=..., artistOverride=..., genreOverride=..., composerOverride=..., yearOverride=yearOverride@entry=0, coverUrl=...) at /usr/src/debug/amarok-2.8.0/src/services/scriptable/ScriptableServiceManager.cpp:75
#11 0x00000031409fefcd in ScriptableServiceScript::insertItem (this=0x3802a70, item=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/scriptengine/AmarokScriptableServiceScript.cpp:220
#12 0x00000031407c7651 in ScriptableServiceScript::qt_static_metacall (_o=_o@entry=0x3802a70, _id=_id@entry=3, _a=_a@entry=0x7fff5648f4d0, _c=QMetaObject::InvokeMetaMethod) at /usr/src/debug/amarok-2.8.0/x86_64-redhat-linux-gnu/src/moc_AmarokScriptableServiceScript.cpp:193
#13 0x00000031407cdc93 in qt_static_metacall (_a=0x7fff5648f4d0, _id=3, _c=QMetaObject::InvokeMetaMethod, _o=0x3802a70) at /usr/src/debug/amarok-2.8.0/x86_64-redhat-linux-gnu/src/moc_AmarokScriptableServiceScript.cpp:240
#14 ScriptableServiceScript::qt_metacall (this=0x3802a70, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fff5648f4d0) at /usr/src/debug/amarok-2.8.0/x86_64-redhat-linux-gnu/src/moc_AmarokScriptableServiceScript.cpp:241
#15 0x0000003137ffd0c6 in QScript::callQtMethod (exec=exec@entry=0x7fb235cc00d8, callType=callType@entry=QMetaMethod::Method, thisQObject=thisQObject@entry=0x3802a70, scriptArgs=..., meta=meta@entry=0x3140e9d4a0 <ScriptableServiceScript::staticMetaObject>, initialIndex=7, maybeOverloaded=true) at bridge/qscriptqobject.cpp:960
#16 0x0000003137ffe219 in QScript::QtFunction::execute (this=this@entry=0x7fb235922800, exec=0x7fb235cc00d8, thisValue=..., thisValue@entry=..., scriptArgs=...) at bridge/qscriptqobject.cpp:1015
#17 0x0000003137ffe4c9 in QScript::QtFunction::call (exec=0x7fb235cc00d8, callee=0x7fb235922800, thisValue=..., args=...) at bridge/qscriptqobject.cpp:1030
#18 0x0000003137efde40 in QTJSC::NativeFuncWrapper::operator() (this=this@entry=0x7fff5648f710, exec=0x7fb235cc00d8, jsobj=jsobj@entry=0x7fb235922800, thisValue=..., argList=...) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/CallData.cpp:46
#19 0x0000003137eda9f4 in QTJSC::cti_op_call_NotJSFunction (args=0x7fff5648f770) at ../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:1780
#20 0x00007fb1b00208c5 in ?? ()
#21 0x00007fb235cc0060 in ?? ()
#22 0x00007fb235922800 in ?? ()
#23 0x00007fb20000000f in ?? ()
#24 0x00007fb200000002 in ?? ()
#25 0x00007fff5648f970 in ?? ()
#26 0x0000003137f9200b in GetThreadHeap () at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2923
#27 GetCache () at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2932
#28 do_malloc<false> (size=2996) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:3467
#29 fastMalloc<false> (size=2996) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:3690
#30 QTWTF::tryFastMalloc (size=2996) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:3672
#31 0x00007fb235cc0060 in ?? ()
#32 0x00007fb2360dd580 in ?? ()
#33 0x0000003137e92196 in QTJSC::Interpreter::execute (this=0x7fb2360ea800, functionExecutable=0x7fb2364970e0, callFrame=0x7fb2360ea800, callFrame@entry=0x3762688, function=function@entry=0x7fb235c43ac0, thisObj=<optimized out>, args=..., scopeChain=scopeChain@entry=0x7fb2360d5090, exception=exception@entry=0x7fb2360eba88) at ../3rdparty/javascriptcore/JavaScriptCore/jit/JITCode.h:79
#34 0x0000003137f2b036 in QTJSC::JSFunction::call (this=0x7fb235c43ac0, exec=exec@entry=0x3762688, thisValue=..., args=...) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSFunction.cpp:122
#35 0x0000003137efde6f in QTJSC::call (exec=exec@entry=0x3762688, functionObject=..., callType=<optimized out>, callData=..., thisValue=..., thisValue@entry=..., args=...) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/CallData.cpp:62
#36 0x0000003137fffdd7 in QScript::QObjectConnectionManager::execute (this=this@entry=0x3f6a970, slotIndex=slotIndex@entry=0, argv=argv@entry=0x7fff5648fba0) at bridge/qscriptqobject.cpp:2163
#37 0x0000003138003941 in QScript::QObjectConnectionManager::qt_metacall (this=0x3f6a970, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff5648fba0) at bridge/qscriptqobject.cpp:2066
#38 0x000000312f39bb46 in QMetaObject::activate (sender=sender@entry=0x3802a70, m=m@entry=0x3140e9d4a0 <ScriptableServiceScript::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff5648fba0) at kernel/qobject.cpp:3597
#39 0x00000031407c7478 in ScriptableServiceScript::populate (this=this@entry=0x3802a70, _t1=_t1@entry=0, _t2=..., _t3=...) at /usr/src/debug/amarok-2.8.0/x86_64-redhat-linux-gnu/src/moc_AmarokScriptableServiceScript.cpp:251
#40 0x00000031409ff1fc in ScriptableServiceScript::slotPopulate (this=0x3802a70, name=..., level=level@entry=0, parent_id=2, callbackData=..., filter=...) at /usr/src/debug/amarok-2.8.0/src/scriptengine/AmarokScriptableServiceScript.cpp:238
#41 0x0000003140a9879e in ScriptManager::ServiceScriptPopulate (this=0x3677380, name=..., level=level@entry=0, parent_id=parent_id@entry=2, path=..., filter=...) at /usr/src/debug/amarok-2.8.0/src/ScriptManager.cpp:345
#42 0x00000031407e53af in Collections::ScriptableServiceQueryMaker::fetchTracks (this=0xaee0180) at /usr/src/debug/amarok-2.8.0/src/services/scriptable/ScriptableServiceQueryMaker.cpp:344
#43 0x000000312f39febe in QObject::event (this=0xaee0180, e=<optimized out>) at kernel/qobject.cpp:1222
#44 0x0000003130bcaebc in QApplicationPrivate::notify_helper (this=this@entry=0x1967d50, receiver=receiver@entry=0xaee0180, e=e@entry=0xaee0340) at kernel/qapplication.cpp:4565
#45 0x0000003130bd1825 in QApplication::notify (this=this@entry=0x7fff564905a0, receiver=receiver@entry=0xaee0180, e=e@entry=0xaee0340) at kernel/qapplication.cpp:4351
#46 0x0000003131e4ab0a in KApplication::notify (this=0x7fff564905a0, receiver=0xaee0180, event=0xaee0340) at /usr/src/debug/kdelibs-4.12.4/kdeui/kernel/kapplication.cpp:311
#47 0x000000312f386ebd in QCoreApplication::notifyInternal (this=0x7fff564905a0, receiver=receiver@entry=0xaee0180, event=event@entry=0xaee0340) at kernel/qcoreapplication.cpp:953
#48 0x000000312f38a0d5 in sendEvent (event=0xaee0340, receiver=0xaee0180) at kernel/qcoreapplication.h:231
#49 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1867d00) at kernel/qcoreapplication.cpp:1577
#50 0x000000312f38a573 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#51 0x000000312f3b6253 in sendPostedEvents () at kernel/qcoreapplication.h:236
#52 postEventSourceDispatch (s=s@entry=0x1967a20) at kernel/qeventdispatcher_glib.cpp:280
#53 0x00000034ed0492a6 in g_main_dispatch (context=0x19680a0) at gmain.c:3066
#54 g_main_context_dispatch (context=context@entry=0x19680a0) at gmain.c:3642
#55 0x00000034ed049628 in g_main_context_iterate (context=context@entry=0x19680a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713
#56 0x00000034ed0496dc in g_main_context_iteration (context=0x19680a0, may_block=1) at gmain.c:3774
#57 0x000000312f3b5ad5 in QEventDispatcherGlib::processEvents (this=0x1869650, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#58 0x0000003130c6cda6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#59 0x000000312f38595f in QEventLoop::processEvents (this=this@entry=0x7fff56490460, flags=...) at kernel/qeventloop.cpp:149
#60 0x000000312f385cad in QEventLoop::exec (this=this@entry=0x7fff56490460, flags=...) at kernel/qeventloop.cpp:204
#61 0x000000312f38b399 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#62 0x0000003130bc952c in QApplication::exec () at kernel/qapplication.cpp:3823
#63 0x0000000000408433 in main (argc=<optimized out>, argv=0x7fff56490708) at /usr/src/debug/amarok-2.8.0/src/main.cpp:329

Reported using DrKonqi
Comment 1 Ralf Engels 2014-11-01 23:44:41 UTC
Probably caused by f3e894f9f1385c1c4f20ddf2adfb090e269914e4
Please check:
-            ScriptableServiceTrack *track = new ScriptableServiceTrack( name );
+            KSharedPtr<ScriptableServiceTrack> track( new ScriptableServiceTrack( name ) );

It seems like all the ScriptableService::add* functions assume that they take the ownership of the pointer (a comment would be nice in the .h file to point that out)

Specifically addTrack will free the track in several cases. Giving a share pointer is probably a mistake.

Matěj please check. it's your commit and I can't see why only track is given as shared pointer.
Comment 2 Matěj Laitl 2014-11-02 10:13:48 UTC
Git commit 7e9e0710daecdb2c6372a699e9af967f485c66c0 by Matěj Laitl.
Committed on 02/11/2014 at 10:01.
Pushed by laitl into branch 'master'.

scriptable service: fix a crash due to double deletion of an object

Thanks go to Ralf Engels for pointing out the problematic code.

The problem is IMO not directly in insertItem() using KSharedPtr, but
in addTrack() which creates a KSharedPtr out of a track pointer, but at
the same time calls delete on the track pointer in some circumstances.

Once a pointer is KSharedPtr-managed, delete must not be used.

I've kept KSharedPtr for track in insertItem(). While using it is a bit
inconsistent wrt. surrounding code, it should have no effect (the crash
is IMO caused by addTrack() code alone). It feels more correct as it
prevents a hypothetical (currently unreachable) memory leak.

Interested folks, please test whether this really fixes bug 334479 for
you.
FIXED-IN: 2.9

M  +1    -0    ChangeLog
M  +0    -3    src/services/scriptable/ScriptableService.cpp

http://commits.kde.org/amarok/7e9e0710daecdb2c6372a699e9af967f485c66c0
Comment 3 Ralf Engels 2014-11-02 19:13:09 UTC
Hi Matěj,
you are right. The shared pointer as such is not bad.

I thought about different possibilities to fix the issue. Using shared pointers from the begin on actually seems to be the best solution. But then for all of the add* functions.

I actually can't try out the issue since I couldn't reproduce it in the first place. Just spotted the issue.
But I assume that making a shared pointer out of a shared pointer will definitely cause an issue. In this case I assume that one of the shared pointers ran out of scope.
Comment 4 Matěj Laitl 2014-11-02 20:57:29 UTC
(In reply to Ralf Engels from comment #3)
> I thought about different possibilities to fix the issue. Using shared
> pointers from the begin on actually seems to be the best solution. But then
> for all of the add* functions.

Righto. That would be the second step, I've just picked the low hanging fruit and fixed the crash, which is kinda selfish. ;)

> But I assume that making a shared pointer out of a shared pointer will
> definitely cause an issue. In this case I assume that one of the shared
> pointers ran out of scope.

With KSharedPtr (refcount in pointed object) this should be perfectly fine:

KSharedPtr<Object> shared1( new Object() );
Object *plain = shared1.data();
{
    KSharedPtr<Object> shared2( plain );
    (...)
}

Object is destroyed only after shared1 goes out of scope. With QSharedPointer (refcount in pointer), the code would be of course incorrect. (shared2 would prematurely delete Object)