To play with different kernel versinos without changing the current state I mounted the linux src directory using unionfs onto a directory at a ramdisk - here are the fstab definition : n22 ~ # grep ramdisk /etc/fstab # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will tmpfs /mnt/ramdisk tmpfs noauto,user,size=660M using the following commands: n22 ~ # modprobe unionfs n22 ~ # mkdir /mnt/ramdisk/src n22 ~ # mkdir /mnt/ramdisk/src_overlay n22 ~ # mount -t unionfs -o dirs=/mnt/ramdisk/src_overlay/=rw:/usr/src/linux-2.6.15-gentoo-r1/=ro unionfs /mnt/ramdisk/src n22 ~ # cd /mnt/ramdisk/src Then I did an n22 /mnt/ramdisk/src # make clean and this commands hangs :-( The strace outout follows: n22 /mnt/ramdisk/src # strace make clean execve("/usr/bin/make", ["make", "clean"], [/* 43 vars */]) = 0 uname({sys="Linux", node="n22", ...}) = 0 brk(0) = 0x8069000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=87958, ...}) = 0 mmap2(NULL, 87958, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f8a000 close(3) = 0 open("/lib/tls/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\0P\36\0\000"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=33376, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f89000 mmap2(NULL, 33384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f80000 mmap2(0xb7f87000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7f87000 close(3) = 0 open("/lib/tls/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\0\20P\1\000"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1214968, ...}) = 0 mmap2(NULL, 1154236, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e66000 mmap2(0xb7f7a000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x114) = 0xb7f7a000 mmap2(0xb7f7e000, 7356, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f7e000 close(3) = 0 open("/lib/tls/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\260H\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=113349, ...}) = 0 mmap2(NULL, 70104, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e54000 mmap2(0xb7e62000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe) = 0xb7e62000 mmap2(0xb7e64000, 4568, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e64000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e53000 mprotect(0xb7e62000, 4096, PROT_READ) = 0 mprotect(0xb7f7a000, 4096, PROT_READ) = 0 mprotect(0xb7fb5000, 4096, PROT_READ) = 0 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e536c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 munmap(0xb7f8a000, 87958) = 0 set_tid_address(0xb7e53708) = 12453 rt_sigaction(SIGRTMIN, {0xb7e58400, [], SA_SIGINFO}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0xb7e58480, [], 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 _sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbf9b226c, 32, (nil), 0}) = 0 open("/dev/urandom", O_RDONLY) = 3 read(3, "\245\253\fz", 4) = 4 close(3) = 0 open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) brk(0) = 0x8069000 brk(0x808a000) = 0x808a000 open("/usr/share/locale/locale.alias", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=2586, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f9f000 read(3, "# Locale name alias data base.\n#"..., 4096) = 2586 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7f9f000, 4096) = 0 open("/usr/lib/locale/de_DE@euro/LC_CTYPE", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=208004, ...}) = 0 mmap2(NULL, 208004, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7e20000 close(3) = 0 rt_sigaction(SIGHUP, {0x804b430, [HUP], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGQUIT, {0x804b430, [QUIT], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGINT, {0x804b430, [INT], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGTERM, {0x804b430, [TERM], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGXCPU, {0x804b430, [XCPU], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGXFSZ, {0x804b430, [XFSZ], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 getcwd("/mnt/ramdisk/src", 4096) = 17 stat64("/usr/include", {st_mode=S_IFDIR|0755, st_size=24576, ...}) = 0 stat64("/usr/gnu/include", 0xbf9b0c00) = -1 ENOENT (No such file or directory) stat64("/usr/local/include", 0xbf9b0c00) = -1 ENOENT (No such file or directory) stat64("/usr/include", {st_mode=S_IFDIR|0755, st_size=24576, ...}) = 0 rt_sigaction(SIGCHLD, {0x8052340, [CHLD], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGUSR1, {0x8054460, [USR1], SA_RESTART}, {SIG_DFL}, 8) = 0 stat64(".", {st_mode=S_IFDIR|0755, st_size=180, ...}) = 0 open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3 fstat64(3, {st_mode=S_IFDIR|0755, st_size=180, ...}) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 getdents64(3, n22 ~ # lsof /mnt/ramdisk/src COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME rm 12173 root cwd DIR 0,18 180 232 /mnt/ramdisk/src rm 12173 root 3r DIR 0,18 180 232 /mnt/ramdisk/src make 12453 root cwd DIR 0,18 180 232 /mnt/ramdisk/src make 12453 root 3r DIR 0,18 180 232 /mnt/ramdisk/src n22 ~ # ps -ef | grep 12173 root 12173 1 0 13:16 ? 00:00:00 rm -rf .tmp_versions root 12633 12595 0 13:28 pts/2 00:00:00 grep 12173 n22 ~ # ps -ef | grep 12453 root 12453 1 0 13:21 ? 00:00:00 make clean root 12635 12595 0 13:28 pts/2 00:00:00 grep 12453 n22 /mnt/ramdisk/src # emerge info Portage 2.0.54 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.5-r3, 2.6.15-gentoo-r1 i686) ================================================================= System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) M processor 1700MHz Gentoo Base System version 1.6.14 ccache version 2.3 [enabled] dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://mirror.nutsmaas.nl/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/" LINGUAS="de en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 X acpi alsa apache2 arts audiofile avi berkdb bitmap-fonts bzip2 cdr cli crypt ctype cups curl dba dri dvd emboss encode exif expat fam fastbuild ffmpeg font-server foomaticdb force-cgi-redirect fortran ftp gd gdbm gif glut gpm gstreamer gtk gtk2 idn imagemagick imlib ipv6 isdnlog jai java javascript jimi joystick jpeg junit kde lcms libg++ libwww live logrotate mad mbox memlimit mhash mikmod mmx mmxext mng motif mp3 mpeg mysql ncurses nls nptl nsplugin ogg opengl oss pam pcre pdflib perl php png posix pppd python qt quicktime readline real rtc samba sdl session simplexml slp snmp soap sockets spell spl sse sse2 ssl subversion swat tcltk tcpd tiff tokenizer truetype truetype-fonts type1-fonts udev usb userlocales vorbis win32codecs xine xml xml2 xsl xv xvid yaepg zlib linguas_de linguas_en userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Here's the outout of the console: n22 /mnt/ramdisk/src # make clean CLEAN arch/i386/boot/compressed CLEAN arch/i386/boot CLEAN /mnt/ramdisk/src CLEAN arch/i386/kernel CLEAN drivers/char CLEAN drivers/video/logo CLEAN init CLEAN kernel CLEAN lib CLEAN usr CLEAN .tmp_versions and here the process table: make,9149 clean └─sh,9665 -c echo\040'\040\040CLEAN\040\040\040.tmp_versions'\040&&\040rm\040-rf\040.tmp_versions └─rm,9666 -rf .tmp_versions
Same behaviour for 1.1.4-r1: n22 /mnt/ramdisk/src # make clean CLEAN arch/i386/boot/compressed CLEAN arch/i386/boot CLEAN /mnt/ramdisk/src CLEAN arch/i386/kernel CLEAN drivers/char CLEAN drivers/video/logo CLEAN init CLEAN kernel CLEAN lib CLEAN usr CLEAN .tmp_versions << hanging at this point :-(
Could you try to do this without a temporary file system? That is, with /mnt/ramdisk as an ext{2,3}, reiserfs or xfs partition.
Ok, doing the same under /root (ext3fs) : n22 ~ # pwd /root n22 ~ # modprobe unionfs n22 ~ # mkdir src n22 ~ # mkdir src_overlay n22 ~ # mount -t unionfs -o dirs=/root/src_overlay/=rw:/usr/src/linux-2.6.15-gentoo-r1/=ro unionfs /root/src n22 ~ # unionctl /root/src --list /root/src_overlay (rw-) /usr/src/linux-2.6.15-gentoo-r1 (r--) n22 ~/src # make clean CLEAN arch/i386/boot/compressed CLEAN arch/i386/boot CLEAN /root/src CLEAN arch/i386/kernel CLEAN drivers/char CLEAN drivers/video/logo CLEAN init CLEAN kernel CLEAN lib CLEAN usr CLEAN .tmp_versions hanging here :-(
issue went away using newer kernel and/or glibc, now the kernel oopses, reported upstream : https://bugzilla.fsl.cs.sunysb.edu/show_bug.cgi?id=499