9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 9vx fork problem
@ 2008-06-30  0:32 Anthony Martin
  2008-06-30  2:02 ` Russ Cox
  2008-06-30 12:34 ` Steve Simon
  0 siblings, 2 replies; 8+ messages in thread
From: Anthony Martin @ 2008-06-30  0:32 UTC (permalink / raw)
  To: 9fans

On 9vx, iostats suicides:

  term% iostats echo
  iostats 128: suicide: sys: trap: page fault pc=0x0000b21c

Apparently, after a fork, a child retains it's parent's
pid in _tos->pid. It isn't updated until the next syscall
finishes with kexit.

This is a problem if the child's first function call is
malloc. When malloc locks it's pool, it stores the pid
from _tos in a private area. After the kernel returns from
the brk, _tos->pid has been corrected by the call to kexit.
Punlock then fails because the pids don't match.

I'm not sure of the best way to go about fixing this.

     Anthony



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-06-30 15:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-30  0:32 [9fans] 9vx fork problem Anthony Martin
2008-06-30  2:02 ` Russ Cox
2008-06-30  3:25   ` Anthony Martin
2008-06-30 12:34 ` Steve Simon
2008-06-30 12:42   ` Pietro Gagliardi
2008-06-30 15:14     ` Robert William Fuller
2008-06-30 12:51   ` Russ Cox
2008-06-30 13:03     ` Steve Simon

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).