bug-bash
[Top][All Lists]
Advanced

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

Bug in Bash-3.00


From: Ivano Primi
Subject: Bug in Bash-3.00
Date: Tue, 15 Nov 2005 11:04:54 +0100
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

The bug which I will describe
affects the version 3.00 of bash shipped
with Slackware GNU/Linux 10.2 .
This version has been obtained by applying
all the patches available at your site (from
bash30-001 to bash30-016)
plus an additional patch "which should prevent an issue with newer glibc versions and 2.4.x kernels that leads to a bash hang if bash is recompiled on such a system" (From the Slackware Changelog).
In attachment you can find this patch
(consisting only of a few lines of code), but,
if you prefer so, then you can download it directly
from any slackware mirror (for instance,
from

http://slackware.ngi.it/slackware-10.2/source/a/bash/patches/
).
Probably this patch is not good, since
it leads to the following problem.
On my machines

(a notebook equipped with i686 cpu (Intel Celeron 2.20GHz stepping 09) running Slackware GNU/Linux 10.2 with Linux kernel 2.4.31, gcc 3.3.6, glibc 2.3.5 and an home PC
equipped with Athlon XP1700+
running the same operating system with
the same configuration),

just after starting
a new bash process (i.e. just after starting a
new shell, which can also be the login shell),
if I run a program (for instance an editor,
like jed, emacs, zile...)
and then I suspend it via Ctrl+Z, then
the control does return to the shell:

address@hidden jed
the control has not been returned to the shell, just as you can
see here... I can type anything I like but there is not a prompt
and nothing happends

But a "ps aux" command launched on a different
terminal shows that the "jed" editor
has been actually stopped:

ivano 2821 0.0 3.3 10584 7448 ? S 10:13 0:00 /usr/bin/emacs-
ivano     2838  0.0  0.7   2692   1600 pts/0    S    10:30   0:00 bash
ivano     2839  0.0  0.7   3004   1628 pts/0    T+  10:31   0:00 jed
ivano 2840 2.6 1.2 6224 2792 ? Ss 10:35 0:00 aterm -sh 60 -t
ivano     2841  1.5  0.7   3308   1716 pts/1    Rs   10:35   0:00 zsh
ivano     2842  0.0  0.3   2568   892 pts/1      R+ 10:35   0:00 ps aux

Please, note that this issue is not related to the
jed editor, since it appears with any console application !

But the really funny stuff is that, if i kill "jed" from another
terminal, then  the shell  remember  anything  I typed
on the command line after  stopping "jed" and tries to execute it:

the control has not been returned to the shell, just as you can
see here... I can type any text I like but there is not a prompt
and nothing happends address@hidden the control has not been returned to the anell, just as you c
bash: the: command not found
address@hidden see here... I can type any text I like but there is not a prompt
bash: see: command not found
address@hidden and nothing happends

Moreover,  if  I repeat  for a second time this little
experiment within the same shell process, then everything
works fine (!!!):

address@hidden jed

[1]+  Stopped                 jed

and I have to start a new shell (for instance, by opening
a new terminal) to re-discover the problem.

There are two remarks that must be done:

1) The problem can be observed both working with the Linux
console and working in an xterm (or rxvt).

2) In an X11 session, if I open a new terminal (xterm or rxvt)
and run an X11 application in this way:

address@hidden abiword &
[1] 2884
address@hidden

then, until the X11 application is closed, running a command
like 'ls'  locks  the shell:

address@hidden abiword &
[1] 2884
address@hidden ls
CBM               bash999.glibc-wcontinued-bug.diff.gz  mpi.ps
Calendar          bin                                   myprojs
Desktop           curriculum.pdf                        ndiff.ps
Esercizi.pdf      david                                 phdth
FdA               dloaded                               riassunto_tesi.txt
GNUstep           dott.txt                              secrets
Lipsia            esame_finale.txt                      strtold.c
Lipsia_reply      iscrizioni 2005_06.doc                tutor
ORARIO I DLI.doc  moduloIII.txt
Voti.abw          moduloIV.txt
*** NO PROMPT HERE *** What is happening ?

but I can type anything on the terminal
and be sure that, after the closure
of the X11 application previously launched, the shell
will remember it and will try to execute it like a command:

address@hidden abiword &
[1] 2884
address@hidden ls
CBM               bash999.glibc-wcontinued-bug.diff.gz  mpi.ps
Calendar          bin                                   myprojs
Desktop           curriculum.pdf                        ndiff.ps
Esercizi.pdf      david                                 phdth
FdA               dloaded                               riassunto_tesi.txt
GNUstep           dott.txt                              secrets
Lipsia            esame_finale.txt                      strtold.c
Lipsia_reply      iscrizioni 2005_06.doc                tutor
ORARIO I DLI.doc  moduloIII.txt
Voti.abw          moduloIV.txt
NO PROMPT HERE *** What is happening ?
address@hidden NO PROMPT HERE *** What is happening ?
bash: NO: command not found
address@hidden

Of course, If I repeat the experiment within the same shell
process, then  everything works fine:

address@hidden abiword &
[2] 2889
address@hidden ls
CBM               bash999.glibc-wcontinued-bug.diff.gz  mpi.ps
Calendar          bin                                   myprojs
Desktop           curriculum.pdf                        ndiff.ps
Esercizi.pdf      david                                 phdth
FdA               dloaded                               riassunto_tesi.txt
GNUstep           dott.txt                              secrets
Lipsia            esame_finale.txt                      strtold.c
Lipsia_reply      iscrizioni 2005_06.doc                tutor
ORARIO I DLI.doc  moduloIII.txt
Voti.abw          moduloIV.txt
address@hidden


I hope you can guess which part of the  source code
of bash (or which patch) is causing the problem. If I was able,
I would try to solve this issue by myself, but this is not the case,
I am really sorry !

Thanks for your care and help,
best regards

                                                 Ivano Primi








reply via email to

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