Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 321133 - Python hangs when importing pynotify (dev-python/notify-python)
Summary: Python hangs when importing pynotify (dev-python/notify-python)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Tiziano Müller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-23 02:18 UTC by Stelard Actek
Modified: 2010-07-03 10:54 UTC (History)
3 users (show)

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


Attachments
Example script to cause issue (hang.py,99 bytes, text/plain)
2010-05-23 02:19 UTC, Stelard Actek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stelard Actek 2010-05-23 02:18:11 UTC
As the summary says, python will hang when attempting to import pynotify. A look at 'top' at this point will show python using near 100% of the CPU. Python continues to hang until Ctrl+C is pressed, at which point the script seems to continue, though without having loaded pynotify (so attempting to use it causes the script to fail).

Reproducible: Always

Steps to Reproduce:
1. emerge -av dev-python/notify-python
2. Run the attached script


Actual Results:  
Python hung and hogged the CPU.

Expected Results:  
Successful loading of the pynotify module

I've tried compiling dev-python/notify-python with different CFLAGS, with parallel compilation off and with distcc off. Nothing seems to fix it.

Portage 2.1.8.3 (default/linux/x86/10.0/desktop/gnome, gcc-4.3.4, glibc-2.10.1-r1, 2.6.33-tuxonice-r2 i686)
=================================================================
System uname: Linux-2.6.33-tuxonice-r2-i686-Intel-R-_Atom-TM-_CPU_N280_@_1.66GHz-with-gentoo-2.0.1
Timestamp of tree: Sat, 22 May 2010 16:15:01 +0000
distcc[2964] (dcc_set_trace_from_env) ERROR: failed to open logfile /var/log/distcc/distcc.log: Permission denied [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1 skype-eula IBM-J1.6 jrockit"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -mtune=generic -mssse3 -mfpmath=sse -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/distcc/bin /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -mtune=generic -mssse3 -mfpmath=sse -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distcc distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.internode.on.net/pub/gentoo ftp://mirror.internode.on.net/pub/gentoo"
LANG="en_AU.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB en"
MAKEOPTS="-j4"
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"
SYNC="rsync://steltechcor.dyndns.org/gentoo-portage"
USE="X a52 aac acl acpi alsa arts avahi bash-completion berkdb bluetooth branding bzip2 cairo cdparanoia cdr cli consolekit cracklib crypt css cups cxx dbus dga dma dri dts dvd dvdr eds emboss encode esd evo exif fam firefox flac fortran fuse gcj gdbm gdu gif gnome gnome-keyring gnutls gpm gstreamer gtk hal iconv icu idn ipod ipv6 java jpeg kde lcms libffi libnotify mad madwifi mikmod mmx mmxext mng modules mono mp3 mp4 mpeg mudflap musicbrainz nautilus ncurses networkmanager nls nptl nptlonly nsplugin offensive ogg openal opengl openmp pam pango pcre pdf perl png policykit ppds pppd pulseaudio python qt3support qt4 readline reflection samba sdl session spell spl sse sse2 sse3 ssl ssse3 startup-notification svg sysfs tcpd threads tiff truetype unicode upnp usb vorbis win32codecs x264 x86 xcb xml xorg xulrunner xv xvid xvmc zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="auth_digest authn_file authz_groupfile dav dav_fs authz_host dir mime" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev intel vga vesa" 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, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Stelard Actek 2010-05-23 02:19:10 UTC
Created attachment 232535 [details]
Example script to cause issue
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2010-05-25 08:56:23 UTC
I can't reproduce it here

I use python-2.6.5-r2
Comment 3 Stelard Actek 2010-05-25 22:33:49 UTC
(In reply to comment #2)
> I can't reproduce it here
> 
> I use python-2.6.5-r2
> 

I just upgraded to 2.6.5-r2, and ran python-updater after that. I still have the problem.
Comment 4 Sebastian Pipping gentoo-dev 2010-06-26 00:19:17 UTC
Have you tried running strace on it?  Maybe

  # strace python hang.py

gives a hint on what it's looping on?

Comment 5 Stelard Actek 2010-07-03 10:00:45 UTC
I did as suggested, and it turns out my problem was that I had a script called pynotify.py in the same directory as my other scripts...

I feel like a right fool now. :P
Comment 6 Sebastian Pipping gentoo-dev 2010-07-03 10:54:15 UTC
No problem. Thanks for reporting back the solution!