Bug 449552 - CUPS and DBus crashes
Summary: CUPS and DBus crashes
Status: RESOLVED DOWNSTREAM
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.08.1
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-02-03 10:50 UTC by Matias L
Modified: 2022-02-03 22:52 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matias L 2022-02-03 10:50:00 UTC
Application: okular (21.08.1)

Qt Version: 5.15.2
Frameworks Version: 5.86.0
Operating System: Linux 5.13.0-27-generic x86_64
Windowing System: X11
Drkonqi Version: 5.22.5
Distribution: Ubuntu 21.10

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

I  am having problems with the printers on my computer, where it crashes when trying to do something related with them.

e.g.: 
* libreoffice crashes on startup, I have to disable cups previously every time
* when trying to open the "Print" dialog on Okular, I also get a crash.
* `lpstat -p -d` crashes with the following error:

"dbus[794440]: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file ../../../dbus/dbus-message.c line 2760.
This is normally a bug in some application using the D-Bus library.

  D-Bus not built with -rdynamic so unable to print a backtrace
[1]    794440 IOT instruction (core dumped)  lpstat -p -d"

This is the same type of crash info that I get from okular and libreoffice.

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Aborted

[KCrash Handler]
#4  __pthread_kill_implementation (no_tid=0, signo=6, threadid=139952731393600) at pthread_kill.c:44
#5  __pthread_kill_internal (signo=6, threadid=139952731393600) at pthread_kill.c:80
#6  __GI___pthread_kill (threadid=139952731393600, signo=signo@entry=6) at pthread_kill.c:91
#7  0x00007f494caaa476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007f494ca907b7 in __GI_abort () at abort.c:79
#9  0x00007f494bf52ed6 in ?? () from /lib/x86_64-linux-gnu/libdbus-1.so.3
#10 0x00007f494bf79620 in _dbus_warn_check_failed () from /lib/x86_64-linux-gnu/libdbus-1.so.3
#11 0x00007f494bf688af in dbus_message_iter_append_basic () from /lib/x86_64-linux-gnu/libdbus-1.so.3
#12 0x00007f494bf69d86 in dbus_message_append_args_valist () from /lib/x86_64-linux-gnu/libdbus-1.so.3
#13 0x00007f494bf69fdd in dbus_message_append_args () from /lib/x86_64-linux-gnu/libdbus-1.so.3
#14 0x00007f493c08c23a in avahi_record_browser_new () from /lib/x86_64-linux-gnu/libavahi-client.so.3
#15 0x00007f4930452d41 in ?? () from /lib/x86_64-linux-gnu/libcups.so.2
#16 0x00007f4930402591 in cupsGetDests2 () from /lib/x86_64-linux-gnu/libcups.so.2
#17 0x00007f493c37e235 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/printsupport/libcupsprintersupport.so
#18 0x00007f493c37e3d2 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/printsupport/libcupsprintersupport.so
#19 0x00007f494c3478e7 in QPrinterInfo::defaultPrinter() () from /lib/x86_64-linux-gnu/libQt5PrintSupport.so.5
#20 0x00007f494c342b1d in QPrinterPrivate::findValidPrinter(QPrinterInfo const&) () from /lib/x86_64-linux-gnu/libQt5PrintSupport.so.5
#21 0x00007f494c344c16 in QPrinterPrivate::initEngines(QPrinter::OutputFormat, QPrinterInfo const&) () from /lib/x86_64-linux-gnu/libQt5PrintSupport.so.5
#22 0x00007f494c345042 in QPrinter::QPrinter(QPrinter::PrinterMode) () from /lib/x86_64-linux-gnu/libQt5PrintSupport.so.5
#23 0x00007f4945622e67 in Okular::Part::slotPrint() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#24 0x00007f494d16958b in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f494d16e456 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x000055bba36a2492 in ?? ()
#27 0x00007f494d195a88 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007f494dcd7b86 in QAction::triggered(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f494dcda89c in QAction::activate(QAction::ActionEvent) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f494dcdb487 in QAction::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007f494dcde6b3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007f494d15e16a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007f494d607054 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#34 0x00007f494d607a03 in QShortcutMap::tryShortcut(QKeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#35 0x00007f494d5afec2 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#36 0x00007f494d5d332f in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#37 0x00007f49484790b4 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
#38 0x00007f494d195a53 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x00007f494d473e23 in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#40 0x00007f494d18b73e in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007f494dcde6b3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007f494d15e16a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007f494d161257 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#44 0x00007f494d1b7ef7 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#45 0x00007f494b8078bb in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007f494b85af08 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007f494b805003 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007f494d1b7548 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#49 0x00007f494d15ca9b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007f494d165024 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x000055bba369dc4a in ?? ()
#52 0x00007f494ca91fd0 in __libc_start_call_main (main=main@entry=0x55bba369c700, argc=argc@entry=2, argv=argv@entry=0x7fff41111b08) at ../sysdeps/nptl/libc_start_call_main.h:58
#53 0x00007f494ca9207d in __libc_start_main_impl (main=0x55bba369c700, argc=2, argv=0x7fff41111b08, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff41111af8) at ../csu/libc-start.c:409
#54 0x000055bba369e665 in ?? ()
[Inferior 1 (process 794686) detached]

Possible duplicates by query: bug 447519, bug 445746, bug 445496, bug 445355.

Reported using DrKonqi
Comment 1 Albert Astals Cid 2022-02-03 13:30:34 UTC
It very much sounds like your installation of cups/dbus is broken, not something that Okular can help you with. I'd suggest to visit some help forum (possibily ubuntu related) and ask there.
Comment 2 Nicolas Fella 2022-02-03 22:42:29 UTC
https://bugs.kde.org/show_bug.cgi?id=432740 shows a similar backtrace, which suggests the issue might be with Qt's printing code
Comment 3 Albert Astals Cid 2022-02-03 22:52:45 UTC
(In reply to Nicolas Fella from comment #2)
> https://bugs.kde.org/show_bug.cgi?id=432740 shows a similar backtrace, which
> suggests the issue might be with Qt's printing code

I'm 92% sure it's a local setup problem, Qt is calling cupsGetDests2 and that "can't crash". 

If it's crashing is because something is not well setup in the system or is there something in that stack that needs recompiling because of an ABI/API break .