splassert: bstp_notify_rtage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

splassert: bstp_notify_rtage

Hrvoje Popovski
Hi all,

while playing around with stp and pair interfaces and using exactly the
same example as in man (4) pair

ifconfig pair0 up
ifconfig pair1 rdomain 1 patch pair0 up
ifconfig pair2 up
ifconfig pair3 rdomain 1 patch pair2 up
ifconfig bridge0 add pair0 add pair2 stp pair0 stp pair2 up
ifconfig bridge1 add pair1 add pair3 stp pair1 stp pair3 up

and while destroying/creating stp root pair interfaces with
kern.pool_debug=1 and kern.splassert=2 i'm getting this traces

splassert: bstp_notify_rtage: want 2 have 0
Starting stack trace...
bstp_update_tc(ffff8000004e0c00) at bstp_update_tc+0x338
bstp_tick(ffff800000159700) at bstp_tick+0x357
softclock(0) at softclock+0x123
softintr_dispatch(0) at softintr_dispatch+0x11e
Xsoftclock(0,0,1388,0,ffff800000021800,ffffffff81d0b6d0) at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x281
sched_idle(ffffffff81d0aff0) at sched_idle+0x235
end trace frame: 0x0, count: 250
End of stack trace.


splassert: bstp_notify_rtage: want 2 have 256
Starting stack trace...
bstp_set_port_tc(ffff8000004e0600,5) at bstp_set_port_tc+0x1a6
bstp_update_tc(ffff8000004e0600) at bstp_update_tc+0xfd
bstp_tick(ffff800000159000) at bstp_tick+0x357
softclock(0) at softclock+0x123
softintr_dispatch(0) at softintr_dispatch+0x11e
Xsoftclock(0,0,1388,0,ffff800000021800,ffffffff81d0b6d0) at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x281
sched_idle(ffffffff81d0aff0) at sched_idle+0x235
end trace frame: 0x0, count: 249
End of stack trace.


i don't know is this serious or not, i'm just sending report here for
the record.

from misc@ https://www.mail-archive.com/misc@.../msg165596.html


log with "option BRIDGESTP_DEBUG" :

