Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1627935 - xdg-desktop-portal-kde dumped core several times when using simple-scan
Summary: xdg-desktop-portal-kde dumped core several times when using simple-scan
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-desktop-portal-kde
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Kyral
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1624601 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-11 22:08 UTC by Matt Fagnani
Modified: 2018-11-17 02:27 UTC (History)
4 users (show)

Fixed In Version: xdg-desktop-portal-kde-5.13.5-2.fc29 xdg-desktop-portal-kde-5.13.5-2.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-10 03:17:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
journalctl -b for boot where xdg-desktop-portal-kde-5.13.4-4 dumped core several times when using simple-scan (deleted)
2018-09-11 22:08 UTC, Matt Fagnani
no flags Details
journalctl -b for boot where xdg-desktop-portal-kde-5.13.4-4 crashed several times when using simple-scan, then simple-scan gave an error when scanning more pages (deleted)
2018-09-11 22:12 UTC, Matt Fagnani
no flags Details
File: backtrace (deleted)
2018-11-16 21:53 UTC, Eileen Moroot
no flags Details

Description Matt Fagnani 2018-09-11 22:08:12 UTC
Created attachment 1482476 [details]
journalctl -b for boot where xdg-desktop-portal-kde-5.13.4-4 dumped core several times when using simple-scan

Description of problem:

I was scanning a document using simple-scan which worked correctly the first three times in Plasma 5.13.4 with qt 5.11.1 and X server 1.19.6 in F28.  I later noticed in the journal that xdg-desktop-portal-kde dumped core several times while I was using simple-scan. xdg-desktop-portal-kde was requested by xdg-desktop-portal on dbus, and then xdg-desktop-portal-kde gave the error 'Cannot create GBM device: Invalid argument' which might have led to the crashes. GBM is part of Mesa, and my system is using the llvmpipe software-based rendering driver from Mesa 18.0.5. llvmpipe or my hardware might not be able to handle the use of GBM.

Sep 09 16:38:40 dimension dbus-daemon[1165]: [session uid=1000 pid=1165] Activating service name='org.freedesktop.impl.portal.desktop.kde' requested by ':1.78' (uid=1000 pid=3786 comm="/usr/libexec/xdg-desktop-portal " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Sep 09 16:38:41 dimension dbus-daemon[1165]: [session uid=1000 pid=1165] Successfully activated service 'org.freedesktop.impl.portal.desktop.kde'
Sep 09 16:38:41 dimension xdg-desktop-portal-kde[3805]: Cannot create GBM device: Invalid argument
Sep 09 16:38:41 dimension audit[3805]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=3805 comm="xdg-desktop-por" exe="/usr/libexec/xdg-desktop-portal-kde" sig=6 res=1
Sep 09 16:38:41 dimension audispd[665]: node=dimension type=ANOM_ABEND msg=audit(1536525521.822:335): auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=3805 comm="xdg-desktop-por" exe="/usr/libexec/xdg-desktop-portal-kde" sig=6 res=1
Sep 09 16:38:42 dimension systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Sep 09 16:38:42 dimension systemd[1]: Started Process Core Dump (PID 3810/UID 0).
Sep 09 16:38:42 dimension audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@0-3810-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 09 16:38:42 dimension audispd[665]: node=dimension type=SERVICE_START msg=audit(1536525522.378:336): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@0-3810-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

The following core dump is the first that occurred in xdg-desktop-portal-kde processes with essentially the same stack trace. The core dumps started shortly after I click on Scan in simple-scan and repeated eight times for one scanned page. I'm unsure how to run gdb or strace on xdg-desktop-portal-kde because it was started by dbus and crashed immediately.

Sep 09 16:39:03 dimension systemd-coredump[3811]: Process 3805 (xdg-desktop-por) of user 1000 dumped core.
                                                  
Stack trace of thread 3805:
#0  0x00000000b7f65d21 __kernel_vsyscall (linux-gate.so.1)
#1  0x00000000b61bed82 __libc_signal_restore_set (libc.so.6)
#2  0x00000000b61a8848 __GI_abort (libc.so.6)
#3  0x00000000b664b90a qt_message_fatal (libQt5Core.so.5)
#4  0x0000000000483338 _ZN16ScreenCastPortal7initDrmEv (xdg-desktop-portal-kde)
#5  0x00000000004885a9 _ZN16ScreenCastPortalC1EP7QObject (xdg-desktop-portal-kde)
#6  0x00000000004603cb _ZN13DesktopPortalC1EP7QObject (xdg-desktop-portal-kde)
#7  0x0000000000459281 main (xdg-desktop-portal-kde)
#8  0x00000000b61aa0d1 __libc_start_main (libc.so.6)
#9  0x000000000045945d _start (xdg-desktop-portal-kde)

The scanner is an HP Officejet 6100. The first three pages I tried to scan functioned correctly. After that I got the error "Failed to scan: Unable to connect to scanner" from simple scan.  The following lines from the journal occurred when that error happened.

Sep 09 21:43:43 dimension simple-scan[6891]: io/hpmud/mlc.c 507: unable to read MlcReverseData header: Resource temporarily unavailable hp:/usb/OfficeJet_6100_Series?serial=MY33BF11WR2R
Sep 09 21:43:44 dimension simple-scan[6891]: io/hpmud/musb.c 975: removed HP-MESSAGE channel=1 clientCnt=0 channelCnt=1
Sep 09 21:43:44 dimension simple-scan[6891]: io/hpmud/musb.c 561: released ff/ff/ff interface
...
Sep 09 21:43:45 dimension simple-scan[6891]: io/hpmud/musb.c 975: removed HP-SCAN channel=4 clientCnt=0 channelCnt=0
Sep 09 21:43:45 dimension simple-scan[6891]: sane_hpaio_cancel: already cancelled!

I have attached the journal output for the boot in question. 
 

Version-Release number of selected component (if applicable):
kernel-0:4.18.5-200.fc28.i686
mesa-libgbm-0:18.0.5-3.fc28.i686
plasma-desktop-0:5.13.4-1.fc28.i686
qt5-qtbase-0:5.11.1-7.fc28.i686
simple-scan-0:3.28.1-1.fc28.i686
xdg-desktop-portal-kde-0:5.13.4-4.fc28.i686
xorg-x11-server-Xorg-0:1.19.6-8.fc28.i686

How reproducible:
The core dumps occurred each of a few times I scanned documents in simple-scan.

Steps to Reproduce:
1. Start Plasma
2. Start simple-scan
3. Press Scan in simple-scan
4. journalctl -b

Actual results:
xdg-desktop-portal-kde dumped core several times when scanning a page, and simple-scan gave an errors after scanning 2-3 pages.

Expected results:
no crashes of xdg-desktop-portal-kde or errors in simple scan

Additional info:

Comment 1 Matt Fagnani 2018-09-11 22:12:28 UTC
Created attachment 1482479 [details]
journalctl -b for boot where xdg-desktop-portal-kde-5.13.4-4 crashed several times when using simple-scan, then simple-scan gave an error when scanning more pages

Comment 2 Jan Grulich 2018-10-10 08:20:17 UTC
Can you please install debug symbols for xdg-desktop-portal-kde and try to run it in gdb, it's in /usr/libexec/xdg-desktop-portals-kde and obtain full backtrace?

Comment 3 Jan Grulich 2018-10-10 08:21:07 UTC
*** Bug 1624601 has been marked as a duplicate of this bug. ***

Comment 4 Matt Fagnani 2018-10-11 11:04:06 UTC
I just upgraded to F29. When I ran simple-scan-3.30.1.1-1.fc29, xdg-desktop-portal-kde-5.13.5-1.fc29 dumped core six to nine times after being requested by xdg-desktop-portal on dbus before pressing the Scan button. I got the error "Failed to scan: Unable to connect to scanner" when I pressed the Scan button. The xdg-desktop-portal-kde error message "Cannot create GBM device: Invalid argument" showed up in the journal right before each core dump. I installed the debug packages for xdg-desktop-portal-kde, glibc, and qt5-qtbase since libc.so.6 and libQt5Core.so.5 showed up in the core dumps in the journal. I ran coredumpctl debug on the last core dump of xdg-desktop-portal-kde which showed the following

Process 3704 (xdg-desktop-por) of user 1000 dumped core.
                
Stack trace of thread 3704:
#0  0x00000000b7f58d41 __kernel_vsyscall (linux-gate.so.1)
#1  0x00000000b61c2b36 __libc_signal_restore_set (libc.so.6)
#2  0x00000000b61ac374 __GI_abort (libc.so.6)
#3  0x00000000b662800a qt_message_fatal (libQt5Core.so.5)
#4  0x00000000004a9288 _ZN16ScreenCastPortal7initDrmEv (xdg-desktop-portal-kde)
#5  0x00000000004ae4f9 _ZN16ScreenCastPortalC2EP7QObject (xdg-desktop-portal-kde)
#6  0x000000000048631b _ZN13DesktopPortalC2EP7QObject (xdg-desktop-portal-kde)
#7  0x000000000047f1d1 main (xdg-desktop-portal-kde)
#8  0x00000000b61adc09 __libc_start_main (libc.so.6)
#9  0x000000000047f3ad _start (xdg-desktop-portal-kde)

...

(gdb) bt
#0  0xb7f58d41 in __kernel_vsyscall ()
#1  0xb61c2b36 in __libc_signal_restore_set (set=0xbf96286c)
    at ../sysdeps/unix/sysv/linux/internal-signals.h:84
#2  __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48
#3  0xb61ac374 in __GI_abort () at abort.c:79
#4  0xb662800a in qt_message_fatal (context=..., message=<synthetic pointer>...)
    at global/qlogging.cpp:1842
#5  QMessageLogger::fatal (this=0xbf962b08, 
    msg=0x4c3be8 "Cannot create GBM device: %s") at global/qlogging.cpp:880
#6  0x004a9288 in ScreenCastPortal::initDrm (this=0x6f3ca0)
    at /usr/include/qt5/QtCore/qlogging.h:91
#7  0x004ae4f9 in ScreenCastPortal::ScreenCastPortal (this=0x6f3ca0, 
    parent=0x6f2b90)
    at /usr/src/debug/xdg-desktop-portal-kde-5.13.5-1.fc29.i386/src/screencast.cpp:137
#8  0x0048631b in DesktopPortal::DesktopPortal (this=0x6f2b90, parent=0xbf962bd0)
    at /usr/src/debug/xdg-desktop-portal-kde-5.13.5-1.fc29.i386/src/desktopportal.cpp:31
#9  0x0047f1d1 in main (argc=<optimized out>, argv=0xbf962cb4)
    at /usr/src/debug/xdg-desktop-portal-kde-5.13.5-1.fc29.i386/src/xdg-desktop-portal-kde.cpp:37

The traces in each core dump looked the same except for the memory addresses.
The llvmpipe documentation notes "Alternatively, you can build it with autoconf/make with:
./configure --enable-glx=gallium-xlib --with-gallium-drivers=swrast --disable-dri --disable-gbm --disable-egl" at https://www.mesa3d.org/llvmpipe.html
I guess that the "--disable-gbm" might mean that llvmpipe doesn't support gbm, which might be related to the error "Cannot create GBM device: Invalid argument" Maybe if the xdg-desktop-portal-kde programs were to check if llvmpipe is being used and if so they didn't try to create the GBM device, the crashes and errors might be avoided. I'm not familiar enough with the programs involved to know if that makes sense. I'm now using mesa 18.2.2-1.fc29 and kernel-4.18.12-300.fc29. I can provide more information if it would help.

