All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kevin D. Kissell" <kevink@paralogos.com>
To: Kaz Kylheku <KKylheku@zeugmasystems.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Silly 100% CPU behavior on a SIG_IGN-ored SIGBUS.
Date: Tue, 23 Jun 2009 15:44:29 -0700	[thread overview]
Message-ID: <4A415ACD.8010102@paralogos.com> (raw)
In-Reply-To: <DDFD17CC94A9BD49A82147DDF7D545C501C35128@exchange.ZeugmaSystems.local>

Kaz Kylheku wrote:
> Hi all,
>
> On kernel 2.6.26, glibc 2.5 (n32), SiByte SB-1 core, the following
> program goes into 100% CPU, chewing up about 80% kernel time and
> 20% user.
>
> #include <stdio.h>
> #include <signal.h>
>
> int main(void)
> {
>   int *deadbeef = (int *) 0xdeadbeef;
>   signal(SIGBUS, SIG_IGN);
>   printf("*deadbeef == %d\n", *deadbeef);
>   return 0;
> }
>
> If any fatal exception is ignored, the program should be killed
> if that exception happens. 100% CPU is not a useful response.
>   
It's not a useful program, so what did you expect?   One might argue 
that it would be more useful or correct to have the kernel advance the 
PC to not endlessly repeat the doomed load, but ignoring SIG_IGN and 
silently killing the thread violates the signal API as I've always 
understood it.

          Regards,

          Kevin K.

  parent reply	other threads:[~2009-06-23 22:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 21:45 Silly 100% CPU behavior on a SIG_IGN-ored SIGBUS Kaz Kylheku
2009-06-23 21:45 ` Kaz Kylheku
2009-06-23 22:03 ` David Daney
2009-06-25  3:39   ` Kaz Kylheku
2009-06-25  3:39     ` Kaz Kylheku
2009-06-23 22:44 ` Kevin D. Kissell [this message]
2009-06-25 13:13   ` Ralf Baechle
2009-06-25 13:45     ` Ralf Baechle
2009-06-25 16:00       ` Kaz Kylheku
2009-06-25 16:00         ` Kaz Kylheku
2009-06-26  0:45         ` Ralf Baechle
2009-06-26  0:52           ` David Daney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A415ACD.8010102@paralogos.com \
    --to=kevink@paralogos.com \
    --cc=KKylheku@zeugmasystems.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.