i went to emerge a new version of games-strategy/scorched3d today while i waited i decided to shower when i got out of the shower, i came back wearing a towel and found this: make[1]: Entering directory `/var/tmp/portage/scorched3d-36.1/work/scorched' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/var/tmp/portage/scorched3d-36.1/work/scorched' >>> Install scorched3d-36.1 into /var/tmp/portage/scorched3d-36.1/image/ category games-strategy and thats it ! a quick `pstree` shows: root@vapier 0 root # pstree `pidof python` emerge---sandbox---ebuild.sh-+-ebuild.sh---dobin---dobin-+-file | `-grep `-tee a quick `top` shows that file is the one wh0ring my cpu: root@vapier 0 root # ps u `pidof file` USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 19943 98.5 0.1 2532 904 pts/4 R 23:25 5:56 file src/scorched/scorched3d so i CTRL+C the emerge process of course and go down to the directory where this evil scorched3d is found ... running `file` on it myself caused file to hang up ... i moved the file over to another machine with diff gcc/glibc and it hung ... gave it to Mr Bones who has yet another set of system specs and it hung for him too ... thinking maybe the binary was junk, i ran it ... it works just fine & dandy ! i tried re-emerging, but the bug is reproducable on my box systems where this happens: Portage 2.0.50_pre9 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.0) (sys-apps/file-4.06) Portage 2.0.50_pre9 (default-1.0, gcc-2.95.3, glibc-2.2.5-r9, 2.6.0) (sys-apps/file-4.06) Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.20-gentoo-r9) (sys-apps/file-4.02)
for anyone who may look into this, the loop is here: /usr/lib/libmagic.so : src/readelf.c : dophn_exec() there are two loops in this function ... the second one around line 631 is the one that is constantly executed ... for (;;) { if (offset >= (size_t)bufsize) break; offset = donote(ms, nbuf, offset, (size_t)bufsize, class, swap, ph_align); } putting in some printf()'s shows that file never breaks out of this
Can you maybe printf offset, and paste a log here?
jhudso just added a patch from debian to fix this (4.07-r1) verified it works over here