Subject: pimd-2.1.0-alpha28 + solaris 8 = kernel panic

From: "Eric S. Johnson" <[email-masked]>
Date: Mon, 09 Oct 2000 20:05:20 +0000

pimd-2.1.0-alpha28
Solaris 5.8 Generic_108528-02 sun4m sparc SUNW,SPARCstation-5

I finally got a sol8 machine in a gateway position and wanted to see if 
I could get pimd up and inter-operating with our cisco's. 

A couple minor changes to get the source to compile (I sent those 
to Pavlin in an earlier message this summer). 

Once I got it up and running I also found I had to change ADVANCE in 
routesock.c to ROUNDUP(16) to deal with the standard sockaddr size. 
And the BROKEN_CISCO_CHECKSUM. But that was it. And it kinda sorta worked.

Till the kernel panic.  (below from syslogs)

A little more investigating and I found that the problem comes from
k_chg_mfc and specifically the 

setsockopt(socket, IPPROTO_IP, MRT_ADD_MFC, (char *)&mc,sizeof(mc))

will crash the system *everytime* mc.mfcc_parent (ie iif) = 0.

vif 0 is my "downstream of RP net" and vif 1 is "upstream to RP net".

So changing the "if" so that setsockopt only gets called if iff!=0:

if (iif && setsockopt(socket, IPPROTO_IP, MRT_ADD_MFC, ....

and I am happily listening to KWAX over mbone again... (just in time 
for the cursed pledge drives... ;) And no crashes. 

But no traffic is getting out (no MFC adds from the downstream network)
This is a sub optimal solution..

Any thoughts? I am still kind of shaky about how the MRT sock options
work. (and docs.sun.com doesn't give much info to a search for MRT)

E

-----

unix: [ID 836849 kern.notice] 
 panic[cpu0]/thread=f6539000: 
unix: [ID 641622 kern.notice] BAD TRAP: type=9 (Data fault) rp=fc02e574 addr=0 mmu_fsr=3a6 rw=2 occurred in module "ip" due to a NULL pointer dereference
unix: [ID 100000 kern.notice] 
unix: [ID 839527 kern.notice] pimd: 
unix: [ID 702911 kern.notice] Data fault
unix: [ID 189141 kern.notice] kernel write fault at addr=0x0, pme=0x0
unix: [ID 901159 kern.notice] MMU sfsr=3a6:
unix: [ID 164009 kern.notice]  Invalid Address
unix: [ID 490779 kern.notice]  on supv data store at level 3
unix: [ID 100000 kern.notice] 
unix: [ID 546445 kern.notice] pte addr = 0xf66a3b00, level = 3
unix: [ID 913234 kern.notice] pid=637, pc=0xf5a9a644, sp=0xfc02e5c0, psr=0x48010c7, context=75
unix: [ID 655124 kern.notice] g1-g7: f5aad000, 0, f5aad1b8, 45000014, f66cd918, f0041000, f6539000
unix: [ID 100000 kern.notice] 
genunix: [ID 872817 kern.notice] fc02e3f0 unix:die+b8 (9, f024c9a4, f024c800, 3a6, 2, 3a6)
genunix: [ID 645206 kern.notice]   %l0-7: fc02e574 00000000 fc02e574 00000020 00000000 f600f000 00000000 f5ab4000
genunix: [ID 872817 kern.notice] fc02e470 unix:trap+774 (0, 1, f0000000, f66a70a8, f66cd918, 0)
genunix: [ID 645206 kern.notice]   %l0-7: 00000000 00000000 fc02e574 00000009 000003a6 00000002 00000000 f0269800
genunix: [ID 872817 kern.notice] fc02e518 unix:fault+84 (f648b560, f648b560, f5dfb900, 0, f00451c8, 0)
genunix: [ID 645206 kern.notice]   %l0-7: 048010c7 f5a9a644 f5a9a648 00000008 00000009 00000080 f024fbb8 fc02e518
genunix: [ID 872817 kern.notice] fc02e5c0 ip:register_send+b8 (f5aacc00, f674e400, f5dfb900, f600e8b0, 0, f5914c40)
genunix: [ID 645206 kern.notice]   %l0-7: 044010c0 f00987a0 f00987a4 00000001 00000000 f5ab37bc 00000000 00000003
genunix: [ID 872817 kern.notice] fc02e620 ip:ip_mdq+2cc (2, f5aad1d0, f5ab3260, 40, f5ab321c, 40)
genunix: [ID 645206 kern.notice]   %l0-7: 00000000 00000000 f600e8b0 f5dfb900 f5a0f518 f64f1074 e002f60d 00000003
genunix: [ID 872817 kern.notice] fc02e680 ip:add_mfc+2a8 (0, f5aacc24, f5ab385c, 28, f67417e4, 68)
genunix: [ID 645206 kern.notice]   %l0-7: 00000001 f64f1074 f6704cd4 00000004 00000000 00000030 00000000 f5aae2e0
genunix: [ID 872817 kern.notice] fc02e6e8 ip:ip_opt_set+760 (f67417e4, 30, 0, 1, f67417e0, f67417e4)
genunix: [ID 645206 kern.notice]   %l0-7: f653c4f0 00000000 f67417e4 00000008 00000000 00000030 00000000 f5b0c7e8
genunix: [ID 872817 kern.notice] fc02e760 ip:svr4_optcom_req+608 (f6741814, f5a6943c, f6741814, f6744ac0, f5a68588, f67417c8)
genunix: [ID 645206 kern.notice]   %l0-7: 00000000 00000031 f5aad208 f67417c8 f6741814 f672a80c f6741814 00000001
genunix: [ID 872817 kern.notice] fc02e7d0 unix:putnext+1c4 (f672a6ac, f6744ac0, f5a72568, 0, 0, f672a80c)
genunix: [ID 645206 kern.notice]   %l0-7: f5c6ff78 f672a6ac 00000000 f67417c8 f6741814 f672a6ac f6741814 00000001
genunix: [ID 872817 kern.notice] fc02e830 icmp:icmp_wput+488 (f672a6ac, f6744ac0, 20, f5b0c9fc, 0, f656bb80)
genunix: [ID 645206 kern.notice]   %l0-7: 044010c6 f6744ac0 f672a6ac 00000001 00000002 00000002 00000007 f6557514
genunix: [ID 872817 kern.notice] fc02e898 unix:putnext+1c4 (f672a96c, f6744ac0, f5b3ae24, 0, 0, f672a6ac)
genunix: [ID 645206 kern.notice]   %l0-7: f5c6f9c8 f672a96c 00000000 fc02ead0 fc02ea0c ffffffff 00000000 00000000
genunix: [ID 872817 kern.notice] fc02e8f8 genunix:strput+210 (0, 2c4, f672a96c, fc02ead0, 0, 0)
genunix: [ID 645206 kern.notice]   %l0-7: f6744ac0 00000000 00000000 00000000 00000000 00000000 00000000 00000000
genunix: [ID 872817 kern.notice] fc02ea10 genunix:kstrputmsg+2d0 (f66afd40, 200, c0, 40, 80, f672a96c)
genunix: [ID 645206 kern.notice]   %l0-7: 00000000 00000000 00000000 f66ac74c 000002c4 00000000 f66ac700 00000000
genunix: [ID 872817 kern.notice] fc02ea80 sockfs:sosetsockopt+140 (ffff, f66afd88, 0, 0, 30, f66afd40)
genunix: [ID 645206 kern.notice]   %l0-7: 00000068 f65240c0 00000000 00000000 00000000 00000000 00000000 00000000
genunix: [ID 872817 kern.notice] fc02eb18 sockfs:setsockopt+b0 (f66afd40, 30, f65240c0, effff488, 68, 0)
genunix: [ID 645206 kern.notice]   %l0-7: 00000003 00000030 ef6968bc f0064400 00000000 f024ac00 f024fbb8 fc02eb80
unix: [ID 100000 kern.notice] 
genunix: [ID 672855 kern.notice] syncing file systems...
unix: [ID 836849 kern.notice] 
 panic[cpu0]/thread=f6539000: 
unix: [ID 849363 kern.notice] BAD TRAP: type=7 (Memory address alignment) rp=f0257ac4 addr=0 mmu_fsr=0 rw=0
unix: [ID 100000 kern.notice] 
genunix: [ID 353387 kern.notice] dumping to /dev/dsk/c0t3d0s4, offset 26935296
genunix: [ID 904073 kern.notice]  done
genunix: [ID 409368 kern.notice]  100% done: 3943 pages dumped, compression ratio 2.28, 
genunix: [ID 851671 kern.notice] dump succeeded

---

From: "Michael F. Speer" <[email-masked]>
Date: Mon, 9 Oct 2000 14:33:34 -0700 (PDT)

Eric:

There is bug that has a fix for this.  Don't know where the patch is.
I will check for you.

Michael

> unix: [ID 641622 kern.notice] BAD TRAP: type=9 (Data fault) rp=fc02e574
> addr=0 mmu_fsr=3a6 rw=2 occurred in module "ip" due to a NULL pointer
> dereference unix: [ID 100000 kern.notice] 
> unix: [ID 913234 kern.notice] pid=637, pc=0xf5a9a644, sp=0xfc02e5c0,
> psr=0x48010c7, context=75 unix: [ID 655124 kern.notice] g1-g7: f5aad000, 0,
> f5aad1b8, 45000014, f66cd918, f0041000, f6539000 unix: [ID 100000
> kern.notice]  genunix: [ID 872817 kern.notice] fc02e3f0 unix:die+b8 (9,
> f024c9a4, f024c800, 3a6, 2, 3a6) genunix: [ID 645206 kern.notice]   %l0-7:
> fc02e574 00000000 fc02e574 00000020 00000000 f600f000 00000000 f5ab4000
> genunix: [ID 872817 kern.notice] fc02e470 unix:trap+774 (0, 1, f0000000,
> f66a70a8, f66cd918, 0) genunix: [ID 645206 kern.notice]   %l0-7: 00000000
> 00000000 fc02e574 00000009 000003a6 00000002 00000000 f0269800 genunix: [ID
> 872817 kern.notice] fc02e518 unix:fault+84 (f648b560, f648b560, f5dfb900, 0,
> f00451c8, 0) genunix: [ID 645206 kern.notice]   %l0-7: 048010c7 f5a9a644
> f5a9a648 00000008 00000009 00000080 f024fbb8 fc02e518 genunix: [ID 872817
> kern.notice] fc02e5c0 ip:register_send+b8 (f5aacc00, f674e400, f5dfb900,
> f600e8b0, 0, f5914c40) genunix: [ID 645206 kern.notice]   %l0-7: 044010c0
> f00987a0 f00987a4 00000001 00000000 f5ab37bc 00000000 00000003 genunix: [ID
> 872817 kern.notice] fc02e620 ip:ip_mdq+2cc (2, f5aad1d0, f5ab3260, 40,
> f5ab321c, 40) genunix: [ID 645206 kern.notice]   %l0-7: 00000000 00000000
> f600e8b0 f5dfb900 f5a0f518 f64f1074 e002f60d 00000003 genunix: [ID 872817
> kern.notice] fc02e680 ip:add_mfc+2a8 (0, f5aacc24, f5ab385c, 28, f67417e4,
> 68) genunix: [ID 645206 kern.notice]   %l0-7: 00000001 f64f1074 f6704cd4
> 00000004 00000000 00000030 00000000 f5aae2e0 genunix: [ID 872817
> kern.notice] fc02e6e8 ip:ip_opt_set+760 (f67417e4, 30, 0, 1, f67417e0,
> f67417e4) genunix: [ID 645206 kern.notice]   %l0-7: f653c4f0 00000000
> f67417e4 00000008 00000000 00000030 00000000 f5b0c7e8 genunix: [ID 872817
> kern.notice] fc02e760 ip:svr4_optcom_req+608 (f6741814, f5a6943c, f6741814,
> f6744ac0, f5a68588, f67417c8) genunix: [ID 645206 kern.notice]   %l0-7:
> 00000000 00000031 f5aad208 f67417c8 f6741814 f672a80c f6741814 00000001
> genunix: [ID 872817 kern.notice] fc02e7d0 unix:putnext+1c4 (f672a6ac,
> f6744ac0, f5a72568, 0, 0, f672a80c) genunix: [ID 645206 kern.notice]  
> %l0-7: f5c6ff78 f672a6ac 00000000 f67417c8 f6741814 f672a6ac f6741814
> 00000001 genunix: [ID 872817 kern.notice] fc02e830 icmp:icmp_wput+488
> (f672a6ac, f6744ac0, 20, f5b0c9fc, 0, f656bb80) genunix: [ID 645206
> kern.notice]   %l0-7: 044010c6 f6744ac0 f672a6ac 00000001 00000002 00000002
> 00000007 f6557514 genunix: [ID 872817 kern.notice] fc02e898 unix:putnext+1c4
> (f672a96c, f6744ac0, f5b3ae24, 0, 0, f672a6ac) genunix: [ID 645206
> kern.notice]   %l0-7: f5c6f9c8 f672a96c 00000000 fc02ead0 fc02ea0c ffffffff
> 00000000 00000000 genunix: [ID 872817 kern.notice] fc02e8f8
> genunix:strput+210 (0, 2c4, f672a96c, fc02ead0, 0, 0) genunix: [ID 645206
> kern.notice]   %l0-7: f6744ac0 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000 genunix: [ID 872817 kern.notice] fc02ea10
> genunix:kstrputmsg+2d0 (f66afd40, 200, c0, 40, 80, f672a96c) genunix: [ID
> 645206 kern.notice]   %l0-7: 00000000 00000000 00000000 f66ac74c 000002c4
> 00000000 f66ac700 00000000 genunix: [ID 872817 kern.notice] fc02ea80
> sockfs:sosetsockopt+140 (ffff, f66afd88, 0, 0, 30, f66afd40) genunix: [ID
> 645206 kern.notice]   %l0-7: 00000068 f65240c0 00000000 00000000 00000000
> 00000000 00000000 00000000 genunix: [ID 872817 kern.notice] fc02eb18
> sockfs:setsockopt+b0 (f66afd40, 30, f65240c0, effff488, 68, 0) genunix: [ID
> 645206 kern.notice]   %l0-7: 00000003 00000030 ef6968bc f0064400 00000000
> f024ac00 f024fbb8 fc02eb80 unix: [ID 100000 kern.notice] 
> unix: [ID 849363 kern.notice] BAD TRAP: type=7 (Memory address alignment)
> rp=f0257ac4 addr=0 mmu_fsr=0 rw=0 unix: [ID 100000 kern.notice] 
> genunix: [ID 353387 kern.notice] dumping to /dev/dsk/c0t3d0s4, offset
> 26935296 genunix: [ID 904073 kern.notice]  done
> genunix: [ID 409368 kern.notice]  100% done: 3943 pages dumped, compression
> ratio 2.28,  genunix: [ID 851671 kern.notice] dump succeeded
> 
>

---

From: Hitoshi Asaeda <[email-masked]>
Date: Tue, 10 Oct 2000 15:07:51 +0900 (JST)

> Solaris 5.8 Generic_108528-02 sun4m sparc SUNW,SPARCstation-5

Unfortunately, pimd-2.1.0-alpha28 doesn't work on solaris8.
I'll tell you the on going fix toward alpha29 or 2.2.0 if you can be
an alpha tester.:)

Regards.
--
Hitoshi Asaeda