Red Hat Bugzilla – Bug 979748
cupsd uses D-Bus from two different threads
Last modified: 2014-04-14 11:12:03 EDT
Version-Release number of selected component:
cmdline: /usr/sbin/cupsd -f
Thread no. 1 (10 frames)
#0 __memmove_ssse3_back at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1664
#1 memmove at /usr/include/bits/string3.h:57
#2 delete at dbus-string.c:1175
#4 _dbus_string_delete at dbus-string.c:1200
#5 load_message at dbus-message.c:4171
#6 _dbus_message_loader_queue_messages at dbus-message.c:4245
#7 _dbus_transport_get_dispatch_status at dbus-transport.c:1101
#8 _dbus_transport_queue_messages at dbus-transport.c:1128
#9 _dbus_connection_get_dispatch_status_unlocked at dbus-connection.c:4211
#11 dispatch_timeout_callback at ../avahi-common/dbus-watch-glue.c:105
Created attachment 767010 [details]
Created attachment 767011 [details]
Created attachment 767012 [details]
Created attachment 767013 [details]
Created attachment 767014 [details]
Created attachment 767015 [details]
Created attachment 767016 [details]
Created attachment 767017 [details]
Created attachment 767018 [details]
Created attachment 767019 [details]
There are quite a few symbols missing so it's hard to see what's happened. :-(
Could you please run these commands?:
1. debuginfo-install cupsd
2. gdb /usr/sbin/cupd /var/tmp/abrt/ccpp-2013-06-30-09:50:42-1513/coredump
3. then at the '(gdb)' prompt: thread apply all bt
What output do you get from step 3?
Created attachment 767328 [details]
This is the output of the requested commands with all the needed debuginfo packages installed.
I think the root cause of this is that cupsd is using avahi_threaded_poll (which makes use of D-Bus) while also using D-Bus in its main thread. I don't think that's allowed.
The fix will be to alter the avahi polling so that it's done in the main thread (i.e. as it was before it was re-implemented upstream).
*** Bug 974506 has been marked as a duplicate of this bug. ***
*** Bug 980294 has been marked as a duplicate of this bug. ***
*** Bug 980310 has been marked as a duplicate of this bug. ***
cups-1.6.2-15.fc19 has been submitted as an update for Fedora 19.
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cups-1.6.2-15.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Created attachment 768326 [details]
Crash with cups-1.6.2-15.fc19.x86_64
It happened again with version cups-1.6.2-15.fc19.x86_64
(In reply to Juan Orti Alcaine from comment #19)
> Created attachment 768326 [details]
> Crash with cups-1.6.2-15.fc19.x86_64
> It happened again with version cups-1.6.2-15.fc19.x86_64
Although abrt claims it was cups-1.6.2-15.fc19.x86_64, it was actually cups-1.6.2-12.fc19.x86_64. Two things that make me think that:
* /var/log/messages has this:
Jul 3 17:57:16 xenon abrt: File '/usr/sbin/cupsd' seems to be deleted
i.e. the running binary was actually different than the file on disk.
* the backtrace makes no sense (symbol lookups fail) when running gdb against cups-1.6.2-15.fc19.x86_64, but against cups-1.6.2-12.fc19.x86_64 it makes perfect sense:
Thread 2 (Thread 0x7fceb928c840 (LWP 1580)):
#0 0x00007fceb6ab0ded in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x00007fceb6aacba1 in _L_lock_790 () from /lib64/libpthread.so.0
#2 0x00007fceb6aacaa7 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3 0x00007fceb7aa012c in avahi_threaded_poll_stop ()
#4 0x00007fceb7aa01f3 in avahi_threaded_poll_free ()
#5 0x00007fceb92f9125 in dnssdStop () at dirsvc.c:1339
#6 cupsdStopBrowsing () at dirsvc.c:324
#7 0x00007fceb9314d65 in cupsdStopServer () at server.c:114
#8 0x00007fceb92e423e in main (argc=<optimized out>, argv=<optimized out>)
Thread 1 (Thread 0x7fcead1f2700 (LWP 2086)):
#0 0x00007fceb5b94a19 in raise () from /lib64/libc.so.6
#1 0x00007fceb5b96128 in abort () from /lib64/libc.so.6
#2 0x00007fceb5b8d986 in __assert_fail_base () from /lib64/libc.so.6
#3 0x00007fceb5b8da32 in __assert_fail () from /lib64/libc.so.6
#4 0x00007fceb789235c in connection_data_ref ()
#5 0x00007fceb7892926 in dispatch_timeout_callback ()
#6 0x00007fceb7a9fbf8 in avahi_simple_poll_dispatch ()
#7 0x00007fceb7a9fedd in avahi_simple_poll_loop ()
#8 0x00007fceb7a9ffa4 in thread () from /lib64/libavahi-common.so.3
#9 0x00007fceb6aaac53 in start_thread () from /lib64/libpthread.so.0
#10 0x00007fceb5c5413d in clone () from /lib64/libc.so.6
and in fact shows the use of avahi_threaded_poll_* functions -- exactly the thing we'd expect to see from that version.
So I think what must have happened was that, on upgrade, the cupsd from the previous version crashed during the restart triggered from the %postun scriptlet.
Humm... maybe I went too quick reporting the crash, I see this opening the coredump. If I understand it right, it seems the running binary was still the 1.6.2-12 version, I got confused when abrt told me it was the newer version, sorry.
[root@xenon tmp]# LANG=C gdb /usr/sbin/cupd/ /tmp/ccpp-2013-07-03-17\:57\:16-1580/coredump
GNU gdb (GDB) Fedora (7.6-30.fc19)
Copyright (C) 2013 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-redhat-linux-gnu".
For bug reporting instructions, please see:
/usr/sbin/cupd/: No such file or directory.
[New LWP 2086]
[New LWP 1580]
Missing separate debuginfo for the main executable file
Try: yum --disablerepo='*' --enablerepo='*debug*' install /usr/lib/debug/.build-id/d4/cd1cdec037a7f9c24cca29bdac7962357eef2a
Core was generated by `/usr/sbin/cupsd -f'.
Program terminated with signal 6, Aborted.
#0 0x00007fceb5b94a19 in ?? ()
[root@xenon tmp]# LANG=C yum --disablerepo='*' --enablerepo='*debug*' install /usr/lib/debug/.build-id/d4/cd1cdec037a7f9c24cca29bdac7962357eef2a
Loaded plugins: auto-update-debuginfo, langpacks, refresh-packagekit
Package matching 1:cups-debuginfo-1.6.2-12.fc19.x86_64 already installed. Checking for update.
Nothing to do
cups-1.6.2-15.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.