[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110128182947.GB20056@elte.hu>
Date: Fri, 28 Jan 2011 19:29:47 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Tejun Heo <tj@...nel.org>, roland@...hat.com,
jan.kratochvil@...hat.com, linux-kernel@...r.kernel.org,
torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Thomas Gleixner <tglx@...utronix.de>,
Frédéric Weisbecker <fweisbec@...il.com>
Subject: Re: Bash not reacting to Ctrl-C
* Oleg Nesterov <oleg@...hat.com> wrote:
> On 01/28, Ingo Molnar wrote:
> >
> > The bug is that occasionally Ctrl-C does not get processed, and that the Ctrl-C is
> > 'lost'. It can be reproduced here by running ./test-signal several times, and
> > Ctrl-C-ing it:
> >
> > $ ./test-signal
> > ^C
> > $ ./test-signal
> > ^C^C
> > $ ./test-signal
> > ^C
> >
> > See that '^C^C' line? That is where i had to do Ctrl-C twice.
>
> Reproduced.
>
> At first glance, /bin/sh should be blamed... Hmm, probably yes,
> I even reproduced this under strace, and this is what I see
>
> wait4(-1, 0x7fff388431c4, 0, NULL) = ? ERESTARTSYS (To be restarted)
> --- SIGINT (Interrupt) @ 0 (0) ---
> rt_sigreturn(0) = -1 EINTR (Interrupted system call)
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 9706
>
> So, ^C is not lost, but ./test-signal doesn't want to exit.
Might be some Bash assumption or race that works under other OSs but somehow Linux
does differently. IIRC Bash is being developed on MacOS-X.
But it's happening all the time (with yum for example - but also with makejobs, as
Thomas has reported it) - this is simply the first time i managed to reproduce it
with something really simple.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists