9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Kernel Panic <cinap_lenrek@gmx.de>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] notes and traps
Date: Thu, 28 Aug 2008 17:28:28 +0200	[thread overview]
Message-ID: <48B6C41C.4050307@gmx.de> (raw)
In-Reply-To: <4be02306ffb650f91d3c167024c106b2@coraid.com>

erik quanstrom wrote:
> it looks like you get the second trap while
> you are still in your notify handler, since
> i think this test
> 	(up->notified || up->notify==0)
> is for a proc in a notify handler getting a system
> trap (or a proc with no notify handler).
>
right, the problem is, my note handler never sees the
*real* trap. the message passed to the notehandler is the
string posted from the other process. "sig" in the case
of linuxemu. the ureg has the trap field set to 0xD. the
pc is right on the INT 0x80 instruction., but we get the
"sig", not "sys: trap: general protection ..."

(Of course! because that was the context/event that brougth
it into the kernel in the first place. But i think it picked the wrong
note for delivery, and keeps the NDebug note pending.)

If i ignore the "sig" and do a noted(NCONT); the real trap
comes in. (most of the time) But if i do any syscall in the
handler of "sig", we get killed

(maybe caused by notify() detecting the condition:
up->note[0].flag != NUser && up->notified
while we process the "sig" note)
> it would be very interesting to know what the system
> trap is.
> it would also be interesting to know if you are
> seeing this randomly or if you can reliable reproduce
> this condition.
>
I can reproduce it outside of linuxemu. I'm at work currently...
I will provide a testcase.

Many thanks for your response.
> - erik
>

--
cinap



  reply	other threads:[~2008-08-28 15:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28 13:21 Kernel Panic
2008-08-28 14:09 ` erik quanstrom
2008-08-28 15:28   ` Kernel Panic [this message]
2008-08-29 10:04   ` Kernel Panic
2008-08-29 10:09     ` Kernel Panic
2008-08-29 18:26     ` erik quanstrom
2008-08-30  2:18       ` cinap_lenrek
2008-08-30  3:38         ` erik quanstrom
2008-08-30  5:48           ` cinap_lenrek
2008-08-30 10:50             ` Steve Simon
2008-08-30 14:04             ` erik quanstrom
2008-08-30 17:40               ` cinap_lenrek
2008-08-30 18:09               ` cinap_lenrek

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=48B6C41C.4050307@gmx.de \
    --to=cinap_lenrek@gmx.de \
    --cc=9fans@9fans.net \
    /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).