Bug 370959 - Crash when trying to extract a rar archive file.
Summary: Crash when trying to extract a rar archive file.
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 16.08.1
Platform: Mageia RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords: drkonqi
: 370921 372521 372757 372891 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-16 15:06 UTC by Stephane Couturier
Modified: 2016-11-24 20:00 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 16.08.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Couturier 2016-10-16 15:06:29 UTC
Application: dolphin (16.08.1)

Qt Version: 5.6.1
Frameworks Version: 5.27.0
Operating System: Linux 4.6.3-desktop-1.mga6 x86_64
Distribution: "Mageia 6"

-- Information about the crash:
- What I was doing when the application crashed:
1. Open Dolphin
2. Drag and release a rar archve file
3. Selecte "Extract here"
4. Dolphin crashes

- Unusual behavior I noticed:
Using Mageia Cauldron (development version), x64.
When I try and open the RAR file with Ark, I see they is an issue:
1. Open Dolphin
2. Open a RAR archive (with Ark)
3. Ark opens with a warning (translated from fr):
"Ark could not open rar_archive_filename. Impossible to find an external module to manage the file. Ark does not seem to support this type of files."
When starting Ark from konsole, the message is "ark.kerfuffle: Could not find a plugin to handle "/home/(...).rar"

Note: checking with the Mageia team if the Ark issue is a packaging/installation issue. 
In any case, Dolphin should not crash if the issue is the handling of extraction done by Ark.

The crash can be reproduced every time.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f5e3045a800 (LWP 10506))]

Thread 4 (Thread 0x7f5e23db6700 (LWP 10509)):
#0  0x00007f5e37c43604 in g_mutex_unlock () at /lib64/libglib-2.0.so.0
#1  0x00007f5e37bfe91d in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f5e37bfeb5c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f5e3c2033ab in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007f5e3c1aec9a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f5e3bfe837c in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007f5e3bfecfb9 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#7  0x00007f5e3878e66d in start_thread () at /lib64/libpthread.so.0
#8  0x00007f5e4152cded in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f5e2aaa2700 (LWP 10508)):
#0  0x00007f5e4151c8bd in read () at /lib64/libc.so.6
#1  0x00007f5e37c42320 in g_wakeup_acknowledge () at /lib64/libglib-2.0.so.0
#2  0x00007f5e37bfe55e in g_main_context_check () at /lib64/libglib-2.0.so.0
#3  0x00007f5e37bfe9f8 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#4  0x00007f5e37bfeb5c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#5  0x00007f5e3c2033ab in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f5e3c1aec9a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#7  0x00007f5e3bfe837c in QThread::exec() () at /lib64/libQt5Core.so.5
#8  0x00007f5e41c04615 in QDBusConnectionManager::run() () at /lib64/libQt5DBus.so.5
#9  0x00007f5e3bfecfb9 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#10 0x00007f5e3878e66d in start_thread () at /lib64/libpthread.so.0
#11 0x00007f5e4152cded in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f5e2c29d700 (LWP 10507)):
#0  0x00007f5e41520f9d in poll () at /lib64/libc.so.6
#1  0x00007f5e35d93902 in _xcb_conn_wait () at /lib64/libxcb.so.1
#2  0x00007f5e35d95657 in xcb_wait_for_event () at /lib64/libxcb.so.1
#3  0x00007f5e2e7d32b9 in QXcbEventReader::run() () at /lib64/libQt5XcbQpa.so.5
#4  0x00007f5e3bfecfb9 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#5  0x00007f5e3878e66d in start_thread () at /lib64/libpthread.so.0
#6  0x00007f5e4152cded in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f5e3045a800 (LWP 10506)):
[KCrash Handler]
#6  0x00007f5e2253def4 in BatchExtract::slotStartJob() () at /usr/lib64/qt5/plugins/kf5/kio_dnd/extracthere.so
#7  0x00007f5e3c1e7c76 in QSingleShotTimer::timerEvent(QTimerEvent*) () at /lib64/libQt5Core.so.5
#8  0x00007f5e3c1dcb8b in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#9  0x00007f5e3cb1690c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#10 0x00007f5e3cb1ba76 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#11 0x00007f5e3c1b0e18 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#12 0x00007f5e3c2022de in QTimerInfoList::activateTimers() () at /lib64/libQt5Core.so.5
#13 0x00007f5e3c202821 in timerSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#14 0x00007f5e37bfe887 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#15 0x00007f5e37bfeab8 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#16 0x00007f5e37bfeb5c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#17 0x00007f5e3c203386 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#18 0x00007f5e3c1aec9a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#19 0x00007f5e3c1b7001 in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#20 0x00007f5e41849b66 in kdemain () at /lib64/libkdeinit5_dolphin.so
#21 0x00007f5e41457600 in __libc_start_main () at /lib64/libc.so.6
#22 0x0000000000400719 in _start ()

Reported using DrKonqi
Comment 1 Elvis Angelaccio 2016-10-16 21:04:31 UTC
*** Bug 370921 has been marked as a duplicate of this bug. ***
Comment 2 Elvis Angelaccio 2016-10-16 21:31:27 UTC
@Stephane: do you have the unrar or unar program installed?

I can reproduce the crash from command line (e.g. ark --batch --autodestination foo.7z without p7zip installed), so this should definitely be fixed.

But you should not see the "Extract here" action if you don't have the required backed installed, so I think something might also be wrong in the Mageia package. Same for Fedora in the duplicate bug.
Comment 3 Stephane Couturier 2016-10-17 07:29:14 UTC
sorry I forgot to mention:
- yes, unrar is installed
- in Konsole, "unrar x rar_archive_filename" works fine, the files are extracted correctly.
Comment 4 Elvis Angelaccio 2016-10-17 09:52:46 UTC
Can you attach here the complete debug output when you start Ark from Konsole?
Comment 5 Elvis Angelaccio 2016-10-17 10:13:20 UTC
Ah right, you might simply be affected by bug 368786
Do you have shared-mime-info 1.7?
Comment 6 Elvis Angelaccio 2016-10-17 14:36:13 UTC
Git commit 33c5874b39a1182402d0869b74417c50195ec37f by Elvis Angelaccio.
Committed on 17/10/2016 at 14:32.
Pushed by elvisangelaccio into branch 'Applications/16.08'.

Stop crashing when batch extracting invalid archives

When starting a --batch extraction job, the input can be any
kind of archive, even an unsupported one. So we need to discard invalid
archives before starting the job.
Related: bug 370986

M  +1    -1    app/batchextract.cpp

http://commits.kde.org/ark/33c5874b39a1182402d0869b74417c50195ec37f
Comment 7 Stephane Couturier 2016-10-17 15:31:11 UTC
Yes, I have shared-mime-info-1.7-3.mga6.x86_64 installed.
The bug https://bugs.kde.org/show_bug.cgi?id=368786 looks familiar indeed.

Here is some more console output:
[user@localhost ~]$ ark -b test.rar 
ark.kerfuffle: Could not find a plugin to handle "/home/user/test.rar"
QObject::connect: Cannot connect (null)::percent(KJob*,ulong) to BatchExtract::forwardProgress(KJob*,ulong)
QObject::connect: invalid null parameter
QSocketNotifier: Invalid socket 7 and type 'Read', disabling...
QSocketNotifier: Invalid socket 10 and type 'Read', disabling...
KCrash: Application 'ark' crashing...
KCrash: Attempting to start /usr/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0

[1]+  Stoppé                 ark -b test.rar


I see you have already committed a change in ark to prevent the crash.
Would you know then how to make the extraction successful ? it is now  depending on an update of share-mime-info ? or something to be done in the distribution ?

Thank you very much,
Comment 8 Stephane Couturier 2016-10-17 15:40:09 UTC
Sorry, I actually saw that bug https://bugs.kde.org/show_bug.cgi?id=368786 is fixed, so I guess this should be ok with release 16.08.2.
Thanks again,
Comment 9 Elvis Angelaccio 2016-10-17 15:43:44 UTC
(In reply to Stephane Couturier from comment #8)
> Sorry, I actually saw that bug https://bugs.kde.org/show_bug.cgi?id=368786
> is fixed, so I guess this should be ok with release 16.08.2.
> Thanks again,

Yes, you need Ark 16.08.2. You could also ask the Mageia devs to backport this commit: https://quickgit.kde.org/?p=ark.git&a=commit&h=9a9a851049cd904f08c9594cc6aacf696886404e 

The crash is fixed by the commit above, so this can be closed.
Comment 10 Elvis Angelaccio 2016-11-16 12:44:18 UTC
*** Bug 372521 has been marked as a duplicate of this bug. ***
Comment 11 Elvis Angelaccio 2016-11-21 21:19:13 UTC
*** Bug 372757 has been marked as a duplicate of this bug. ***
Comment 12 Elvis Angelaccio 2016-11-24 20:00:43 UTC
*** Bug 372891 has been marked as a duplicate of this bug. ***