I have a few thoughts.

Are you sure that __nr_readers is actually the number of readers?  Some
implementation of locks bias their counts so that -1 means zero.

What error did pthread_rwlock_rdlock() report?

OVS 2.6 is not an important or a recent branch.  It would be easier to
provide support for a more recent branch.  Even within the 2.6.x series,
2.6.1 is old.

Thanks,

Ben.

On Sun, Apr 28, 2019 at 09:54:45AM +0800, 夏宇 wrote:
> Hello OVS team,
> 
> 
> I have a ovs-vswitched crash of ovs version 2.6.1. From the backtrace I could 
> see that the crash is because of __nr_readers overflow. 
> 
> 
> 
> (gdb) bt
> #0  0x00007f31539f71d7 in __GI_raise (sig=sig@entry=6) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1  0x00007f31539f88c8 in __GI_abort () at abort.c:90
> #2  0x00007f31558287ae in ovs_abort_valist (err_no=<optimized out>, 
> format=<optimized out>, args=args@entry=0x7f30a3ff9f20) at lib/util.c:335
> #3  0x00007f3155828844 in ovs_abort (err_no=<optimized out>, 
> format=format@entry=0x7f31558ea6b0 "%s: pthread_%s_%s failed") at 
> lib/util.c:327
> #4  0x00007f31557fb162 in ovs_rwlock_rdlock_at (l_=0x7f3156ff5d98, 
> where=where@entry=0x7f31558d2420 "ofproto/ofproto-dpif-xlate.c:2152") at 
> lib/ovs-thread.c:77
> #5  0x00007f3155763e37 in update_learning_table (xbridge=0x7f31570583c0, 
> flow=0x7f3094006ec0, wc=0x7f30a3ffa0b0, vlan=2226, in_xbundle=0x7f3156fdf240)
>     at ofproto/ofproto-dpif-xlate.c:2152
> #6  0x00007f3155765b89 in xlate_cache_normal (ofproto=<optimized out>, 
> flow=0x7f3094006ec0, vlan=2226) at ofproto/ofproto-dpif-xlate.c:5857
> #7  0x00007f315576def0 in xlate_push_stats (xcache=<optimized out>, 
> stats=stats@entry=0x7f30a3ffa3f0) at ofproto/ofproto-dpif-xlate.c:5898
> #8  0x00007f315575f282 in revalidate_ukey (udpif=udpif@entry=0x7f3156fe4420, 
> ukey=ukey@entry=0x7f30d0007c90, stats=stats@entry=0x7f30a3ffcc58, 
>     odp_actions=odp_actions@entry=0x7f30a3ffaee0, 
> reval_seq=reval_seq@entry=8575315723, recircs=recircs@entry=0x7f30a3ffaed0) 
> at ofproto/ofproto-dpif-upcall.c:1844
> #9  0x00007f3155761ad4 in revalidate (revalidator=0x7f3156fc8008) at 
> ofproto/ofproto-dpif-upcall.c:2199
> #10 0x00007f3155761dcb in udpif_revalidator (arg=0x7f3156fc8008) at 
> ofproto/ofproto-dpif-upcall.c:881
> #11 0x00007f31557fb066 in ovsthread_wrapper (aux_=<optimized out>) at 
> lib/ovs-thread.c:342
> #12 0x00007f31546ebdc5 in start_thread (arg=0x7f30a3fff700) at 
> pthread_create.c:308
> #13 0x00007f3153ab976d in clone () at 
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
> (gdb) frame 4
> #4  0x00007f31557fb162 in ovs_rwlock_rdlock_at (l_=0x7f3156ff5d98, 
> where=where@entry=0x7f31558d2420 "ofproto/ofproto-dpif-xlate.c:2152") at 
> lib/ovs-thread.c:77
> 77    LOCK_FUNCTION(rwlock, rdlock)
> (gdb) p * l
> $2 = {lock = {__data = {__lock = 0, __nr_readers = 4294967295, 
> __readers_wakeup = 72951523, __writer_wakeup = 128782028, __nr_readers_queued 
> = 0, __nr_writers_queued = 0, 
>       __writer = 0, __shared = 0, __pad1 = 0, __pad2 = 0, __flags = 0}, 
> __size = "\000\000\000\000\377\377\377\377\343&Y\004\314\016\255\a", '\000' 
> <repeats 39 times>, 
>     __align = -4294967296}, where = 0x7f31558cb9de "<unlocked>"}
> 
> 
> ovs-vswitchd --version
> ovs-vswitchd (Open vSwitch) 2.6.1
> 
> 
> cat /proc/version 
> Linux version 3.10.0-514.26.2.el7.x86_64 ([email protected]) 
> (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Jul 4 
> 15:04:05 UTC 2017
> 
> 
> 
> 
> 

> _______________________________________________
> discuss mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to