Bug 369283 - Ark crash when I close it
Summary: Ark crash when I close it
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 16.08.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2016-09-24 13:22 UTC by Mustafa Muhammad
Modified: 2016-09-27 09:35 UTC (History)
2 users (show)

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


Attachments
Possible fix (818 bytes, patch)
2016-09-24 15:45 UTC, Elvis Angelaccio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mustafa Muhammad 2016-09-24 13:22:46 UTC
Application: ark (16.08.0)

Qt Version: 5.6.1
Frameworks Version: 5.26.0
Operating System: Linux 4.4.21-2-default x86_64
Distribution: "openSUSE Leap 42.2 Beta"

-- Information about the crash:
- What I was doing when the application crashed:
I opened an rpm package, while it was loading, I closed ark and it crashed, tried several times, happen every time.

The crash can be reproduced every time.

-- Backtrace:
Application: Ark (ark), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f842728d880 (LWP 18060))]

Thread 4 (Thread 0x7f8408a81700 (LWP 18063)):
[KCrash Handler]
#6  0x00007f8423d6c494 in QObjectPrivate::isSignalConnected (signal_index=4, this=0x4545454545454545) at kernel/qobject_p.h:250
#7  QMetaObject::activate (sender=sender@entry=0xd9e210, signalOffset=3, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7f8408a80c50) at kernel/qobject.cpp:3605
#8  0x00007f8423d6c6f7 in QMetaObject::activate (sender=sender@entry=0xd9e210, m=m@entry=0x7f84270b9860 <Kerfuffle::ReadOnlyArchiveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7f8408a80c50) at kernel/qobject.cpp:3595
#9  0x00007f8426e9f90a in Kerfuffle::ReadOnlyArchiveInterface::error (this=this@entry=0xd9e210, _t1=..., _t2=...) at /usr/src/debug/ark-16.08.0/build/kerfuffle/moc_archiveinterface.cpp:234
#10 0x00007f840909c892 in LibarchivePlugin::list (this=0xd9e210) at /usr/src/debug/ark-16.08.0/plugins/libarchive/libarchiveplugin.cpp:112
#11 0x00007f8426e703ba in Kerfuffle::ListJob::doWork (this=0xd2b9b0) at /usr/src/debug/ark-16.08.0/kerfuffle/jobs.cpp:211
#12 0x00007f8426e6e821 in Kerfuffle::Job::Private::run (this=0xd9cfb0) at /usr/src/debug/ark-16.08.0/kerfuffle/jobs.cpp:62
#13 0x00007f8423b7f9e9 in QThreadPrivate::start (arg=0xd9cfb0) at thread/qthread_unix.cpp:341
#14 0x00007f841f8a1734 in start_thread () from /lib64/libpthread.so.0
#15 0x00007f8423493d3d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f8410126700 (LWP 18062)):
#0  0x00007f842348b49d in poll () from /lib64/libc.so.6
#1  0x00007f841f16d314 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f841f16d42c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f8423d9230b in QEventDispatcherGlib::processEvents (this=0xaf0e80, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#4  0x00007f8423d3ffbb in QEventLoop::exec (this=this@entry=0x7f8410125d20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007f8423b7af1a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:500
#6  0x00007f84211e21d5 in ?? () from /usr/lib64/libQt5DBus.so.5
#7  0x00007f8423b7f9e9 in QThreadPrivate::start (arg=0x7f842144ace0) at thread/qthread_unix.cpp:341
#8  0x00007f841f8a1734 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f8423493d3d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f84143bd700 (LWP 18061)):
#0  0x00007f842348b49d in poll () from /lib64/libc.so.6
#1  0x00007f841ca233e2 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007f841ca24fcf in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f8416917529 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007f8423b7f9e9 in QThreadPrivate::start (arg=0xaa2640) at thread/qthread_unix.cpp:341
#5  0x00007f841f8a1734 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f8423493d3d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f842728d880 (LWP 18060)):
#0  0x00007f841f8a60af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f8423b8065b in QWaitConditionPrivate::wait (time=18446744073709551615, this=0xd9cb00) at thread/qwaitcondition_unix.cpp:136
#2  QWaitCondition::wait (this=this@entry=0xd9c620, mutex=mutex@entry=0xd9c600, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3  0x00007f8423b7f5e6 in QThread::wait (this=<optimized out>, time=time@entry=18446744073709551615) at thread/qthread_unix.cpp:672
#4  0x00007f8426e6e050 in Kerfuffle::Job::~Job (this=0xd2b9b0, __in_chrg=<optimized out>) at /usr/src/debug/ark-16.08.0/kerfuffle/jobs.cpp:91
#5  0x00007f8426ea2314 in Kerfuffle::ListJob::~ListJob (this=0xd2b9b0, __in_chrg=<optimized out>) at /usr/src/debug/ark-16.08.0/kerfuffle/jobs.h:92
#6  Kerfuffle::ListJob::~ListJob (this=0xd2b9b0, __in_chrg=<optimized out>) at /usr/src/debug/ark-16.08.0/kerfuffle/jobs.h:92
#7  0x00007f8423d6d190 in QObject::event (this=0xd2b9b0, e=<optimized out>) at kernel/qobject.cpp:1247
#8  0x00007f8424a48e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#9  0x00007f8424a4d49a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007f8423d41fa5 in QCoreApplication::notifyInternal2 (receiver=0xd2b9b0, event=event@entry=0xcc0420) at kernel/qcoreapplication.cpp:1015
#11 0x00007f8423d43d8a in QCoreApplication::sendEvent (event=0xcc0420, receiver=<optimized out>) at kernel/qcoreapplication.h:225
#12 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0xa83ee0) at kernel/qcoreapplication.cpp:1650
#13 0x00007f8423d44338 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1508
#14 0x00007f8423d92c63 in postEventSourceDispatch (s=0xae06c0) at kernel/qeventdispatcher_glib.cpp:270
#15 0x00007f841f16d134 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#16 0x00007f841f16d388 in ?? () from /usr/lib64/libglib-2.0.so.0
#17 0x00007f841f16d42c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#18 0x00007f8423d922ec in QEventDispatcherGlib::processEvents (this=0xa8b980, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#19 0x00007f8423d3ffbb in QEventLoop::exec (this=this@entry=0x7ffebb2f0a00, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#20 0x00007f8423d47ea6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1285
#21 0x000000000040d368 in main (argc=2, argv=<optimized out>) at /usr/src/debug/ark-16.08.0/app/main.cpp:298

Reported using DrKonqi
Comment 1 Elvis Angelaccio 2016-09-24 14:55:19 UTC
I think I know where the problem is, but I cannot reproduce the crash so I cannot test the fix. How big was the RPM archive? Does it crash if you try with a big tar.gz file?
Comment 2 Elvis Angelaccio 2016-09-24 15:45:22 UTC
Created attachment 101257 [details]
Possible fix
Comment 3 Mustafa Muhammad 2016-09-24 20:52:08 UTC
(In reply to Elvis Angelaccio from comment #1)
> I think I know where the problem is, but I cannot reproduce the crash so I
> cannot test the fix. How big was the RPM archive? Does it crash if you try
> with a big tar.gz file?

It was google-chrome rpm in openSUSE, about 50 MiB, I tried with 2.8 GiB tar.gz file and it crashed too.
Comment 4 Elvis Angelaccio 2016-09-27 09:35:48 UTC
Git commit c866108ceecdffa6e0263294153cad00eb297d69 by Elvis Angelaccio.
Committed on 27/09/2016 at 09:33.
Pushed by elvisangelaccio into branch 'Applications/16.08'.

Fix potential crash when aborting a ListJob

Libarchive's error() signal is connected to the `Job::onError` slot, but
when we abort a ListJob, the slot might be called when the job instance
has already been deleted. So we now emit this signal only when we are not
aborting the job.
FIXED-IN: 16.08.2

Differential Revision: D2852

M  +5    -4    plugins/libarchive/libarchiveplugin.cpp

http://commits.kde.org/ark/c866108ceecdffa6e0263294153cad00eb297d69