Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 401011 - kde-base/printer-applet keeps crashing on kde startup or when run manually
Summary: kde-base/printer-applet keeps crashing on kde startup or when run manually
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 10:31 UTC by Markus Wernig
Modified: 2012-03-02 06:44 UTC (History)
1 user (show)

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 Markus Wernig 2012-01-27 10:31:23 UTC
On ~amd64, starting with 4.7.4, printer-applet-kde crashes during startup and when called manually:

$ /usr/bin/printer-applet-kde 
KCrash: Application 'printer-applet-kde' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/home/markus/.kde4/socket-envy/kdeinit4__0


Tried to get a backtrace:

$ python -m trace --count /usr/bin/printer-applet-kde
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib64/python2.7/trace.py", line 827, in <module>
    main()
  File "/usr/lib64/python2.7/trace.py", line 815, in main
    t.runctx(code, globs, globs)
  File "/usr/lib64/python2.7/trace.py", line 521, in runctx
    exec cmd in globals, locals
  File "/usr/bin/printer-applet-kde", line 66, in <module>
    from statereason import StateReason
ImportError: No module named statereason

$ locate statereason.py
/usr/share/apps/printer-applet/statereason.py
/usr/share/system-config-printer/statereason.py

$ equery b statereason.py
 * Searching for statereason.py ... 
app-admin/system-config-printer-common-1.3.7 (/usr/share/system-config-printer/statereason.py)
kde-base/printer-applet-4.8.0 (/usr/share/apps/printer-applet/statereason.py)

$ ls -l /usr/share/apps/printer-applet/statereason.py
-rw-r--r-- 1 root root 4932 Jan 27 11:13 /usr/share/apps/printer-applet/statereason.py

$ ls -l /usr/share/system-config-printer/statereason.py
-rw-r--r-- 1 root root 6159 Jan 27 11:13 /usr/share/system-config-printer/statereason.py


Something similar seems to have happened before: https://bugs.gentoo.org/show_bug.cgi?id=288945 (But I didn't know how to reopen it)

Reproducible: Always

Steps to Reproduce:
1. run /usr/bin/printer-applet-kde
2.
3.



Portage 2.1.10.44 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r2, 3.2.1-gentoo-r2 x86_64)
=================================================================
System uname: Linux-3.2.1-gentoo-r2-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_720_@_1.60GHz-with-gentoo-2.1
Timestamp of tree: Thu, 26 Jan 2012 14:15:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3, 3.2.2
dev-util/cmake:           2.8.7-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.2-r1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo/ ftp://sunsite.cnlab-switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac accessibility acl acpi alsa amd64 arts avahi bash-completion berkdb bluetooth branding bzip2 cairo caps cdda cddax cddb cdparanoia cdr cli consolekit cracklib crypt css cups cxx dbus device-mapper dga dirac dns dri dts dv dvb dvd dvdnav dvdr dvdread emboss encode exif faac faad fam ffmpeg firefox flac fortran ftp gd gdbm gdu ggi gif gimp gmp gnome gphoto2 gpm gstreamer gtk gtkhtml gzip h323 hal hdmi http iconv imagemagick imap imlib ipv6 java jce jpeg jpeg2k kde kdrive kontact lame laptop lcms ldap libnotify live lzo mad matroska mdnsresponder-compat mikmod mime mmap mmx mmxext mng modplug modules mozilla mp3 mp4 mpeg mplayer mudflap multilib mysql ncurses network networkmanager nls nptl nptlonly nsplugin nss obex ogg opencore-amr opengl openmp openssl osdmenu oss pam pango pcmcia pcre pcsc pcsc-lite pda pdf perl php pipechan plasma png pnm policykit ppds pppd pvr qt3 qt3support qt4 radio raw rdesktop readline rss sasl scanner sdl secure-delete semantic-desktop session sip smartcard smp sockets spell sql sqlite sse sse2 ssl ssse3 startup-notification static-libs svg sysfs tcpd theora threads tiff timidity toolame tremor truetype twolame udev unicode usb utils v4l v4l2 vcd vnc vorbis wav wavpack webkit wifi wmf x264 xanim xattr xcb xcomposite xine xinerama xml xorg xpm xscreensaver xulrunner xv xvid zeroconf zlib" 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 authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="all" 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 synaptics void alps" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev fglrx" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Markus Wernig 2012-01-27 11:05:55 UTC
Ran python-updater, did not solve problem.
Comment 2 Markus Wernig 2012-01-27 14:58:11 UTC
statereason.py does not seem to be the reason:

$ export PYTHONPATH=/usr/share/apps/printer-applet
$ python -m trace --count /usr/bin/printer-applet-kde
KCrash: Application 'printer-applet-kde' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/home/markus/.kde4/socket-envy/kdeinit4__0

Still crashes, but no stacktrace ...
Comment 3 Maciej Mrozowski gentoo-dev 2012-01-27 21:02:20 UTC
Unable to reproduce. Worked with 4.7.4 and 4.8.0 as well. You're still on portage-2.1 therefore I suspect some preserved-lib problem (or rather a consequence of the lack of thereof and thus the need to run revdep-rebuild).
Comment 4 Markus Wernig 2012-01-27 21:22:09 UTC
What do you mean "still on portage-2.1"? Afaik, Portage is currently at 2.1.10.44 for ~amd64 :-)

*  sys-apps/portage
      Latest version available: 2.1.10.44
      Latest version installed: 2.1.10.44
      Size of files: 763 kB
      Homepage:      http://www.gentoo.org/proj/en/portage/index.xml
      Description:   Portage is the package management and distribution system for Gentoo
      License:       GPL-2


One thing I noted:

I have another gentoo machine, which I had been constantly upgrading over the years (reactivated and upgraded to KDE 4.8.0 in order to reproduce this bug) - and it does not show the same behaviour.

The machine this bug occurred on is a fresh install that was rebuild from the world file of another working installation (with KDE 4.7.4 on ~x86, which did not show the bug).

So one of the differences seems to be that on the machine that shows the behaviour, everything was build together from scratch, while the other one was constantly upgraded. To me this looks like something is missing on the "new" machine, but not on the "old" one - whatever it is, it might have been installed previously, maybe by some other dependency, which is now missing.

I have run revdep-rebuild multiple times - to no avail:

# revdep-rebuild
 * Configuring search environment for revdep-rebuild

 * Checking reverse dependencies
 * Packages containing binaries and libraries broken by a package update
 * will be emerged.

 * Collecting system binaries and libraries
 * Generated new 1_files.rr
 * Collecting complete LD_LIBRARY_PATH
 * Generated new 2_ldpath.rr
 * Checking dynamic linking consistency
[ 100% ]                 

 * Dynamic linking on your system is consistent... All done.
Comment 5 Maciej Mrozowski gentoo-dev 2012-01-28 03:32:25 UTC
I mean you're not using portage-2.2 ("masked" but rocking) with preserved-libs feature (no more revdep-rebuild needed in theory and in most cases in practice).

Well, you could try the recipe from bug 399261:

eselect python set python2.7
python-updater
emerge --depclean
revdep-rebuild

Os otherwise ensure that PyQt4, pykde4 is rebuilt for currently selected python before runnig/installing printer-applet (and system-config-printer-kde which likely fails for you as well).
Comment 6 gstier 2012-01-28 12:21:34 UTC
Problem still not solved.

I've done:

python-updater
emerge --depclean
revdep-rebuild


emerge system-config-printer-common 
emerge system-config-printer-kde 
emerge printer-applet

allways the same crash
Comment 7 Markus Wernig 2012-01-28 14:45:14 UTC
OK, remerging the whole bunch solves it for me:

emerge PyQt4 && emerge sip && emerge pykde4 && emerge system-config-printer-kde && emerge printer-applet.

Thanks for the tipps.
Comment 8 Navid Zamani 2012-03-02 06:44:25 UTC
(In reply to comment #7)
> emerge PyQt4 && emerge sip && emerge pykde4 && emerge
> system-config-printer-kde && emerge printer-applet.

IMPORTANT: When doing that, be sure to use “emerge -1” for the dependencies, or they will get added to the world file!!
Also, usually dependencies are installed first, so this should work exactly the same: 

> emerge -a1tv PyQt4 sip pykde4 system-config-printer-kde printer-applet

(Added --ask, --tree and --verbose, so you can see for yourself, before starting it.)

I had the exact same problem, btw. Both system-config-printer-kde and printer-applet crashed when ran. Now they work.

There’s a huge load of dupes btw. I think most of them got wrongly closed because they had unknowingly re-compiled of the above packages shortly before, and so the bug didn’t show anymore.
And there will be a huge load of them in the future too, unless this is fixed once and for all.
Just my two cents…