Subject: kern/10283: wscons page fault trap when cat:ing a binary file
To: None <>
From: Alan Barrett <>
List: netbsd-bugs
Date: 06/05/2000 02:32:12
>Number:         10283
>Category:       kern
>Synopsis:       wscons page fault trap when cat:ing a binary file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 05 02:33:00 PDT 2000
>Originator:     Alan Barrett
>Release:        NetBSD-current 2000-04-02
not much
	NetBSD 1.4X/i386
I accidentally copied a binary file to my terminal using cat, and got
a page fault trap.  At the time, my shell was running in a "screen"
virtual terminal (using screen-3.9.5 from pkgsrc), and that was running
in a wscons virtual console on the physical VGA console of an i386
machine.  I have subsequently been able to replicate the problem
without using "screen".

Here's some debugging information, transcribed by hand and with some
details omitted:

uvm_fault(0xc9986e68, 0x7200000, 0, 1) -> 1
kernel: page fault trap, code=0
Stopped in screen-3.9.5 at wsemul_vt100_output_normal+0xc9: movl 0(%edx,%eax,4),%eax
db> t
wsemul_vt100_output_normal(c04e7c00,37,0) at wsemul_vt100_output_normal+0xc9
wsemul_vt100_output(c04e7c00,c04ef800,64,0) at wsemul_vt100_output+0x83
wsdisplaystart(...) at wsdisplaystart+0x7e
ttstart(...) at ttstart+0x13
ttwrite(...) at ttwrite+0x295
wsdisplaywrite(...) at wsdisplaywrite+0x5a
spec_write(...) at ...
ufsspec_write(...) at ...
vn_write(...) at ...
dofilewrite(...) at ...
sys_write(...) at ...
--- syscall (number 4) ---

Get an i386 box with NetBSD-current 2000-04-02, using the wscons console
driver.  Login on one of the virtual consoles.  cat a large binary file,
such as the Windows version of Star Office: so51a_win_01.exe.