Re: [7-STABLE] ping -s 4000 with ipsec panic

2008-06-15 Thread Patrick Lamaizière
Le Sat, 14 Jun 2008 01:52:29 +0200,
Patrick Lamaizière [EMAIL PROTECTED] a écrit :


 I made few tests and the panic occurs with a -s of 3989 bytes.
 
 ping -s 3988 = ok 
 ping -s 3989 = panic
 
 The coredump seems to be ok.
 http://user.lamaiziere.net/patrick/coredump.txt
 
 I will try with a kernel and DEBUG_REDZONE and INVARIANT.

With INVARIANT there is an assertion that failed in the ipsec code.
I've filled a PR : http://www.freebsd.org/cgi/query-pr.cgi?pr=124609

Thank you, regards.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [7-STABLE] ping -s 4000 with ipsec panic

2008-06-13 Thread Patrick Lamaizière
Le Fri, 13 Jun 2008 01:57:35 +0200,
Kris Kennaway [EMAIL PROTECTED] a écrit :

Hello,

[...]

  #17 0xc0700746 in crypto_invoke (cap=0x8, crp=0xd61a0950,
  hint=-1616994916) at cryptodev_if.h:53
  Previous frame inner to this frame (corrupt stack?)
  (kgdb) 
 
 Unfortunately the trace is bogus.  Try to rebuild with -O instead of
 -O2 and reproduce the panic.

Hmm, i've got no luck with -O. 

I made few tests and the panic occurs with a -s of 3989 bytes.

ping -s 3988 = ok 
ping -s 3989 = panic

The coredump seems to be ok.
http://user.lamaiziere.net/patrick/coredump.txt

I will try with a kernel and DEBUG_REDZONE and INVARIANT.

---

Unread portion of the kernel message buffer:


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x9350ef1e
fault code  = supervisor read, page not present
instruction pointer = 0x20:0xc05a0579
stack pointer   = 0x28:0xd61635cc
frame pointer   = 0x28:0xd61635d0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 1101 (ping)
trap number = 12
panic: page fault
Uptime: 7m47s
Physical memory: 503 MB
Dumping 88 MB: 73 57 41 25 9

#0  doadump () at pcpu.h:195
in pcpu.h
(kgdb) bt
#0  doadump () at pcpu.h:195
#1  0xc0556273 in boot (howto=260)
at /usr/src/sys/kern/kern_shutdown.c:418 #2  0xc055646f in panic (fmt=)
at /usr/src/sys/kern/kern_shutdown.c:572 #3  0xc079b91c in trap_fatal
(frame=0xd616358c, eva=2471554846) at /usr/src/sys/i386/i386/trap.c:899
#4  0xc079bba0 in trap_pfault (frame=0xd616358c, usermode=0,
eva=2471554846) at /usr/src/sys/i386/i386/trap.c:812
#5  0xc079c529 in trap (frame=0xd616358c)
at /usr/src/sys/i386/i386/trap.c:490 #6  0xc0789f2b in calltrap ()
at /usr/src/sys/i386/i386/exception.s:139 #7  0xc05a0579 in mb_dupcl
(n=0xc2b02000, m=0xc2b02d00) at /usr/src/sys/kern/uipc_mbuf.c:293
#8  0xc05a157a in m_copym (m=0xc2b02d00, off0=2980, len=3, wait=1)
at /usr/src/sys/kern/uipc_mbuf.c:570
#9  0xc0614055 in ip_fragment (ip=0xc2e5a038, m_frag=0xd61636d0,
mtu=1500, if_hwassist_flags=7, sw_csum=0)
at /usr/src/sys/netinet/ip_output.c:728 #10 0xc0614d38 in ip_output
(m=0xc2b02600, opt=0x0, ro=0xd6163694, flags=2, imo=0x0, inp=0x0)
at /usr/src/sys/netinet/ip_output.c:567 #11 0xc06acd9d in
ipsec_process_done (m=0xc2b02600, isr=0xc2bacd80)
at /usr/src/sys/netipsec/ipsec_output.c:177 #12 0xc06bbf5c in
esp_output_cb (crp=0xc2e5c708) at /usr/src/sys/netipsec/xform_esp.c:965
#13 0xc06ff730 in crypto_done (crp=0xc2e5c708)
at /usr/src/sys/opencrypto/crypto.c:1148
#14 0xc0702afe in swcr_process (dev=0xc29cf380, crp=0xc2e5c708, hint=0)
at /usr/src/sys/opencrypto/cryptosoft.c:975
#15 0xc0700746 in crypto_invoke (cap=0xc29cf380, crp=0xc2e5c708, hint=0)
at cryptodev_if.h:53
#16 0xc070118c in crypto_dispatch (crp=0xc2e5c708)
at /usr/src/sys/opencrypto/crypto.c:798
#17 0xc06bc5c6 in esp_output (m=0xc2b02600, isr=0xc2bacd80, mp=0x0,
skip=20, protoff=9) at /usr/src/sys/netipsec/xform_esp.c:875
#18 0xc06ad112 in ipsec4_process_packet (m=0xc2b02600, isr=0xc2bacd80, 
flags=32, tunalready=0) at /usr/src/sys/netipsec/ipsec_output.c:491
#19 0xc0612f95 in ip_ipsec_output (m=0xd6163b04, inp=0xc2e07870, 
flags=0xd6163b10, error=0xd6163ae4, ro=0xd6163b0c,
iproute=0xd6163ac8, dst=0xd6163ae0, ia=0xd6163adc, ifp=0xd6163aec)
at /usr/src/sys/netinet/ip_ipsec.c:331
#20 0xc0614ab9 in ip_output (m=0xc2b02600, opt=0x0, ro=0xd6163ac8,
flags=32, imo=0x0, inp=0xc2e07870)
at /usr/src/sys/netinet/ip_output.c:420 #21 0xc0615e1b in rip_output
(m=0xc2b02600, so=0xc2ddfad4, dst=352430272)
at /usr/src/sys/netinet/raw_ip.c:336 #22 0xc0615efc in rip_send
(so=0xc2ddfad4, flags=0, m=0xc2b02600, nam=0xc29f9800, control=0x0,
td=0xc2b77000) at /usr/src/sys/netinet/raw_ip.c:806
#23 0xc05a97f5 in sosend_generic (so=0xc2ddfad4, addr=0xc29f9800, 
uio=0xd6163be8, top=0xc2b02600, control=0x0, flags=0, td=0xc2b77000)
at /usr/src/sys/kern/uipc_socket.c:1240
#24 0xc05a580f in sosend (so=0xc2ddfad4, addr=0xc29f9800,
uio=0xd6163be8, top=0x0, control=0x0, flags=0, td=0xc2b77000)
at /usr/src/sys/kern/uipc_socket.c:1286
#25 0xc05abf16 in kern_sendit (td=0xc2b77000, s=3, mp=0xd6163c64,
flags=0, control=0x0, segflg=UIO_USERSPACE)
at /usr/src/sys/kern/uipc_syscalls.c:789 #26 0xc05af031 in sendit
(td=0xc2b77000, s=3, mp=0xd6163c64, flags=0)
at /usr/src/sys/kern/uipc_syscalls.c:730 #27 0xc05af148 in sendto
(td=0xc2b77000, uap=0xd6163cfc) at /usr/src/sys/kern/uipc_syscalls.c:841
#28 0xc079bef5 in syscall (frame=0xd6163d38)
at /usr/src/sys/i386/i386/trap.c:1035
#29 0xc0789f90 in Xint0x80_syscall ()
at /usr/src/sys/i386/i386/exception.s:196 #30 0x0033 in ?? ()
(kgdb) quit

--

Thanks, regards.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To 

[7-STABLE] ping -s 4000 with ipsec panic

2008-06-12 Thread Patrick Lamaizière
[FreeBSD 7-STABLE/i386]

Hello,

I've got a 100 % reproductible panic with ipsec when using a 
'ping -s 4000'. It works without ipsec

My ipsec setup is very simple, i just use setkey:

/etc/ipsec.conf 
flush;
spdflush;
add 192.168.1.21 192.168.1.200 esp 1011 -E rijndael-cbc
0123456789012345; 
add 192.168.1.200 192.168.1.21 esp 1012 -E rijndael-cbc
0123456789012345; 
spdadd 192.168.1.200 192.168.1.21  any -P out ipsec
esp/transport//require;
spdadd 192.168.1.21 192.168.1.200 any -P in ipsec
esp/transport//require;

I tried to use des-cbc with the same panic.



Unread portion of the kernel message buffer:


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x4100be00
fault code  = supervisor read, page not present
instruction pointer = 0x20:0xc079985e
stack pointer   = 0x28:0xd61a0744
frame pointer   = 0x28:0xd61a076c
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 1175 (ping)
trap number = 12
panic: page fault
Uptime: 9m5s
Physical memory: 503 MB
Dumping 87 MB: 72 56 40 24 8

#0  doadump () at pcpu.h:195
195 pcpu.h: No such file or directory.
in pcpu.h
(kgdb) bt
#0  doadump () at pcpu.h:195
#1  0xc0556273 in boot (howto=260)
at /usr/src/sys/kern/kern_shutdown.c:418 #2  0xc055646f in panic
(fmt=Variable fmt is not available. )
at /usr/src/sys/kern/kern_shutdown.c:572 #3  0xc079b91c in trap_fatal
(frame=0xd61a0704, eva=1090567680) at /usr/src/sys/i386/i386/trap.c:899
#4  0xc079bba0 in trap_pfault (frame=0xd61a0704, usermode=0,
eva=1090567680) at /usr/src/sys/i386/i386/trap.c:812
#5  0xc079c529 in trap (frame=0xd61a0704)
at /usr/src/sys/i386/i386/trap.c:490 #6  0xc0789f2b in calltrap ()
at /usr/src/sys/i386/i386/exception.s:139 #7  0xc079985e in
generic_bcopy () at /usr/src/sys/i386/i386/support.s:498 #8  0xc1f7267e
in ?? () #9  0x8fb82d87 in ?? ()
#10 0x361fe9de in ?? ()
#11 0x39402686 in ?? ()
#12 0x0fa0 in ?? ()
#13 0xc29cf380 in ?? ()
#14 0xc2ea9654 in ?? ()
#15 0x in ?? ()
#16 0xd61a095c in ?? ()
#17 0xc0700746 in crypto_invoke (cap=0x8, crp=0xd61a0950,
hint=-1616994916) at cryptodev_if.h:53
Previous frame inner to this frame (corrupt stack?)
(kgdb) 

-

Thansk, regards.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [7-STABLE] ping -s 4000 with ipsec panic

2008-06-12 Thread Kris Kennaway

Patrick Lamaizière wrote:


generic_bcopy () at /usr/src/sys/i386/i386/support.s:498 #8  0xc1f7267e
in ?? () #9  0x8fb82d87 in ?? ()
#10 0x361fe9de in ?? ()
#11 0x39402686 in ?? ()
#12 0x0fa0 in ?? ()
#13 0xc29cf380 in ?? ()
#14 0xc2ea9654 in ?? ()
#15 0x in ?? ()
#16 0xd61a095c in ?? ()
#17 0xc0700746 in crypto_invoke (cap=0x8, crp=0xd61a0950,
hint=-1616994916) at cryptodev_if.h:53
Previous frame inner to this frame (corrupt stack?)
(kgdb) 


Unfortunately the trace is bogus.  Try to rebuild with -O instead of -O2 
and reproduce the panic.


Kris
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]