Comment 5 Fedora Update System 2018-10-11 13:18:06 UTC
xdg-desktop-portal-kde-5.13.5-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1d1a701953

Comment 6 Fedora Update System 2018-10-11 13:18:13 UTC
xdg-desktop-portal-kde-5.13.5-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ca7c30512f

Comment 7 Fedora Update System 2018-10-11 19:00:19 UTC
xdg-desktop-portal-kde-5.13.5-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1d1a701953

Comment 8 Fedora Update System 2018-10-12 00:24:09 UTC
xdg-desktop-portal-kde-5.13.5-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-ca7c30512f

Comment 9 Fedora Update System 2018-11-10 03:17:02 UTC
xdg-desktop-portal-kde-5.13.5-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2018-11-10 03:28:52 UTC
xdg-desktop-portal-kde-5.13.5-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Eileen Moroot 2018-11-16 21:53:57 UTC
Similar problem has been detected:

I was running a basic h.265 encode of Handbrake and the application crashed when it reached the end of one encode for the extras from Incredibles 2 and started on the next. This is an intermittent problem, with Handbrake crashing between encodes with no rhyme or reason to which ones crash and which ones don't. I wasn't even at console when it happened. The encoding server is run over tigertvnc instead of local console but that shouldn't have anything to do with it.

reporter:       libreport-2.9.5
backtrace_rating: 4
cmdline:        /usr/libexec/xdg-desktop-portal-kde
crash_function: qt_message_fatal
executable:     /usr/libexec/xdg-desktop-portal-kde
journald_cursor: s=5d93904fdc93419a950cf5d3983f405a;i=e71d;b=d8b0fd9fa78245348808b2bf041f6f0a;m=20c18bcba1c;t=57ace9a8c33e0;x=6a12c43c3e40fb58
kernel:         4.18.12-200.fc28.x86_64
package:        xdg-desktop-portal-kde-5.13.5-1.fc28
reason:         xdg-desktop-portal-kde killed by SIGABRT
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            1000

Comment 12 Eileen Moroot 2018-11-16 21:53:59 UTC
Created attachment 1506567 [details]
File: backtrace

Comment 13 Matt Fagnani 2018-11-17 02:27:53 UTC
(In reply to Eileen Moroot from comment #11)
> Similar problem has been detected:
> 
> I was running a basic h.265 encode of Handbrake and the application crashed
> when it reached the end of one encode for the extras from Incredibles 2 and
> started on the next. This is an intermittent problem, with Handbrake
> crashing between encodes with no rhyme or reason to which ones crash and
> which ones don't. I wasn't even at console when it happened. The encoding
> server is run over tigertvnc instead of local console but that shouldn't
> have anything to do with it.
> 
> reporter:       libreport-2.9.5
> backtrace_rating: 4
> cmdline:        /usr/libexec/xdg-desktop-portal-kde
> crash_function: qt_message_fatal
> executable:     /usr/libexec/xdg-desktop-portal-kde
> journald_cursor:
> s=5d93904fdc93419a950cf5d3983f405a;i=e71d;b=d8b0fd9fa78245348808b2bf041f6f0a;
> m=20c18bcba1c;t=57ace9a8c33e0;x=6a12c43c3e40fb58
> kernel:         4.18.12-200.fc28.x86_64
> package:        xdg-desktop-portal-kde-5.13.5-1.fc28
> reason:         xdg-desktop-portal-kde killed by SIGABRT
> rootdir:        /
> runlevel:       N 5
> type:           CCpp
> uid:            1000

Eileen, based on the trace and xdg-desktop-portal-kde-5.13.5-1.fc28 in your report, if you upgrade to the xdg-desktop-portal-kde-5.13.5-2.fc28 update at https://bodhi.fedoraproject.org/updates/FEDORA-2018-ca7c30512f for example using sudo dnf upgrade xdg-desktop-portal-kde , then the crashes you've seen should be resolved.


Note You need to log in before you can comment on or make changes to this bug.