First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 131875
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Heinrich Nirschl <Heinrich.Nirschl@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
config.log the config.log file with /dev/fd test failed text/plain Heinrich Nirschl 2006-05-05 10:26 0000 134.16 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 131875 depends on: Show dependency tree
Bug 131875 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-05-01 02:12 0000
When process substitution is used inside command substitution, the named pipes
are not cleaned up. For example:

echo $( diff <(echo abc) <(echo adb) )

leaves two named pipes in /tmp behind.

The net init scripts use such constructs. Which means, there are lots of
sh-np-XXXXXXX files piling up in /tmp.

My emerge --info:
Portage 2203-svn (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.6-r3,
2.6.16-gentoo-r3 i686)
=================================================================
System uname: 2.6.16-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
Gentoo Base System version 1.6.14
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=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo
/etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://gentoo.inode.at/source/
ftp://mirror.switch.ch/mirror/gentoo/ http://ftp.easynet.nl/mirror/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm atm audiofile avi berkdb bitmap-fonts bzip2 cdr cli
crypt cups curl dga doc dri dvd eds emboss encode esd exif expat fam ffmpeg
firefox flac foomaticdb fortran gd gdbm gif glut gmp gnome gphoto2 gpm
gstreamer gtk gtk2 gtkhtml idn imagemagick imlib isdnlog java jce jpeg junit
lcms libg++ libwww mad mhash mikmod mmx mng motif mp3 mpeg mysql ncurses nls
no-htdocs nptl nsplugin offensive ogg openal opengl pam pcre pdflib perl php
png pppd python quicktime readline real recode reflection sdl session slang
source spell spl sse sse2 ssl svg svga tcltk tcpd tetex tiff truetype
truetype-fonts type1-fonts udev usb vorbis wmf xine xml xml2 xmms xorg xv xvid
zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS

------- Comment #1 From Jakub Moc (RETIRED) 2006-05-01 02:15:15 0000 -------
Ah... same here. And I always blamed evil green men w/ the pipe for that... :=)

------- Comment #2 From Da Fox 2006-05-01 03:27:15 0000 -------
same here :(

------- Comment #3 From Kevin Parent 2006-05-02 09:25:55 0000 -------
I have two boxes running gentoo that are nearly identical.  Both are Athlon 64
- one in 64 bit mode and one in 32 bit mode.  The 64 bit machine is a server. 
The 32 bit box is my mythtv box.

Only the 64 bit setup (server) has the named pipes in the /tmp dir and seem to
be created on boot, then not cleaned up.

Restarting individual services do not recreate the pipes, but restarting
net.eth0 does - two for every restarted daemon.

emerge info for affected machine:

Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.5-r3,
2.6.16-ck6-r1 x86_64)
=================================================================
System uname: 2.6.16-ck6-r1 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
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.8.1-r1, 2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-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/lib64/mozilla/defaults/pref /usr/share/config /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo
http://gentoo.chem.wisc.edu/gentoo/"
LANG="en_US"
LC_ALL="en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://63.150.226.21/gentoo-portage"
USE="amd64 X alsa apache2 audiofile avi berkdb bitmap-fonts bzip2 cdparanoia
cdr cli crypt cups curl dga dri eds emboss encode esd ethereal evo exif expat
fam ffmpeg flac foomaticdb fortran frontendonly gd gdbm gif glut gmp gnome gpm
gstreamer gtk gtk2 gtkhtml guile idn imap imlib irda irmc isdnlog ithreads java
jpeg kde lcms ldap libwww lzw lzw-tiff mad mbox mhash mng mozilla mp3 mpeg
mysql mythtv ncurses nls nptl nvidia oav offensive ogg oggvorbis opengl oss pam
pcre pda pdf pdflib perl php png posix ppds pppd pthreads python quicktime
readline recode reflection samba sdl session slang spell spl ssl tcpd tiff
truetype truetype-fonts type1-fonts udev usb vorbis xine xml xml2 xmms xorg xpm
xv xvmc zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LDFLAGS, LINGUAS

------- Comment #4 From SpanKY 2006-05-03 18:42:37 0000 -------
unable to reproduce over here with bash-3.1_p16 on i686 or bash-3.1_p17 on
amd64

------- Comment #5 From Heinrich Nirschl 2006-05-04 10:05:40 0000 -------
I am not sure, if bash is supposed to use named pipes when /dev/fd is
available. Maybe this could explain the differences. Here is another
experiment:

set -x
echo $( diff <(echo abc) <(echo adb) )

gives this output:

++ diff /tmp/sh-np-1146764446 /tmp/sh-np-3438175859
+++ echo abc
+++ echo adb
+ echo 1c1 '<' abc --- '>' adb
1c1 < abc --- > adb

both named pipes are not cleaned up.

On systems where it works, does it use named pipes or /dev/fd ?

------- Comment #6 From Heinrich Nirschl 2006-05-04 11:28:00 0000 -------
Interestingly, the configure test for /dev/fd succeeds if I run configure
manually but fails if configure is run by emerge ...

A manually compiled bash uses /dev/fd instead of named pipes.

------- Comment #7 From SpanKY 2006-05-05 10:11:32 0000 -------
please run:
FEATURES=noauto ebuild bash-3.1_p17.ebuild clean unpack compile

verify that the /dev/fd test failed then post the config.log file from
/var/tmp/portage/bash-3.1_p17/bash-3.1/ as an attachment

------- Comment #8 From Heinrich Nirschl 2006-05-05 10:26:37 0000 -------
Created an attachment (id=86214) [edit]
the config.log file with /dev/fd test failed

here it is.

------- Comment #9 From Heinrich Nirschl 2006-05-05 11:23:39 0000 -------
Just found out, that the /dev/fd test succeeds if I remove userpriv usersandbox
from the FEATURES.

------- Comment #10 From SpanKY 2006-05-05 17:48:51 0000 -------
this is because the links in /dev/fd/ point to device nodes owned by root and
thus the user running the compile is unable to access them

------- Comment #11 From SpanKY 2006-05-05 17:58:47 0000 -------
ok, ive tweaked the test so it should work now with FEATURES=userpriv

also e-mailed upstream ... maybe get the test to be less anal ...

------- Comment #12 From SpanKY 2006-05-22 23:18:10 0000 -------
*** Bug 133778 has been marked as a duplicate of this bug. ***

First Last Prev Next    No search results available      Search page      Enter new bug