bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash 3.0 compiled and linked with glibc 2.3.3 hungs when executing s


From: Chet Ramey
Subject: Re: Bash 3.0 compiled and linked with glibc 2.3.3 hungs when executing simple disk command
Date: Sat, 02 Oct 2004 10:34:11 -0400
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.3) Gecko/20040910

Sergey Zalogin wrote:
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/tools/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H  -I. -I/tools/include -I. -I./include -I./lib   -g -O2
uname output: Linux build.nolimit.ru 2.6.8-zalog2 #1 Thu Sep 30 16:25:15 EEST 
2004 i686 i686 i386 GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 3.0
Patch Level: 14
Release Status: release

Description:
        When bash 3.0 was compiled with glibc 2.3.3 (CVS on 2004-10-01) it 
hungs after
        executing external disk commands, like "ls". As I discovered it runs an 
infinite loop
        in function "waitchld (wpid, block)" in "jobs.c" file while waiting for 
child exiting.
        The problem is in the "waitpid_flags" argument when calling waitpid() 
function - it
        returns errno "EINVAL". "man waitpid" says what third argument 
"options" for waitpid()
        may be combination of constatnts "WNOHANG", "WUNTRACED" and some other 
for Linux,
        but used in "jobs.c" "WCONTINUED" is not listed in man for "waitpid" 
call. After I removed
        "WCONTINUED" from options passed to waitpid the problem was dissapeared.
        Is this a bug?

It's a bug in glibc.  glibc defines WCONTINUED even when running on
kernels whose waitpid(2) implementations reject it.  I will look at
ways to work around it -- I have at least one mechanism submitted
as a patch by Red Hat.

Chet




reply via email to

[Prev in Thread] Current Thread [Next in Thread]