Date: Mon, 02 Jul 2001 10:30:36 +0900 From: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> To: Bruce Evans <bde@zeta.org.au> Cc: Dag-Erling Smorgrav <des@ofug.org>, current@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: blockable sleep lock panic (and dumps still don't work) Message-ID: <200107020130.KAA23158@zodiac.mech.utsunomiya-u.ac.jp> In-Reply-To: Your message of "Mon, 02 Jul 2001 03:45:19 %2B1000." <Pine.BSF.4.21.0107020251080.32793-100000@besplex.bde.org> References: <Pine.BSF.4.21.0107020251080.32793-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>This has something to do with the TIOCCONS ioctl. tputchar() is the >output function for the TOTTY case, and the TOTTY flag is only set for >kernel printfs if TIOCCONS has set constty to non-NULL. I'm not sure >what uses TIOCCONS (I think it is intended for use with X, but it >doesn't seem to be used on my systems). IIRC, xconsole uses this to capture console output. >TIOCCONS is almost unimplementable >(printing to a terminal is not reentrant enough to work in all contexts, >and is supposed to be protected by spltty(), but kernel printfs must >work in all contexts), so the correct fix may be to remove it. TIOCCONS >is broken in all versions of FreeBSD. The brokenness is just more >obvious now that there are more locks to trip over. > >The output function for the TOLOG case (i.e., msglogchar()) also seems to >be broken in all versions of FreeBSD. It operates on the circular message >buffer, but doesn't have any locking. I discussed this with jhb. We even had a test patch. Jhb told me that someone else was working on providing proper locking in kernel printf(). >The output function for the TOCONS case (i.e., cnputc()) is also >problematic. Only the serial console output routine even attempts to >be reentrant, and (per-cpu) reentrancy is not enough under SMP. >Syscons' output routine was easy to panic by mixing kernel printfs with >user-mode output the last time I checked. Syscons' sccnputc() is not reentrant. I was trying to improbe this, but decided that I would wait until I see further development in tty locking and kernel printf() area by jhb. Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107020130.KAA23158>