Summary: | Portage 2.0.47-r7 freezes very early during ANY build - ccache bug | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Robin Johnson <robbat2> |
Component: | Unclassified | Assignee: | Zach Welch (RETIRED) <zwelch> |
Status: | RESOLVED WORKSFORME | ||
Severity: | blocker | CC: | carpaski |
Priority: | Highest | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Enviroment settings
Strace output of ccache call Direct trace of the ccache call from the configure script LARGE strace from forked process started by ccache |
Description
Robin Johnson
![]() ![]() ![]() ![]() Created attachment 8848 [details]
Enviroment settings
enviroment output right before the call to /usr/lib/ccache/bin/gcc
Created attachment 8849 [details]
Strace output of ccache call
Output of strace directly on the ccache command
tracing it more (via strace -ff), it seems that ccache goes into an infinite loop with calling 'gcc', but actually looping somewhere.
More debug output:
server1 root # ebuild /usr/portage/sys-libs/zlib/zlib-1.1.4-r1.ebuild compile
>>> md5 ;-) zlib-1.1.4.tar.bz2
>>> Checking zlib-1.1.4.tar.bz2's mtime...
>>> WORKDIR is up-to-date, keeping...
-----
-----
gcc -c -march=pentium3 -O3 -pipe ztest28057.c
which gcc = /usr/lib/ccache/bin/gcc
Process 11643 attached (waiting for parent)
Process 11643 resumed (parent 19555 ready)
Process 19555 suspended
More stack traces to follow.
Created attachment 8850 [details]
Direct trace of the ccache call from the configure script
see also trace.11643 which is the trace of the forked process from this one.
Created attachment 8851 [details]
LARGE strace from forked process started by ccache
this file is 32mb when extracted. Judging by the compression alone, there is a
LOT of repition involved in the file.
briefly glancing at the content it seems that ccache is looping infinitely on
some calls.
For a temporary workaround, remove 'ccache' from FEATURES in make.global Another report of this surfaced recently in bug 15100. It is real. My instincts tell me that ccache enters an infinite chain of execs with itself. I'll try to figure out a solution this weekend. Have you tried clearing you /root/.ccache directory? This seems to be the present workaround that works and allows you to continue using ccache. also, you might use ccache to set the maximum to something reasonable: ccache -M 1G seems to be fairly safe and prevents these lockups. I've tried clearing out the entire ccache with 'ccache -C', as well as setting the max cache size to 1gb, without any success. if you are running ccache to clear the cache be sure to try prefixing the command like the following: CCACHE_DIR=/root/.ccache ccache -C or use the sure-fire approach: rm -rf /root/.ccache Zach: your new suggestions don't resolve it either. I'm just about to upgrade the box to sys-devel/binutils-2.13.90.0.18-r1, sys-libs/glibc-2.3.2 and downgrade to sys-devel/gcc-3.2.2-r1. your last comment says 'downgrade' to gcc-3.2.2-r1... what where you using? Otherwise, have you made progress on this issue? Any further information that you might be able to provide? was running gcc-3.2.2-r3 previously, then it got masked. The machine still has the problem. The best details I can offer, is that when portage runs the configure script, it used this PATH spec (gained using printenv to a file during the configure) PATH=/usr/lib/ccache/bin:/sbin:/usr/sbin:/usr/lib/portage/bin:/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/afsws/bin:/etc/afs/afsws:/usr/afs/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.2:/opt/Acrobat5:/usr/X11R6/bin:/opt/blackdown-jre-1.4.1/bin:/usr/qt/3/bin:/var/qmail/bin I had left the box alone for a while. I'm trying a few more things now. Found the eventual cause of the bug. I had sys-devel/cc-config installed, and it had overwritten sys-devel/gcc-config. Both of them contain /usr/bin/gcc... I remerge gcc-config, and everything works now. Should cc-config even exist?, see the output below: pestilence root # emerge -s cc-config Searching... [ Results for search key : cc-config ] [ Applications found : 2 ] * sys-devel/cc-config Latest version available: 1.2.8 Latest version installed: [ Not Installed ] Size of downloaded files: 0 kB Homepage: http://www.gentoo.org/ Description: Utility to change the gcc compiler being used. * sys-devel/gcc-config Latest version available: 1.3.1 Latest version installed: 1.3.1 Size of downloaded files: 0 kB Homepage: http://www.gentoo.org/ Description: Utility to change the gcc compiler being used. Thanks for digging on this. I'll look into killing off cc-config soon. |