9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] problem with building from source on vx32 solved
@ 2010-08-31  6:00 ron minnich
  2010-08-31 12:54 ` erik quanstrom
  0 siblings, 1 reply; 11+ messages in thread
From: ron minnich @ 2010-08-31  6:00 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I'd been having a problem once I built from source on vx32.

lots of commands would hang until I hit return.

ratrace showed this:

rminnich@xcpu2:~$ more /tmp/problem
ratrace -c /bin/date
24577 date Pread 0x19f6 0
0ffffee0/"." 8 0 = 1 "" 0x11cef69ae0b06c68 0x11cef69c0a58d900
24577 date Close 0x1a30 0 = 0 "" 0x11cef69c0b601f70 0x11cef69c0b607948
24577 date Open 0x1a89 0000702c/"/dev/bintime" 00000020 = 0 ""
0x11cef69c0c2119c8 0x11c
ef69c0c5911e8

Note the weird read from fd 0. Makes no sense.

To shorten a long story, I tracked it to this:
pid = _tos->pid
in libc/9sys/nsec.c, which was added last july 23.

pid is 0 in _tos->pid on 9vx.

A simple change:
pid = getpid();

fixes it. Is it essential for performance to have _tos->pid? It would
seem so. If it's really that necessary, then maybe getpid() could just
cache the pid.

Or I'll try to fix 9vx.

For now, I'm going with getpid(), and sysfromiso will too.

thanks

ron



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

end of thread, other threads:[~2010-09-03 14:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-31  6:00 [9fans] problem with building from source on vx32 solved ron minnich
2010-08-31 12:54 ` erik quanstrom
2010-08-31 14:59   ` ron minnich
2010-08-31 15:25     ` erik quanstrom
2010-09-02  6:35       ` ron minnich
2010-09-02 11:57         ` erik quanstrom
2010-09-02 15:05           ` ron minnich
2010-09-03  5:59             ` ron minnich
2010-09-03  8:21               ` Charles Forsyth
2010-09-03 14:56                 ` ron minnich
2010-09-03 14:57               ` Philippe Anel

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