-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPF in orchagent. ACL counters related code #201
Comments
@qiluo-msft , can you take a look at this issue? |
[Thread debugging using libthread_db enabled] |
This commit is to mitigate the issue #201.
Is there any steps to reproduce? Do you observe this crash during some test? |
Can you attach or share logs with me? |
Problem is in incorrect usage of thread class in AclOrch class. Thread is initialized and started in a middle of "AclOrch" class object construction. After thread starts it reads AclOrch object members. Due to race condition in some cases thread reads AclOrch object members before they are initialized. I was able to simulate race condition by adding additional member with long term creation between thread and other members of AclOrch class. This allowed me achieve 100% reproducibility rate. Patch that allows to reproduce the issue is the following:
|
…ound in map!" (sonic-net#201) Attribute SAI_QUEUE_ATTR_INDEX added into attribute map for object type SAI_OBJECT_TYPE_QUEUE Signed-off-by: Denis Maslov <[email protected]>
sonic-net#201) First-cut changes to provide platform independent support for different transceivers in SONiC platforms.
Reading symbols from /usr/bin/orchagent...Reading symbols from /usr/lib/debug/.build-id/ef/36e12d55ea2b4540a35abab394a233817622dc.debug...bdone.
done.
t[New LWP 108]
[New LWP 97]
[New LWP 107]
[New LWP 105]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `orchagent -m 90:b1:1c:f4:a8:51'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000000046a139 in pair (this=0x7f1b1fffee50)
at /usr/include/c++/4.9/bits/stl_pair.h:127
127 /usr/include/c++/4.9/bits/stl_pair.h: No such file or directory.
(gdb) bt
#0 0x000000000046a139 in pair (this=0x7f1b1fffee50)
at /usr/include/c++/4.9/bits/stl_pair.h:127
#1 AclOrch::collectCountersThread (pAclOrch=0x2387690) at aclorch.cpp:1315
#2 0x00007f1b25a7f970 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007f1b26825064 in start_thread (arg=0x7f1b1ffff700) at pthread_create.c:309
#4 0x00007f1b251ef62d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
The text was updated successfully, but these errors were encountered: