Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2006 16:33:14 +0200 (CEST)
From:      Martin Blapp <mb@imp.ch>
To:        Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
Cc:        freebsd-stable@freebsd.org, "Wojciech A. Koszek" <wkoszek@freebsd.org>, csjp@freebsd.org, Robert Watson <rwatson@freebsd.org>, phk@freebsd.org, tmm@freebsd.org, Max Laier <max@love2party.net>, Patrick Guelat <patg@imp.ch>
Subject:   Re: Crash with FreeBSD 6.1 STABLE of today
Message-ID:  <20060626154810.S14714@godot.imp.ch>
In-Reply-To: <1151328755.80434.17.camel@buffy.york.ac.uk>
References:  <20060621202508.S17514@godot.imp.ch> <20060623133915.S14714@godot.imp.ch> <1151078632.62769.30.camel@buffy.york.ac.uk> <200606231928.58063.max@love2party.net> <20060626115110.O14714@godot.imp.ch> <20060626133540.G14714@godot.imp.ch> <20060626151138.C14714@godot.imp.ch> <1151328755.80434.17.camel@buffy.york.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help


Hi,

> Is the problem actually understood?  Do we know what's racing with what?
> Given there only ever seems to be a single backtrace involved, as far as
> I can tell, it's ttymodem racing with tty_close - can those two
> functions alone be locked?

Correct: The only place there tp->t_session is set to NULL is in tty_close().

         tp->t_pgrp = NULL;
         tp->t_session = NULL;
         tp->t_state = 0;

But I've seen this comment on peters page (http://people.freebsd.org/~peter/smp.html)

> At the moment I've hacked all the console code to obtain the scheduler mutex 
> instead of spltty()'ing all over the place, because in a word: it can't 
> spltty() any more. It's illegal because the console code may be called at any time (see 
> the next section). This is a hack because it isn't MP safe against tty 
> interrupts running on another cpu. Since the current tty interrupt is a fast 
> interrupt, I'm not sure that we're any worse off (fastints aren't masked by the 
> cpl anyway).

IMHO it explains why we need the proctree_lock (in early SMP times 
scheduler mutex). Maybe this should be replaced with a proper tty subsystem 
mutex ...)

After looking at our SMPnewgen Page, Poul Henning and Thomas Moestel
are working on locking the tty subsystem. I'll CC those :-)

Martin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060626154810.S14714>