From nick@milla.ask33.net  Fri Aug 30 04:19:14 2002
Return-Path: <nick@milla.ask33.net>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id F337937B400
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Aug 2002 04:19:13 -0700 (PDT)
Received: from milla.ask33.net (milla.ask33.net [217.197.166.60])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7675343E42
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Aug 2002 04:19:13 -0700 (PDT)
	(envelope-from nick@milla.ask33.net)
Received: by milla.ask33.net (Postfix, from userid 1001)
	id 597EB3ABD40; Fri, 30 Aug 2002 13:19:38 +0200 (CEST)
Message-Id: <20020830111938.597EB3ABD40@milla.ask33.net>
Date: Fri, 30 Aug 2002 13:19:38 +0200 (CEST)
From: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
Reply-To: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Kernel panics or system hangs up with big SC_HISTORY_SIZE and VESA.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         42198
>Category:       i386
>Synopsis:       Kernel panics or system hangs up with big SC_HISTORY_SIZE and VESA.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 30 04:20:02 PDT 2002
>Closed-Date:    Sat Sep 16 11:52:25 GMT 2006
>Last-Modified:  Sat Sep 16 11:52:25 GMT 2006
>Originator:     Pawel Jakub Dawidek
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
Private
>Environment:
System: FreeBSD milla.ask33.net 4.6-STABLE FreeBSD 4.6-STABLE #9: Wed Jul 31 21:18:46 CEST 2002 root@milla.ask33.net:/usr/obj/usr/src/sys/MILLA i386


>Description:
	There are some serious problems with big values of SC_HISTORY_SIZE
	and VESA video driver. Kernel panics when we are trying to load
	vesa.ko module and SC_HISTORY_SIZE is big or system hangs up when
	SC_HISTORY_SIZE is big and VESA is compiled in kernel.

>How-To-Repeat:
	There are two ways:
	1. Compile kernel with big (for example 5000) SC_HISTORY_SZIE and
	   without VESA. Then reboot machine and do

		# kldload vesa

	   Kernel sould panic.

	2. Compile kernel with big (for example 5000) SC_HISTORY_SIZE and
	   with VESA support, then reboot machine and:

		# vidcontrol 132x60

	   then:

		# cat <some_big_file>

	   few times. When history buffer fills up system will hangs up.

	But there is a chance that those are two diffrent bugs.
>Fix:
	I don't know exactly. Backtrace after panic shows lncintr_sc()
	function from /sys/i386/isa/if_lnc.c.
	But I don't think secound problem (with system hangs up) is there.
	Problem could be here (from /sys/dev/syscons/schistory.c):

	#define	SC_MAX_HISTORY_SIZE	(1000 * MAXCONS * NSC)

	NSC is as I suppose number of chars per line. But where it is defined?
	I can't grep it. And there is a chance that this is to less for
	132 chars per line, because maybe somewhere buffer size is counted
	as number_of_lines * x_console_size and we got overflow.

	But I could be wrong:)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->pjd 
Responsible-Changed-By: dannyboy 
Responsible-Changed-When: Wed Jul 14 22:53:59 GMT 2004 
Responsible-Changed-Why:  
Originator is committer now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=42198 
State-Changed-From-To: open->closed 
State-Changed-By: pjd 
State-Changed-When: Sat Sep 16 11:50:39 UTC 2006 
State-Changed-Why:  
I don't use 132x60 text consoles anymore and nobody seems to have 
this problem. It could also be already fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=42198 
>Unformatted:
