List Info

Thread: SCTP




SCTP
user name
2006-07-17 11:54:58
All:

Just a friendly reminder/prod... if you have started
testing SCTP.. thats great (any feedback?)..
and if you have not .. please do so :-D

R
-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
SCTP
user name
2006-07-18 19:30:26
   Hello,

On Mon, 17 Jul 2006, at 07:54, Randall Stewart wrote:

> All:
> 
> Just a friendly reminder/prod... if you have started
> testing SCTP.. thats great (any feedback?)..

   As said last time, i've been using sctp with netflow
records between
   a router and a freebsd box - perhaps not the most useful
test, but
   it's the only 'real life' test i found. if you have
other ideas ...
   anyway, the only way to have more exposure is to have
more sctp ready
   applications, and a good way to have it happen is to
commit your
   patch, right 

--
http://flowog.6f2.net/
- A NetFlow collecting house
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
SCTP
user name
2006-07-18 20:23:26
On 7/17/06, Randall Stewart <rrscisco.com> wrote:
> All:
>
> Just a friendly reminder/prod... if you have started
> testing SCTP.. thats great (any feedback?)..
> and if you have not .. please do so :-D

Hi,

I played around a bit with NetPIPE, FreeBSD-CURRENT in one
end and
Linux 2.6.17 in the other over a gigabit crossover cable
network, 1500
MTU. FreeBSD crashes after a while. I do have MAC enabled
(no policy
modules loaded at the time), it looks like it is involved. I
think I
can reproduce this, made it happen on both attempts.

For the record, I modified the patch a bit to make it
compile, the
syscalls numbers collide with new threading syscalls added
recently,
so I moved the thr syscalls up a notch. And I removed this
#ifdef MAC
part of the patch due to duplicate sctp_bad labels.

+#ifdef MAC
+sctp_bad:
+#endif
+ sctp_bad:
+       free(iov, M_IOV);

Any more info I can provide ?

~/sctp/np> ./NPsctp -h 192.168.10.1
...
  68:   16384 bytes     71 times -->    179.87 Mbps in   
 694.94 usec
  69:   16387 bytes     71 times -->    178.78 Mbps in   
 699.33 usec
  70:   24573 bytes     71 times -->    198.43 Mbps in   
 944.80 usec
  71:   24576 bytes     70 times -->    199.18 Mbps in   
 941.35 usec
  72:   24579 bytes     70 times -->    198.82 Mbps in   
 943.19 usec
  73:   32765 bytes     35 times -->    210.05 Mbps in   
1190.07 usec
  74:   32768 bytes     42 times -->    208.48 Mbps in   
1199.15 usec
  75:   32771 bytes     41 times -->    208.00 Mbps in   
1202.03 usec
  76:   49149 bytes     41 times -->    234.43 Mbps in   
1599.55 usec
  77:   49152 bytes     41 times -->    300.20 Mbps in   
1249.17 usec
  78:   49155 bytes     53 times -->    299.66 Mbps in   
1251.51 usec
  79:   65533 bytes     26 times -->      4.77 Mbps in 
104844.52 usec
  80:   65536 bytes      3 times -->      3.70 Mbps in 
135258.48 usec
  81:   65539 bytes      3 times -->      3.70 Mbps in 
135257.16 usec
  82:   98301 bytes      3 times -->      7.36 Mbps in 
101946.00 usec
  83:   98304 bytes      3 times -->      7.36 Mbps in 
101923.51 usec
  84:   98307 bytes      3 times -->      7.36 Mbps in 
101945.48 usec
  85:  131069 bytes      3 times --> [stalls here]

then a couple of seconds later...

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x0
fault code              = supervisor write, page not present
instruction pointer     = 0x20:0xc06a7e16
stack pointer           = 0x28:0xd35e5174
frame pointer           = 0x28:0xd35e5174
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         = 12 (swi1: net)
trap number             = 12
panic: page fault
KDB: stack backtrace:
kdb_backtrace(c078488a,c07e2500,c07790c0,d35e5028,100,...)
at kdb_backtrace+0x2e
panic(c07790c0,c079de93,c2466a70,1,1,...) at panic+0xb7
trap_fatal(d35e5134,0,2,8,e5df6f6e,...) at trap_fatal+0x342
trap_pfault(d35e5134,0,0,0,0,...) at trap_pfault+0x245
trap(8,ffff0028,7fff0028,c104db80,0,...) at trap+0x3e3
calltrap() at calltrap+0x5
--- trap 0xc, eip = 0xc06a7e16, esp = 0xd35e5174, ebp =
0xd35e5174 ---
mac_labelzone_dtor(0,14,0,0,0,...) at mac_labelzone_dtor+0x6
uma_zfree_arg(c104db80,0,0,d35e51d0,c06acfc4,...) at
uma_zfree_arg+0x2f
mac_labelzone_free(0) at mac_labelzone_free+0x22
mac_socket_label_free(0,c2ad4000,d35e5200,c0587da8,c2ad4000,
...) at
mac_socket_label_free+0x94
mac_destroy_socket(c2ad4000,40,0,c2ad4000,4,...) at
mac_destroy_socket+0x18
sodealloc(c2ad4000,c2ad4000,0,0,4,...) at sodealloc+0x168
sofree(c2ad4000,0,0,0,c10372c8,...) at sofree+0x311
sctp_inpcb_free(c2c98000,0,0,d35e52b4,c060c90d,...) at
sctp_inpcb_free+0x10d6
sctp_free_assoc(c2c98000,c2cad958,0,c2cafcd0,d35e534c,...)
at
sctp_free_assoc+0x1a5b
sctp_handle_shutdown_complete(c2cf3830,c2cad958,c2cafcd0,d35
e534c,c0754bbe,...)
at sctp_handle_shutdown_complete+0x228
sctp_process_control(c2cea500,14,d35e5bb8,24,c2cf3824,...)
at
sctp_process_control+0x1388
sctp_common_input_processing(d35e5c30,14,20,24,c2cf3824,...)
at
sctp_common_input_processing+0x87
sctp_input(c2cea500,14,c255c800,1,0,...) at sctp_input+0x383
ip_input(c2cea500,d35e5c88,c0553c65,8,0,...) at
ip_input+0x70c
netisr_processqueue(c07e75b8,c2467870,c2467870,c24668d0,d35e
5ce4,...)
at netisr_processqueue+0xe9
swi_net(0,c2467870,80246,b9669622,c2467870,...) at
swi_net+0x12f
ithread_execute_handlers(c24668d0,c2463500,c24668d0,c2467870
,c24668d0,...)
at ithread_execute_handlers+0x188
ithread_loop(c2433ad0,d35e5d38,0,0,c2433ad0,...) at
ithread_loop+0x76
fork_exit(c051d900,c2433ad0,d35e5d38) at fork_exit+0x7f
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xd35e5d6c, ebp = 0 ---
Uptime: 27m28s
Physical memory: 502 MB
Dumping 68 MB: 53 37 21 5

#0  doadump () at pcpu.h:166
166     pcpu.h: No such file or directory.
        in pcpu.h
(kgdb) bt
#0  doadump () at pcpu.h:166
#1  0xc053c0b4 in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:409
#2  0xc053c42d in panic (fmt=0xc07790c0 "%s")
    at /usr/src/sys/kern/kern_shutdown.c:565
#3  0xc074a2d2 in trap_fatal (frame=0xd35e5134, eva=0)
    at /usr/src/sys/i386/i386/trap.c:869
#4  0xc0749f65 in trap_pfault (frame=0xd35e5134, usermode=0,
eva=0)
    at /usr/src/sys/i386/i386/trap.c:778
#5  0xc0749ab3 in trap (frame=
      {tf_fs = 8, tf_es = -65496, tf_ds = 2147418152, tf_edi
=
-1056646272, tf_esi = 0, tf_ebp = -748793484, tf_isp =
-748793504,
tf_ebx = 0, tf_edx = 0, tf_ecx = 4, tf_eax = 0, tf_trapno =
12, tf_err
= 2, tf_eip = -1066762730, tf_cs = 32, tf_eflags = 66178,
tf_esp =
-748793432, tf_ss = -1066463889})
    at /usr/src/sys/i386/i386/trap.c:463
#6  0xc0738cfa in calltrap () at
/usr/src/sys/i386/i386/exception.s:138
#7  0xc06a7e16 in mac_labelzone_dtor (mem=0x0, size=20,
arg=0x0)
    at /usr/src/sys/security/mac/mac_label.c:74
#8  0xc06f0d6f in uma_zfree_arg (zone=0xc104db80, item=0x0,
udata=0x0)
    at /usr/src/sys/vm/uma_core.c:2263
#9  0xc06a7e72 in mac_labelzone_free (label=0x0) at
uma.h:303
#10 0xc06acfc4 in mac_socket_label_free (label=0x0)
    at /usr/src/sys/security/mac/mac_socket.c:151
#11 0xc06ad088 in mac_destroy_socket (socket=0xc2ad4000)
---Type <return> to continue, or q <return> to
quit---
    at /usr/src/sys/security/mac/mac_socket.c:168
#12 0xc0587da8 in sodealloc (so=0xc2ad4000)
    at /usr/src/sys/kern/uipc_socket.c:291
#13 0xc0588971 in sofree (so=0xc2ad4000) at
/usr/src/sys/kern/uipc_socket.c:592
#14 0xc0604986 in sctp_inpcb_free (inp=0xc2c98000,
immediate=0)
    at /usr/src/sys/netinet/sctp_pcb.c:2582
#15 0xc060817b in sctp_free_assoc (inp=0xc2c98000,
stcb=0xc2cad958,
    from_inpcbfree=0) at
/usr/src/sys/netinet/sctp_pcb.c:3896
#16 0xc0617b58 in sctp_handle_shutdown_complete
(cp=0xc2cf3830,
    stcb=0xc2cad958, net=0x0) at
/usr/src/sys/netinet/sctp_input.c:2500
#17 0xc061a7d8 in sctp_process_control (m=0xc2cea500,
iphlen=20,
    offset=0xd35e5bb8, length=36, sh=0xc2cf3824,
ch=0xc2cf3830,
    inp=0xc2c98000, stcb=0xc2cad958, netp=0xd35e5bd0,
fwd_tsn_seen=0xd35e5b98)
    at /usr/src/sys/netinet/sctp_input.c:4267
#18 0xc061ad87 in sctp_common_input_processing
(mm=0xd35e5c30, iphlen=20,
    offset=32, length=36, sh=0xc2cf3824, ch=0xc2cf3830,
inp=0xc2c98000,
    stcb=0xc2cad958, net=0xc2cafcd0, ecn_bits=2 '\002')
    at /usr/src/sys/netinet/sctp_input.c:4583
#19 0xc061b5e3 in sctp_input (m=0xc2cea500, off=20)
    at /usr/src/sys/netinet/sctp_input.c:4994
#20 0xc05ec1ec in ip_input (m=0xc2cea500)
    at /usr/src/sys/netinet/ip_input.c:658
#21 0xc05d2de9 in netisr_processqueue (ni=0xc07e75b8)
---Type <return> to continue, or q <return> to
quit---
    at /usr/src/sys/net/netisr.c:236
#22 0xc05d305f in swi_net (dummy=0x0) at
/usr/src/sys/net/netisr.c:349
#23 0xc051d808 in ithread_execute_handlers (p=0xc24668d0,
ie=0xc2463500)
    at /usr/src/sys/kern/kern_intr.c:662
#24 0xc051d976 in ithread_loop (arg=0xc2433ad0)
    at /usr/src/sys/kern/kern_intr.c:745
#25 0xc051c38f in fork_exit (callout=0xc051d900
<ithread_loop>, arg=0x0,
    frame=0x0) at /usr/src/sys/kern/kern_fork.c:822
#26 0xc0738d5c in fork_trampoline () at
/usr/src/sys/i386/i386/exception.s:199

-- 
Pawel
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
SCTP
user name
2006-07-18 21:57:42
On 7/18/06, Pawel Worach <pawel.worachgmail.com> wrote:
> On 7/17/06, Randall Stewart <rrscisco.com> wrote:
> > All:
> >
> > Just a friendly reminder/prod... if you have
started
> > testing SCTP.. thats great (any feedback?)..
> > and if you have not .. please do so :-D
>
> Hi,
>
> I played around a bit with NetPIPE, FreeBSD-CURRENT in
one end and
> Linux 2.6.17 in the other over a gigabit crossover
cable network, 1500
> MTU. FreeBSD crashes after a while. I do have MAC
enabled (no policy
> modules loaded at the time), it looks like it is
involved. I think I
> can reproduce this, made it happen on both attempts.
>

And I removed MAC and I get another panic. No idea if
directly related to SCTP.

panic: sbdrop
KDB: stack backtrace:
kdb_backtrace(c0761224,c07bd400,c07649ee,d5b14a10,100,...)
at kdb_backtrace+0x2e
panic(c07649ee,c2b42d24,0,0,0,...) at panic+0xb7
sbdrop_locked(c2aaf9d0,10c19,0,c05250f9,c2aaf9d0,...) at
sbdrop_locked+0x46
sbflush_locked(c2aaf9d0,c2b42b70,0,0,3041,...) at
sbflush_locked+0x54
sbrelease_locked(c2aaf9d0,c2aaf914,d5b14a88,c05eb388,c2b42b7
0,...) at
sbrelease_locked+0x12
sofree(c2aaf914,d5b14ae4,4,d5b14ab4,c073ce8c,...) at
sofree+0x2a3
soclose(c2aaf914,d5b14b24,0,d5b14ae0,c059d652,...) at
soclose+0x3ff
soo_close(c27305a0,c275bbd0,d5b14af8,c05a9798,c27305a0,...)
at soo_close+0x7d
fdrop_locked(c27305a0,c275bbd0,c0722f76,d5b14be0,4) at
fdrop_locked+0xf0
fdrop(c27305a0,c275bbd0,c2720924,0,c275bbd0,d5b14be0,0,0,0,c
06d1e2b,c2720924,c2b41374,c175b040,d5b14b68,c06e2c12,4,c29b7
514,28111000,d5b14c5c,c06d39f2,d5b14be0,80,c2b41374,5,0)
at fdrop+0x5f
closef(c27305a0,c275bbd0,c25c4a00,d5b14c64,0,...) at
closef+0x542
fdfree(c275bbd0,c078e240,2,c053e2e6,c275bbd0,...) at
fdfree+0x756
exit1(c275bbd0,19100,d5b14d30,c0727af3,c275bbd0,...) at
exit1+0x660
sys_exit(c275bbd0,d5b14d04,4,c275bbd0,d5b14d30,...) at
sys_exit+0x1d
syscall(bfbf003b,82b003b,bfbc003b,bfbfe910,82c4000,...) at
syscall+0x3d3
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (1, FreeBSD ELF32, sys_exit), eip = 0x280e87ef,
esp =
0xbfbc002c, ebp = 0xbfbc0038 ---
Uptime: 10m15s
Physical memory: 502 MB
Dumping 84 MB: 69 53 37 21 5

#0  doadump () at pcpu.h:166
166     pcpu.h: No such file or directory.
        in pcpu.h
(kgdb) bt
#0  doadump () at pcpu.h:166
#1  0xc0535b44 in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:409
#2  0xc0535ebd in panic (fmt=0xc07649ee
"sbdrop")
    at /usr/src/sys/kern/kern_shutdown.c:565
#3  0xc05876b6 in sbdrop_locked (sb=0xc2aaf9d0, len=68633)
    at /usr/src/sys/kern/uipc_socket2.c:1002
#4  0xc0587574 in sbflush_locked (sb=0xc2aaf9d0)
    at /usr/src/sys/kern/uipc_socket2.c:969
#5  0xc0586952 in sbrelease_locked (sb=0xc2aaf9d0, so=0x0)
    at /usr/src/sys/kern/uipc_socket2.c:469
#6  0xc0581603 in sofree (so=0xc2aaf914) at
/usr/src/sys/kern/uipc_socket.c:587
#7  0xc0581a8f in soclose (so=0xc2aaf914)
    at /usr/src/sys/kern/uipc_socket.c:662
#8  0xc056b9bd in soo_close (fp=0xc27305a0, td=0xc275bbd0)
    at /usr/src/sys/kern/sys_socket.c:317
#9  0xc050be00 in fdrop_locked (fp=0xc27305a0, td=0x0) at
file.h:296
#10 0xc050bcff in fdrop (fp=0xc27305a0, td=0x0)
    at /usr/src/sys/kern/kern_descrip.c:2156
#11 0xc0509b42 in closef (fp=0xc27305a0, td=0xc275bbd0)
    at /usr/src/sys/kern/kern_descrip.c:1971
#12 0xc0508396 in fdfree (td=0xc275bbd0)
    at /usr/src/sys/kern/kern_descrip.c:1653
#13 0xc0514620 in exit1 (td=0xc275bbd0, rv=102656)
---Type <return> to continue, or q <return> to
quit---
    at /usr/src/sys/kern/kern_exit.c:280
#14 0xc0513fbd in sys_exit (td=0x0, uap=0x0)
    at /usr/src/sys/kern/kern_exit.c:101
#15 0xc0727af3 in syscall (frame=
      {tf_fs = -1078001605, tf_es = 137035835, tf_ds =
-1078198213,
tf_edi = -1077942000, tf_esi = 137117696, tf_ebp =
-1078198216, tf_isp
= -709800604, tf_ebx = 672598776, tf_edx = 0, tf_ecx = 3,
tf_eax = 1,
tf_trapno = 12, tf_err = 2, tf_eip = 672040943, tf_cs = 51,
tf_eflags
= 646, tf_esp = -1078198228, tf_ss = 59}) at
/usr/src/sys/i386/i386/trap.c:1015
#16 0xc071613f in Xint0x80_syscall () at
/usr/src/sys/i386/i386/exception.s:191
#17 0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb) f 3
#3  0xc05876b6 in sbdrop_locked (sb=0xc2aaf9d0, len=68633)
    at /usr/src/sys/kern/uipc_socket2.c:1002
1002                                   
panic("sbdrop");
(kgdb) list
997
998             next = (m = sb->sb_mb) ? m->m_nextpkt
: 0;
999             while (len > 0) {
1000                    if (m == 0) {
1001                            if (next == 0)
1002                                   
panic("sbdrop");
1003                            m = next;
1004                            next = m->m_nextpkt;
1005                            continue;
1006                    }
(kgdb)

I also ran across this in the middle of things... this
likely should
have a new thread.

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xa0
fault code              = supervisor write, page not present
instruction pointer     = 0x20:0xc06444be
stack pointer           = 0x28:0xd5b3bc24
frame pointer           = 0x28:0xd5b3bc40
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         = 1169 (ssh)
trap number             = 12
panic: page fault
KDB: stack backtrace:
kdb_backtrace(c0761224,c07bd400,c0755b24,d5b3bad8,100,...)
at kdb_backtrace+0x2e
panic(c0755b24,c0779cd1,c2a9e3d4,1,1,...) at panic+0xb7
trap_fatal(d5b3bbe4,a0,2,8,0,...) at trap_fatal+0x342
trap_pfault(d5b3bbe4,0,a0,c29e5434,a0,...) at
trap_pfault+0x245
trap(8,c0760028,c0760028,c079aed4,c29e53e4,...) at
trap+0x3e3
calltrap() at calltrap+0x5
--- trap 0xc, eip = 0xc06444be, esp = 0xd5b3bc24, ebp =
0xd5b3bc40 ---
udp_shutdown(c29e53e4,0,d5b3bd04,c29c3a20,d5b3bc84,...) at
udp_shutdown+0x1e
soshutdown(c29e53e4,2,d5b3bc74,0,d5b3bdd0,...) at
soshutdown+0x41
shutdown(c29c3a20,d5b3bd04,8,16,d5b3bd30,...) at
shutdown+0xad
syscall(82a003b,bfbf003b,bfbf003b,0,2,...) at syscall+0x3d3
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (134, FreeBSD ELF32, shutdown), eip =
0x2826c327, esp =
0xbfbfe9fc, ebp = 0xbfbfea18 ---
Uptime: 13m47s
Physical memory: 502 MB
Dumping 46 MB: 31 (CTRL-C to abort)  (CTRL-C to abort) 
(CTRL-C to abort)  15

#0  doadump () at pcpu.h:166
166     pcpu.h: No such file or directory.
        in pcpu.h
(kgdb) bt
#0  doadump () at pcpu.h:166
#1  0xc0535b44 in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:409
#2  0xc0535ebd in panic (fmt=0xc0755b24 "%s")
    at /usr/src/sys/kern/kern_shutdown.c:565
#3  0xc07276b2 in trap_fatal (frame=0xd5b3bbe4, eva=160)
    at /usr/src/sys/i386/i386/trap.c:869
#4  0xc0727345 in trap_pfault (frame=0xd5b3bbe4, usermode=0,
eva=160)
    at /usr/src/sys/i386/i386/trap.c:778
#5  0xc0726e93 in trap (frame=
      {tf_fs = 8, tf_es = -1066008536, tf_ds = -1066008536,
tf_edi =
-1065767212, tf_esi = -1029811228, tf_ebp = -709641152,
tf_isp =
-709641200, tf_ebx = 0, tf_edx = -1029948896, tf_ecx = 4,
tf_eax = 4,
tf_trapno = 12, tf_err = 2, tf_eip = -1067170626, tf_cs =
32,
tf_eflags = 66198, tf_esp = 0, tf_ss = 0})
    at /usr/src/sys/i386/i386/trap.c:463
#6  0xc07160ea in calltrap () at
/usr/src/sys/i386/i386/exception.s:138
#7  0xc06444be in udp_shutdown (so=0xc29e53e4) at
atomic.h:146
#8  0xc0583bf1 in soshutdown (so=0xc29e53e4, how=2)
    at /usr/src/sys/kern/uipc_socket.c:1810
#9  0xc058a07d in shutdown (td=0xc29c3a20, uap=0xd5b3bd04)
    at /usr/src/sys/kern/uipc_syscalls.c:1328
#10 0xc0727af3 in syscall (frame=
      {tf_fs = 136970299, tf_es = -1078001605, tf_ds =
-1078001605,
tf_edi = 0, tf_esi = 2, tf_ebp = -1077941736, tf_isp =
-709640860,
tf_ebx = 671968624, tf_ed---Type <return> to continue,
or q <return>
to quit---
x = 0, tf_ecx = 2, tf_eax = 134, tf_trapno = 22, tf_err = 2,
tf_eip =
673628967, tf_cs = 51, tf_eflags = 582, tf_esp =
-1077941764, tf_ss =
59})
    at /usr/src/sys/i386/i386/trap.c:1015
#11 0xc071613f in Xint0x80_syscall () at
/usr/src/sys/i386/i386/exception.s:191
#12 0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)

-- 
Pawel
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
SCTP
user name
2006-07-19 13:20:20
Yann Berthier wrote:
>    Hello,
> 
> On Mon, 17 Jul 2006, at 07:54, Randall Stewart wrote:
> 
> 
>>All:
>>
>>Just a friendly reminder/prod... if you have started
>>testing SCTP.. thats great (any feedback?)..
> 
> 
>    As said last time, i've been using sctp with
netflow records between
>    a router and a freebsd box - perhaps not the most
useful test, but
>    it's the only 'real life' test i found. if you
have other ideas ...
>    anyway, the only way to have more exposure is to
have more sctp ready
>    applications, and a good way to have it happen is to
commit your
>    patch, right 
Of course..

You can also find a patch for apache to use SCTP and
a firebird version that can take advantage of it at:
http://pel.cis.udel.edu/

R

> 
> --
> http://flowog.6f2.net/ - A
NetFlow collecting house
> 


-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
SCTP
user name
2006-07-19 13:34:26
Pawel:

I see at least one thing wrong with the sctp_sendmsg()
code... I just recently added the iov.... and the
order of where bad:/ bad2:/ bad1: goes is wrong..

Now, the MAC stuff I have never enabled (at least
I don't think so).. and I see that in this trace
it seems the MAC stuff is calling to deallocate
the socket directly... I am not sure if the
crash is related to the wrong bad calls.. which
would do a free() when it should not on the iov..
that can't be good.. but also not sure of the
deallocate() stuff...

The bad stuff is easy to fix.. and I will
get a new patch prepared.. (I also will see if
I can't update to current  again.. and thus
eliminate your syscall conflict)..

But I want to look a bit into this mac_destroy_socket()
path...

R

Pawel Worach wrote:
> On 7/17/06, Randall Stewart <rrscisco.com> wrote:
> 
>> All:
>>
>> Just a friendly reminder/prod... if you have
started
>> testing SCTP.. thats great (any feedback?)..
>> and if you have not .. please do so :-D
> 
> 
> Hi,
> 
> I played around a bit with NetPIPE, FreeBSD-CURRENT in
one end and
> Linux 2.6.17 in the other over a gigabit crossover
cable network, 1500
> MTU. FreeBSD crashes after a while. I do have MAC
enabled (no policy
> modules loaded at the time), it looks like it is
involved. I think I
> can reproduce this, made it happen on both attempts.
> 
> For the record, I modified the patch a bit to make it
compile, the
> syscalls numbers collide with new threading syscalls
added recently,
> so I moved the thr syscalls up a notch. And I removed
this #ifdef MAC
> part of the patch due to duplicate sctp_bad labels.
> 
> +#ifdef MAC
> +sctp_bad:
> +#endif
> + sctp_bad:
> +       free(iov, M_IOV);
> 
> Any more info I can provide ?
> 
> ~/sctp/np> ./NPsctp -h 192.168.10.1
> ...
>  68:   16384 bytes     71 times -->    179.87 Mbps
in     694.94 usec
>  69:   16387 bytes     71 times -->    178.78 Mbps
in     699.33 usec
>  70:   24573 bytes     71 times -->    198.43 Mbps
in     944.80 usec
>  71:   24576 bytes     70 times -->    199.18 Mbps
in     941.35 usec
>  72:   24579 bytes     70 times -->    198.82 Mbps
in     943.19 usec
>  73:   32765 bytes     35 times -->    210.05 Mbps
in    1190.07 usec
>  74:   32768 bytes     42 times -->    208.48 Mbps
in    1199.15 usec
>  75:   32771 bytes     41 times -->    208.00 Mbps
in    1202.03 usec
>  76:   49149 bytes     41 times -->    234.43 Mbps
in    1599.55 usec
>  77:   49152 bytes     41 times -->    300.20 Mbps
in    1249.17 usec
>  78:   49155 bytes     53 times -->    299.66 Mbps
in    1251.51 usec
>  79:   65533 bytes     26 times -->      4.77 Mbps
in  104844.52 usec
>  80:   65536 bytes      3 times -->      3.70 Mbps
in  135258.48 usec
>  81:   65539 bytes      3 times -->      3.70 Mbps
in  135257.16 usec
>  82:   98301 bytes      3 times -->      7.36 Mbps
in  101946.00 usec
>  83:   98304 bytes      3 times -->      7.36 Mbps
in  101923.51 usec
>  84:   98307 bytes      3 times -->      7.36 Mbps
in  101945.48 usec
>  85:  131069 bytes      3 times --> [stalls here]
> 
> then a couple of seconds later...
> 
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0x0
> fault code              = supervisor write, page not
present
> instruction pointer     = 0x20:0xc06a7e16
> stack pointer           = 0x28:0xd35e5174
> frame pointer           = 0x28:0xd35e5174
> 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         = 12 (swi1: net)
> trap number             = 12
> panic: page fault
> KDB: stack backtrace:
>
kdb_backtrace(c078488a,c07e2500,c07790c0,d35e5028,100,...)
at 
> kdb_backtrace+0x2e
> panic(c07790c0,c079de93,c2466a70,1,1,...) at panic+0xb7
> trap_fatal(d35e5134,0,2,8,e5df6f6e,...) at
trap_fatal+0x342
> trap_pfault(d35e5134,0,0,0,0,...) at trap_pfault+0x245
> trap(8,ffff0028,7fff0028,c104db80,0,...) at trap+0x3e3
> calltrap() at calltrap+0x5
> --- trap 0xc, eip = 0xc06a7e16, esp = 0xd35e5174, ebp =
0xd35e5174 ---
> mac_labelzone_dtor(0,14,0,0,0,...) at
mac_labelzone_dtor+0x6
> uma_zfree_arg(c104db80,0,0,d35e51d0,c06acfc4,...) at
uma_zfree_arg+0x2f
> mac_labelzone_free(0) at mac_labelzone_free+0x22
>
mac_socket_label_free(0,c2ad4000,d35e5200,c0587da8,c2ad4000,
...) at
> mac_socket_label_free+0x94
> mac_destroy_socket(c2ad4000,40,0,c2ad4000,4,...) at
mac_destroy_socket+0x18
> sodealloc(c2ad4000,c2ad4000,0,0,4,...) at
sodealloc+0x168
> sofree(c2ad4000,0,0,0,c10372c8,...) at sofree+0x311
> sctp_inpcb_free(c2c98000,0,0,d35e52b4,c060c90d,...) at 
> sctp_inpcb_free+0x10d6
>
sctp_free_assoc(c2c98000,c2cad958,0,c2cafcd0,d35e534c,...)
at
> sctp_free_assoc+0x1a5b
>
sctp_handle_shutdown_complete(c2cf3830,c2cad958,c2cafcd0,d35
e534c,c0754bbe,...) 
> 
> at sctp_handle_shutdown_complete+0x228
>
sctp_process_control(c2cea500,14,d35e5bb8,24,c2cf3824,...)
at
> sctp_process_control+0x1388
>
sctp_common_input_processing(d35e5c30,14,20,24,c2cf3824,...)
at
> sctp_common_input_processing+0x87
> sctp_input(c2cea500,14,c255c800,1,0,...) at
sctp_input+0x383
> ip_input(c2cea500,d35e5c88,c0553c65,8,0,...) at
ip_input+0x70c
>
netisr_processqueue(c07e75b8,c2467870,c2467870,c24668d0,d35e
5ce4,...)
> at netisr_processqueue+0xe9
> swi_net(0,c2467870,80246,b9669622,c2467870,...) at
swi_net+0x12f
>
ithread_execute_handlers(c24668d0,c2463500,c24668d0,c2467870
,c24668d0,...)
> at ithread_execute_handlers+0x188
> ithread_loop(c2433ad0,d35e5d38,0,0,c2433ad0,...) at
ithread_loop+0x76
> fork_exit(c051d900,c2433ad0,d35e5d38) at fork_exit+0x7f
> fork_trampoline() at fork_trampoline+0x8
> --- trap 0x1, eip = 0, esp = 0xd35e5d6c, ebp = 0 ---
> Uptime: 27m28s
> Physical memory: 502 MB
> Dumping 68 MB: 53 37 21 5
> 
> #0  doadump () at pcpu.h:166
> 166     pcpu.h: No such file or directory.
>        in pcpu.h
> (kgdb) bt
> #0  doadump () at pcpu.h:166
> #1  0xc053c0b4 in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:409
> #2  0xc053c42d in panic (fmt=0xc07790c0
"%s")
>    at /usr/src/sys/kern/kern_shutdown.c:565
> #3  0xc074a2d2 in trap_fatal (frame=0xd35e5134, eva=0)
>    at /usr/src/sys/i386/i386/trap.c:869
> #4  0xc0749f65 in trap_pfault (frame=0xd35e5134,
usermode=0, eva=0)
>    at /usr/src/sys/i386/i386/trap.c:778
> #5  0xc0749ab3 in trap (frame=
>      {tf_fs = 8, tf_es = -65496, tf_ds = 2147418152,
tf_edi =
> -1056646272, tf_esi = 0, tf_ebp = -748793484, tf_isp =
-748793504,
> tf_ebx = 0, tf_edx = 0, tf_ecx = 4, tf_eax = 0,
tf_trapno = 12, tf_err
> = 2, tf_eip = -1066762730, tf_cs = 32, tf_eflags =
66178, tf_esp =
> -748793432, tf_ss = -1066463889})
>    at /usr/src/sys/i386/i386/trap.c:463
> #6  0xc0738cfa in calltrap () at
/usr/src/sys/i386/i386/exception.s:138
> #7  0xc06a7e16 in mac_labelzone_dtor (mem=0x0, size=20,
arg=0x0)
>    at /usr/src/sys/security/mac/mac_label.c:74
> #8  0xc06f0d6f in uma_zfree_arg (zone=0xc104db80,
item=0x0, udata=0x0)
>    at /usr/src/sys/vm/uma_core.c:2263
> #9  0xc06a7e72 in mac_labelzone_free (label=0x0) at
uma.h:303
> #10 0xc06acfc4 in mac_socket_label_free (label=0x0)
>    at /usr/src/sys/security/mac/mac_socket.c:151
> #11 0xc06ad088 in mac_destroy_socket
(socket=0xc2ad4000)
> ---Type <return> to continue, or q <return>
to quit---
>    at /usr/src/sys/security/mac/mac_socket.c:168
> #12 0xc0587da8 in sodealloc (so=0xc2ad4000)
>    at /usr/src/sys/kern/uipc_socket.c:291
> #13 0xc0588971 in sofree (so=0xc2ad4000) at 
> /usr/src/sys/kern/uipc_socket.c:592
> #14 0xc0604986 in sctp_inpcb_free (inp=0xc2c98000,
immediate=0)
>    at /usr/src/sys/netinet/sctp_pcb.c:2582
> #15 0xc060817b in sctp_free_assoc (inp=0xc2c98000,
stcb=0xc2cad958,
>    from_inpcbfree=0) at
/usr/src/sys/netinet/sctp_pcb.c:3896
> #16 0xc0617b58 in sctp_handle_shutdown_complete
(cp=0xc2cf3830,
>    stcb=0xc2cad958, net=0x0) at
/usr/src/sys/netinet/sctp_input.c:2500
> #17 0xc061a7d8 in sctp_process_control (m=0xc2cea500,
iphlen=20,
>    offset=0xd35e5bb8, length=36, sh=0xc2cf3824,
ch=0xc2cf3830,
>    inp=0xc2c98000, stcb=0xc2cad958, netp=0xd35e5bd0, 
> fwd_tsn_seen=0xd35e5b98)
>    at /usr/src/sys/netinet/sctp_input.c:4267
> #18 0xc061ad87 in sctp_common_input_processing
(mm=0xd35e5c30, iphlen=20,
>    offset=32, length=36, sh=0xc2cf3824, ch=0xc2cf3830,
inp=0xc2c98000,
>    stcb=0xc2cad958, net=0xc2cafcd0, ecn_bits=2
'\002')
>    at /usr/src/sys/netinet/sctp_input.c:4583
> #19 0xc061b5e3 in sctp_input (m=0xc2cea500, off=20)
>    at /usr/src/sys/netinet/sctp_input.c:4994
> #20 0xc05ec1ec in ip_input (m=0xc2cea500)
>    at /usr/src/sys/netinet/ip_input.c:658
> #21 0xc05d2de9 in netisr_processqueue (ni=0xc07e75b8)
> ---Type <return> to continue, or q <return>
to quit---
>    at /usr/src/sys/net/netisr.c:236
> #22 0xc05d305f in swi_net (dummy=0x0) at
/usr/src/sys/net/netisr.c:349
> #23 0xc051d808 in ithread_execute_handlers
(p=0xc24668d0, ie=0xc2463500)
>    at /usr/src/sys/kern/kern_intr.c:662
> #24 0xc051d976 in ithread_loop (arg=0xc2433ad0)
>    at /usr/src/sys/kern/kern_intr.c:745
> #25 0xc051c38f in fork_exit (callout=0xc051d900
<ithread_loop>, arg=0x0,
>    frame=0x0) at /usr/src/sys/kern/kern_fork.c:822
> #26 0xc0738d5c in fork_trampoline () at 
> /usr/src/sys/i386/i386/exception.s:199
> 


-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
SCTP
user name
2006-07-19 13:34:26
Pawel:

I see at least one thing wrong with the sctp_sendmsg()
code... I just recently added the iov.... and the
order of where bad:/ bad2:/ bad1: goes is wrong..

Now, the MAC stuff I have never enabled (at least
I don't think so).. and I see that in this trace
it seems the MAC stuff is calling to deallocate
the socket directly... I am not sure if the
crash is related to the wrong bad calls.. which
would do a free() when it should not on the iov..
that can't be good.. but also not sure of the
deallocate() stuff...

The bad stuff is easy to fix.. and I will
get a new patch prepared.. (I also will see if
I can't update to current  again.. and thus
eliminate your syscall conflict)..

But I want to look a bit into this mac_destroy_socket()
path...

R

Pawel Worach wrote:
> On 7/17/06, Randall Stewart <rrscisco.com> wrote:
> 
>> All:
>>
>> Just a friendly reminder/prod... if you have
started
>> testing SCTP.. thats great (any feedback?)..
>> and if you have not .. please do so :-D
> 
> 
> Hi,
> 
> I played around a bit with NetPIPE, FreeBSD-CURRENT in
one end and
> Linux 2.6.17 in the other over a gigabit crossover
cable network, 1500
> MTU. FreeBSD crashes after a while. I do have MAC
enabled (no policy
> modules loaded at the time), it looks like it is
involved. I think I
> can reproduce this, made it happen on both attempts.
> 
> For the record, I modified the patch a bit to make it
compile, the
> syscalls numbers collide with new threading syscalls
added recently,
> so I moved the thr syscalls up a notch. And I removed
this #ifdef MAC
> part of the patch due to duplicate sctp_bad labels.
> 
> +#ifdef MAC
> +sctp_bad:
> +#endif
> + sctp_bad:
> +       free(iov, M_IOV);
> 
> Any more info I can provide ?
> 
> ~/sctp/np> ./NPsctp -h 192.168.10.1
> ...
>  68:   16384 bytes     71 times -->    179.87 Mbps
in     694.94 usec
>  69:   16387 bytes     71 times -->    178.78 Mbps
in     699.33 usec
>  70:   24573 bytes     71 times -->    198.43 Mbps
in     944.80 usec
>  71:   24576 bytes     70 times -->    199.18 Mbps
in     941.35 usec
>  72:   24579 bytes     70 times -->    198.82 Mbps
in     943.19 usec
>  73:   32765 bytes     35 times -->    210.05 Mbps
in    1190.07 usec
>  74:   32768 bytes     42 times -->    208.48 Mbps
in    1199.15 usec
>  75:   32771 bytes     41 times -->    208.00 Mbps
in    1202.03 usec
>  76:   49149 bytes     41 times -->    234.43 Mbps
in    1599.55 usec
>  77:   49152 bytes     41 times -->    300.20 Mbps
in    1249.17 usec
>  78:   49155 bytes     53 times -->    299.66 Mbps
in    1251.51 usec
>  79:   65533 bytes     26 times -->      4.77 Mbps
in  104844.52 usec
>  80:   65536 bytes      3 times -->      3.70 Mbps
in  135258.48 usec
>  81:   65539 bytes      3 times -->      3.70 Mbps
in  135257.16 usec
>  82:   98301 bytes      3 times -->      7.36 Mbps
in  101946.00 usec
>  83:   98304 bytes      3 times -->      7.36 Mbps
in  101923.51 usec
>  84:   98307 bytes      3 times -->      7.36 Mbps
in  101945.48 usec
>  85:  131069 bytes      3 times --> [stalls here]
> 
> then a couple of seconds later...
> 
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0x0
> fault code              = supervisor write, page not
present
> instruction pointer     = 0x20:0xc06a7e16
> stack pointer           = 0x28:0xd35e5174
> frame pointer           = 0x28:0xd35e5174
> 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         = 12 (swi1: net)
> trap number             = 12
> panic: page fault
> KDB: stack backtrace:
>
kdb_backtrace(c078488a,c07e2500,c07790c0,d35e5028,100,...)
at 
> kdb_backtrace+0x2e
> panic(c07790c0,c079de93,c2466a70,1,1,...) at panic+0xb7
> trap_fatal(d35e5134,0,2,8,e5df6f6e,...) at
trap_fatal+0x342
> trap_pfault(d35e5134,0,0,0,0,...) at trap_pfault+0x245
> trap(8,ffff0028,7fff0028,c104db80,0,...) at trap+0x3e3
> calltrap() at calltrap+0x5
> --- trap 0xc, eip = 0xc06a7e16, esp = 0xd35e5174, ebp =
0xd35e5174 ---
> mac_labelzone_dtor(0,14,0,0,0,...) at
mac_labelzone_dtor+0x6
> uma_zfree_arg(c104db80,0,0,d35e51d0,c06acfc4,...) at
uma_zfree_arg+0x2f
> mac_labelzone_free(0) at mac_labelzone_free+0x22
>
mac_socket_label_free(0,c2ad4000,d35e5200,c0587da8,c2ad4000,
...) at
> mac_socket_label_free+0x94
> mac_destroy_socket(c2ad4000,40,0,c2ad4000,4,...) at
mac_destroy_socket+0x18
> sodealloc(c2ad4000,c2ad4000,0,0,4,...) at
sodealloc+0x168
> sofree(c2ad4000,0,0,0,c10372c8,...) at sofree+0x311
> sctp_inpcb_free(c2c98000,0,0,d35e52b4,c060c90d,...) at 
> sctp_inpcb_free+0x10d6
>
sctp_free_assoc(c2c98000,c2cad958,0,c2cafcd0,d35e534c,...)
at
> sctp_free_assoc+0x1a5b
>
sctp_handle_shutdown_complete(c2cf3830,c2cad958,c2cafcd0,d35
e534c,c0754bbe,...) 
> 
> at sctp_handle_shutdown_complete+0x228
>
sctp_process_control(c2cea500,14,d35e5bb8,24,c2cf3824,...)
at
> sctp_process_control+0x1388
>
sctp_common_input_processing(d35e5c30,14,20,24,c2cf3824,...)
at
> sctp_common_input_processing+0x87
> sctp_input(c2cea500,14,c255c800,1,0,...) at
sctp_input+0x383
> ip_input(c2cea500,d35e5c88,c0553c65,8,0,...) at
ip_input+0x70c
>
netisr_processqueue(c07e75b8,c2467870,c2467870,c24668d0,d35e
5ce4,...)
> at netisr_processqueue+0xe9
> swi_net(0,c2467870,80246,b9669622,c2467870,...) at
swi_net+0x12f
>
ithread_execute_handlers(c24668d0,c2463500,c24668d0,c2467870
,c24668d0,...)
> at ithread_execute_handlers+0x188
> ithread_loop(c2433ad0,d35e5d38,0,0,c2433ad0,...) at
ithread_loop+0x76
> fork_exit(c051d900,c2433ad0,d35e5d38) at fork_exit+0x7f
> fork_trampoline() at fork_trampoline+0x8
> --- trap 0x1, eip = 0, esp = 0xd35e5d6c, ebp = 0 ---
> Uptime: 27m28s
> Physical memory: 502 MB
> Dumping 68 MB: 53 37 21 5
> 
> #0  doadump () at pcpu.h:166
> 166     pcpu.h: No such file or directory.
>        in pcpu.h
> (kgdb) bt
> #0  doadump () at pcpu.h:166
> #1  0xc053c0b4 in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:409
> #2  0xc053c42d in panic (fmt=0xc07790c0
"%s")
>    at /usr/src/sys/kern/kern_shutdown.c:565
> #3  0xc074a2d2 in trap_fatal (frame=0xd35e5134, eva=0)
>    at /usr/src/sys/i386/i386/trap.c:869
> #4  0xc0749f65 in trap_pfault (frame=0xd35e5134,
usermode=0, eva=0)
>    at /usr/src/sys/i386/i386/trap.c:778
> #5  0xc0749ab3 in trap (frame=
>      {tf_fs = 8, tf_es = -65496, tf_ds = 2147418152,
tf_edi =
> -1056646272, tf_esi = 0, tf_ebp = -748793484, tf_isp =
-748793504,
> tf_ebx = 0, tf_edx = 0, tf_ecx = 4, tf_eax = 0,
tf_trapno = 12, tf_err
> = 2, tf_eip = -1066762730, tf_cs = 32, tf_eflags =
66178, tf_esp =
> -748793432, tf_ss = -1066463889})
>    at /usr/src/sys/i386/i386/trap.c:463
> #6  0xc0738cfa in calltrap () at
/usr/src/sys/i386/i386/exception.s:138
> #7  0xc06a7e16 in mac_labelzone_dtor (mem=0x0, size=20,
arg=0x0)
>    at /usr/src/sys/security/mac/mac_label.c:74
> #8  0xc06f0d6f in uma_zfree_arg (zone=0xc104db80,
item=0x0, udata=0x0)
>    at /usr/src/sys/vm/uma_core.c:2263
> #9  0xc06a7e72 in mac_labelzone_free (label=0x0) at
uma.h:303
> #10 0xc06acfc4 in mac_socket_label_free (label=0x0)
>    at /usr/src/sys/security/mac/mac_socket.c:151
> #11 0xc06ad088 in mac_destroy_socket
(socket=0xc2ad4000)
> ---Type <return> to continue, or q <return>
to quit---
>    at /usr/src/sys/security/mac/mac_socket.c:168
> #12 0xc0587da8 in sodealloc (so=0xc2ad4000)
>    at /usr/src/sys/kern/uipc_socket.c:291
> #13 0xc0588971 in sofree (so=0xc2ad4000) at 
> /usr/src/sys/kern/uipc_socket.c:592
> #14 0xc0604986 in sctp_inpcb_free (inp=0xc2c98000,
immediate=0)
>    at /usr/src/sys/netinet/sctp_pcb.c:2582
> #15 0xc060817b in sctp_free_assoc (inp=0xc2c98000,
stcb=0xc2cad958,
>    from_inpcbfree=0) at
/usr/src/sys/netinet/sctp_pcb.c:3896
> #16 0xc0617b58 in sctp_handle_shutdown_complete
(cp=0xc2cf3830,
>    stcb=0xc2cad958, net=0x0) at
/usr/src/sys/netinet/sctp_input.c:2500
> #17 0xc061a7d8 in sctp_process_control (m=0xc2cea500,
iphlen=20,
>    offset=0xd35e5bb8, length=36, sh=0xc2cf3824,
ch=0xc2cf3830,
>    inp=0xc2c98000, stcb=0xc2cad958, netp=0xd35e5bd0, 
> fwd_tsn_seen=0xd35e5b98)
>    at /usr/src/sys/netinet/sctp_input.c:4267
> #18 0xc061ad87 in sctp_common_input_processing
(mm=0xd35e5c30, iphlen=20,
>    offset=32, length=36, sh=0xc2cf3824, ch=0xc2cf3830,
inp=0xc2c98000,
>    stcb=0xc2cad958, net=0xc2cafcd0, ecn_bits=2
'\002')
>    at /usr/src/sys/netinet/sctp_input.c:4583
> #19 0xc061b5e3 in sctp_input (m=0xc2cea500, off=20)
>    at /usr/src/sys/netinet/sctp_input.c:4994
> #20 0xc05ec1ec in ip_input (m=0xc2cea500)
>    at /usr/src/sys/netinet/ip_input.c:658
> #21 0xc05d2de9 in netisr_processqueue (ni=0xc07e75b8)
> ---Type <return> to continue, or q <return>
to quit---
>    at /usr/src/sys/net/netisr.c:236
> #22 0xc05d305f in swi_net (dummy=0x0) at
/usr/src/sys/net/netisr.c:349
> #23 0xc051d808 in ithread_execute_handlers
(p=0xc24668d0, ie=0xc2463500)
>    at /usr/src/sys/kern/kern_intr.c:662
> #24 0xc051d976 in ithread_loop (arg=0xc2433ad0)
>    at /usr/src/sys/kern/kern_intr.c:745
> #25 0xc051c38f in fork_exit (callout=0xc051d900
<ithread_loop>, arg=0x0,
>    frame=0x0) at /usr/src/sys/kern/kern_fork.c:822
> #26 0xc0738d5c in fork_trampoline () at 
> /usr/src/sys/i386/i386/exception.s:199
> 


-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
SCTP
user name
2006-07-19 15:17:21
Pawel:

Ok, I have verified that even with my patch I can
recreate this one.. have not tried the mac one yet
(I will fix this first :-D)

I do think its an SCTP problem.. it looks to me
like an accounting issue... sb_cc or sb_mbcnt is
left with a value (at a guess) when we never use
the sb_mb pointers... so it panics..

In theory sb_cc and sb_mbcnt should be zero at
cleanup.. so some where a bug crept in from
the last time I played with netpipe :-0

Should have a patch later today hopefully.. of course
I am now trying to get kgdb to build.. I have not
done a buildworld in a while and of course there
have been changes and the old kgdb will not read
the core.. some nice error... sigh... I hate
to go down the build-world rat-hole.. at least
after the last time I did this it took me a long
time to recover... but I will jump in with both
feet :-D

R

Pawel Worach wrote:
> On 7/18/06, Pawel Worach <pawel.worachgmail.com> wrote:
> 
>> On 7/17/06, Randall Stewart <rrscisco.com> wrote:
>> > All:
>> >
>> > Just a friendly reminder/prod... if you have
started
>> > testing SCTP.. thats great (any feedback?)..
>> > and if you have not .. please do so :-D
>>
>> Hi,
>>
>> I played around a bit with NetPIPE, FreeBSD-CURRENT
in one end and
>> Linux 2.6.17 in the other over a gigabit crossover
cable network, 1500
>> MTU. FreeBSD crashes after a while. I do have MAC
enabled (no policy
>> modules loaded at the time), it looks like it is
involved. I think I
>> can reproduce this, made it happen on both
attempts.
>>
> 
> And I removed MAC and I get another panic. No idea if
directly related 
> to SCTP.
> 
> panic: sbdrop
> KDB: stack backtrace:
>
kdb_backtrace(c0761224,c07bd400,c07649ee,d5b14a10,100,...)
at 
> kdb_backtrace+0x2e
> panic(c07649ee,c2b42d24,0,0,0,...) at panic+0xb7
> sbdrop_locked(c2aaf9d0,10c19,0,c05250f9,c2aaf9d0,...)
at sbdrop_locked+0x46
> sbflush_locked(c2aaf9d0,c2b42b70,0,0,3041,...) at
sbflush_locked+0x54
>
sbrelease_locked(c2aaf9d0,c2aaf914,d5b14a88,c05eb388,c2b42b7
0,...) at
> sbrelease_locked+0x12
> sofree(c2aaf914,d5b14ae4,4,d5b14ab4,c073ce8c,...) at
sofree+0x2a3
> soclose(c2aaf914,d5b14b24,0,d5b14ae0,c059d652,...) at
soclose+0x3ff
>
soo_close(c27305a0,c275bbd0,d5b14af8,c05a9798,c27305a0,...)
at 
> soo_close+0x7d
> fdrop_locked(c27305a0,c275bbd0,c0722f76,d5b14be0,4) at
fdrop_locked+0xf0
>
fdrop(c27305a0,c275bbd0,c2720924,0,c275bbd0,d5b14be0,0,0,0,c
06d1e2b,c2720924,c2b41374,c175b040,d5b14b68,c06e2c12,4,c29b7
514,28111000,d5b14c5c,c06d39f2,d5b14be0,80,c2b41374,5,0) 
> 
> at fdrop+0x5f
> closef(c27305a0,c275bbd0,c25c4a00,d5b14c64,0,...) at
closef+0x542
> fdfree(c275bbd0,c078e240,2,c053e2e6,c275bbd0,...) at
fdfree+0x756
> exit1(c275bbd0,19100,d5b14d30,c0727af3,c275bbd0,...) at
exit1+0x660
> sys_exit(c275bbd0,d5b14d04,4,c275bbd0,d5b14d30,...) at
sys_exit+0x1d
> syscall(bfbf003b,82b003b,bfbc003b,bfbfe910,82c4000,...)
at syscall+0x3d3
> Xint0x80_syscall() at Xint0x80_syscall+0x1f
> --- syscall (1, FreeBSD ELF32, sys_exit), eip =
0x280e87ef, esp =
> 0xbfbc002c, ebp = 0xbfbc0038 ---
> Uptime: 10m15s
> Physical memory: 502 MB
> Dumping 84 MB: 69 53 37 21 5
> 
> #0  doadump () at pcpu.h:166
> 166     pcpu.h: No such file or directory.
>        in pcpu.h
> (kgdb) bt
> #0  doadump () at pcpu.h:166
> #1  0xc0535b44 in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:409
> #2  0xc0535ebd in panic (fmt=0xc07649ee
"sbdrop")
>    at /usr/src/sys/kern/kern_shutdown.c:565
> #3  0xc05876b6 in sbdrop_locked (sb=0xc2aaf9d0,
len=68633)
>    at /usr/src/sys/kern/uipc_socket2.c:1002
> #4  0xc0587574 in sbflush_locked (sb=0xc2aaf9d0)
>    at /usr/src/sys/kern/uipc_socket2.c:969
> #5  0xc0586952 in sbrelease_locked (sb=0xc2aaf9d0,
so=0x0)
>    at /usr/src/sys/kern/uipc_socket2.c:469
> #6  0xc0581603 in sofree (so=0xc2aaf914) at 
> /usr/src/sys/kern/uipc_socket.c:587
> #7  0xc0581a8f in soclose (so=0xc2aaf914)
>    at /usr/src/sys/kern/uipc_socket.c:662
> #8  0xc056b9bd in soo_close (fp=0xc27305a0,
td=0xc275bbd0)
>    at /usr/src/sys/kern/sys_socket.c:317
> #9  0xc050be00 in fdrop_locked (fp=0xc27305a0, td=0x0)
at file.h:296
> #10 0xc050bcff in fdrop (fp=0xc27305a0, td=0x0)
>    at /usr/src/sys/kern/kern_descrip.c:2156
> #11 0xc0509b42 in closef (fp=0xc27305a0, td=0xc275bbd0)
>    at /usr/src/sys/kern/kern_descrip.c:1971
> #12 0xc0508396 in fdfree (td=0xc275bbd0)
>    at /usr/src/sys/kern/kern_descrip.c:1653
> #13 0xc0514620 in exit1 (td=0xc275bbd0, rv=102656)
> ---Type <return> to continue, or q <return>
to quit---
>    at /usr/src/sys/kern/kern_exit.c:280
> #14 0xc0513fbd in sys_exit (td=0x0, uap=0x0)
>    at /usr/src/sys/kern/kern_exit.c:101
> #15 0xc0727af3 in syscall (frame=
>      {tf_fs = -1078001605, tf_es = 137035835, tf_ds =
-1078198213,
> tf_edi = -1077942000, tf_esi = 137117696, tf_ebp =
-1078198216, tf_isp
> = -709800604, tf_ebx = 672598776, tf_edx = 0, tf_ecx =
3, tf_eax = 1,
> tf_trapno = 12, tf_err = 2, tf_eip = 672040943, tf_cs =
51, tf_eflags
> = 646, tf_esp = -1078198228, tf_ss = 59}) at
> /usr/src/sys/i386/i386/trap.c:1015
> #16 0xc071613f in Xint0x80_syscall () at 
> /usr/src/sys/i386/i386/exception.s:191
> #17 0x00000033 in ?? ()
> Previous frame inner to this frame (corrupt stack?)
> (kgdb) f 3
> #3  0xc05876b6 in sbdrop_locked (sb=0xc2aaf9d0,
len=68633)
>    at /usr/src/sys/kern/uipc_socket2.c:1002
> 1002                                   
panic("sbdrop");
> (kgdb) list
> 997
> 998             next = (m = sb->sb_mb) ?
m->m_nextpkt : 0;
> 999             while (len > 0) {
> 1000                    if (m == 0) {
> 1001                            if (next == 0)
> 1002                                   
panic("sbdrop");
> 1003                            m = next;
> 1004                            next = m->m_nextpkt;
> 1005                            continue;
> 1006                    }
> (kgdb)
> 
> I also ran across this in the middle of things... this
likely should
> have a new thread.
> 
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0xa0
> fault code              = supervisor write, page not
present
> instruction pointer     = 0x20:0xc06444be
> stack pointer           = 0x28:0xd5b3bc24
> frame pointer           = 0x28:0xd5b3bc40
> 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         = 1169 (ssh)
> trap number             = 12
> panic: page fault
> KDB: stack backtrace:
>
kdb_backtrace(c0761224,c07bd400,c0755b24,d5b3bad8,100,...)
at 
> kdb_backtrace+0x2e
> panic(c0755b24,c0779cd1,c2a9e3d4,1,1,...) at panic+0xb7
> trap_fatal(d5b3bbe4,a0,2,8,0,...) at trap_fatal+0x342
> trap_pfault(d5b3bbe4,0,a0,c29e5434,a0,...) at
trap_pfault+0x245
> trap(8,c0760028,c0760028,c079aed4,c29e53e4,...) at
trap+0x3e3
> calltrap() at calltrap+0x5
> --- trap 0xc, eip = 0xc06444be, esp = 0xd5b3bc24, ebp =
0xd5b3bc40 ---
> udp_shutdown(c29e53e4,0,d5b3bd04,c29c3a20,d5b3bc84,...)
at 
> udp_shutdown+0x1e
> soshutdown(c29e53e4,2,d5b3bc74,0,d5b3bdd0,...) at
soshutdown+0x41
> shutdown(c29c3a20,d5b3bd04,8,16,d5b3bd30,...) at
shutdown+0xad
> syscall(82a003b,bfbf003b,bfbf003b,0,2,...) at
syscall+0x3d3
> Xint0x80_syscall() at Xint0x80_syscall+0x1f
> --- syscall (134, FreeBSD ELF32, shutdown), eip =
0x2826c327, esp =
> 0xbfbfe9fc, ebp = 0xbfbfea18 ---
> Uptime: 13m47s
> Physical memory: 502 MB
> Dumping 46 MB: 31 (CTRL-C to abort)  (CTRL-C to abort) 
(CTRL-C to 
> abort)  15
> 
> #0  doadump () at pcpu.h:166
> 166     pcpu.h: No such file or directory.
>        in pcpu.h
> (kgdb) bt
> #0  doadump () at pcpu.h:166
> #1  0xc0535b44 in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:409
> #2  0xc0535ebd in panic (fmt=0xc0755b24
"%s")
>    at /usr/src/sys/kern/kern_shutdown.c:565
> #3  0xc07276b2 in trap_fatal (frame=0xd5b3bbe4,
eva=160)
>    at /usr/src/sys/i386/i386/trap.c:869
> #4  0xc0727345 in trap_pfault (frame=0xd5b3bbe4,
usermode=0, eva=160)
>    at /usr/src/sys/i386/i386/trap.c:778
> #5  0xc0726e93 in trap (frame=
>      {tf_fs = 8, tf_es = -1066008536, tf_ds =
-1066008536, tf_edi =
> -1065767212, tf_esi = -1029811228, tf_ebp = -709641152,
tf_isp =
> -709641200, tf_ebx = 0, tf_edx = -1029948896, tf_ecx =
4, tf_eax = 4,
> tf_trapno = 12, tf_err = 2, tf_eip = -1067170626, tf_cs
= 32,
> tf_eflags = 66198, tf_esp = 0, tf_ss = 0})
>    at /usr/src/sys/i386/i386/trap.c:463
> #6  0xc07160ea in calltrap () at
/usr/src/sys/i386/i386/exception.s:138
> #7  0xc06444be in udp_shutdown (so=0xc29e53e4) at
atomic.h:146
> #8  0xc0583bf1 in soshutdown (so=0xc29e53e4, how=2)
>    at /usr/src/sys/kern/uipc_socket.c:1810
> #9  0xc058a07d in shutdown (td=0xc29c3a20,
uap=0xd5b3bd04)
>    at /usr/src/sys/kern/uipc_syscalls.c:1328
> #10 0xc0727af3 in syscall (frame=
>      {tf_fs = 136970299, tf_es = -1078001605, tf_ds =
-1078001605,
> tf_edi = 0, tf_esi = 2, tf_ebp = -1077941736, tf_isp =
-709640860,
> tf_ebx = 671968624, tf_ed---Type <return> to
continue, or q <return>
> to quit---
> x = 0, tf_ecx = 2, tf_eax = 134, tf_trapno = 22, tf_err
= 2, tf_eip =
> 673628967, tf_cs = 51, tf_eflags = 582, tf_esp =
-1077941764, tf_ss =
> 59})
>    at /usr/src/sys/i386/i386/trap.c:1015
> #11 0xc071613f in Xint0x80_syscall () at 
> /usr/src/sys/i386/i386/exception.s:191
> #12 0x00000033 in ?? ()
> Previous frame inner to this frame (corrupt stack?)
> 


-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
SCTP
user name
2006-07-20 00:17:50
Pawel/All:

You will now find a new patch available either
by clicking:

http://www.sc
tp.org/cvs_diff.July19.bz2

Or you can find it at
http://www.sctp.org/

Hanging off the download page has patch-2.

This is current to this evening's CVS and fixes
the issues Pawel saw..

I still don't like the performance on my SMP machine
and think there may be some locking contentions going
on.. I will try to look into this tommorrow :-0

R

-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
SCTP
user name
2006-07-25 17:27:55
Greetings all:

After much work with Pawel.. I figured out
and fixed/simplified/made better a lot of
what was happening for him...

Turns out he had some of Roberts latest changes
to the sockets code :-0 (which I knew would break SCTP).

Now I have fixed these in the latest patch/and or download.

Please find the patch either at:

http://www.sctp.
org/July25.patch.bz2

OR

you can find it hanging off the
http://www.sctp.org
download tab.

Note: thanks to all of you that have tested and played
       with SCTP.. keep up the good work.. and for those
       of you that have not gotten around to it.. please do
so :-D

R

-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)
_______________________________________________
freebsd-netfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to
"freebsd-net-unsubscribefreebsd.org"
[1-10] [11-12]

about | contact  Other archives ( Real Estate discussion Medical topics )