*After compiled ovs with clang, I experience the crash:*

[430100.705907] openvswitch: Open vSwitch switching datapath 2.1.90, built
Mar 19 2014 09:22:17
[430101.140122] ovsdb-server[27292]: segfault at 0 ip 000000000045b3a3 sp
00007fffb8a3e100 error 4 in ovsdb-server[400000+c7000]
[430101.142000] ovs-vsctl[27294]: segfault at 0 ip 000000000041c6f3 sp
00007fff877c0f60 error 4 in ovs-vsctl[400000+eb000]
[430101.216383] ovs-vswitchd[27297]: segfault at 0 ip 000000000049eaf3 sp
00007fffe9524db0 error 4 in ovs-vswitchd[400000+13d000]

*GDB output:*

root@server329:~/openvswitch# gdb ovs-vswitchd
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/local/sbin/ovs-vswitchd...done.
(gdb) run
Starting program: /usr/local/sbin/ovs-vswitchd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
seq_read (seq=0x0) at lib/seq.c:121
121         value = seq->value;
(gdb) where
#0  seq_read (seq=0x0) at lib/seq.c:121
#1  0x000000000048e11d in ovsrcu_quiesce () at lib/ovs-rcu.c:130
#2  0x00000000004a8f35 in time_poll (pollfds=0x762e60, n_pollfds=<optimized
out>, handles=0x19b01d02,
    timeout_when=0, elapsed=0x7fffffffe4f4) at lib/timeval.c:291
#3  0x000000000049b51a in poll_block () at lib/poll-loop.c:312
#4  0x000000000040de01 in main (argc=1, argv=0x7fffffffe668) at
vswitchd/ovs-vswitchd.c:122


*Tentative fix:*

diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c
index ac4513b..0f427c8 100644
--- a/lib/ovs-rcu.c
+++ b/lib/ovs-rcu.c
@@ -127,6 +127,8 @@ ovsrcu_quiesce_start(void)
 void
 ovsrcu_quiesce(void)
 {
+    ovsrcu_init();
+
     ovsrcu_perthread_get()->seqno = seq_read(global_seqno);
     seq_change(global_seqno);
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to