bstp: state changed to DISCARDING on pair0
bstp: pair0 -> TC_INACTIVE
bstp: state changed to DISCARDING on pair2
bstp: pair2 -> TC_INACTIVE
bstp: state changed to DISCARDING on pair1
bstp: pair1 -> TC_INACTIVE
bstp: state changed to DISCARDING on pair3
bstp: pair3 -> TC_INACTIVE
bstp: pair0 role -> DESIGNATED
bstp: pair0 -> DESIGNATED_SYNCED
bstp: pair0 -> DESIGNATED_PROPOSE
bstp: pair1 role -> DESIGNATED
bstp: pair1 -> DESIGNATED_SYNCED
bstp: pair1 -> DESIGNATED_PROPOSE
bstp: pair2 role -> DESIGNATED
bstp: pair2 -> DESIGNATED_SYNCED
bstp: pair2 -> DESIGNATED_PROPOSE
bstp: pair3 role -> DESIGNATED
bstp: pair3 -> DESIGNATED_SYNCED
bstp: pair3 -> DESIGNATED_PROPOSE
bstp: pair2 role -> ALT/BACK/DISABLED
bstp: pair3 role -> ALT/BACK/DISABLED
bstp: pair1 role -> ROOT
bstp: pair1 -> ROOT_REROOT
bstp: pair1 -> ROOT_AGREED
bstp: state changed to LEARNING on pair1
bstp: pair1 -> TC_LEARNING
bstp: pair1 -> ROOT_AGREED
bstp: state changed to FORWARDING on pair1
bstp: pair1 -> ROOT_REROOTED
bstp: pair1 -> TC_DETECTED
bstp: pair1 -> ROOT_AGREED
bstp: pair1 -> ROOT_AGREED
bstp: pair1 -> ROOT_AGREED
bstp: pair1 -> ROOT_AGREED
bstp: state changed to FORWARDING on pair0
bstp: pair0 -> TC_LEARNING
bstp: state changed to DISCARDING on pair2
bstp: pair2 -> TC_INACTIVE
bstp: pair3 role -> DESIGNATED
bstp: pair3 -> DESIGNATED_RETIRED
bstp: pair3 -> DESIGNATED_SYNCED
bstp: pair3 -> DESIGNATED_PROPOSE
bstp: pair2 role -> DESIGNATED
bstp: pair2 -> DESIGNATED_SYNCED
bstp: pair2 -> DESIGNATED_PROPOSE
bstp: pair0 -> TC_DETECTED
bstp: pair3 role -> ALT/BACK/DISABLED
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair1 -> TC_TC
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair1 -> TC_TC
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair3 -> ALTERNATE_AGREED
bstp: state changed to FORWARDING on pair2
bstp: pair2 -> TC_LEARNING
bstp: pair0 -> TC_LEARNING
bstp: pair3 role -> ROOT
bstp: pair1 role -> ALT/BACK/DISABLED
bstp: state changed to DISCARDING on pair1
bstp: pair1 -> TC_LEARNING
bstp: pair3 -> ROOT_REROOT
bstp: state changed to LEARNING on pair3
bstp: pair3 -> TC_LEARNING
bstp: pair1 -> ALTERNATE_PORT
bstp: pair1 -> TC_INACTIVE
bstp: state changed to FORWARDING on pair3
bstp: pair3 -> ROOT_REROOTED
bstp: pair3 -> TC_DETECTED
bstp: state changed to DISCARDING on pair3
bstp: pair3 role -> ALT/BACK/DISABLED
bstp: pair3 -> TC_LEARNING
bstp: pair1 role -> ROOT
bstp: pair3 -> TC_INACTIVE
bstp: state changed to DISCARDING on pair2
bstp: pair2 role -> ALT/BACK/DISABLED
bstp: pair2 -> TC_INACTIVE
bstp: pair1 -> ROOT_REROOT
bstp: state changed to LEARNING on pair1
bstp: pair1 -> TC_LEARNING
bstp: state changed to FORWARDING on pair1
bstp: pair1 -> ROOT_REROOTED
bstp: pair1 -> TC_DETECTED
bstp: pair0 -> TC_DETECTED
bstp: pair1 -> TC_TC
bstp: pair0 -> TC_TC
bstp: pair1 -> TC_TC
bstp: pair0 -> TC_LEARNING
bstp: state changed to DISCARDING on pair3
bstp: pair3 -> TC_INACTIVE
bstp: pair2 role -> DESIGNATED
bstp: pair2 -> DESIGNATED_SYNCED
bstp: state changed to FORWARDING on pair2
bstp: pair2 -> TC_LEARNING
bstp: pair3 role -> DESIGNATED
bstp: pair3 -> DESIGNATED_SYNCED
bstp: pair3 -> DESIGNATED_PROPOSE
bstp: pair2 -> TC_DETECTED
bstp: pair0 -> TC_LEARNING
bstp: pair0 -> TC_DETECTED
bstp: pair3 role -> ALT/BACK/DISABLED
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair3 role -> ROOT
bstp: pair1 role -> ALT/BACK/DISABLED
bstp: state changed to DISCARDING on pair1
bstp: pair1 -> TC_LEARNING
bstp: pair3 -> ROOT_REROOT
bstp: state changed to LEARNING on pair3
bstp: pair3 -> TC_LEARNING
bstp: pair1 -> ALTERNATE_PORT
bstp: pair1 -> TC_INACTIVE
bstp: pair2 -> TC_PROPAG
bstp: state changed to FORWARDING on pair3
bstp: pair3 -> ROOT_REROOTED
bstp: pair3 -> TC_DETECTED
bstp: pair2 -> TC_TC
splassert: bstp_notify_rtage: want 2 have 0
Starting stack trace...
bstp_set_port_tc(ffff8000004e0600,5) at bstp_set_port_tc+0x1ed
bstp_update_tc(ffff8000004e0600) at bstp_update_tc+0x28d
bstp_tick(ffff800000159000) at bstp_tick+0x377
softclock(0) at softclock+0x123
softintr_dispatch(0) at softintr_dispatch+0x11e
Xsoftclock(0,0,1388,0,ffff800000021800,ffffffff81d2a6d0) at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x281
sched_idle(ffffffff81d29ff0) at sched_idle+0x235
end trace frame: 0x0, count: 249
End of stack trace.
bstp: pair0 -> TC_PROPAG
bstp: pair3 -> TC_TC
bstp: pair2 -> TC_TC
bstp: pair0 -> TC_LEARNING
bstp: pair2 -> TC_LEARNING
bstp: state changed to DISCARDING on pair3
bstp: pair3 role -> ALT/BACK/DISABLED
bstp: pair3 -> TC_LEARNING
bstp: pair1 role -> ROOT
bstp: pair3 -> TC_INACTIVE
bstp: state changed to DISCARDING on pair2
bstp: pair2 role -> ALT/BACK/DISABLED
bstp: pair2 -> TC_INACTIVE
bstp: pair1 -> ROOT_REROOT
bstp: state changed to LEARNING on pair1
bstp: pair1 -> TC_LEARNING
bstp: state changed to FORWARDING on pair1
bstp: pair1 -> ROOT_REROOTED
bstp: pair1 -> TC_DETECTED
bstp: pair0 -> TC_LEARNING
bstp: pair0 -> TC_DETECTED
bstp: pair1 -> TC_TC
bstp: pair1 -> TC_TC
bstp: pair0 -> TC_TC
bstp: state changed to DISCARDING on pair3
bstp: pair3 -> TC_INACTIVE
bstp: pair2 role -> DESIGNATED
bstp: pair2 -> DESIGNATED_SYNCED
bstp: state changed to FORWARDING on pair2
bstp: pair2 -> TC_LEARNING
bstp: pair3 role -> DESIGNATED
bstp: pair3 -> DESIGNATED_SYNCED
bstp: pair3 -> DESIGNATED_PROPOSE
bstp: pair2 -> TC_DETECTED
bstp: pair0 -> TC_PROPAG
bstp: pair3 role -> ALT/BACK/DISABLED
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair3 role -> ROOT
bstp: pair1 role -> ALT/BACK/DISABLED
bstp: state changed to DISCARDING on pair1
bstp: pair1 -> TC_LEARNING
bstp: pair3 -> ROOT_REROOT
bstp: state changed to LEARNING on pair3
bstp: pair3 -> TC_LEARNING
bstp: pair1 -> ALTERNATE_PORT
bstp: pair1 -> TC_LEARNING
bstp: state changed to FORWARDING on pair3
bstp: pair3 -> ROOT_REROOTED
bstp: pair3 -> TC_DETECTED
bstp: pair1 -> TC_LEARNING
bstp: pair2 -> TC_TC
splassert: bstp_notify_rtage: want 2 have 256
Starting stack trace...
bstp_set_port_tc(ffff8000004e0600,5) at bstp_set_port_tc+0x1ed
bstp_update_tc(ffff8000004e0600) at bstp_update_tc+0x28d
bstp_tick(ffff800000159000) at bstp_tick+0x377
softclock(0) at softclock+0x123
softintr_dispatch(0) at softintr_dispatch+0x11e
Xsoftclock(0,0,1388,0,ffff800000021800,ffffffff81d2a6d0) at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x281
sched_idle(ffffffff81d29ff0) at sched_idle+0x235
end trace frame: 0x0, count: 249
End of stack trace.
bstp: pair0 -> TC_PROPAG
bstp: pair1 -> TC_INACTIVE
bstp: pair3 -> TC_TC
bstp: pair0 -> TC_LEARNING
bstp: pair2 -> TC_TC
bstp: pair0 -> TC_LEARNING
bstp: state changed to DISCARDING on pair3
bstp: pair3 role -> ALT/BACK/DISABLED
bstp: pair3 -> TC_LEARNING
bstp: pair1 role -> ROOT
bstp: pair3 -> TC_INACTIVE
bstp: state changed to DISCARDING on pair2
bstp: pair2 role -> ALT/BACK/DISABLED
bstp: pair2 -> TC_LEARNING
bstp: pair2 -> TC_INACTIVE
bstp: pair1 -> ROOT_REROOT
bstp: state changed to LEARNING on pair1
bstp: pair1 -> TC_LEARNING
bstp: state changed to FORWARDING on pair1
bstp: pair1 -> ROOT_REROOTED
bstp: pair1 -> TC_DETECTED
bstp: pair0 -> TC_LEARNING
bstp: pair0 -> TC_DETECTED
bstp: pair1 -> TC_TC
bstp: pair1 -> TC_TC
bstp: pair0 -> TC_TC
bstp: pair0 -> TC_LEARNING
bstp: pair2 role -> DESIGNATED
bstp: pair2 -> DESIGNATED_SYNCED
bstp: pair2 -> DESIGNATED_PROPOSE
bstp: state changed to DISCARDING on pair3
bstp: pair3 -> TC_INACTIVE
bstp: pair3 role -> DESIGNATED
bstp: pair3 -> DESIGNATED_SYNCED
bstp: pair3 -> DESIGNATED_PROPOSE
bstp: pair0 -> TC_DETECTED
bstp: pair1 -> TC_TC
bstp: pair3 -> DESIGNATED_SYNCED
bstp: pair3 -> DESIGNATED_PROPOSE
bstp: pair3 role -> ALT/BACK/DISABLED
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair1 -> TC_TC
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair3 -> ALTERNATE_AGREED
bstp: state changed to LEARNING on pair2
bstp: pair2 -> TC_LEARNING
bstp: pair3 -> ALTERNATE_AGREED
bstp: pair3 role -> ROOT
bstp: pair1 role -> ALT/BACK/DISABLED
bstp: state changed to DISCARDING on pair1
bstp: pair1 -> TC_LEARNING
bstp: pair3 -> ROOT_REROOT
bstp: state changed to LEARNING on pair3
bstp: pair3 -> TC_LEARNING
bstp: pair1 -> ALTERNATE_PORT
bstp: pair1 -> TC_INACTIVE
bstp: state changed to FORWARDING on pair3
bstp: pair3 -> ROOT_REROOTED
bstp: pair3 -> TC_DETECTED
bstp: pair2 -> TC_LEARNING
bstp: state changed to FORWARDING on pair2
bstp: pair2 -> TC_DETECTED
splassert: bstp_notify_rtage: want 2 have 256
Starting stack trace...
bstp_set_port_tc(ffff8000004e0600,5) at bstp_set_port_tc+0x1ed
bstp_update_tc(ffff8000004e0600) at bstp_update_tc+0x28d
bstp_tick(ffff800000159000) at bstp_tick+0x377
softclock(0) at softclock+0x123
softintr_dispatch(0) at softintr_dispatch+0x11e
Xsoftclock(0,0,1388,0,ffff800000021800,ffffffff81d2a6d0) at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x281
sched_idle(ffffffff81d29ff0) at sched_idle+0x235
end trace frame: 0x0, count: 249
End of stack trace.
bstp: pair0 -> TC_PROPAG
bstp: pair0 -> TC_LEARNING
bstp: pair3 -> TC_TC
bstp: pair2 -> TC_TC
bstp: pair0 -> TC_LEARNING
bstp: pair2 -> TC_LEARNING

