9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] devmnt crash, fix.
@ 2012-08-22 18:53 erik quanstrom
  2012-08-22 19:09 ` cinap_lenrek
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: erik quanstrom @ 2012-08-22 18:53 UTC (permalink / raw)
  To: 9fans

i'm probablly wrong again, but we had a crash with this back trace.
the process doing the i/o was given a note. ...

src(0xe010a6b9); // dumpstack+0x10
src(0xe0112653); // panic+0x112
src(0xe010a8d7); // fault386+0x17d
src(0xe0109dc2); // trap+0x15d
src(0xe010066f); // forkret
//passing interrupt frame; last pc found at sp=0xf4ea5d94
src(0xe01babbd); // lockloop+0x34
src(0xe01bacf6); // lock+0x103
src(0xe01aeed8); // wakeup+0x18
src(0xe0111a91); // mountmux+0xf1
src(0xe01115b6); // mountio+0x21d
src(0xe011127a); // mountrpc+0x27
src(0xe011116f); // mntrdwr+0xfb
src(0xe0110faa); // mntread+0x126
src(0xe01b90e3); // sysexec+0x172
src(0xe010abbb); // syscall+0x238
src(0xe0100cb5); // _syscallintr+0x18
...

i believe the unlock(m) needs to be moved to just before the return
because mntflushfree -> mntqrm can run after we drop the lock and
before the wakeup.

- erik

----

void
mountmux(Mnt *m, Mntrpc *r)
{
	Mntrpc **l, *q;

	lock(m);
	l = &m->queue;
	for(q = *l; q; q = q->list) {
		/* look for a reply to a message */
		if(q->request.tag == r->reply.tag) {
			*l = q->list;
			if(q != r) {
				/*
				 * Completed someone else.
				 * Trade pointers to receive buffer.
				 */
				q->reply = r->reply;
				q->b = r->b;
				r->b = nil;
			}
			q->done = 1;
			unlock(m);
			if(mntstats != nil)
				(*mntstats)(q->request.type,
					m->c, q->stime,
					q->reqlen + r->replen);
			if(q != r)
mountmux+0xf1			wakeup(&q->r);
			return;
		}
		l = &q->list;
	}
	unlock(m);
	print("unexpected reply tag %ud; type %d\n", r->reply.tag, r->reply.type);
}



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

end of thread, other threads:[~2012-08-23 18:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-22 18:53 [9fans] devmnt crash, fix erik quanstrom
2012-08-22 19:09 ` cinap_lenrek
2012-08-22 19:12 ` cinap_lenrek
2012-08-22 19:53 ` cinap_lenrek
2012-08-22 22:26   ` erik quanstrom
2012-08-22 23:30 ` cinap_lenrek
2012-08-23  1:53   ` erik quanstrom
2012-08-23  9:47     ` cinap_lenrek
2012-08-23 13:27       ` erik quanstrom
2012-08-23 15:02         ` cinap_lenrek
2012-08-23 15:39         ` Bakul Shah
2012-08-23 15:48           ` erik quanstrom
2012-08-23 15:53           ` cinap_lenrek
2012-08-23 16:06             ` erik quanstrom
2012-08-23 16:18               ` cinap_lenrek
2012-08-23 16:24                 ` erik quanstrom
2012-08-23 16:47                   ` Charles Forsyth
2012-08-23 17:01                     ` cinap_lenrek
2012-08-23 17:53                     ` Bakul Shah
2012-08-23 18:03                       ` erik quanstrom
     [not found]                   ` <CAOw7k5ii5PoYZnEbDeUuhR9GsgEEGt7i+XTQm7FR9+r=ENg=xw@mail.gmail.c>
2012-08-23 17:09                     ` erik quanstrom

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