Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 469996 - net-print/cups-1.6.2-r5 - cupsd: segfault in libdbus-1.so.3.7.3 at startup
Summary: net-print/cups-1.6.2-r5 - cupsd: segfault in libdbus-1.so.3.7.3 at startup
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: cups-1.6-stable
  Show dependency tree
 
Reported: 2013-05-15 20:30 UTC by Bob Johnson
Modified: 2013-05-20 09:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Johnson 2013-05-15 20:30:35 UTC
I've been running unstable cups on my mostly-stable amd64 system due to the need to access more up-to-date printer drivers. The recent upgrade of cups to 1.6.2-r5 causes cups to segfault on startup. The dmesg output is:

$ dmesg | grep cups
[ 17.538093] cupsd[2929]: segfault at 4 ip 00007fca7e302e60 sp 00007fffd50f3ca8 error 6 in libdbus-1.so.3.7.3[7fca7e2e1000+3c000] 


Reproducible: Always




Thinking it might be caused by the coincident dbus upgrade, I masked dbus-1.6.10 and reverted to 1.6.8. Cups still failed to start at boot-time. I then masked cups-1.6.2-r5 and re-installed 1.6.2-r3. This older version starts fine with dbus-1.6.10.

Once the system has booted up, I can start cupsd manually without issues.

# emerge --info net-print/cups
Portage 2.1.11.62 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.7.10-gentoo-r1 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.7.10-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5-2500_CPU_@_3.30GHz-with-gentoo-2.2
KiB Mem:    32953680 total,  28596596 free
KiB Swap:    2097148 total,   2097148 free
Timestamp of tree: Wed, 15 May 2013 14:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo vmware printer-drivers local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA vmware"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/vmware /var/lib/layman/printer-drivers /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 apache2 berkdb bzip2 cairo cli clucene colord consolekit cracklib crypt cups curl cxx dbus doc dri examples exif fontconfig fortran gcj gd gdbm gif handbook iconv icu ipv6 jack java jbig jpeg jpeg2k kde kipi kpathsea lcms lzma mbox mmx mng modules mudflap multilib ncurses nls nptl nsplugin odbc ogg openexr opengl openmp pam pango pcre pdf plasma png policykit postgres qt3support readline scanner semantic-desktop session source spell sse sse2 sse4_1 ssl ssse3 svg t1lib tcpd threads tiff truetype unicode xattr xinerama xml xpm zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_core authn_dbd authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info lbmethod_byrequests log_config log_forensic logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif slotmem_shm socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev vmmouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver pdfimport" LINGUAS="en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19" SANE_BACKENDS="epson2" USERLAND="GNU" VIDEO_CARDS="fbdev intel radeon vesa vmware" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

net-print/cups-1.6.2-r5 was built with the following:
USE="X acl dbus filters gnutls java pam ssl threads zeroconf -debug -kerberos -lprng-compat -python (-selinux) -static-libs -usb -xinetd" LINGUAS="-ca -es -fr -ja -ru"
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2013-05-18 20:18:39 UTC
We can't do very much about this without further information (i.e. a backtrace of the segfault). 
Please have a look at the relevant documentation:
http://www.gentoo.org/proj/en/qa/backtraces.xml

Differences between -r3 and -r5 are minimal, basically only prefix support has been added - is it reproducible that the switch between -r3 and -r5 fixes/recreates the segfault?
Comment 2 Bob Johnson 2013-05-20 05:30:47 UTC
(In reply to comment #1)
> We can't do very much about this without further information (i.e. a
> backtrace of the segfault). 
> Please have a look at the relevant documentation:
> http://www.gentoo.org/proj/en/qa/backtraces.xml
> 
> Differences between -r3 and -r5 are minimal, basically only prefix support
> has been added - is it reproducible that the switch between -r3 and -r5
> fixes/recreates the segfault?

I think you might as well close this bug. It seems to be a temporal bug that is going to be almost impossible to find, and may no longer 'exist'.

Here's what I did:
1) I unmasked net-print/cups-1.6.2-r5 and emerged it. I no longer see the cupsd segfault at startup with the current stable kernel 3.8.13-gentoo.

2) I re-booted to the previous kernel 3.7.10-gentoo-r1. cupsd *did* crash at startup with this kernel.

3) I created a non-stripped debug build of cups, enabled core dumps in my /etc/security/limits.conf file and added the following two lines in /etc/init.d/cupsd:
       echo "/tmp/core" > /proc/sys/kernel/core_pattern
       echo 1 > /proc/sys/kernel/core_uses_pid
just after the 'ebegin "Staring cupsd" line.

4) When I rebooted with the above changes into the 3.7.10-gentoo-r1 kernel, cupsd started normally with no segfault.

5) I then removed the /etc/portage/env/net-print/cups splitdebug file, and re-built cups without debug information. When I rebooted into the 3.7.10-gentoo-r1 kernel, cupsd still started normally.

6) I then commented out the two lines I had added to the /etc/init.d/cupsd startup script, and rebooted again into 3.7.10-gentoo-r1. This time, cupsd segfaulted.

So, it appears that this is a very sensitive race bug that 1) is going to be almost impossible to get a backtrace on and 2) no longer manifests itself with the current stable kernel. I'm not sure it's worth any more effort at this point.
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2013-05-20 09:43:53 UTC
Wow. You put in a lot of work there. Thank you very much. 

This is what's called a heisenbug. It's only there if you don't look closely enough...

Let's close it now, and if it reappears with the new kernel, reopen.