[PANIC] More details about problem with syscons(4)

From: Wojciech A. Koszek <dunstan_at_freebsd.czest.pl>
Date: Mon, 9 Jan 2006 17:03:52 +0000
Hello,

There is a problem I've reported earlier:

	http://lists.freebsd.org/pipermail/freebsd-current/2005-November/058221.html

Analisis has shown that allscreen_flags="80x50" or
allscreen_flags="MODE_278" is a reason. After I removed it and run my
box with typical 80x25 console, everything seems to be fine.

I'm getting that problem from time to time, which is really unpleasant
(especially because it happens after fsck'ing your filesystem when it's
mounted read/write). For some time I've been running modified
schistory.c from src/sys/dev/syscons.  It's here:

	http://freebsd.czest.pl/dunstan/FreeBSD/vidcontrol/schistory.c

Successful booting with my printf's looks like that:

	http://freebsd.czest.pl/dunstan/FreeBSD/vidcontrol/dmesg_success.txt

I got a panic, obtained a crash dump and was able to track it. Result is
here:

	http://freebsd.czest.pl/dunstan/FreeBSD/vidcontrol/syscons_crash.txt

As you see from attached information, I'm running with:

options          SC_PIXEL_MODE
options          SC_HISTORY_SIZE=20000

Complete kernel configuration is here:

	http://freebsd.czest.pl/dunstan/FreeBSD/vidcontrol/LAPTOP
	http://freebsd.czest.pl/dunstan/FreeBSD/vidcontrol/devel
	http://freebsd.czest.pl/dunstan/FreeBSD/vidcontrol/debug
	http://freebsd.czest.pl/dunstan/FreeBSD/vidcontrol/security

rwatson_at_ suggested that this highly XXXed part in schistory might be a
problem, since this area is where memory allocation happens. I belive my
analisis can confirm it:

(kgdb) list *0xc05db628
0xc05db628 is in sc_alloc_history_buffer
(/usr/src/sys/dev/syscons/schistory.c:154).
149
150                     /* FIXME: XXX no good? */
151
152                     sc_vtb_clear(history, scp->sc->scr_map[0x20],
153                                  SC_NORM_ATTR << 8);
154                     SC_DBG("prev_history=%p", prev_history);
155                     if (prev_history != NULL)
156                             copy_history(prev_history, history);
157                     scp->history_pos = sc_vtb_tail(history);
158                     SC_DBG("scp->history_pos=%d", scp->history_pos);


-- 
* Wojciech A. Koszek && dunstan_at_FreeBSD.czest.pl
Received on Mon Jan 09 2006 - 15:59:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:50 UTC