Subject: Kernel Oops when booting on DECstation

From: Martin Michlmayr <[email-masked]>
Date: Sat, 16 Dec 2000 08:56:03 +0100

When I boot a Linux kernel on a DECstation/125, I get the following oops:

>>boot 3/rz2/vmlinux root=/dev/sda1 console=ttyS2 root=/dev/sda1
>> NetBSD/pmax Secondary Boot, Revision 1.0
>> (root@vlad, Sat Mar  4 14:34:30 EST 2000)
Boot: 3/rz2/vmlinux
1623360+151344=0x18c540
Starting at 0x80040584

This DECstation is a DS5000/1xx
Loading R[23]00 MMU routines.
CPU revision is: 00000230
Primary instruction cache 64kb, linesize 4 bytes
Primary data cache 64kb, linesize 4 bytes
Linux version 2.4.0-test11 ([email-masked]) (gcc version egcs-20
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS2 root=/dev/sda1
Calibrating delay loop... 24.77 BogoMIPS
Memory: 30224k/32768k available (1453k kernel code, 2544k reserved, 68k data, 6)
Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes)                   Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
Unable to handle kernel paging request at virtual address 00000004, epc == 80054
Oops in fault.c:do_page_fault, line 172:
$0 : 00000000 10002000 80720410 00000000 80720410 00000000 810884d4 10002000
$8 : 00000000 00000000 00000000 00000000 00bd0000 fffffff7 ffffffff 81097180
$16: 00010f00 81094000 00000000 80048000 30464354 a0002f88 fffffff4 00010f00
$24: 00000001 0000000a                   80720000 80720f58 80721090 80059b34
epc  : 80059b7c                                                                 Status: 10002004
Cause : 30000408
Process  (pid: 0, stackpage=80720000)
Stack: 8005f564 00000001 000000c0 8005f228 801c6c6c 800f191c 00000000 00000000
       00000000 80720f7c 80720f7c 00000023 00000000 00000000 00000000 80720f7c
       80720f7c 00000023 00010f00 00010000 00000000 80048000 30464354 a0002f88
       00000200 001200d2 40208a0a 8004e168 00000000 00000020 80720fe0 00000000
       8004b42c 0000261c 00010f00 00000000 80721090 0000261c 00bd0000 fffffff7
       00000000 ...
Call Trace: [<8005f564>] [<8005f228>] [<800f191c>] [<80048000>] [<8004e168>] [<]
Code: 24630010  8e2501d4  8e230218 <8ca20004> 00000000  0043102b  10400431  241

This is with a 2.4.0-test11 kernel image compiled by Adrian Bunk.  The
image works for him.  I get virtually the same problem when booting
with Flo's test-8-pre1 image from ftp.rfc822.org:

Linux version 2.4.0-test8-pre1 ([email-masked]) (gcc version egcs-2.90.20
[...]
POSIX conformance testing by UNIFIX
Unable to handle kernel paging request at virtual address 00000004, epc == 8005c
Oops in fault.c:do_page_fault, line 158:
$0 : 00000000 10002000 80720370 00000000 00000000 00001098 10002000 0000003c
$8 : 00002000 ffff00ff 00000000 00000000 00000000 00000000 801a9d94 10002001
$16: 00000f00 81098000 80048000 a000fcf8 30464354 a0002f88 fffffff4 00000f00
$24: 00000000 00000000                   80720000 80720f58 80721090 8005999c
epc  : 800599f4
Status: 10002004
Cause : 30000408
Process  (pid: 0, stackpage=80720000)
Stack: 800d7054 81086200 800613a8 00000001 00000008 80061064 00000000 00000000
       00000000 80720f7c 80720f7c 801b6737 00000000 00000000 00000000 80720f7c
       80720f7c 801b6737 00000f00 00000000 80048000 a000fcf8 30464354 a0002f88
       00000200 001200d2 40208a0a 8004e934 00000000 00000020 80720fe0 0000000a
       8004b2cc 0000003c 00000f00 00000000 80721090 0000003c 801b6748 801a9d94
       00000000 ...
Call Trace: [<800d7054>] [<800613a8>] [<80061064>] [<80048000>] [<8004e934>] [<]
Code: ac6b0004  8e2401d0  8e230214 <8c820004> 00000000  0043102b  10400442  241

Any ideas?  (I hope and think that it has nothing to do with me
booting from a NetBSD partition.  I don't have ethernet on the machine
and thus have to boot the kernel from the existing FFS partition in
order to start Linux and then run delo.  NetBSD boots and works, btw.)
-- 
Martin Michlmayr
[email-masked]

---

From: Karel van Houten <[email-masked]>
Date: Sat, 16 Dec 2000 11:20:00 +0100 (MET)

Martin wrote:
> ...
> ...

The next entry the kernel would print is the Turbochannel scan.
Do you have any unsupported cards in your system that could cause this?

Have you tried my kernels, by the way?

-- 
Karel van Houten

----------------------------------------------------------
The box said "Requires Windows 95 or better."
I can't understand why it won't work on my Linux computer. 
----------------------------------------------------------

---

From: Keith Owens <[email-masked]>
Date: Sat, 16 Dec 2000 22:19:10 +1100

On Sat, 16 Dec 2000 08:56:03 +0100, 
>Code: 24630010  8e2501d4  8e230218 <8ca20004> 00000000  0043102b  10400431  241

Those two lines have been truncated at end of line instead of wrapping
onto the next line.  Capture the full text (without truncation) and run
it through ksymoops[*] to decode it.

[*]ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/v2.3

---

From: Martin Michlmayr <[email-masked]>
Date: Sat, 16 Dec 2000 16:00:51 +0100

> it through ksymoops[*] to decode it.

ksymoops 2.3.5 on i586 2.2.15.  Options used
     -v /home/tbm/a/vmlinux-2.4.0-test8-pre1 (specified)
     -K (specified)
     -L (specified)
     -O (specified)
     -m /home/tbm/a/System.map-2.4.0-test8-pre1 (specified)
     -a mipsel

Unable to handle kernel paging request at virtual address 00000004, epc == 800599f4, ra == 8005999c
$0 : 00000000 10002000 80720370 00000000 00000000 00001098 10002000 0000003c
$8 : 00002000 ffff00ff 00000000 00000000 00000000 00000000 801a9d94 10002001
$16: 00000f00 81098000 80048000 a000fcf8 30464354 a0002f88 fffffff4 00000f00
$24: 00000000 00000000                   80720000 80720f58 80721090 8005999c
epc  : 800599f4
Using defaults from ksymoops -t elf32-i386
Status: 10002004
Cause : 30000408
Process  (pid: 0, stackpage=80720000)
Stack: 800d7054 81086200 800613a8 00000001 00000008 80061064 00000000 00000000
       00000000 80720f7c 80720f7c 801b6737 00000000 00000000 00000000 80720f7c
       80720f7c 801b6737 00000f00 00000000 80048000 a000fcf8 30464354 a0002f88
       00000200 001200d2 40208a0a 8004e934 00000000 00000020 80720fe0 0000000a
       8004b2cc 0000003c 00000f00 00000000 80721090 0000003c 801b6748 801a9d94
       00000000 ...
Call Trace: [<800d7054>] [<800613a8>] [<80061064>] [<80048000>] [<8004e934>] [<8004b2cc>]
Code: ac6b0004  8e2401d0  8e230214 <8c820004> 00000000  0043102b  10400442  2416fff5  40036000 
Error (Oops_bfd_perror): scan_arch for specified architecture Success

>>RA;  8005999c <do_fork+b0/1264>
>>EIP; 800599f4 <do_fork+108/1264>   <=====
Trace; 800d7054 <timer_interrupt+104/1c0>
Trace; 800613a8 <tasklet_hi_action+e0/160>
Trace; 80061064 <__gnu_compiled_c+c4/138>
Trace; 80048000 <__gnu_compiled_c+0/0>
Trace; 8004e934 <sys_clone+5c/6c>
Trace; 8004b2cc <stack_done+20/3c>

1 error issued.  Results may not be reliable.

(This kernel is from ftp://ftp.rfc822.org/pub/local/linux-mipsel/kernel (?)
file: kernel-image-2.4.0-test8-pre1-dec-r3k.tar.gz)

ksymoops 2.3.5 on i586 2.2.15.  Options used
     -v /home/tbm/linux-2.4.0test11mipsel (specified)
     -K (specified)
     -L (specified)
     -O (specified)
     -M (specified)
     -a mipsel

Error (pclose_local): read_nm_symbols pclose failed 0x100
Warning (read_vmlinux): no kernel symbols in vmlinux, is /home/tbm/linux-2.4.0test11mipsel a valid vmlinux file?
Warning (merge_maps): no symbols in merged map
Unable to handle kernel paging request at virtual address 00000004, epc == 80059b7c, ra == 80059b34
$0 : 00000000 10002000 80720410 00000000 80720410 00000000 810884d4 10002000
$8 : 00000000 00000000 00000000 00000000 00bd0000 fffffff7 ffffffff 81097180
$16: 00010f00 81094000 00000000 80048000 30464354 a0002f88 fffffff4 00010f00
$24: 00000001 0000000a                   80720000 80720f58 80721090 80059b34
epc  : 80059b7c
Using defaults from ksymoops -t elf32-i386
Status: 10002004
Cause : 30000408
Process  (pid: 0, stackpage=80720000)
Stack: 8005f564 00002400 000000c0 8005f228 801c6c6c 800f191c 00000000 00000000
       00000000 80720f7c 80720f7c 00000023 00000000 00000000 00000000 80720f7c
       80720f7c 00000023 00010f00 00010000 00000000 80048000 30464354 a0002f88
       00000000 001200d2 40208a0a 8004e168 00000000 00000020 80720fe0 00000000
       8004b42c 0000261c 00010f00 00000000 80721090 0000261c 00bd0000 fffffff7
       00000000 ...
Call Trace: [<8005f564>] [<8005f228>] [<800f191c>] [<80048000>] [<8004e168>] [<8004b42c>]
Code: 24630010  8e2501d4  8e230218 <8ca20004> 00000000  0043102b  10400431  2416fff5  40046000 
Error (Oops_bfd_perror): scan_arch for specified architecture Success

>>RA;  80059b34 No symbols available
>>EIP; 80059b7c No symbols available   <=====
Trace; 8005f564 No symbols available
Trace; 8005f228 No symbols available
Trace; 800f191c No symbols available
Trace; 80048000 No symbols available
Trace; 8004e168 No symbols available
Trace; 8004b42c No symbols available

2 warnings and 2 errors issued.  Results may not be reliable.

(This kernel is from http://www.fs.tum.de/~bunk/linux-2.4.0test11mipsel)

-- 
Martin Michlmayr
[email-masked]

---

From: Keith Owens <[email-masked]>
Date: Sun, 17 Dec 2000 02:09:51 +1100

On Sat, 16 Dec 2000 16:00:51 +0100, 
>Using defaults from ksymoops -t elf32-i386

The joys of cross system debugging.  You need to set ksymoops option
-t, it is defaulting to elf32-i386 which is no good for mips objects.
You almost certainly need to set environment variables KSYMOOPS_NM and
KSYMOOPS_OBJDUMP to point to versions of these programs that understand
mips.  If mips prints the code in big endian format then you need to
use ksymoops option -e.  man ksymoops and scan for 'cross'.

---

From: Martin Michlmayr <[email-masked]>
Date: Sun, 17 Dec 2000 21:23:34 +0100

> -t, it is defaulting to elf32-i386 which is no good for mips objects.

When I ran the program on Intel, I feared I might have to change
something... anyway, I did it natively on mipsel now.  I hope it's
ok:

With Karel van Houten's kernel from
http://www.xs4all.nl/~vhouten/mipsel/vmlinux-2.4.0-decR3k.tgz

ksymoops 2.3.5 on mips 2.0.34C52_SK.  Options used
     -v vmlinux (specified)
     -K (specified)
     -L (specified)
     -O (specified)
     -m System.map (specified)

Unable to handle kernel paging request at virtual address 00000004, epc == 800596b8, ra == 80059660
$0 : 00000000 10002000 80720380 00000000 00000000 801c38e0 10002000 80230000
$8 : 00002000 ffff00ff 00000000 00000000 00000000 00000000 ffffffff 81096180
$16: 00010f00 81094000 80048000 a000fcf8 30464354 a0002f88 fffffff4 00010f00
$24: 00000001 00000002                   80720000 80720f58 80721090 80059660
epc  : 800596b8
Using defaults from ksymoops -t elf32-littlemips -a mips:3000
Status: 10002004
Cause : 30000408
Process  (pid: 0, stackpage=80720000)
Stack: 00000008 0000000d 80060bc0 00000000 8020c020 00000001 00000000 00000000
       00000000 80720f7c 80720f7c 80048518 00000000 00000000 00000000 80720f7c
       80720f7c 80048518 00010f00 00000000 80048000 a000fcf8 30464354 a0002f88
       00000200 001220d2 40208a0a 8004e988 8023e268 0000000a 80720fe0 00000000
       8004b2cc ffff00ff 00010f00 00000000 80721090 00000000 ffffffff 81096180
       00000000 ...
Call Trace: [<80060bc0>] [<80048518>] [<80048518>] [<80048000>] [<8004e988>] [<8004b2cc>]
Code: ac6b0004  8e2401d4  8e230218 <8c820004> 00000000  0043102b  1040043b  2416fff5  40036000 

>>RA;  80059660 <do_fork+b4/124c>
>>PC;  800596b8 <do_fork+10c/124c>   <=====
Trace; 80060bc0 <open_softirq+30/90>
Trace; 80048518 <handle_softirq+8/10>
Trace; 80048518 <handle_softirq+8/10>
Trace; 80048000 <__gnu_compiled_c+0/0>
Trace; 8004e988 <sys_clone+5c/6c>
Trace; 8004b2cc <stack_done+20/3c>

With Flo's kernel from
ftp://ftp.rfc822.org/pub/local/debian-mipsel/kernel/kernel-image-2.4.0-test8-pre1-dec-r3k.tar.gz

ksymoops 2.3.5 on mips 2.0.34C52_SK.  Options used
     -v vmlinux-2.4.0-test8-pre1 (specified)
     -K (specified)
     -L (specified)
     -O (specified)
     -m System.map-2.4.0-test8-pre1 (specified)

Using defaults from ksymoops -t elf32-littlemips -a mips:3000
Error (Oops_bfd_perror): set_section_contents Section has no contents

>>PC;  800599f4 <do_fork+108/1264>   <=====

---

From: Florian Lohoff <[email-masked]>
Date: Mon, 18 Dec 2000 12:07:14 +0100

[...]
> order to start Linux and then run delo.  NetBSD boots and works, btw.)

I have the suspicion that you are running into a bug Harald and me
solved when booting my /150 from Disk. It seems the Firmware KN04 V2.1k
doesnt correctly reset/disable the SCSI Controller and the Ethernet
chip causing the system to crash immediatly in the "request_irq" section.

I guess the backtrace is bogus but i might be wrong. I would recommend
trying to compile a current cvs kernel yourself and retry.

Flo
-- 
Florian Lohoff                  [email-masked]             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?

---

From: Jun Sun <[email-masked]>
Date: Mon, 18 Dec 2000 10:48:52 -0800

> use ksymoops option -e.  man ksymoops and scan for 'cross'.

Martin,

If you have System.map file, you can use a perl script written by Phil to
decode the trace.

Jun

#!/usr/bin/perl

# call2sym -  convert linux kernel oops call trace listings to System.map
#             symbolic names.
#
# Written by Phil Hollenback
# Copyright (C) 2000 Phil Hollenback <[email-masked]>
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
# All other rights reserved.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# See the perlpod documentation at the end of this file for
# instructions.
#
# $Id: call2sym,v 1.2 2000/09/28 20:15:59 phil Exp $

#
# Configuration Options
#

# This will be viewable thru the "-v" switch at a later date.
$version = "0.0.1";

#
# End Configuration Options
#

# Check that we got passed a System.map file on the command line.
(scalar(@ARGV) == 1) or $mapfile = "System.map";
(scalar(@ARGV) == 1) and $mapfile = $ARGV[0];

( -r $mapfile ) or die "Can't read file $mapfile\n";

print "Ready for call trace list.  <ctrl-d> on a blank line when done.\n\n";

while (<STDIN>)
  {
    # remove newlines in case this was a cut-n-paste.
    chop;
    $trace_line .= $_;
  }

print "\nProcessing...\n";

# Now munge call trace entries into an array.
@trace_addrs = ();

# Split into an array of addresses, on whitespace.
@trace_addrs = split / /,$trace_line;

# I think I'm clever, so use a map to remove cruft from each array
# entry.
@trace_addrs = map { m|\[<(.*)>\]| } @trace_addrs;

# I now have an in-order array of the call trace addresses.

# Suck the whole mapfile into a hash keyed on address.  Convert keys to
# decimal for easier compares later on.
open MAPFILE, $mapfile or die "Can't open mapfile $mapfile\n";
while (<MAPFILE>)
  {
    if ( /^00000000(.*) . (.*)/ )
      {
        # convert to decimal and pad to 10 digits.
        # that way everything lines up and conversions should be easy.
        $decaddr = sprintf "%010lu", hex($1);
        $funcs{$decaddr} = $2;
      }
  }

# print a header
print "\nAddress\t\tFunction\n\n";

# We've got all the addresses in the hash as string versions of
# decimal numbers. Should now be able to iterate thru the
# list until we find the one closest to each $addr.
foreach $addr (@trace_addrs)
  {
    # convert addr to decimal.
    $decaddr = hex($addr);

    # loop through keys until we find the one just 1 greater.
    foreach $func (sort keys %funcs)
      {
        # now print out the one just 1 less.
        if ($func > $decaddr ) {
          print  "$addr\t$funcs{$lastfunc}\n";
          last;
        }
        $lastfunc = $func;
      }
  }

---

From: Martin Michlmayr <[email-masked]>
Date: Tue, 19 Dec 2000 13:48:29 +0100

> trying to compile a current cvs kernel yourself and retry.

I compiled a current CVS kernel (as of 2000-Dec-18) and I still get
the same problem:

KN02-BA V5.7e    (PC: 0xbfc00cbc, SP: 0xa000f404)
^C
>>boot 3/rz2/vmlinux root=/dev/sda1 console=ttyS2
Boot: 3/rz2/vmlinux
1589960+134048+142976 [204+126192+119611]=0x205ebc
Starting at 0x800405ac

This DECstation is a DS5000/1xx
Loading R[23]00 MMU routines.
CPU revision is: 00000230
Primary instruction cache 64kb, linesize 4 bytes
Primary data cache 64kb, linesize 4 bytes
Linux version 2.4.0-test11 ([email-masked]) (gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)) #6 Mon Dec 18 18:47:44 MET 2000
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS2
Calibrating delay loop... 24.71 BogoMIPS
Memory: 30128k/32768k available (1552k kernel code, 2640k reserved, 70k data, 60k init)
Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
Unable to handle kernel paging request at virtual address 00000004, epc == 8005a16c, ra == 8005a124
Oops in fault.c:do_page_fault, line 172:
$0 : 00000000 10002000 80720410 00000000 80720410 00000000 81088460 10002000
$8 : 00000000 00000000 00000000 00000000 00bc8000 fffffff7 ffffffff 8021f180
$16: 00010f00 8021c000 00000000 80048000 30464354 a0002f88 fffffff4 00010f00
$24: 00000001 0000000a                   80720000 80720f58 80721090 8005a124
epc  : 8005a16c
Status: 10002004
Cause : 30000008
Process  (pid: 0, stackpage=80720000)
Stack: 80061d94 00000001 000000c0 80061a58 801e0eec 800f82fc 00000000 00000000
       00000000 80720f7c 80720f7c 00000023 00000000 00000000 00000000 80720f7c
       80720f7c 00000023 00010f00 00010000 00000000 80048000 30464354 a0002f88
       bfc00cbc a000f404 40208a0a 8004e1a8 00000000 00000020 80720fe0 00000000
       8004b46c 00002617 00010f00 00000000 80721090 00002617 00bc8000 fffffff7
       00000000 ...
