plasmashell crashes on login - so I can't use my desktop system.

Bug #1770044 reported by Gordon Lack
100
This bug affects 17 people
Affects Status Importance Assigned to Milestone
print-manager
Fix Released
High
plasma-workspace (Ubuntu)
Invalid
Undecided
Unassigned
print-manager (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Confirmed
Undecided
Unassigned
Eoan
Confirmed
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

System was running fine then the desktop background went black. I continued to work for a while to tidy things up (open window were OK) and rebooted.
Any attempt to login will produce a black screen shortly after the desktop is displayed.

The problem is related to this:

[ 119.186969] plasmashell[2316]: segfault at 0 ip 00007f1517ee4556 sp 00007ffee1d19c30 error 4 in libkcupslib.so[7f1517ea8000+55000]

This started shortly after midnight. The first one in kern.log is:

May 9 00:08:46 parent kernel: [22487.658162] plasmashell[10497]: segfault at 0 ip 00007faf64cce556 sp 00007ffe0cbc0b60 error 4 in libkcupslib.so[7faf64c92000+55000]

so I suspect this is something to do with anacron scripts.

May 9 00:08:39 parent anacron[10182]: Job `cron.daily' started

The only packages updated since yesterday are:

root@parent:/local/configs/packages# diff installed.list.2018-0508 installed.list
448c448
< ii intel-microcode 3.20180312.0~ubuntu18.04.1 amd64 Processor microcode firmware for Intel CPUs
---
> ii intel-microcode 3.20180425.1~ubuntu0.18.04.1 amd64 Processor microcode firmware for Intel CPUs
1112c1112
< ii libjavascriptcoregtk-4.0-18:amd64 2.20.1-1 amd64 JavaScript engine library from WebKitGTK+
---
> ii libjavascriptcoregtk-4.0-18:amd64 2.20.2-0ubuntu0.18.04.1 amd64 JavaScript engine library from WebKitGTK+
1827c1827
< ii libraw16:amd64 0.18.8-1 amd64 raw image decoder library
---
> ii libraw16:amd64 0.18.8-1ubuntu0.1 amd64 raw image decoder library
2073c2073
< ii libwebkit2gtk-4.0-37:amd64 2.20.1-1 amd64 Web content engine library for GTK+
---
> ii libwebkit2gtk-4.0-37:amd64 2.20.2-0ubuntu0.18.04.1 amd64 Web content engine library for GTK+
2717c2717
< ii update-notifier-common 3.192 all Files shared between update-notifier and other packages
---
> ii update-notifier-common 3.192.1 all Files shared between update-notifier and other packages

but I don't see it being any of them. The microcode update didn't actually change the firmware file for this system, and a reboot to the previous kernel had the same problem anyway.

NOTE: that any attached system data is for the wrong system (correct Ubuntu release though).
Since I have no desktop login on the affected system I can't run apport-bug there.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: plasma-workspace 4:5.12.4-0ubuntu3
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: KDE
Date: Wed May 9 01:36:24 2018
InstallationDate: Installed on 2017-11-01 (188 days ago)
InstallationMedia: Kubuntu 17.10 "Artful Aardvark" - Release amd64 (20171017.1)
SourcePackage: plasma-workspace
UpgradeStatus: Upgraded to bionic on 2018-05-02 (7 days ago)

Revision history for this message
In , Piotr Kęplicz (keplicz) wrote :
Download full text (8.6 KiB)

Application: plasma-desktop (4.11.2)
KDE Platform Version: 4.11.2
Qt Version: 4.8.4
Operating System: Linux 3.11.0-12-generic i686
Distribution: Ubuntu 13.10

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

I started printing some documents and before the printing job finished, I modified printer applet settings so that it would show finished jobs also. It crashed plasma-desktop, restarting it causes crash again.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Powłoka pulpitu Plazmy (plasma-desktop), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb1277740 (LWP 5114))]

Thread 5 (Thread 0xad787b40 (LWP 5115)):
#0 0xb772a424 in __kernel_vsyscall ()
#1 0xb20e184b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2 0xb75de9bc in __pthread_cond_wait (cond=0xb31e38d0, mutex=0xb31e38b8) at forward.c:149
#3 0xb30e0ef2 in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#4 0xb30e0f3f in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#5 0xb20ddd78 in start_thread (arg=0xad787b40) at pthread_create.c:311
#6 0xb75d101e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

Thread 4 (Thread 0xa6a9db40 (LWP 5116)):
#0 0xb75deba7 in pthread_mutex_lock (mutex=0xa6100558) at forward.c:192
#1 0xb200bba0 in g_mutex_lock (mutex=mutex@entry=0xa61004e0) at /build/buildd/glib2.0-2.38.0/./glib/gthread-posix.c:213
#2 0xb1fc858b in g_main_context_check (context=context@entry=0xa61004e0, max_priority=2147483647, fds=fds@entry=0xa6102288, n_fds=n_fds@entry=1) at /build/buildd/glib2.0-2.38.0/./glib/gmain.c:3558
#3 0xb1fc8aea in g_main_context_iterate (context=context@entry=0xa61004e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/buildd/glib2.0-2.38.0/./glib/gmain.c:3709
#4 0xb1fc8c98 in g_main_context_iteration (context=0xa61004e0, may_block=1) at /build/buildd/glib2.0-2.38.0/./glib/gmain.c:3773
#5 0xb603a8df in QEventDispatcherGlib::processEvents (this=0xa6100468, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6 0xb60099f3 in QEventLoop::processEvents (this=this@entry=0xa6a9d228, flags=...) at kernel/qeventloop.cpp:149
#7 0xb6009d19 in QEventLoop::exec (this=this@entry=0xa6a9d228, flags=...) at kernel/qeventloop.cpp:204
#8 0xb5ef8e3d in QThread::exec (this=this@entry=0xa831688) at thread/qthread.cpp:542
#9 0xb5fe9e14 in QInotifyFileSystemWatcherEngine::run (this=0xa831688) at io/qfilesystemwatcher_inotify.cpp:265
#10 0xb5efb72f in QThreadPrivate::start (arg=0xa831688) at thread/qthread_unix.cpp:338
#11 0xb20ddd78 in start_thread (arg=0xa6a9db40) at pthread_create.c:311
#12 0xb75d101e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

Thread 3 (Thread 0xa53ffb40 (LWP 5118)):
#0 0xb772a424 in __kernel_vsyscall ()
#1 0xb75c1a0b in poll () at ../sysdeps/unix/syscall-template.S:81
#2 0xb1fd7a3b in poll (__timeout=__timeout@entry=-1, __nfds=__nfds@entry=1, __fds=__fds@entry=0xa4a023a0) at /usr/include/i386-linux-gnu/bits/poll2.h:46
#3 g_poll (fds=fds@entry=0xa4a023a0, nfds=nfds@entry=1, timeout=...

Read more...

Revision history for this message
In , Daniel Nicoletti (dantti) wrote :

Can you reproduce it everytime?
Without debug symbols I can't find out why is it crashing.

Revision history for this message
In , Piotr Kęplicz (keplicz) wrote :
Download full text (8.4 KiB)

I rebuilt print-manager with debugging symbols, below goes a new backtrace. It crashes everytime plasma-desktop starts.

Application: Powłoka pulpitu Plazmy (plasma-desktop), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb1234740 (LWP 29647))]

Thread 5 (Thread 0xad745b40 (LWP 29652)):
#0 0xb76e7424 in __kernel_vsyscall ()
#1 0xb209e84b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2 0xb759b9bc in __pthread_cond_wait (cond=0xb31a08d0, mutex=0xb31a08b8) at forward.c:149
#3 0xb309def2 in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#4 0xb309df3f in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#5 0xb209ad78 in start_thread (arg=0xad745b40) at pthread_create.c:311
#6 0xb758e01e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

Thread 4 (Thread 0xa6a5db40 (LWP 29655)):
#0 0xb75ca173 in __x86.get_pc_thunk.bx () from /lib/i386-linux-gnu/libc.so.6
#1 0xb759bbd8 in pthread_mutex_unlock (mutex=0xa6100558) at forward.c:194
#2 0xb1fc8be0 in g_mutex_unlock (mutex=mutex@entry=0xa61004e0) at /build/buildd/glib2.0-2.38.0/./glib/gthread-posix.c:232
#3 0xb1f85572 in g_main_context_check (context=context@entry=0xa61004e0, max_priority=2147483647, fds=fds@entry=0xa6102288, n_fds=n_fds@entry=1) at /build/buildd/glib2.0-2.38.0/./glib/gmain.c:3554
#4 0xb1f85aea in g_main_context_iterate (context=context@entry=0xa61004e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/buildd/glib2.0-2.38.0/./glib/gmain.c:3709
#5 0xb1f85c98 in g_main_context_iteration (context=0xa61004e0, may_block=1) at /build/buildd/glib2.0-2.38.0/./glib/gmain.c:3773
#6 0xb5ff78df in QEventDispatcherGlib::processEvents (this=0xa6100468, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#7 0xb5fc69f3 in QEventLoop::processEvents (this=this@entry=0xa6a5d228, flags=...) at kernel/qeventloop.cpp:149
#8 0xb5fc6d19 in QEventLoop::exec (this=this@entry=0xa6a5d228, flags=...) at kernel/qeventloop.cpp:204
#9 0xb5eb5e3d in QThread::exec (this=this@entry=0x91732f0) at thread/qthread.cpp:542
#10 0xb5fa6e14 in QInotifyFileSystemWatcherEngine::run (this=0x91732f0) at io/qfilesystemwatcher_inotify.cpp:265
#11 0xb5eb872f in QThreadPrivate::start (arg=0x91732f0) at thread/qthread_unix.cpp:338
#12 0xb209ad78 in start_thread (arg=0xa6a5db40) at pthread_create.c:311
#13 0xb758e01e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

Thread 3 (Thread 0xa52ffb40 (LWP 29657)):
#0 g_mutex_get_impl (mutex=0xa5308d90) at /build/buildd/glib2.0-2.38.0/./glib/gthread-posix.c:123
#1 0xb1fc8b98 in g_mutex_lock (mutex=mutex@entry=0xa5308d90) at /build/buildd/glib2.0-2.38.0/./glib/gthread-posix.c:213
#2 0xb1f85b34 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0xa49023a0, timeout=-1, context=0xa5308d90) at /build/buildd/glib2.0-2.38.0/./glib/gmain.c:4001
#3 g_main_context_iterate (context=0xa5308d90, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/buildd/glib2.0-2.38.0/./glib/gmain.c:3707
#4 0xb1f8603b in g_main_loop_run (loop=0xa5308d58) at /build/bui...

Read more...

Revision history for this message
In , adaptee (adaptee) wrote :

thanks for the new backtrace

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 328235 has been marked as a duplicate of this bug. ***

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 328950 has been marked as a duplicate of this bug. ***

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 333993 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Chris (eggert-ehmke) wrote :

I can confirm this bug. plasma-desktop crashed on every restart of KDE, until I removed the org.kde.printmanager entry from .kde/share/config/plasma-desktop-appletsrc. This solved the problem for me.

Revision history for this message
In , Florian Reinhard (freinhard) wrote :

Created attachment 87557
New crash information added by DrKonqi

kde-print-queue (0.3.0) on KDE Platform 4.13.1 using Qt 4.8.6

Still present in KDE 4.13.1 on kubuntu 14.04

-- Backtrace (Reduced):
#6 0x00007fe968a876f2 in JobModel::updateJob(int, KCupsJob const&) () from /usr/lib/libkcupslib.so
#7 0x00007fe968a8b2b9 in JobModel::getJobFinished() () from /usr/lib/libkcupslib.so
[...]
#9 0x00007fe967312c1e in QObject::event (this=0xe01340, e=<optimized out>) at kernel/qobject.cpp:1194
#10 0x00007fe967f67e2c in QApplicationPrivate::notify_helper (this=this@entry=0xc16480, receiver=receiver@entry=0xe01340, e=e@entry=0x7fe95008e260) at kernel/qapplication.cpp:4567
#11 0x00007fe967f6e4a0 in QApplication::notify (this=this@entry=0x7ffff88072a0, receiver=receiver@entry=0xe01340, e=e@entry=0x7fe95008e260) at kernel/qapplication.cpp:4353

Revision history for this message
In , Nande! (jerobarraco) wrote :

Confirmed. Same issue.
It was working ok until i upgraded some stuff.

The solution from Eggert worked for me https://bugs.kde.org/show_bug.cgi?id=326289#c7

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 375983 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 361999 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 325932 has been marked as a duplicate of this bug. ***

Revision history for this message
In , czsergey (czsergey) wrote :

I had the same issue on
Fedora 25
kernel: 4.10.10-200.fc25.x86_64
KDE Plasma: 5.9.4
KDE Frameworks: 5.33.0
Qt: 5.7.1

Backtrace (sorry, no debug symbols):
#0 0x00007fff291c9d86 in JobModel::updateJob(int, KCupsJob const&) () at /lib64/libkcupslib.so
#1 0x00007fff291cc137 in JobModel::getJobFinished() () at /lib64/libkcupslib.so
#2 0x00007fff291d2335 in JobModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [clone .part.7] () at /lib64/libkcupslib.so
#3 0x00007ffff1d717e9 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#4 0x00007ffff2615ecc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#5 0x00007ffff261d671 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#6 0x00007ffff1d496fa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#7 0x00007ffff1d4bde0 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQt5Core.so.5
#8 0x00007ffff1d97653 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#9 0x00007fffe9ae4e52 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#10 0x00007fffe9ae51d0 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#11 0x00007fffe9ae527c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#12 0x00007ffff1d976cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#13 0x00007ffff1d4868a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#14 0x00007ffff1d5018c in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#15 0x0000555555571192 in main ()

Workaround:
temporary remove print manager until it's fixed:
# dnf remove kde-print-manager kde-print-manager-libs

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 381686 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 382244 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andrew Travneff (travneff) wrote :

Created attachment 112216
New crash information added by DrKonqi

plasmashell (5.12.4) using Qt 5.9.4

What I was doing when the application crashed: restarted cups service with one print job in the queue.
System experienced smth like kernel bug 12309 while that (copying data from sd card to ssd, everything was very slow).

-- Backtrace (Reduced):
#6 0x00007f25d75973c6 in JobModel::updateJob(int, KCupsJob const&) () at /lib64/libkcupslib.so
#7 0x00007f25d759bd0f in JobModel::getJobFinished() () at /lib64/libkcupslib.so
#9 0x00007f26a03c826a in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#10 0x00007f26a14d192c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#11 0x00007f26a14d9174 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5

Revision history for this message
Gordon Lack (gordon-lack) wrote :
Revision history for this message
Gordon Lack (gordon-lack) wrote :
Download full text (3.4 KiB)

A few other things.

The affect system has these cups processes running:

root@parent:/local/configs/packages# ps -ef | grep cups
root 3421 1 0 01:49 ? 00:00:00 /usr/sbin/cupsd -l
lp 3423 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3424 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3425 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3426 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3427 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3428 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3429 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3430 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3431 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3432 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
root 3434 2860 0 01:49 pts/1 00:00:00 grep cupsroot@parent:/local/configs/packages# ps -ef | grep cups
root 3421 1 0 01:49 ? 00:00:00 /usr/sbin/cupsd -l
lp 3423 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3424 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3425 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3426 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3427 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3428 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3429 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3430 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3431 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
lp 3432 3421 0 01:49 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus://
root 3434 2860 0 01:49 pts/1 00:00:00 grep cups

My laptop (the one I'm reporting from) which should be configured the same) has:

[gmllaptop]: ps -ef | grep cups
root 984 1 0 01:07 ? 00:00:00 /usr/sbin/cupsd -l
root 1032 1 0 01:08 ? 00:00:00 /usr/sbin/cups-browsed
gml4410 7966 4133 0 01:45 pts/2 00:00:00 grep cups

My (failing) desktop is also reporting:

root@parent:/var/log# grep cups-browsed syslog | grep DENIED
May 9 00:58:44 parent kernel: [ 39.940369] audit: type=1400 audit(1525823924.302:22): apparmor="DENIED" operation="open" profile="/usr/sbin/cups-browsed" name="/local/lib/libunistring.so.2.0.0" pid=1133 comm="cups-browsed" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
May 9 01:11:30 parent kernel: [ 39.218176] audit: type=1400 audit(1525824690.582:22): apparmor="DENIED" operation="open" profile="/usr/sbin/cups-browsed" name="/local/lib/libunistring.so.2.0.0" pid=1144 comm="cups-browsed" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
May 9 01:24:22 parent kernel: [ 40.002547] audit: type=1400 audit(1525825462.362:22): apparmor="DENIED" operation="o...

Read more...

Revision history for this message
Gordon Lack (gordon-lack) wrote :

I've found the two attached crash files for this issue in /var/crash/

Revision history for this message
In , Mmar-m (mmar-m) wrote :

I can reliably reproduce this crash on Kubuntu 18.04. I tried to debug it using the Git version of print-manager. I’m not familiar with the code, so I don’t think I can submit a patch, but I think I can pinpoint the problem.

The crash occurs in line 328 in JobModel.cpp (in JobModel::updateJob()):
<https://github.com/KDE/print-manager/blob/9172f63f16a663b58de919e485579453e12d5560/libkcups/JobModel.cpp#L328>

The line is:

if (item(pos, ColStatus)->data(RoleJobState).toInt() != jobState) {

The expression item(pos, ColStatus) evaluates to NULL, hence the crash.

In my case, updateJob() is called from JobModel::getJobFinished() at line 202 within a branch described as "found at wrong position, take it and insert on the right position", see
<https://github.com/KDE/print-manager/blob/9172f63f16a663b58de919e485579453e12d5560/libkcups/JobModel.cpp#L202>

Perhaps this is already enough for one of the developers to come up with a solution. I’d be happy to help as much as I can.

Revision history for this message
Gordon Lack (gordon-lack) wrote :

I've had to reinstall 18.04 on this system to make it usable.
It now works - with (essentially) the same configuration and with no change to my $HOME files.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in plasma-workspace (Ubuntu):
status: New → Confirmed
Revision history for this message
vmagnin (vincent-magnin) wrote :

I first encountered that bug when installing Kubuntu 17.10 on my HP Zbook. I found a turnaround (see below) but the bug reappeared today after upgrading to Kubuntu 18.04.

The segfault appears in libkcupslib.so, which is in the print-manager package:
$ apt-file search libkcupslib.so
print-manager: /usr/lib/x86_64-linux-gnu/libkcupslib.so

So I removed it:
$ sudo apt-get remove print-manager

After reboot or relogging, plasma is now working.
The problem is that I can't print anymore. And if I reinstall print-manager the bug is back.

Note that I installed Kubuntu 17.10 & 18.04 on 5 machines, and the bug appears only on my HP Zbook.

Revision history for this message
Sergey Tryuber (stryuber) wrote :

Exactly the same issue. Plasmashell segfault with "error 4 in libkcupslib.so". Black screen after login, all hot keys work, ALT+F2 works, but no desktop GUI. Removing "print-manager" fixed issue, but this is a hotfix.

My system (if helps):
- Dell XPS 2-in-1
- Kubuntu 17.10 that was staying in my PC for last few months and that was initially grown up from Kubuntu 16.04.
- Looks like the bug came in one of last updates.
- First that I did when saw no GUI after reboot - upgraded to 18.04 with a hope, that upgrade will overwrite buggy pages. But the issue remained.
- Cleaning up ".config" directory or creation of a new user does not work. New user accounts do not have GUI either.

Revision history for this message
In , Cfeck (cfeck) wrote :

Random idea:

If the job is not found, it first does a takeRow(), then an insertRow(). If the row to be removed is preceeding the row where to insert later, then the insert index "i" probably needs to be updated.

Revision history for this message
In , Daniel Nicoletti (dantti) wrote :

This is really odd, and sadly I could never reproduce it.

The code removes a row, inserts at another position and then crashes when updating it at the new position, it feels like the insert failed somehow...

I could add a check but that doesn't seem right :/

Revision history for this message
In , Daniel Nicoletti (dantti) wrote :

Git commit 5d3c5f7bc4174695af57cf5032a3d4117bd7577c by Daniel Nicoletti.
Committed on 06/06/2018 at 20:22.
Pushed by dantti into branch 'master'.

Possibly fix a crash by updating a row before moving it

This optimizes row updates and will update a row
before putting it in another position in order to
try to avoid a crash.

M +63 -55 libkcups/JobModel.cpp

https://commits.kde.org/print-manager/5d3c5f7bc4174695af57cf5032a3d4117bd7577c

Revision history for this message
In , Daniel Nicoletti (dantti) wrote :

I'm not sure if this fixes the issue so please try...

Revision history for this message
In , Mmar-m (mmar-m) wrote :

Thanks so much for looking into this! Unfortunately, the crash is still there.

(Sorry for the late reply, but for some reason I wasn’t notified that this report had been updated.)

However, your changes made it a bit easier for me to continue debugging this. As it turns out, the problem appears to be that I have two jobs that have the same id. That is, within getJobFinished(), the 'jobs' variable (KCupsJobs) contains four jobs, and the first two have the same .id(). (They also have the same .name().) I have four jobs in total.

Here is what happens inside the for loop over the KCupsJobs (the JobModel is initially empty, i.e. rowCount() == 0 at the start)

- Iteration/job 0: jobRow() for this KCupsJob returns -1, which means that the job isn’t in the model. The job is inserted at index 0.

- Iteration/job 1: jobRow() for this KCupsJob returns 0 because this KCupsJob has the same id as the one that was just inserted. updateJob() is called for row 0. Then the condition in "if (job_row != i)" is true ("found at wrong position") and the code tries to take row 0 and insert it at index 2. This fails for some reason so that there are actually no rows in the model anymore (rowCount() == 0). Perhaps insertRow() has undefined behavior when the given row index is greater than rowCount()?

- Iteration/job 2: jobRow() for this KCupsJob returns -1 as it is a different job. The code tries to insert it at index 2. insertJob() calls updateJob() with pos = 2, which crashes at some point because rowCount() is actually 0.

I have no idea why the duplicate jobs exist, but they are also visible on <http://localhost:631/jobs/>, so they’re real.

I’ve attempted to fix the problem in getJobFinished() by just inserting all jobs when the model is empty:

if (rowCount() == 0) {
    for (int i = 0; i < jobs.size(); ++i) {
        insertJob(i, jobs.at(i));
    }
} else {
    // (previous loop here)

For me, this avoids the crash during startup. (I’m not suggesting this is a proper fix.)

Revision history for this message
Luca Morandini (lmorandini) wrote :

Same issue here with Kubuntu 18.04 on an HP EliteBook.

Revision history for this message
Steve Baker (y9a7s7tjd2-s1eac-si9yrl01qs) wrote :

I can confirm same exact problems as Sergey on a computer that was once a Dell XPS, but has been through so many upgrades, the only original part may now be the power cord!

Uninstalling the print-manager fixed it.

Revision history for this message
Zaur Molotnikov (qutorial) wrote :
Download full text (5.5 KiB)

Hello.

I have encoutered this bug today.

Confirming that the removing of print-manager solves it.
In case it helps, I printed today to a non-existing printer. (Or not connected now)
This might be the reason.

System info:
===================================
$ uname -a
Linux xxxxxx 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
===================================
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
===================================

===================================
$ cat /var/log/syslog | grep libkcups
Aug 23 19:09:40 xxxx kernel: [ 21.796551] plasmashell[2806]: segfault at 0 ip 00007f06228bf556 sp 00007ffda5944a00 error 4 in libkcupslib.so[7f0622883000+55000]
Aug 23 19:11:58 xxxx kernel: [ 159.541136] plasmashell[3142]: segfault at 0 ip 00007fb9f90eb556 sp 00007ffd1f9dc550 error 4 in libkcupslib.so[7fb9f90af000+55000]
Aug 23 19:12:24 xxxx kernel: [ 185.479028] plasmashell[3190]: segfault at 0 ip 00007fe7ae4b3556 sp 00007ffddf141da0 error 4 in libkcupslib.so[7fe7ae477000+55000]
Aug 23 19:13:20 xxxx kernel: [ 241.740921] plasmashell[3907]: segfault at 0 ip 00007f90b4e6e556 sp 00007fff15942bc0 error 4 in libkcupslib.so[7f90b4e32000+55000]
Aug 23 19:17:15 xxxx kernel: [ 21.434726] plasmashell[2561]: segfault at 0 ip 00007f679fd09556 sp 00007ffcfd0279a0 error 4 in libkcupslib.so[7f679fccd000+55000]
Aug 23 19:25:00 xxxx kernel: [ 486.744808] plasmashell[19246]: segfault at 0 ip 00007f35a96d5556 sp 00007fff5621e720 error 4 in libkcupslib.so[7f35a9699000+55000]
Aug 23 19:30:31 xxxx kernel: [ 817.724261] plasmashell[23856]: segfault at 0 ip 00007fbc4b29d556 sp 00007ffe87f7e930 error 4 in libkcupslib.so[7fbc4b261000+55000]
Aug 23 19:31:22 xxxx kernel: [ 868.486032] plasmashell[24483]: segfault at 0 ip 00007f10fc9b2556 sp 00007ffe7b7f9890 error 4 in libkcupslib.so[7f10fc976000+55000]
======================================

$ dpkg -l | egrep "plasma"
rc kdeconnect-plasma 1.3.1-0ubuntu0.1 all Transitional package (kdeconnect-plasma -> kdeconnect)
ii kdeplasma-addons-data 4:5.12.6-0ubuntu0.1 all locale files for kdeplasma-addons
ii libkdeclarative5 4:4.14.38-0ubuntu3 amd64 declarative library for plasma
ii libkf5plasma5:amd64 5.44.0-0ubuntu3 amd64 Plasma Runtime components
ii libkf5plasmaquick5:amd64 5.44.0-0ubuntu3 amd64 Plasma Runtime components
ii libplasma-geolocation-interface5 4:5.12.6-0ubuntu0.1 amd64 Plasma Workspace for KF5 library
ii libplasma3 4:4.14.38-0ubuntu3 amd64 Plasma Library for the KDE Platform
ii plasma-dataengines-addons 4:5.12.6-0ubuntu0.1 amd64 additional data engines for Plasma
ii plasma-desktop ...

Read more...

Revision history for this message
Zaur Molotnikov (qutorial) wrote :

Deleting the non-existing printer from printers helped:
1) Delete print-manager
$ apt-get remove print-manager
2) Start plasma
sudo service sddm restart
or
kstart plasmashell
3) Install print-manager back again
$ apt-get install print-manager
4) Open Printers
Alt-F2 -> Printers
Remove the not used printers or all of them and then install the used ones.

"Fixed"
A software fix is still necessary.

Revision history for this message
Gordon Lack (gordon-lack) wrote :

>> In case it helps, I printed today to a non-existing printer. (Or not connected now)
>> This might be the reason.

That's interesting. The system on which I had the problem also had an "unusual" printer defined.
I have a Brother printer/scanner, so add the Brother-supplied driver (more options - needed for the scanner). I then try to prevent cups from finding the device on the network and adding another printer entry by manually editing cups-browsed.conf to add BrowseDeny entries, but that doesn't always seem to work.
So it's possible that when I re-installed the OS (see #4) I did this in a way which worked differently.

Revision history for this message
vmagnin (vincent-magnin) wrote :

Yes, Zaur's post is interesting: it explains why I encountered that problem only on my laptop (which I use at home and at work with several printers), and not on my desktop machines.

Revision history for this message
Buddy Butterfly (buddybutterfly) wrote :

Btw. I was shocked that a bug in a component could bring down the whole plasma shell. Where is the
design goal of decoupling of components? I mean, I love KDE, but KDEs quality seems to be dependent
on every little app running there? Oh my goodness.... I would have expected a list of components with its status. Something like (unloaded, loaded, active, broken, etc.), but KDE running up and being stable. Something like osgi for KDE? ;-)

Revision history for this message
Cristian Arteaga (crisarte22) wrote :

Similar behavior in Kubuntu 18.04. Today I sent a print job to a non existing printer and in the next reboot, plasmashell did not start, I only got a black screen.
Removing print-manager fixed the issue for now.

Revision history for this message
Andreas John (derjohn) wrote :

+1 from me.

I sopped cups via systemctl, then the plasmashell and the taskbar came up again. I disabled the printer status notification in system settings, now plasmashell and printing is working (but without notifiy).

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 399400 has been marked as a duplicate of this bug. ***

Revision history for this message
Thomas Ribbrock (emgaron+ubuntu) wrote :

Another +1

In my case, plasmashell started crashing like this after I had some problems with printing a document two days back. When I started the PC today (Kubuntu 18.04), plasmashell would keep crashing with the error messages outlined above.

After reading this bug report, I did some digging and found the following:

- One of the attempts of printing the document apparently resulted in a "stuck" print job in CUPS
- That job was listed twice with the same ID
- I could cancel one of them, but not the other one, as it had the same ID
- After manually removing the stuck job from /var/spool/cups and rebooting the PC, everything worked again
- Strangely enough, one of the two printers I had previously configured has now vanished completely from CUPS

So, the root cause seems to lie in CUPS rather than KDE, but I find it extremely puzzling that an error in CUPS keeps KDE from starting properly - this seems to be a bug in itself.

Revision history for this message
Thomas Ribbrock (emgaron+ubuntu) wrote :

Correction to comment #17 - the "vanishing" printer was due to something else, please disregard that part.

Revision history for this message
In , JeansenVaars (saif1988) wrote :

Hi.

Today my KDE Plasma stopped booting normally. Got this libkcups.so core dumped error. Works fine after uninstalling cups package. Fedora 29

Revision history for this message
In , JeansenVaars (saif1988) wrote :

(In reply to saif1988 from comment #24)
> Hi.
>
> Today my KDE Plasma stopped booting normally. Got this libkcups.so core
> dumped error. Works fine after uninstalling cups package. Fedora 29

Full stacktrace I got is here:
https://ask.fedoraproject.org/en/question/130338/kde-broken-after-fedora-upgrade/

Revision history for this message
In , Mmar-m (mmar-m) wrote :

A temporary fix should be to delete all queued print jobs because the problem occurs when there are multiple print jobs with the same id. Then you don’t have to uninstall cups and will still be able to print.

On the commandline, you should be able to delete all jobs by running "cancel -a". Or read <https://askubuntu.com/questions/350334/>.

I have not tested this on my machine as I want to be able to reproduce the crash when necessary.

Revision history for this message
In , JeansenVaars (saif1988) wrote :

(In reply to Marcel Martin from comment #26)
> A temporary fix should be to delete all queued print jobs because the
> problem occurs when there are multiple print jobs with the same id. Then you
> don’t have to uninstall cups and will still be able to print.
>
> On the commandline, you should be able to delete all jobs by running "cancel
> -a". Or read <https://askubuntu.com/questions/350334/>.
>
> I have not tested this on my machine as I want to be able to reproduce the
> crash when necessary.

Interesting, so you're saying that my boot problem was because there were jobs in the print queue?

Revision history for this message
In , Mmar-m (mmar-m) wrote :

> Interesting, so you're saying that my boot problem was because
> there were jobs in the print queue?

To be precise: The problem occurs whenever there are at least two jobs in your print queue with identical job ids. This should normally not happen, but it apparently does sometimes.

When Plasma starts up, it loads various apps, including the one responsible for the printer status icon in the system tray. When that one is loaded, it goes through the jobs in the print queue and tries to gather information about them. When it does so and encounters two jobs with the same id, it crashes, taking Plasma with it. At least that is my theory so far.

Did you try 'cancel -a'? It would be interesting to know whether that fixes the problem.

Revision history for this message
In , JeansenVaars (saif1988) wrote :

(In reply to Marcel Martin from comment #28)
> > Interesting, so you're saying that my boot problem was because
> > there were jobs in the print queue?
>
> To be precise: The problem occurs whenever there are at least two jobs in
> your print queue with identical job ids. This should normally not happen,
> but it apparently does sometimes.
>
> When Plasma starts up, it loads various apps, including the one responsible
> for the printer status icon in the system tray. When that one is loaded, it
> goes through the jobs in the print queue and tries to gather information
> about them. When it does so and encounters two jobs with the same id, it
> crashes, taking Plasma with it. At least that is my theory so far.
>
> Did you try 'cancel -a'? It would be interesting to know whether that fixes
> the problem.

Interesting!. The consequences are super nasty though. My KDE desktop wouldn't boot at all. No wallpaper, no menus, nothing. Obvious debugging or first counter-measures won't work either (such as wiping out ~/.config/).

I haven't tried cancel -a now since the first thing I went through is re-installing cups completely which fixed the problem. Not sure how to reproduce it now.

Still, I was seconds away of installing other distro or something... This one should get fixed. I didn't do any weird stuff just user my printer a few times last night (and it worked fine)

Revision history for this message
Hummel, Martin (uid03055) wrote :

The same at me:
plasmashell[2492]: segfault at 0 ip 00007ff4d97b4556 sp 00007ffc42745ad0 error 4 in libkcupslib.so[7ff4d9778000+55000]

4.15.0-43-generic

It seems the bug is unresolved since a half year.

Revision history for this message
fab (filipsnew) wrote :

As suggested by @GordonLack I observe that also in a desktop pc it had happened an operation like this immediately before the manifestation of the symptom, precisely the request for a print preview from an application which, however, had not set a program to be used to manage the display. This event is therefore almost certainly the origin of the bug.

Revision history for this message
László Szalma (dblaci) wrote :

I confirm the error (segfault in dmesg) on kubuntu 18.10. Removing the printer spool (/var/spool/cups/*) temporarily fixes the problem. Removing print-manager solved the problem (with the caveats mentioned above - no notify etc.)

Revision history for this message
Claudio Nold (fredfisch) wrote :
Download full text (6.9 KiB)

Same here (Kubuntu 18.04.01) - after removing blocked print jobs in CUPS service UI (http://localhost:631/) plasmashell started. Here is my gdb backtrace from the crash before:

cl@supertux:~$ gdb /usr/bin/plasmashell
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/plasmashell...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/plasmashell
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe1caa700 (LWP 5836)]
[New Thread 0x7fffdb713700 (LWP 5837)]
[New Thread 0x7fffd9cce700 (LWP 5838)]
org.kde.plasmaquick: Applet preload policy set to 1
[New Thread 0x7fffd3bb5700 (LWP 5839)]
[New Thread 0x7fffd1b58700 (LWP 5840)]
Warning: all files used by qml by the plasmoid should be in ui/. The file in the path "file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/code/LayoutManager.js" was expected at QUrl("file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/LayoutManager.js")
Warning: all files used by qml by the plasmoid should be in ui/. The file in the path "file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/code/FolderTools.js" was expected at QUrl("file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderTools.js")
[New Thread 0x7fff3e1f6700 (LWP 5841)]
trying to show an empty dialog
trying to show an empty dialog
org.kde.plasmaquick: New Applet "Application Launcher" with a weight of 100
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Trying to use rootObject before initialization is completed, whilst using setInitializationDelayed. Forcing completion
Both point size and pixel size set. Using pixel size.
Both point size and pixel size set. Using pixel size.
Both point size and pixel size set. Using pixel size.
trying to show an empty dialog
org.kde.plasmaquick: New Applet "Digital Clock" with a weight of 50
Warning: all files used by qml by the plasmoid should be in ui/. The file in the path "file:///usr/share/plasma/plasmoids/org.kde.panel/contents/code/LayoutManager.js" was expected at QUrl("file:///usr/share/plasma/plasmoids/org.kde.panel/contents/ui/LayoutManager.js")
trying to show an empty dialog
org.kde.plasmaquick: Delayed preload of "Application Launcher" after 0 seconds
KAStatsFavoritesModel::setFavorites is ignored
KActivities: Database connection: "kactivities_db_resources_1407373...

Read more...

Revision history for this message
Matthias Hadlich (mattttteo) wrote :

Confirmed on KDE Neon 5.15.1. Might be due to a network printer which was recognized automatically but now no longer exists. The fixes mentioned above (uninstalling the print-manager) appears to work.

[ 5748.844786] plasmashell[10378]: segfault at 0 ip 00007f9c5c597a50 sp 00007ffd24d6a2f0 error 4 in libkcupslib.so[7f9c5c557000+56000]

Also my logs indicate that this might be related to an AppArmor issue with the /usr/sbin/cupsd profile. There are multiple denied entries in the logs whichof I have appended one. Afterwards there is the segfault in libkcupslib.

syslog:Feb 26 18:55:13 matteo-whatever kernel: [ 5090.165402] audit: type=1400 audit(1551203713.010:42): apparmor="DENIED" operation="file_lock" profile="/usr/sbin/cupsd" name="/run/utmp" pid=1420 comm="cupsd" requested_mask="k" denied_mask="k" fsuid=0 ouid=0
syslog:Feb 26 18:58:11 matteo-whatever kernel: [ 5268.663312] plasmashell[4392]: segfault at 0 ip 00007f1ee3c3ea50 sp 00007ffdafee0690 error 4 in libkcupslib.so[7f1ee3bfe000+56000]

After reinstalling the logs have changed and the "denied" entries have been changed into "allowed":
syslog:Feb 26 19:06:11 matteo-whatever kernel: [ 5748.809771] audit: type=1400 audit(1551204371.662:52): apparmor="ALLOWED" operation="capable" profile="/usr/sbin/cupsd" pid=1420 comm="cupsd" capability=12 capname="net_admin"

My system:
Operating System: KDE neon 5.15
KDE Plasma Version: 5.15.1
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.0
Kernel Version: 4.15.12-041512-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.5 GiB of RAM

Revision history for this message
In , Fobian (fobian) wrote :

> Perhaps insertRow() has undefined behavior when the given row index is greater than rowCount()?

The behaviour is actually well defined: It does nothing.

As the assumption that at each iteration of the loop there are at least "i" rows is wrong, it crashes.

Maybe the best option is to just skip jobs with duplicate ids?

Revision history for this message
In , Fobian (fobian) wrote :

*** Bug 409439 has been marked as a duplicate of this bug. ***

Changed in print-manager:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
In , Rik Mills (rikmills) wrote :

*** Bug 410124 has been marked as a duplicate of this bug. ***

Revision history for this message
In , U26 (u26) wrote :

*** Bug 410570 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 410509 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Gordon Lack (gordon-lack) wrote :
Download full text (6.8 KiB)

FWIW.
That comment about that multiple jobs with the same id shouldn't exist.
I just decided to use the taskbar print-queue viewer (kde-print-queue) and selected "All Jobs".
At that point it crashed (but only it - plasma was OK).

But "lpstat -W completed" shows this - several multiple entries...

[parent]: lpstat -W completed
MFCJ4410DW-52 gml4410 8081408 Sun 01 Sep 2019 22:31:09 BST
MFCJ4410DW-51 gml4410 3419136 Sun 01 Sep 2019 22:28:35 BST
MFCJ4410DW-49 gml4410 667648 Sun 01 Sep 2019 22:20:14 BST
MFCJ4410DW-48 gml4410 12908544 Sun 01 Sep 2019 22:18:02 BST
MFCJ4410DW-47 gml4410 522240 Sun 01 Sep 2019 22:16:27 BST
MFCJ4410DW-46 gml4410 667648 Sun 01 Sep 2019 22:15:51 BST
MFCJ4410DW-45 gml4410 633856 Sun 01 Sep 2019 22:15:19 BST
MFCJ4410DW-44 gml4410 3618816 Sun 01 Sep 2019 22:13:56 BST
MFCJ4410DW-43 gml4410 3674112 Sun 01 Sep 2019 22:13:06 BST
MFCJ4410DW-40 gml4410 1386496 Sun 01 Sep 2019 21:48:04 BST
MFCJ4410DW-39 gml4410 1386496 Sun 01 Sep 2019 21:47:16 BST
MFCJ4410DW-38 gml4410 1199104 Sun 01 Sep 2019 21:44:59 BST
MFCJ4410DW-37 gml4410 1199104 Sun 01 Sep 2019 21:44:16 BST
MFCJ4410DW-36 gml4410 1832960 Sun 01 Sep 2019 21:42:29 BST
MFCJ4410DW-35 gml4410 5528576 Sun 01 Sep 2019 21:37:53 BST
MFCJ4410DW-33 gml4410 1867776 Sun 01 Sep 2019 21:32:38 BST
MFCJ4410DW-33 gml4410 1867776 Sun 01 Sep 2019 21:32:38 BST
MFCJ4410DW-31 gml4410 104448 Tue 13 Aug 2019 12:52:43 BST
MFCJ4410DW-31 gml4410 104448 Tue 13 Aug 2019 12:52:43 BST
MFCJ4410DW-30 gml4410 256000 Tue 06 Aug 2019 08:09:15 BST
MFCJ4410DW-30 gml4410 256000 Tue 06 Aug 2019 08:09:15 BST
MFCJ4410DW-29 gml4410 5049344 Tue 06 Aug 2019 08:08:49 BST
MFCJ4410DW-29 gml4410 5049344 Tue 06 Aug 2019 08:08:49 BST
MFCJ4410DW-28 gml4410 131072 Mon 05 Aug 2019 03:10:27 BST
MFCJ4410DW-28 gml4410 131072 Mon 05 Aug 2019 03:10:27 BST
MFCJ4410DW-27 gml4410 437248 Sat 03 Aug 2019 05:52:51 BST
MFCJ4410DW-27 gml4410 437248 Sat 03 Aug 2019 05:52:51 BST
MFCJ4410DW-26 gml4410 178176 Fri 02 Aug 2019 00:24:39 BST
MFCJ4410DW-26 gml4410 178176 Fri 02 Aug 2019 00:24:39 BST
MFCJ4410DW-25 gml4410 312320 Sat 15 Jun 2019 08:55:55 BST
MFCJ4410DW-25 gml4410 312320 Sat 15 Jun 2019 08:55:55 BST
MFCJ4410DW-24 gml4410 1629184 Sun 09 Jun 2019 18:51:18 BST
MFCJ4410DW-24 gml4410 1629184 Sun 09 Jun 2019 18:51:18 BST
MFCJ4410DW-23 gml4410 211968 Sun 02 Jun 2019 11:11:43 BST
MFCJ4410DW-23 gml4410 211968 Sun 02 Jun 2019 11:11:43 BST
MFCJ4410DW-22 gml4410 521216 Sun 02 Jun 2019 11:05:51 BST
MFCJ4410DW-22 gml4410 521216 Sun 02 Jun 201...

Read more...

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 411153 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Carlos (cromualdo) wrote :

Created attachment 123034
New crash information added by DrKonqi

plasmashell (5.16.5) using Qt 5.12.3

- What I was doing when the application crashed:
Usually after printing Plasma would crash but restarting from terminal using killall plasmashell followed by kstart plasmashell would work, now it just keeps on crashing, so it becomes unusable.
- Unusual behavior I noticed:
Whenever printing succeeded, plasma would crash but resume. If printing failed and job stayed in printing queue, plasma would crash and never resume. Manual restart of plasma would be necessary. This is no longer working.

-- Backtrace (Reduced):
#6 0x00007f6ae18e9c80 in JobModel::updateJob(int, KCupsJob const&) () at /usr/lib/x86_64-linux-gnu/libkcupslib.so
#7 0x00007f6ae18ebe68 in JobModel::insertJob(int, KCupsJob const&) () at /usr/lib/x86_64-linux-gnu/libkcupslib.so
#8 0x00007f6ae18ec46b in JobModel::getJobFinished(KCupsRequest*) () at /usr/lib/x86_64-linux-gnu/libkcupslib.so
#9 0x00007f6b32e203e2 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f6b3474d65c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in print-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 411870 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 412269 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Giant+bug-kde (giant+bug-kde) wrote :

*** Bug 414058 has been marked as a duplicate of this bug. ***

Revision history for this message
vmagnin (vincent-magnin) wrote :

The bug is still present in Kubuntu 19.10 (KDE Plasma 5.16.5), and it appeared two years ago in Kubuntu 17.10.

I have reinstalled the package print-manager on my notebook to install a new printer, but I was obliged to remove print-manager after plasma crashed when trying to print as the Wi-Fi was off.

Note that without the print-manager, I can not add printers but I can still print on already installed printers. So you can install print-manager each time you need to manage a new printer then uninstall the package.

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 414083 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

People that still have this crash. Can you please run
lpstat -R

People that still have this crash and have the technical ability to test a patch, please test https://phabricator.kde.org/D25623

If we're quick enough we can get it into the 19.12 release of print-manager

Revision history for this message
In , Mr203010spam (mr203010spam) wrote :

I do experience the crash and

$> lpstat -R
  0 printer-97 user 316416 Sun Sep 15 22:00:36 2019
  1 printer-97 user 316416 Sun Sep 15 22:00:36 2019
  2 printer-97 user 316416 Sun Sep 15 22:00:36 2019

Running on openSuse Thumbleweed on the latests updates. Experience this crash since a few days

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

(In reply to Meinhard Ritscher from comment #43)
> I do experience the crash and
>
> $> lpstat -R
> 0 printer-97 user 316416 Sun Sep 15 22:00:36 2019
> 1 printer-97 user 316416 Sun Sep 15 22:00:36 2019
> 2 printer-97 user 316416 Sun Sep 15 22:00:36 2019
>
> Running on openSuse Thumbleweed on the latests updates. Experience this
> crash since a few days

Right, you have 3 print jobs with id 97, which is why this is crashing.

Do you remember what you did to end up with 3 print jobs with the same id? Was your printer off or on or it failed during printing or something?

Revision history for this message
In , Vortex-s (vortex-s) wrote :

Created attachment 124272
New crash information added by DrKonqi

plasmashell (5.17.3) using Qt 5.13.1

- What I was doing when the application crashed:
Logged in into KDE
- Unusual behavior I noticed:
Desktop appeard and went straight to a black screen and after a few seconds Dr. Konqi appeared.

-- Backtrace (Reduced):
#6 0x00007f0945c0b556 in JobModel::updateJob(int, KCupsJob const&) () at /usr/lib64/libkcupslib.so
#7 0x00007f0945c0d5f8 in JobModel::insertJob(int, KCupsJob const&) () at /usr/lib64/libkcupslib.so
#8 0x00007f0945c0dab9 in JobModel::getJobFinished(KCupsRequest*) () at /usr/lib64/libkcupslib.so
#9 0x00007f097747deea in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#10 0x00007f097800fc62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5

Revision history for this message
In , Mr203010spam (mr203010spam) wrote :

(In reply to Albert Astals Cid from comment #44)
> Right, you have 3 print jobs with id 97, which is why this is crashing.
>
> Do you remember what you did to end up with 3 print jobs with the same id?
> Was your printer off or on or it failed during printing or something?
Not really, no. I would assume the (network connected) printer was switched off. But I'm not certain.

Meanwhile I managed to remove the print jobs via lprm -U user x (iterating x from 0 to 2)

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 414652 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Git commit c93f2f16c30d10fbd0f4bfb4c0bf0cec07a4c93b by Albert Astals Cid.
Committed on 02/12/2019 at 22:05.
Pushed by aacid into branch 'release/19.12'.

Fix crash when cups returns jobs with duplicate id

Summary:
For some reason my cups was giving me two withheld jobs with id 33 and two with id 40

That made the JobModel code crash, because it went like this

 * First job with id 33 found
 * insertRow with 0 called
 * Row 0 inserted
 * Job at row 0 updated (from inside insertRow)
 * Second job with id 33 found
 * The "oh i already have this job code triggers", updates the job, then takesRow 0 and inserts at row 1. QStandardItemModel doesn't like getting a row add at 1 inserted when empty
 * First job with id 40 found
 * insertRow with 2 called
 * Row 2 inserted, it fails, QStandardItemModel doesn't like getting a row add at 2 when empty
 * Job at row 2 updated (from iniside insertRow)
 * Crash because there's no row 2 in the model

Test Plan: Doesn't crash anymore with my weird cups list of pending jobs

Reviewers: dantti

Reviewed By: dantti

Subscribers: ngraham, marcelm, fvogt, broulik, nicolasfella, kmaterka, kde-utils-devel

Differential Revision: https://phabricator.kde.org/D25623

M +21 -2 libkcups/JobModel.cpp

https://commits.kde.org/print-manager/c93f2f16c30d10fbd0f4bfb4c0bf0cec07a4c93b

Revision history for this message
In , Konrad Materka (materka) wrote :

Anyone knows what exactly happened on Cups side? Why there were jobs with duplicated Id? Maybe this should also be reported to Cups team?

Revision history for this message
In , Gordon Lack (gordon-lack) wrote :

>>> Anyone knows what exactly happened on Cups side?

I was wondering a similar thing. But rather what the "cups database" of past jobs looked like when it has multiple jobs with teh same id.
When I went looking the info was only in /var/spool/cups and the job number was taken from the filename, so what does this look like when there are multiple ids?

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

(In reply to Konrad Materka from comment #49)
> Maybe this should also be reported to Cups team?

Unless someone knows how to reproduce the duplicate ids issue i'm not sure it makes much sense, but feel free :) maybe they can think of a way this would happen

Changed in print-manager:
status: Confirmed → Fix Released
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 415239 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 415014 has been marked as a duplicate of this bug. ***

Rik Mills (rikmills)
Changed in plasma-workspace (Ubuntu):
status: Confirmed → Invalid
no longer affects: plasma-workspace (Ubuntu Bionic)
no longer affects: plasma-workspace (Ubuntu Eoan)
no longer affects: plasma-workspace (Ubuntu Focal)
Changed in print-manager (Ubuntu Focal):
status: Confirmed → Fix Released
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 416215 has been marked as a duplicate of this bug. ***

Revision history for this message
In , 8p-k26-gj (8p-k26-gj) wrote :

*** Bug 416985 has been marked as a duplicate of this bug. ***

Revision history for this message
Gordon Lack (gordon-lack) wrote :

>>> no longer affects: plasma-workspace (Ubuntu Eoan)

This is incorrect, as I've just had it happen to me (again) and I;m using Eoan.

Here is my print queue:

[gmllaptop]: lpstat -R
  0 MFCJ6930DW-111 gml4410 1024 Fri 24 Jan 2020 17:14:13 GMT
  1 MFCJ6930DW-111 gml4410 1024 Fri 24 Jan 2020 17:14:13 GMT
  2 MFCJ6930DW-111 gml4410 1024 Fri 24 Jan 2020 17:14:13 GMT

Note that despite the time (>9 days ago) it only caused the problem just now (I suspect at approximately the midnight rollover from Sunday Feb 2nd to Monday 3rd).

A "cancel -x -a" has removed these records and my laptop is now OK again.

Attached is the saved crash text file.

Revision history for this message
Gordon Lack (gordon-lack) wrote :

>>> This is incorrect, as I've just had it happen to me (again) and I'm using Eoan.

Although if that actually meant the problem wasn't with plasma-workspace but rather with print-manager then I disagree.
Clearly plasma-workspace has the ability to crash when presented with incorrect data. That itself is a bug! Applications should validate their input and handle errors appropriately. A crash is not an appropriate handling.

Also, will the Focal fix be backported to the earlier, still suffering releases?

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 417601 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Matheus (mattfly) wrote :

Is there any workaround? I'm on 5.18.9? I was trying to use a wifi printer

Revision history for this message
In , Gordon Lack (gordon-lack) wrote :

A workaround is to cancel all jobs, or at least the duplicates(?).

See:

https://bugs.launchpad.net/ubuntu/+source/plasma-workspace/+bug/1770044/comments/82

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 417462 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 417537 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 418717 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Beastyvoid (yvan-skywalker) wrote :

Created attachment 127232
New crash information added by DrKonqi

plasmashell (5.17.5) using Qt 5.13.2

- What I was doing when the application crashed:

I added a new HP printer earlier this day. Now, Plasma crashes at every login.
I created a new user with a brand new /home and Plasma crashes with that user as well.

-- Backtrace (Reduced):
#6 0x00007f809d42436a in JobModel::updateJob(int, KCupsJob const&) () from /lib64/libkcupslib.so
#7 0x00007f809d426418 in JobModel::insertJob(int, KCupsJob const&) () from /lib64/libkcupslib.so
#8 0x00007f809d4268d9 in JobModel::getJobFinished(KCupsRequest*) () from /lib64/libkcupslib.so
#9 0x00007f80c94b279a in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#10 0x00007f80c9f88ab6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in print-manager (Ubuntu Bionic):
status: New → Confirmed
Changed in print-manager (Ubuntu Eoan):
status: New → Confirmed
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 420576 has been marked as a duplicate of this bug. ***

Revision history for this message
Patrick Gillespie (vermontpoet) wrote :

For what it's worth, this bug is still present in Kubuntu 20.04. Deleting Print-Manager and reinstalling after reboot (and deleting printers) ---as advised above--- seems to have solved the problem---for now.

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 424849 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 412639 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Git commit 33a1a1dced51ab8d21bf766db45f45e14c448b99 by Albert Astals Cid.
Committed on 02/12/2019 at 22:04.
Pushed by aacid into branch 'arcpatch-D25623'.

Fix crash when cups returns jobs with duplicate id

Summary:
For some reason my cups was giving me two withheld jobs with id 33 and two with id 40

That made the JobModel code crash, because it went like this

 * First job with id 33 found
 * insertRow with 0 called
 * Row 0 inserted
 * Job at row 0 updated (from inside insertRow)
 * Second job with id 33 found
 * The "oh i already have this job code triggers", updates the job, then takesRow 0 and inserts at row 1. QStandardItemModel doesn't like getting a row add at 1 inserted when empty
 * First job with id 40 found
 * insertRow with 2 called
 * Row 2 inserted, it fails, QStandardItemModel doesn't like getting a row add at 2 when empty
 * Job at row 2 updated (from iniside insertRow)
 * Crash because there's no row 2 in the model

Test Plan: Doesn't crash anymore with my weird cups list of pending jobs

Reviewers: dantti

Reviewed By: dantti

Subscribers: ngraham, marcelm, fvogt, broulik, nicolasfella, kmaterka, kde-utils-devel

Differential Revision: https://phabricator.kde.org/D25623

M +21 -2 libkcups/JobModel.cpp

https://invent.kde.org/utilities/print-manager/commit/33a1a1dced51ab8d21bf766db45f45e14c448b99

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.