Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402589 - app-text/calibre-0.8.46 - hangs in install phase with "Running gui", when using PyQt4.Qt.QSettings
Summary: app-text/calibre-0.8.46 - hangs in install phase with "Running gui", when usi...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-07 19:44 UTC by Christian Faulhammer (RETIRED)
Modified: 2015-10-09 14:04 UTC (History)
6 users (show)

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


Attachments
build.log (build.log,20.30 KB, text/plain)
2012-02-09 18:43 UTC, Christian Faulhammer (RETIRED)
Details
testcase strace (strace.testcase,139.45 KB, text/plain)
2012-02-14 19:00 UTC, Christian Faulhammer (RETIRED)
Details
PyQt4 test case that triggers the hang (testcase.py,370 bytes, text/plain)
2012-02-14 22:40 UTC, Zac Medico
Details
C++ version of the above testcase (main.cpp,459 bytes, text/plain)
2012-02-15 01:01 UTC, Davide Pesavento (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Faulhammer (RETIRED) gentoo-dev 2012-02-07 19:44:07 UTC
I have an indefinite hang at the install (also with 0.8.37) phase with the output 

* Running gui...

anything more I can provide for debug?

$ emerge --info --ignore-default-opts
Portage 2.1.10.44 (default/linux/x86/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 3.1.6-gentoo i686)
=================================================================
System uname: Linux-3.1.6-gentoo-i686-AMD_Athlon-tm-_X2_Dual_Core_Processor_BE-2400-with-gentoo-2.0.3
Timestamp of tree: Tue, 07 Feb 2012 18:45:01 +0000
ccache version 3.1.6 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo bazaar emacs fauli
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10 AdobeFlash-10.1 dlj-1.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--verbose"
FEATURES="assume-digests binpkg-logs buildpkg ccache distlocks ebuild-locks fixlafiles metadata-transfer news parallel-fetch protect-owned sandbox sfperms sign strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/"
LANG="de_DE.UTF8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="de"
MAKEOPTS="-j3"
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="/var/lib/layman/bazaar /var/lib/layman/emacs /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aiglx alsa applet artworkextra asf audiofile bash-completion berkdb bidi bogofilter bootsplash branding bzip2 cairo ccache cdda cddb cdparanoia cdr cleartype cli console consolekit cracklib crypt css cups curl custom-cflags dbus deskbar dga directfb divx4linux djvu dri dts dvd dvdr dvdread dvi emacs emboss encode evince exif fam fat fbcon fbcondecor fdftk ffmpeg foomaticdb fortran ftp gb gcj gdbm gdu gif glitz gphoto2 gpm gsf gtk gtk2 gtkhtml howl iconv icq idn imagemagick imlib ipv6 java javascript jpeg jpeg2k kpathsea libnotify libotf lirc lm_sensors mad matroska mime mmx mmxext mng modules mp3 mp4 mpeg mpeg2 mudflap mule nautilus ncurses nforce2 nls noaudio nocardbus nocxx novideo nowebdav nptl nptlonly nvidia objc objc++ objc-gc offensive ogg opengl openmp pam pango passwordsave pcre pdf plotutils pmu png policykit ppds pppd prediction preview-latex print publishers qt-static readline samba sdk session slang smp spell sse ssl startup-notification svg svga sysfs t1lib tcpd theora threads thumbnailing tiff toolkit-scroll-bars totem truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd videos vorbis win32codecs wmf wxwindows x264 x86 xcb xface xft xml xorg xosd xpm xulrunner xv xvid zlib" ALSA_CARDS="intel8x0" 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="ptp2" 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="mouse keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" LIRC_DEVICES="atiusb" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-07 20:21:09 UTC
Please attach the entire build log to this bug report.
Comment 2 Christian Faulhammer (RETIRED) gentoo-dev 2012-02-09 18:43:56 UTC
Created attachment 301417 [details]
build.log
Comment 3 Zac Medico gentoo-dev 2012-02-09 20:54:15 UTC
For me, instead of hanging there, shows a bunch of lines like this:

	Compiling form /var/tmp/portage/app-text/calibre-0.8.38/work/calibre/src/calibre/gui2/filename_pattern.ui

The relevant entry point is in $WORKDIR/calibre/setup/gui.py

The first thing it does is call a build_forms function from $WORKDIR/calibre/src/calibre/gui2/__init__.py

The first thing build_forms does is 'from PyQt4.uic import compileUi'

Please check if the following command hangs:

  python -c 'from PyQt4.uic import compileUi'
Comment 4 Christian Faulhammer (RETIRED) gentoo-dev 2012-02-10 22:27:27 UTC
(In reply to comment #3)
> Please check if the following command hangs:
> 
>   python -c 'from PyQt4.uic import compileUi'

 It does not.
Comment 5 Zac Medico gentoo-dev 2012-02-11 22:17:59 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Please check if the following command hangs:
> > 
> >   python -c 'from PyQt4.uic import compileUi'
> 
>  It does not.

The next thing it does is call a find_forms function that doesn't seem like it could hang, but that's the only thing it does before it calls info('\tCompiling form', form). Maybe find_forms succeeds but we don't see the 'Compiling form' message due to output buffering. Can you strace -f it to see what the last system calls are when it hangs?
Comment 6 Christian Faulhammer (RETIRED) gentoo-dev 2012-02-12 19:58:59 UTC
http://dev.gentoo.org/~fauli/strace.calibre.xz
Comment 7 Zac Medico gentoo-dev 2012-02-12 22:13:09 UTC
Here's the part where it appears to hang:

[pid 17049] stat64("/var/tmp/portage/app-text/calibre-0.8.39/temp/fake_homedir/.config/calibre/gui.json", 0xbfa0ca6c) = -1 ENOENT (No such file or directory)
[pid 17049] futex(0xb583d5fc, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 17049] stat64("/usr/lib/qt4/plugins", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 17049] stat64("/usr/lib/qt4/plugins", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 17049] lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 17049] lstat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=102400, ...}) = 0
[pid 17049] lstat64("/usr/lib/qt4", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 17049] lstat64("/usr/lib/qt4/plugins", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 17049] futex(0x921943c, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>

The stat64 call on gui.json happens in on line 22 of $WORKDIR/calibre/src/calibre/gui2/__init__.py:

  gprefs = JSONConfig('gui')

After that, the lstat64 on /usr/lib/qt4 seems to show that it enters the PyQt4 libraries before it hangs up on the last futex call.

I'm using dev-python/PyQt4-4.8.6 here. What version is yours?
Comment 8 Christian Faulhammer (RETIRED) gentoo-dev 2012-02-13 18:46:16 UTC
(In reply to comment #7)
> I'm using dev-python/PyQt4-4.8.6 here. What version is yours?

 4.8.4, I tried 4.9.1 just upfront and nothing changed.
Comment 9 Zac Medico gentoo-dev 2012-02-13 19:53:26 UTC
Doing a google search for qt+futex+hang turns up lots of results, but I didn't find any with a similar strace output. I think the part where it hangs in $WORKDIR/calibre/src/calibre/gui2/__init__.py might be where it calls QSettings methods. Can you try this test case to see if it hangs?

#!/usr/bin/python2.7
import tempfile
import shutil
from PyQt4.Qt import QSettings

tempdir = tempfile.mkdtemp()
config_dir = tempdir
try:
	QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, config_dir)
	QSettings.setPath(QSettings.IniFormat, QSettings.SystemScope,
			config_dir)
	QSettings.setDefaultFormat(QSettings.IniFormat)
finally:
	shutil.rmtree(tempdir)
Comment 10 Christian Faulhammer (RETIRED) gentoo-dev 2012-02-14 19:00:30 UTC
Created attachment 301945 [details]
testcase strace

Hangs.
Comment 11 Zac Medico gentoo-dev 2012-02-14 22:40:33 UTC
Created attachment 301971 [details]
PyQt4 test case that triggers the hang

(In reply to comment #10)
> Created attachment 301945 [details]
> testcase strace
> 
> Hangs.

It doesn't hang for me using qt-core-4.7.4-r1 and PyQt4-4.8.6. It hangs for you with PyQt4-4.8.4 and what version of qt-core?

I'm thinking that we should come up with a C++ test case, to isolate whether the problem has anything to do with PyQt4, or if it's just qt.
Comment 12 Davide Pesavento (RETIRED) gentoo-dev 2012-02-15 01:01:25 UTC
Created attachment 301979 [details]
C++ version of the above testcase

It doesn't hang here.
Comment 13 Christian Faulhammer (RETIRED) gentoo-dev 2012-02-23 22:26:37 UTC
(In reply to comment #11)
> It doesn't hang for me using qt-core-4.7.4-r1 and PyQt4-4.8.6. It hangs for you
> with PyQt4-4.8.4 and what version of qt-core?

 4.7.4-r1.
 
> I'm thinking that we should come up with a C++ test case, to isolate whether
> the problem has anything to do with PyQt4, or if it's just qt.

 Would be great.(In reply to comment #12)

> Created attachment 301979 [details]
> C++ version of the above testcase
> 
> It doesn't hang here.

 
$ LC_ALL=C gcc -I/usr/include/qt4/ /tmp/test.cpp
/tmp/ccBTAaVY.o: In function `main':
test.cpp:(.text+0x1a): undefined reference to `QByteArray::QByteArray(char const*)'
test.cpp:(.text+0x71): undefined reference to `QSettings::setPath(QSettings::Format, QSettings::Scope, QString const&)'
test.cpp:(.text+0xad): undefined reference to `QSettings::setPath(QSettings::Format, QSettings::Scope, QString const&)'
test.cpp:(.text+0xc5): undefined reference to `QSettings::setDefaultFormat(QSettings::Format)'
test.cpp:(.text+0xf9): undefined reference to `QDir::QDir(QString const&)'
test.cpp:(.text+0x10d): undefined reference to `QDir::rmdir(QString const&) const'
test.cpp:(.text+0x119): undefined reference to `QDir::~QDir()'
test.cpp:(.text+0x17a): undefined reference to `QDir::~QDir()'
/tmp/ccBTAaVY.o: In function `QByteArray::~QByteArray()':
test.cpp:(.text._ZN10QByteArrayD2Ev[_ZN10QByteArrayD5Ev]+0x23): undefined reference to `qFree(void*)'
/tmp/ccBTAaVY.o: In function `QByteArray::detach()':
test.cpp:(.text._ZN10QByteArray6detachEv[QByteArray::detach()]+0x56): undefined reference to `QByteArray::realloc(int)'
/tmp/ccBTAaVY.o: In function `QString::QString(QByteArray const&)':
test.cpp:(.text._ZN7QStringC2ERK10QByteArray[_ZN7QStringC5ERK10QByteArray]+0x40): undefined reference to `QString::fromAscii_helper(char const*, int)'
/tmp/ccBTAaVY.o: In function `QString::QString()':
test.cpp:(.text._ZN7QStringC2Ev[_ZN7QStringC5Ev]+0xb): undefined reference to `QString::shared_null'
/tmp/ccBTAaVY.o: In function `QString::~QString()':
test.cpp:(.text._ZN7QStringD2Ev[_ZN7QStringD5Ev]+0x23): undefined reference to `QString::free(QString::Data*)'
/tmp/ccBTAaVY.o:(.eh_frame+0x1b7): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Comment 14 Davide Pesavento (RETIRED) gentoo-dev 2012-02-24 00:00:04 UTC
(In reply to comment #13)

Put my testcase inside a dir (e.g. /tmp/foo) and from that dir run:
  qmake -project
  qmake QT=core
  make
Comment 15 Christian Faulhammer (RETIRED) gentoo-dev 2012-02-25 16:09:33 UTC
$ strace ./tmp
execve("./tmp", ["./tmp"], [/* 85 vars */]) = 0
brk(0)                                  = 0x8c9d000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb780a000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/qt4/tls/i686/sse2/libQtCore.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/qt4/tls/i686/sse2", 0xbfaf5ea0) = -1 ENOENT (No such file or directory)
open("/usr/lib/qt4/tls/i686/libQtCore.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/qt4/tls/i686", 0xbfaf5ea0) = -1 ENOENT (No such file or directory)
open("/usr/lib/qt4/tls/sse2/libQtCore.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/qt4/tls/sse2", 0xbfaf5ea0) = -1 ENOENT (No such file or directory)
open("/usr/lib/qt4/tls/libQtCore.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/qt4/tls", 0xbfaf5ea0)  = -1 ENOENT (No such file or directory)
open("/usr/lib/qt4/i686/sse2/libQtCore.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/qt4/i686/sse2", 0xbfaf5ea0) = -1 ENOENT (No such file or directory)
open("/usr/lib/qt4/i686/libQtCore.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/qt4/i686", 0xbfaf5ea0) = -1 ENOENT (No such file or directory)
open("/usr/lib/qt4/sse2/libQtCore.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/qt4/sse2", 0xbfaf5ea0) = -1 ENOENT (No such file or directory)
open("/usr/lib/qt4/libQtCore.so.4", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0Pr\5\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=3148308, ...}) = 0
mmap2(NULL, 3152876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7508000
mmap2(0xb7801000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2f8) = 0xb7801000
close(3)                                = 0
open("/usr/lib/qt4/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=93449, ...}) = 0
mmap2(NULL, 93449, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb74f1000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20M\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=117108, ...}) = 0
mmap2(NULL, 94732, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb74d9000
mmap2(0xb74ed000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb74ed000
mmap2(0xb74ef000, 4620, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb74ef000
close(3)                                = 0
open("/usr/lib/qt4/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/libstdc++.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\212\4\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=946408, ...}) = 0
mmap2(NULL, 971820, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73eb000
mmap2(0xb74cd000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe2) = 0xb74cd000
mmap2(0xb74d2000, 25644, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb74d2000
close(3)                                = 0
open("/usr/lib/qt4/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2204\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=145120, ...}) = 0
mmap2(NULL, 147584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73c6000
mmap2(0xb73e9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22) = 0xb73e9000
close(3)                                = 0
open("/usr/lib/qt4/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/libgcc_s.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220#\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=112044, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb73c5000
mmap2(NULL, 115244, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73a8000
mmap2(0xb73c3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a) = 0xb73c3000
close(3)                                = 0
open("/usr/lib/qt4/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0po\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1413492, ...}) = 0
mmap2(NULL, 1419816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb724d000
mmap2(0xb73a2000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x155) = 0xb73a2000
mmap2(0xb73a5000, 10792, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb73a5000
close(3)                                = 0
open("/usr/lib/qt4/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libz.so.1", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\26\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=79312, ...}) = 0
mmap2(NULL, 78064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7239000
mmap2(0xb724b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12) = 0xb724b000
close(3)                                = 0
open("/usr/lib/qt4/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\n\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=9564, ...}) = 0
mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7235000
mmap2(0xb7237000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7237000
close(3)                                = 0
open("/usr/lib/qt4/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/librt.so.1", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\31\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=30512, ...}) = 0
mmap2(NULL, 33392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb722c000
mmap2(0xb7233000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7233000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb722b000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb722a000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb722a6d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7233000, 4096, PROT_READ)   = 0
mprotect(0xb7237000, 4096, PROT_READ)   = 0
mprotect(0xb724b000, 4096, PROT_READ)   = 0
mprotect(0xb73a2000, 8192, PROT_READ)   = 0
mprotect(0xb73c3000, 4096, PROT_READ)   = 0
mprotect(0xb73e9000, 4096, PROT_READ)   = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7229000
mprotect(0xb74cd000, 16384, PROT_READ)  = 0
mprotect(0xb74ed000, 4096, PROT_READ)   = 0
mprotect(0xb7801000, 32768, PROT_READ)  = 0
mprotect(0x804a000, 4096, PROT_READ)    = 0
mprotect(0xb7828000, 4096, PROT_READ)   = 0
munmap(0xb74f1000, 93449)               = 0
set_tid_address(0xb722a738)             = 4677
set_robust_list(0xb722a740, 0xc)        = 0
futex(0xbfaf63d0, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0xbfaf63d0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, bfaf63e0) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0xb74dd6e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb74dd760, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="sol", ...})   = 0
brk(0)                                  = 0x8c9d000
brk(0x8cbe000)                          = 0x8cbe000
gettimeofday({1330186118, 716065}, NULL) = 0
mkdir("/tmp/bug402589-ikx2oS", 0700)    = 0
futex(0xb78095fc, FUTEX_WAKE_PRIVATE, 2147483647) = 0
stat64("/usr/lib/qt4/plugins", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/qt4/plugins", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=102400, ...}) = 0
lstat64("/usr/lib/qt4", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/lib/qt4/plugins", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
futex(0x8c9d25c, FUTEX_WAIT_PRIVATE, 1, NULL
Comment 16 Christian Faulhammer (RETIRED) gentoo-dev 2012-03-16 23:23:36 UTC
(In reply to comment #15)
Anything else I can do to help debug?
Comment 17 Christian Faulhammer (RETIRED) gentoo-dev 2012-04-15 17:18:11 UTC
Nothing has changed with version 0.8.46
Comment 18 Zac Medico gentoo-dev 2012-04-15 19:10:55 UTC
The strace output from comment #15 shows a C++ test program hanging in the same way, right? That means the hang is in the QT libraries, and if that program isn't supposed to hang (doesn't hang for other people), then it seems like there's something wrong with your QT libraries. So, I doubt that any calibre changes will help to resolve your problem.
Comment 19 George Chan 2012-06-24 22:25:37 UTC
I have the same problem.
So, if something is wrong with my QT installation, how do I fix it?

Portage 2.1.10.65 (default/linux/x86/10.0/desktop, gcc-4.5.3, glibc-2.12.2, 2.6.39-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-i686-AMD_Processor_model_-with-gentoo-2.0.3
Timestamp of tree: Sun, 24 Jun 2012 16:00:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.4.6, 2.5.4-r4, 2.6.6-r2, 2.7.3-r1, 3.1.4-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.1.2, 4.3.4, 4.4.5, 4.5.3-r2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo proaudio sunrise kde-sunset mpd oomidi-overlay bleeding-edge bibletime x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/share/config/kdm/ /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/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=k8 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="ftp://mirrors.tera-byte.com/pub/gentoo http://gentoo.mirrors.tera-byte.com/ http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.netnitco.net ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://gentoo.llarian.net/ ftp://gentoo.llarian.net/pub/gentoo http://mirror.datapipe.net/gentoo ftp://mirror.datapipe.net/gentoo http://prometheus.cs.wmich.edu/gentoo ftp://lug.mtu.edu/gentoo http://mirror.phy.olemiss.edu/mirror/gentoo http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/ http://public.planetmirror.com/pub/gentoo/ ftp://ftp.planetmirror.com/pub/gentoo/ "
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US en_GB"
MAKEOPTS="-j3"
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/pro-audio /var/lib/layman/sunrise /var/lib/layman/kde-sunset /var/lib/layman/mpd /var/lib/layman/oomidi /var/lib/layman/bleeding-edge /var/lib/layman/bibletime /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac aalib accessibility acl acpi aim alsa ao audiofile avahi berkdb bidi bluetooth bonobo branding bzip2 cairo calendar caps cdda cddb cdparanoia cdr clamav cli consolekit cracklib crypt cscope cups curl curlwrappers cxx dbus dga doc dri dts dv dvb dvd dvdr dvdread emboss encode esd evo examples exif expat fam ffmpeg fftw firefox flac fltk foomaticdb fortran ftp gb gcj gd gdbm ggi gif glut gmp gnutls gphoto2 gpm graphviz gstreamer gtk gtkhtml handbook iconv icq ieee1394 imagemagick imap imlib inifile ipod ipv6 jabber jack java javascript jikes joystick jpeg jpeg2k kde kdeenablefinal ladcca ladspa lash latex lcms ldap libcaca libg++ libgda libnotify libsamplerate libwww lm_sensors lua mad mailwrapper matroska mbox mcal mikmod milter mmx mng mnogosearch modules motif mp3 mp4 mpeg mplayer msn mudflap musepack musicbrainz nas ncurses neXt nls nntp nptl ocaml ogg openal openexr opengl openmp osc oscar oss pam pango pcre pda pdf perl plotutils png policykit ppds pppd python qt3 qt3support qt4 quicktime readline ruby samba scanner sdl semantic-desktop session shorten slang slp sndfile sox speex spell sqlite sqlite3 sse sse2 ssl startup-notification svg tcl tcpd theora threads tidy tiff tk truetype udev udisks unicode upower usb v4l vcd verbose vhosts vim-syntax vorbis win32codecs wmf wxwidgets wxwindows x264 x86 xcb xcomposite xface xine xinerama xml xmlrpc xorg xosd xpm xprint xsl xulrunner xv xvid xvmc yahoo zlib" ALSA_CARDS="*" 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="*" CAMERAS="*" 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="evdev joystick keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US en_GB" LIRC_DEVICES="*" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev nv nvidia v4l v4l2 vesa vga" 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"
USE_PYTHON="2.7 3.1"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 20 Ben de Groot (RETIRED) gentoo-dev 2012-06-25 03:36:28 UTC
It seems we have established the hang can occur with Qt 4.7 and PyQt 4.8. Can we reproduce this with the latest stable versions: Qt ~4.8.1 and PyQt 4.9.1 ?
Comment 21 George Chan 2012-06-28 02:38:59 UTC
With qt-4.8.1-r3 & PyQt4-4.9.1 it is the same story.
Comment 22 Giovanni 2012-07-09 08:03:44 UTC
same problem for me.
solved with:
eselect python set python2.7
python-updater
Comment 23 George Chan 2012-07-13 21:03:18 UTC
Thanks for the tip.

I re-emerged my existing Python2.7 (just in case) and then ran python-updater.
Now calibre builds & runs perfectly.
Comment 24 Christian Faulhammer (RETIRED) gentoo-dev 2012-08-11 00:15:43 UTC
python-updater did not help me, but I solved the problem nonetheless.

In my portage-related bashrc LC_ALL and LANG are set to C, after disabling this (thus using LANG=de), calibre emerged fine.
Comment 25 Michael Palimaka (kensington) gentoo-dev 2015-03-05 10:13:29 UTC
Is this still happening with latest versions?