Call Trace: [<80061d94>] [<80061a58>] [<800f82fc>] [<80048000>] [<8004e1a8>] [<8004b46c>]
Code: 24630010  8e2501d4  8e230218 <8ca20004> 00000000  0043102b  10400431  2416fff5  40046000

sym2call says:

Address		Function

80061d94	tasklet_hi_action
80061a58	do_softirq
800f82fc	do_IRQ
80048000	init
8004e1a8	_sys_clone
8004b46c	stack_done

The config file used to build the kernel is enclosed below.
-- 
Martin Michlmayr
[email-masked]

---

From: Harald Koerfgen <[email-masked]>
Date: Tue, 19 Dec 2000 18:03:00 +0100 (CET)

On 19-Dec-00 Martin Michlmayr wrote:
[Oops on DECstation boot on a /125]

[...]

> The config file used to build the kernel is enclosed below.

Strange, I am not able to reproduce this here on a /133 (KN02-BA V5.7j).
My box boots just fine.

>>boot 3/tftp/vmlinux.r3k console=ttyS2 root=/dev/sda7                         
1597440+134048+143008                                                          
This DECstation is a DS5000/1xx                                                
Loading R[23]00 MMU routines.                                                  
CPU revision is: 00000230                                                      
Primary instruction cache 64kb, linesize 4 bytes                               
Primary data cache 128kb, linesize 4 bytes                                     
Linux version 2.4.0-test11 (harry@intel) (gcc version egcs-2.91.66 19990314
Determined physical RAM map:                                               
     memory: 03000000 @ 00000000 (usable)                                      
[...]
VFS: Mounted root (ext2 filesystem) readonly.                                
Freeing unused PROM memory: 124k freed                                       
Freeing unused kernel memory: 60k freed                                      
INIT: version 2.74 booting                                                   
Activating swap partitions
hostname: localhost
Checking root filesystems.                                                     
[...]    

Is anybody else successfully using the NetBSD bootloader with a Linux kernel?

-- 
Regards,
Harald

---

From: Karel van Houten <[email-masked]>
Date: Tue, 19 Dec 2000 18:09:25 +0100 (MET)

> Is anybody else successfully using the NetBSD bootloader with a Linux kernel?

I used to use the NetBSD bootloader just fine, but switched to delo
recently, which is easier to use because UFS read-write support
is not stable in the current kernels.

-- 
Karel van Houten

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Fri, 22 Dec 2000 11:44:32 +0100 (MET)

> Oops in fault.c:do_page_fault, line 172:

 Could you please decode your oops with ksymoops or, better yet, send me
the object (*.o) file the oops is happening?  I tried to match the code
above with my kernel binary but I failed.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email-masked], PGP key available        +