Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 387891 - net-p2p/mldonkey needs -fno-web or it will hang on start.
Summary: net-p2p/mldonkey needs -fno-web or it will hang on start.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo net-p2p team
URL: http://wklej.org/id/611153/txt/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-20 16:21 UTC by ChaosEngine
Modified: 2011-11-13 10:14 UTC (History)
2 users (show)

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


Attachments
strace -o strace.log -f -ttT -s 1024 /usr/bin/mlnet # On my system (strace.log,72.78 KB, text/plain)
2011-11-01 15:20 UTC, Navid Zamani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ChaosEngine 2011-10-20 16:21:24 UTC
after compilation of net-p2p/mldonkey-3.0.7 with sys-devel/gcc-4.5.3-r1
simple mlnet --help hangs and eats 100% CPU. kill -9 required



agata@haos ~ $ mlnet --help
2011/10/20 18:05:32 [cO] Starting MLDonkey 3.0.7 ...
2011/10/20 18:05:32 [cO] Language PL, locale UTF-8, ulimit for open files 1024
2011/10/20 18:05:32 [cO] MLDonkey is working in /home/agata/.mldonkey

2011/10/20 18:05:32 [cO] creating new MLDonkey base directory in /home/agata/.mldonkey

2011/10/20 18:05:32 [cO] loaded language resource file
2011/10/20 18:05:32 [DNS] Resolving [haos] ...
^CUnicestwiony




--------------------------------
both mldonkey and gcc are stable on x86:

haos ~ # emerge --info
Portage 2.1.10.11 (default/linux/x86/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.37-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.37-gentoo-r4-i686-AMD_Athlon-tm-_XP_2500+-with-gentoo-2.0.3
Timestamp of tree: Tue, 18 Oct 2011 07:45:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     1.3.7-r1, 2.1.11-r3
dev-lang/python:          2.6.6-r2
dev-util/cmake:           2.8.4-r1
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::<unknown repository>, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5, 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: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo sunrise multimedia wrobel roslin zugaina qting-edge ub0rlay bleeding-edge Local-portage-overlay
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -funroll-loops -mmmx -msse -m3dnow"
CHOST="i686-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.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"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -funroll-loops -mmmx -msse -m3dnow"
DISTDIR="/var/tmp/distfiles/"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news noinfo parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.prz.edu.pl http://gentoo.zie.pg.gda.pl http://src.gentoo.pl http://www.gigaload.org/gentoo.org/ ftp://ftp.easynet.nl/mirror/gentoo/"
LANG="pl_PL.UTF-8"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pl en"
MAKEOPTS="-j2"
PKGDIR="/var/tmp/portage-pkg"
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/sunrise /var/lib/layman/multimedia /var/lib/layman/wrobel /var/lib/layman/roslin /var/lib/layman/zugaina /var/lib/layman/qting-edge /var/lib/layman/ub0rlay /var/lib/layman/bleeding-edge /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X acl alsa apm atm avi bash berkdb bzip2 bzlib cli cracklib crypt cups cxx dga directfb divx4linux dri dvd gdbm gtk gtk2 iconv jabber java jpeg kde mikmod mmx modules mpeg mudflap ncurses nls nptl nptlonly oggvorbis opengl openmp oss pam pcre pppd qt quicktime readline samba sdk session sockets sse ssl svga sysfs tcpd truetype unicode usb utf8 x86 xorg xv zlib" ALSA_CARDS="emu10k1" 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_default authn_file authz_default authz_host authz_owner authz_user autoindex deflate dir env expires ext_filter filter headers include mime mime_magic negotiation proxy proxy_connect proxy_http rewrite setenvif status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z template topfield toshiba_pdrm11" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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


Reproducible: Always

Steps to Reproduce:
1. gcc-config i686-pc-linux-gnu-4.5.3; . /etc/profile
2. USE="bittorrent fasttrack gnutella magic ocamlopt -doc -gd -gtk -guionly" emerge =net-p2p/mldonkey-3.0.7
3. mlnet --help
Actual Results:  
mlnet is unresponsive, only kill -9 workx
telnet interface and web interaface is unavailable

Expected Results:  
telnet interface and web interaface should be available
Comment 1 ChaosEngine 2011-10-20 16:24:04 UTC
haos ~ # emerge --info
Portage 2.1.10.11 (default/linux/x86/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.37-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.37-gentoo-r4-i686-AMD_Athlon-tm-_XP_2500+-with-gentoo-2.0.3
Timestamp of tree: Tue, 18 Oct 2011 07:45:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     1.3.7-r1, 2.1.11-r3
dev-lang/python:          2.6.6-r2
dev-util/cmake:           2.8.4-r1
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::<unknown repository>, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5, 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: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo sunrise multimedia wrobel roslin zugaina qting-edge ub0rlay bleeding-edge Local-portage-overlay
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -funroll-loops -mmmx -msse -m3dnow"
CHOST="i686-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.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"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -funroll-loops -mmmx -msse -m3dnow"
DISTDIR="/var/tmp/distfiles/"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news noinfo parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.prz.edu.pl http://gentoo.zie.pg.gda.pl http://src.gentoo.pl http://www.gigaload.org/gentoo.org/ ftp://ftp.easynet.nl/mirror/gentoo/"
LANG="pl_PL.UTF-8"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pl en"
MAKEOPTS="-j2"
PKGDIR="/var/tmp/portage-pkg"
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/sunrise /var/lib/layman/multimedia /var/lib/layman/wrobel /var/lib/layman/roslin /var/lib/layman/zugaina /var/lib/layman/qting-edge /var/lib/layman/ub0rlay /var/lib/layman/bleeding-edge /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X acl alsa apm atm avi bash berkdb bzip2 bzlib cli cracklib crypt cups cxx dga directfb divx4linux dri dvd gdbm gtk gtk2 iconv jabber java jpeg kde mikmod mmx modules mpeg mudflap ncurses nls nptl nptlonly oggvorbis opengl openmp oss pam pcre pppd qt quicktime readline samba sdk session sockets sse ssl svga sysfs tcpd truetype unicode usb utf8 x86 xorg xv zlib" ALSA_CARDS="emu10k1" 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_default authn_file authz_default authz_host authz_owner authz_user autoindex deflate dir env expires ext_filter filter headers include mime mime_magic negotiation proxy proxy_connect proxy_http rewrite setenvif status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z template topfield toshiba_pdrm11" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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 2 Navid Zamani 2011-11-01 15:11:43 UTC
Same thing here. The log says:

2011/11/01 16:04:24 [cO] Starting MLDonkey 3.1.0 ... 
2011/11/01 16:04:24 [cO] Language DE, locale UTF-8, ulimit for open files 1024
2011/11/01 16:04:24 [cO] raised ulimit for open files from 1024 to 4096
2011/11/01 16:04:24 [cO] MLDonkey is working in .
2011/11/01 16:04:24 [Gettext] Loading language resource mlnet_strings.de_DE.utf8
2011/11/01 16:04:24 [cO] loaded language resource file
2011/11/01 16:04:24 [DNS] Resolving [myserver] ...

Where “myserver” is the hostname of the box. (Which is in /etc/hosts as an alias, but my BIND only knows myserver.mydomain.org, so …

I managed to get it to work once. But I forgot what exactly made it work. :(
Comment 3 Navid Zamani 2011-11-01 15:12:43 UTC
Oh, of course this is 3.1.0 here.
Comment 4 Navid Zamani 2011-11-01 15:20:33 UTC
Created attachment 291445 [details]
strace -o strace.log -f -ttT -s 1024 /usr/bin/mlnet # On my system

Added my strace.

By the way, I remember that I did a gdb backtrace the last time before it worked, and got only question marks. so I recompiled glibc and mldonkey in debug mode (as described in the guide how to get useful backtraces in Gentoo). And I think that is when it started to work. I went back to normal afterwards.

I will go to debug again, and see if it works again. If yes, we’d have a very useful reproducible working / not working example comparison.
Comment 5 Navid Zamani 2011-11-01 17:57:59 UTC
OK, it works again. With the following:

#ACCEPT_KEYWORDS="x86"
CHOST="i686-pc-linux-gnu" # pentium4-pc-linux-gnu gibt es nicht als „hardened“.
#CFLAGS="-O2 -march=pentium4      -fomit-frame-pointer -pipe -fno-ident -fweb" # normal
#CFLAGS="-O1 -march=pentium4 -pipe -ggdb" # debug
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
MAKEOPTS="-j3 -s"
EXTRA_ECONF="-q"

And this added:
FEATURES="${FEATURES} nostrip" # debug

When I uncomment the “normal” line, comment the “debug” lines out, recompile glibc and mldonkey, and restart mldonkey, it hangs again.
Comment 6 Navid Zamani 2011-11-11 18:43:59 UTC
I found the key problem:

It’s the -fweb.
With everything in make.conf normal, and just removing the -fweb, it worked.
But I want to keep that. Luckily there is another way:

> echo 'CFLAGS="${CFLAGS} -fno-web"' > /etc/portage/env/no-fweb.conf
> echo 'CXXFLAGS="$CFLAGS" # So this file can be used generically.' >> /etc/portage/env/no-fweb.conf
> echo 'net-p2p/mldonkey no-fweb.conf' >> /etc/portage/package.env

So the bug title should be changed to:

> net-p2p/mldonkey needs -fno-web or it will hang on start.

And the -fno-web should be built right into the ebuild.

Maybe it should even be added to the OCAML eclass.

Problem solved. :)
Now I need you, Chaos and the Gentoo net-p2p team.
Comment 7 Navid Zamani 2011-11-11 18:45:27 UTC
@Chaos: Btw: -funroll-loops implies -fweb, says the gcc man page. That’s why it happened to you.
Comment 8 ChaosEngine 2011-11-12 21:18:58 UTC
Totally confirmed, thnx Nadi :-)
Comment 9 Navid Zamani 2011-11-13 08:15:12 UTC
You’re welcome, but who’s “Nadi”? ;)
Comment 10 ChaosEngine 2011-11-13 10:14:04 UTC
The monster that eats letters ;-)