Reply | Threaded
Open this post in threaded view
|

Re: splassert: bstp_notify_rtage

Martin Pieuchot
Hello,

On 24/03/19(Sun) 01:00, Hrvoje Popovski wrote:

> Hi all,
>
> while playing around with stp and pair interfaces and using exactly the
> same example as in man (4) pair
>
> ifconfig pair0 up
> ifconfig pair1 rdomain 1 patch pair0 up
> ifconfig pair2 up
> ifconfig pair3 rdomain 1 patch pair2 up
> ifconfig bridge0 add pair0 add pair2 stp pair0 stp pair2 up
> ifconfig bridge1 add pair1 add pair3 stp pair1 stp pair3 up
>
> and while destroying/creating stp root pair interfaces with
> kern.pool_debug=1 and kern.splassert=2 i'm getting this traces
>
> splassert: bstp_notify_rtage: want 2 have 0
> Starting stack trace...
> bstp_update_tc(ffff8000004e0c00) at bstp_update_tc+0x338
> bstp_tick(ffff800000159700) at bstp_tick+0x357
> softclock(0) at softclock+0x123
> softintr_dispatch(0) at softintr_dispatch+0x11e
> Xsoftclock(0,0,1388,0,ffff800000021800,ffffffff81d0b6d0) at Xsoftclock+0x1f
> acpicpu_idle() at acpicpu_idle+0x281
> sched_idle(ffffffff81d0aff0) at sched_idle+0x235
> end trace frame: 0x0, count: 250
> End of stack trace.

