kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: getarunks@gmail.com (Arun KS)
To: kernelnewbies@lists.kernelnewbies.org
Subject: BUG: scheduling while atomic
Date: Wed, 18 Apr 2012 14:10:40 +0530	[thread overview]
Message-ID: <CABOM9Zr-NFMGxVnF8kQSZWT_X_v6h5dra5hDsWaqOK2WeeqNHw@mail.gmail.com> (raw)
In-Reply-To: <4F8E7AF8.3050202@linux.vnet.ibm.com>

Hi Srivatsa,

On Wed, Apr 18, 2012 at 1:57 PM, Srivatsa S. Bhat <
srivatsa.bhat@linux.vnet.ibm.com> wrote:

> On 04/18/2012 01:38 PM, Arun KS wrote:
>
> > Hi Dave,
> >
> > Thanks for your reply.
> >
> > On Wed, Apr 18, 2012 at 1:01 PM, Dave Hylands <dhylands@gmail.com
> > <mailto:dhylands@gmail.com>> wrote:
> >
> >     Hi Arun,
> >
> >     On Tue, Apr 17, 2012 at 11:44 PM, Arun KS <getarunks@gmail.com
> >     <mailto:getarunks@gmail.com>> wrote:
> >     >
> >     > Hello Guys,
> >     >
> >     > System is working normal after this BUG.
> >     > PC is at 0x400b4614, probably a mmaped address.
> >     >
> >     > Just wondering how can this BUG happen when a process is running
> >     in user
> >     > space.
> >     >
> >     > Can it be something like this
> >     > 1) enter to kernel from userspace through some system call.
> >     > 2) kernel disables the interrupt and return to user space.
> >
> >     Don't do that
> >
> >
> > I don't do that. This scenario mentioned is a just a wild guess.
> >
> >
> >     > 3) and now it can happen in user space?
> >
> >     Because something in userspace made a blocking call which would cause
> >     a context switch to occur and your driver erroneously left interrupts
> >     disabled.
> >
> > In that case, my system should have been unstable afterwards if
> > interrupts are left disabled. But that is not happening.
> >
> > If we return to user space with interrupts disabled, can we switch back
> > again to kernel using a system cal(because interrupts are already
> disabled)?
> >
>
>
> Depends on how many CPUs you have - AFAICS the "interrupts disabled"
> discussion above applies to a single CPU.. so if you have other CPUs on
> your
> system, you could probably use the system for a little more time.
>
>
> Hmm.. I have uniprocessor.

>
> There is a simple way to check if interrupts are indeed disabled as
> hypothesised: turn on the hard-lockup detector (See
> Documentation/lockup-watchdogs.txt for details on what it is and what
> config options you have to enable). You can even turn on the soft-lockup
> detector and see what you get. Setting the option to panic on hard-lockup/
> soft-lockup/hung tasks would be even better, to debug the issue.
>

Thanks for the pointers. I ll try this out.

Arun

>
> Regards,
> Srivatsa S. Bhat
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120418/87ed6fc2/attachment.html 

  reply	other threads:[~2012-04-18  8:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CABOM9ZqSazS-NkD980f6sUyy=hk1aLVY+Vjwcxs3mGybvbkgaQ@mail.gmail.com>
2012-04-18  6:44 ` BUG: scheduling while atomic Arun KS
2012-04-18  7:31   ` Dave Hylands
2012-04-18  8:08     ` Arun KS
2012-04-18  8:14       ` Dave Hylands
2012-04-18  8:27       ` Srivatsa S. Bhat
2012-04-18  8:40         ` Arun KS [this message]
2012-04-18  8:58   ` Arun KS
2012-04-18 15:40     ` Dave Hylands
2011-12-05  9:12 Bug:scheduling " sandeep kumar
2011-12-05 19:03 ` Jonathan Neuschäfer
2011-12-05 19:16 ` Jonathan Neuschäfer
  -- strict thread matches above, loose matches on Subject: below --
2011-05-10  5:51 BUG: scheduling " sandeep kumar
2011-05-10  6:08 ` Dave Hylands

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=CABOM9Zr-NFMGxVnF8kQSZWT_X_v6h5dra5hDsWaqOK2WeeqNHw@mail.gmail.com \
    --to=getarunks@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).