Date: Mon, 15 Jan 1996 21:57:00 +0100 (GMT-1:00) From: Jose Federero Martinez <federero@obelix.cica.es> To: bugs@freebsd.org Message-ID: <199601152057.VAA18775@obelix.cica.es>
next in thread | raw e-mail | index | archive | help
Submitted by:
Jesus A. Mora Marin
c/ Herreria, 64
41230-Castilblanco A. (Spain)
e-mail: federero@obelix.cica.es
--------------------------------------------------------------------
This is to report a bug or something alike in FreeBSD 2.1. I don't
know if this is the right place to put it in, but please be patient
with me: I am not used to all this subject of Internet.
I bought and got my copy of FreeBSD from Walnut Creek only some days
ago. I wished to try it as an alternative to commercial systems
-I have been dealing with SCO Unix at home, and with Unix SysVR3 and
SysVR4 at work for years, and now I thought it was time to switch
to something new. Some weeks ago, I got a new 1GB hard disk and
installed Slackware Linux (kernel ver. 1.2.8) on it. It has been
working fine all the time, with no complain at all. But I reserved
a place to FreeBSD, because I was curious about the other major
family of Unix systems -you know, AT&T Unix is getting larger and
less inventive all the time-.
Well, I installed my new FreeBSD system. Fine. Then, made a customized
kernel. Excellent. But the day after I run into trouble... Got a
panic!
But please let me describe first the framework, and then the nasty
crash.
1) HARDWARE.
========
* SYSTEM MOTHERBOARD:
------------------
No-brand: J-403TG GREEN VLB, v2.1
486SX/486DX, ISA, with three slots for VLB controllers.
VLB jumpered at 0 Wait States.
CPU installed: Intel 80486DX2-S, at 66 MHz, fan-cooled.
External cache: 256 KB, 20 ns
DRAM installed: 12 MB, 70 ns (3x4MB 72-pin SIMM)
ROMBIOS: Award Modular BIOS v4.50G. (details later)
Chipset
* ROM BIOS DETAILS:
----------------
Award Modular BIOS v4.50G. Signature: 01/12/95-OPTI-802G-2C4UKJ11-00
-STANDARD CMOS SETUP:
Hard Disks: Write Land
--------------- Type Cyl Heads Precom. Zone Sectors Mode
Primary Master User 525 64 0 2099 63 LBA
Slave User 1024 16 65535 1024 63 NORMAL
Secondary Master & Slave not defined.
Floppy disks drives: A: 1.2MB, 5.25 in.
B: 1.44MB, 3.5 in.
-BIOS FEATURES: (ENA=Enabled, DIS=Disabled)
Virus warning DIS Boot up Numlock status OFF
CPU internal cache ENA Boot up System speed HIGH
External cache ENA IDE HDD Block Mode ENA
Quick POST DIS Gate A20 option FAST
Boot Sequence A,C Memory parity check DIS
Swap floppy drive DIS Typematic Rate setting DIS
Boot up floppy seed DIS All shadowing options DIS
-CHIPSET FEATURES
Autoconfig DIS Single ALE enable DIS
AT Clock option SYNC Extra AT Cycle WS DIS
Synchronous AT clock CLK/4 Fast AT Cycle DIS
DRAM Read Wait States 3-2-2-2 Back to back I/O delay DIS
DRAM Write WS 1 WS Master mode byte swap DIS
Cache Read Burst 2-1-1-1 DMA clock SCLK/2
Cache Write WS 0 WS System BIOS cacheable DIS
Hidden refresh option DIS Video BIOS cacheable DIS
Slow Refresh enable DIS
-POWER MANAGEMENT STUFF: Fully disabled.
* VIDEO CARD:
----------
No-brand SuperVGA Accelerator Card: VL-41
Video BIOS signature: Quatdel S3 86C801/805 Enhanced VGA BIOS.
Version 2.13.065. Phoenix Technologies Ltd.
Bus type: 32-bit VL-Bus
Graphics Accelerator: S3 805
Video Memory: 1024 KB
Installed on VLB slot.
*ENHANCED IDE I/O CARD:
---------------------
Brand: ? FSIOL-UC2.1C, Version 2.0
Installed on VLB slot. Jumpered for 25/33 MHz CPU clock.
Devices supported:
-IDE channels: 2 (secondary channel disabled by hardware)
-Floppy disk controller.
-Serial ports: 2 (Microsoft Home Serial Mouse attached at COM1)
I/O port address and IRQ at default settings.
-Game port, enabled
-Parallel port, enabled (no printer attached)
*HARD DISK DRIVES:
----------------
1) Western Digital, Caviar WDC AC21000-00H.
Geometry: 2100 cylinders, 16 heads, 63 sectors/track, 512 bytes/sector.
Please note: Logic block addressing enabled in BIOS setup.
Jumpered as Master drive in dual drive configuration.
Attached at Primary IDE channel.
2) Quantum Maverick 540A
Geometry: 1048 cylinders, 16 heads, 63 sectors/track, 512 bytes/sector.
Note: only 1024 cyl declared in BIOS, no translation (THANKS IBM!)
Jumpered as Slave drive in dual drive configuration.
Attached at Primary IDE channel.
*SOUND CARD:
----------
Creative Labs Soundblaster AWE 32.
Settings: I/O ports 0x220
IRQ: 7 (not default!)
DMA channel: 1, high 6
MIDI I/O address: 0x330
Game port disabled.
*CD-ROM DRIVE:
------------
Creative Lab, Matsushita/Panasonic CR-563-x 0.81.
Attached at sound card.
I/O ports: 0x230 -although the sound card likes more to say is 0x220-.
2) FreeBSD LOCAL SETTINGS.
======================
The FreeBSD 2.1 is installed on hard disk wd0. The installation was
made by booting directly from CD-ROM (install.bat).
This is the partition scheme of wd0, as seen by fdisk:
Disk name: wd0
Disk Geometry: 525 cyls/64 heads/63 sectors.
Offset Size End Name Ptype Desc Subtype
0 63 62 - 6 unused 0
63 520065 520127 wd0s1 2 fat 6
520128 512064 1032191 wd0s2 4 extended 5
1032192 528192 1560383 wd0s3 1 unknown 131 Active (*1)
1560386 556416 2116799 wd0s4 3 freebsd 165
(*1): This is a Linux native primary partition. Note that, since I am
new to FreeBSD, I have left the Linux partition as the active one, and
boot with the Linux loader either MS-DOS, FreeBSD or Linux itself.
The disk wd1 is used just for two MS-DOS partitions -a primary one and
another extended- and has nothing to do with all this case.
Now, the layout of wd0s4 (FreeBSD slice), as seen by the Disklabel,
editor is as follows:
Disk: wd0 Partition name: wd0s4
Part Mount Size Newfs
wd0s1 <none> 253MB DOS
wd0s4a / 30MB *
wd0s4e /var 10MB *
wd0s4b <none> 24MB SWAP
wd0s4f /usr 207MB *
After the partitioning, I have installed a distribution including
these packages: bin, compat20, dict, info, manpages, proflibs and
kernel sources.
This is the current config file of my FreeBSD 2.1 system, customized
to support most of the devices installed -comments in Spanish trans-
lated :-)
# ------------- /usr/src/sys/i386/conf/JAMMBSD begins here ------------
#
# JAMMBSD -- Customized Kernel Configuration for JAMM's blazing machine
#
# Mods:
# 01/12/96: Options added:
# XSERVER -- Support for X Windows
# 01/13/96: Since they seem not to alter the behaviour, I set the
# DDB and KTRACE options again.
# NFS support commented out - no need, smaller kernel
#
machine "i386"
cpu "I486_CPU"
ident JAMMBSD
maxusers 10
options "CHILD_MAX=128"
options "OPEN_MAX=128"
config kernel root on wd0
options "COMPAT_43" #Compatible with BSD 4.3
# Try this later, when troubles get fixed. Very interesting for me...
# Have some stuff from old SCO Unix
# options "COMPAT_IBCS2"
options SYSVSHM
options SYSVSEM
options SYSVMSG
options DDB
options KTRACE
options UCONSOLE #Allow users to grab the console
options INET #InterNETworking
options FFS #Berkeley Fast Filesystem
# options NFS #Network Filesystem
options MSDOSFS #MSDOS Filesystem
options "CD9660" #ISO 9660 Filesystem
options PROCFS #Process filesystem
options "SCSI_DELAY=15" #Be pessimistic about Joe SCSI device
# Next one needed at all???
options BOUNCE_BUFFERS #include support for DMA bounce buffers
controller isa0
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
disk fd0 at fdc0 drive 0
disk fd1 at fdc0 drive 1
tape ft0 at fdc0 drive 2
controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
disk wd0 at wdc0 drive 0
disk wd1 at wdc0 drive 1
# Please do not probe wdc1 --- it takes a long time before giving up
controller matcd0 at isa? port 0x230 bio
# syscons is the default console driver, resembling an SCO console
device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
#device vt0 at isa? port "IO_KBD" tty irq 1 vector pcrint
#options "PCVT_FREEBSD=210" # pcvt running on FreeBSD 2.1
options XSERVER # include code for XFree86
device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
# May conflict with Soundblaster at irq 7???
device lpt0 at isa? port? tty irq 7 vector lptintr
pseudo-device loop
pseudo-device ether
pseudo-device log
pseudo-device sl 1
# ijppp uses tun instead of ppp device
#pseudo-device ppp 1
pseudo-device tun 1
pseudo-device pty 16
pseudo-device gzip # Exec gzipped a.out's
# ------------- /usr/src/sys/i386/conf/JAMMBSD ends here --------------
It compiles fine, with no warning at all.
And this is the log of a typical booting, as produced by dmesg:
# -------------- bootlog begins here -------------------------------
FreeBSD 2.1.0-RELEASE #0: Sat Jan 13 19:15:55 1996
root@myname.my.domain:/usr/src/sys/compile/JAMMBSD
CPU: i486 DX2 (486-class CPU)
Origin = "GenuineIntel" Id = 0x435 Stepping=5
Features=0x3<FPU,VME>
real memory = 12582912 (12288K bytes)
avail memory = 10928128 (10672K bytes)
Probing for devices on the ISA bus:
sc0 at 0x60-0x6f irq 1 on motherboard
sc0: VGA color <16 virtual consoles, flags=0x0>
sio0 at 0x3f8-0x3ff irq 4 on isa
sio0: type 16450
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16450
lpt0 at 0x378-0x37f irq 7 on isa
lpt0: Interrupt-driven port
lp0: TCP/IP capable interface
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: NEC 765
fd0: 1.2MB 5.25in
fd1: 1.44MB 3.5in
wdc0 at 0x1f0-0x1f7 irq 14 on isa
wdc0: unit 0 (wd0): <WDC AC21000H>
wd0: 1033MB (2116800 sectors), 2100 cyls, 16 heads, 63 S/T, 512 B/S
wdc0: unit 1 (wd1): <QUANTUM MAVERICK 540A>
wd1: 516MB (1057392 sectors), 1049 cyls, 16 heads, 63 S/T, 512 B/S
matcd - Matsushita (Panasonic) CD-ROM Driver by FDIV, Version 1(26) 18-Oct-95
matcdc0 at 0x230-0x233 on isa
matcdc0 Host interface type 0
matcd0: [CR-5630.81]
npx0 on motherboard
npx0: INT 16 interface
# -------------- bootlog ends here -------------------------------
After those funny messages, follow some more of them, generated by
/etc/rc*. They are not impressive: swap device is added, and a lot of
daemons starting, but no errors, except some complain from
a networking-related gronkulator. Nothing to be concerned with.
/etc/sysconfig is modified this way:
keymap=spanish.iso
cursor=blink
Also /etc/rc is modified to comment out the line that starts the
syslogd daemon -got fed up with those nasty messages when logged in
other virtual console, must modify syslog.conf-.
And this is my /etc/fstab:
/dev/wd0s4b none swap sw 0 0
/dev/wd0a / ufs rw 1 1
/dev/wd0s4f /usr ufs rw 1 1
/dev/wd0s4e /var ufs rw 1 1
proc /proc procfs rw 0 0
/dev/matcd0a /cdrom cd9660 ro,noauto 0 0
Well, other packages installed -all from FreeBSD 2.1 Installation
CD-ROM- include:
mc-3.0.tgz
bash-1.14.5.tgz
less-290.tgz Used as man-pager
lynx-2.4.2.tgz For reading html docs
pdksh-5.2.3.tgz Not tried yet
zsh-2.6b10.tgz zsh moved to /bin/zsh and used
as default shell
No time to try other packages.
This is a pseudo-log in a fresh/typical system at home:
--------------- session pseudolog starts here -------------------------------
v0<~># ps -ax
PID TT STAT TIME COMMAND
0 ?? DLs 0:00.00 (swapper)
1 ?? Is 0:00.06 /sbin/init --
2 ?? DL 0:00.00 (pagedaemon)
3 ?? DL 0:00.00 (vmdaemon)
4 ?? DL 0:00.12 (update)
42 ?? Is 0:00.02 routed -q
63 ?? Is 0:00.01 portmap
74 ?? Is 0:00.46 inetd
81 ?? Is 0:00.05 cron
83 ?? Is 0:00.06 lpd
126 v0 Ss 0:01.18 -zsh (zsh)
157 v0 R+ 0:00.01 ps -ax
127 v1 Is+ 0:00.04 /usr/libexec/getty Pc ttyv1
128 v2 Is+ 0:00.04 /usr/libexec/getty Pc ttyv2
129 v3 Is+ 0:00.04 /usr/libexec/getty Pc ttyv3
130 v4 Is+ 0:00.04 /usr/libexec/getty Pc ttyv4
131 v5 Is+ 0:00.05 /usr/libexec/getty Pc ttyv5
v0<~># mount
/dev/wd0a on / (local)
/dev/wd0s4f on /usr (local)
/dev/wd0s4e on /var (local)
procfs on /proc (local)
v0<~># df -k
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/wd0a 30206 13588 14200 49% /
/dev/wd0s4f 208686 63100 128890 33% /usr
/dev/wd0s4e 9726 374 8572 4% /var
procfs 4 4 0 100% /proc
v0<~># vmstat
procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr f0 f1 w0 w1 in sy cs us sy id
0 0 0 17896 3216 48 0 1 0 36 0 0 0 2 0 278 46 6 1 3 96
v0<~># swapinfo
Device 512-blocks Used Avail Capacity Type
/dev/wd0s4b 49152 0 49024 0% Interleaved
v0<~>#
--------------- session pseudolog ends here -------------------------------
3) AND NOW, LET ME INTRODUCE TO YOU... THE PANIC!
==============================================
At last, I will tell you a fully reliable way to reproduce the panic.
Supose you have a fresh system configured the way described before.
I can get the panic simply doing so:
1) Mount the FreeBSD 2.1 Installation CD-ROM:
mount -t cd9660 /dev/matcd0a /cdrom
2) Run the Midnight Commander:
mc
3) Inside Midnight Commander, change directory -of course using the
the arrows and PgUp/PgDn keys of the panel- to /cdrom/ports.
4) Now, highlight the file /cdrom/ports/README, and, in order to
see inside it, please press the F3 key, and...
Gotcha! You get a pretty PANIC message at your console. It says:
Fatal trap 12: page fault while in kernel mode
fault virtual address = 0xf1e17000
fault code = supervisor write, page not present
instruction pointer = 0x8:0xf01839de
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL=0
current process = Idle
interrupt mask =
kernel: type 12 trap, code=0
stopped at _matcd_blockread+0x1fe movb %bl,0(%eax)
Now, having the DDB kernel online debugger enabled, got this data:
db> trace
_matcd_blockread(90) at _matcd_blockread+0x1fe
_softclock(80000000, 10, 10, 0, f0651200) at _softclock+0x64
doreti_swi(0, f01722cc, 11111111, 22222222, 33333333) at doreti_swi+0xf
_cpu_switch(11111111, 22222222, 33333333, 44444444, 55555555) at _cpu_switch
db> show reg
cs 0xf0120008 _ptsread+0x4
ds 0x10
es 0x10
ss 0x10
eax 0xf1e17000
ecx 0x231
edx 0x230
ebx 0x55
esp 0xf0190f54 _etext+0x1644
ebp 0xf0190f9c _etext+0x168c
esi 0xf019d560 _matcd_data+0x154
edi 0
eip 0xf01839de _matcd_blockread+0x1fe
efl 0x10246
_matcd_blockread+0x1fe: movb %bl,0(%eax)
db> call cpu_reset()
That's all, folks!
FINAL NOTES:
Here are some comments and conclusions about this case:
-Although the operations described above ALWAYS result in the reported
panic, this occurs in other conditions, not so well defined. I once
got a similar crash, when had mc in a virtual console in background
and in the current console was messing with the info system. Suddenly,
the panic raised. Another time, I was recompiling on ttyv0 all the
kernel sources; on ttyv1 was less-ing /usr/share/doc/handbook.ascii.
Then something was wrong and less died. Back again on ttyv0, I saw
that the kernel-make has reported some errors and gave up. Tried to
edit my config file and got a message complaining something about
invalid or non-existent file descriptors. A few commands after, the
system crashed.
-Curiously, you can access and read ports/README with no trouble
by cat-ing it. Further, from MS-DOS or Linux, there is not problem
at all. I DO NOT mean that mc has nothing to do with the panic, but
what is the difference?
-I thought that something was wrong with my customized kernel, but
it happens with kernel.GENERIC too.
-I thought that DDB was bugously nervous, so I removed it. The panic
was still there.
-I thought that something was wrong with the swap partition, for some
obscure reason. I commented out the `swapon -A' line in /etc/rc and
rebooted a fresh system with no swap device at all. Bad news: panic
again.
-I thought: Jesus, you need a crash dump after the panic, then savecore
it, and send the dump to someone with more knowledge of this stuff
than you. Well, I modified my /etc/sysconfig to dumpon to the swap
partition (/dev/wd0s4b) and savecore it. Then I crashed at will, and,
inside ddb did `call-ed diediedie()'. It told me it was dumping and
then rebooted. Fine. But it resulted worse at all: the filesystems
were very badly damaged. auto-fsck failed, and fscking by hand
resulted in removing a lot of files at /dev, /var and so on. Since I
am a newcomer to FreeBSD, saw no other solution than reinstallation.
Should better read the docs before doing so again.
-At last, Linux performs fine and stable. So, the toys called MS-DOS
and Windows 3.1 (with their limitations, of course).
Well, man. This was all. I hope it will of any use for you at all.
If you have some questions or suggestions please send to the friend
that let me use his access to Internet for posting this report.
See you,
Jes£s A. Mora Marin, MD
---------< federero@obelix.cica.es >------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601152057.VAA18775>
