Date: Fri, 15 Apr 2005 16:00:40 GMT From: Giorgos Keramidas <keramida@freebsd.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/45478: /bin/sh coredump Message-ID: <200504151600.j3FG0eQU006756@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/45478; it has been noted by GNATS. From: Giorgos Keramidas <keramida@freebsd.org> To: Oliver Fromme <olli@secnetix.de> Cc: bug-followup@freebsd.org, Oliver Fromme <olli@fromme.com> Subject: Re: bin/45478: /bin/sh coredump Date: Fri, 15 Apr 2005 18:52:32 +0300 On 2002-11-19 13:43, Oliver Fromme <olli@secnetix.de> wrote: > Responsible-Changed-By: tjr > Responsible-Changed-Why: > I believe this is caused by the SIGINT handler longjmp()'ing > out when it's in the middle of a malloc() call. Calls to malloc() > and free() should be bracketed in INTON and INTOFF. > > I haven't had much luck tracking this down in the past, but > I'll try again to find the missing INTON/INTOFF. I just happened to stumble upon this bug today. It's still with us in FreeBSD 6.0-CURRENT. It seems that the inner for loop in the following: while for true; do false; done; do true; done is not stopped by sh(1) when ^C is hit. Even after the interrupt is received, sh consumes at least 5-15% of CPU on my test here, while it appears to be sitting at a PS1 prompt, waiting for more input. PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 2352 keramida 1 5 0 1668K 1192K ttyin 0:03 25.48% 10.79% sh After a few of these commands have been run, sh may reach CPU utilizations of even more: PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 2352 keramida 1 123 0 1672K 1196K RUN 1:11 63.21% 63.18% sh
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504151600.j3FG0eQU006756>