It's an incorrect assert.  What's currently protecting all the bridge
data structures is the KERNEL_LOCK().  Does the diff below help?

Index: net/bridgestp.c
===================================================================
RCS file: /cvs/src/sys/net/bridgestp.c,v
retrieving revision 1.67
diff -u -p -r1.67 bridgestp.c
--- net/bridgestp.c 7 Dec 2018 16:17:51 -0000 1.67
+++ net/bridgestp.c 29 Mar 2019 14:31:48 -0000
@@ -1584,7 +1584,7 @@ bstp_notify_rtage(struct bstp_port *bp,
 {
  int age = 0;
 
- NET_ASSERT_LOCKED();
+ KERNEL_ASSERT_LOCKED();
 
  switch (bp->bp_protover) {
  case BSTP_PROTO_STP:

Reply | Threaded
Open this post in threaded view
|

Re: splassert: bstp_notify_rtage

Hrvoje Popovski
On 29.3.2019. 15:32, Martin Pieuchot wrote:

> Hello,
>
> On 24/03/19(Sun) 01:00, Hrvoje Popovski wrote:
>> Hi all,
>>
>> while playing around with stp and pair interfaces and using exactly the
>> same example as in man (4) pair
>>
>> ifconfig pair0 up
>> ifconfig pair1 rdomain 1 patch pair0 up
>> ifconfig pair2 up
>> ifconfig pair3 rdomain 1 patch pair2 up
>> ifconfig bridge0 add pair0 add pair2 stp pair0 stp pair2 up
>> ifconfig bridge1 add pair1 add pair3 stp pair1 stp pair3 up
>>
>> and while destroying/creating stp root pair interfaces with
>> kern.pool_debug=1 and kern.splassert=2 i'm getting this traces
>>
>> splassert: bstp_notify_rtage: want 2 have 0
>> Starting stack trace...
>> bstp_update_tc(ffff8000004e0c00) at bstp_update_tc+0x338
>> bstp_tick(ffff800000159700) at bstp_tick+0x357
>> softclock(0) at softclock+0x123
>> softintr_dispatch(0) at softintr_dispatch+0x11e
>> Xsoftclock(0,0,1388,0,ffff800000021800,ffffffff81d0b6d0) at Xsoftclock+0x1f
>> acpicpu_idle() at acpicpu_idle+0x281
>> sched_idle(ffffffff81d0aff0) at sched_idle+0x235
>> end trace frame: 0x0, count: 250
>> End of stack trace.
>
> It's an incorrect assert.  What's currently protecting all the bridge
> data structures is the KERNEL_LOCK().  Does the diff below help?

Yes it helps. With this diff i can't reproduce traces ..

Tnx ..