-
Notifications
You must be signed in to change notification settings - Fork 26
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
occasional :-) coredump #30
Comments
ouch, I'm afraid I cannot do much without the symbols |
a bit of a long shot, but perhaps the "key" value was NULL? in that case af87627 should fix it |
Thank you very much !! will try it.
|
Dear Mr. Zandbelt,
Just to inform you…
I got another coredump (see below).
My investigation shows that in the source of “oauth2_url_decode” uses these static variables
static CURL *_s_curl = NULL;
static oauth2_uint_t _curl_refcount = 0;
I assume that my problem may arise from thread parallelism which leads to a double free in my example …
(My logfiles harden this theory: two request verify tokens almost simutaneusly (~11microseconds distance))
Now I simply protected the whole token verification with a mutex.
Hopefully no complications any more (I am optimistic).
Thank you again for having a look at those nasty stacktrace from the stripped binary ;-)
Oliver
```
(gdb) where
#0 0x00007fae05dc0247 in raise () from /lib64/libc.so.6
#1 0x00007fae05dc161a in abort () from /lib64/libc.so.6
#2 0x00007fae05dff4a4 in __libc_message () from /lib64/libc.so.6
#3 0x00007fae05e04916 in malloc_printerr () from /lib64/libc.so.6
#4 0x00007fae05e0575b in _int_free () from /lib64/libc.so.6
#5 0x00007fae069e4d13 in ?? () from /appl/local/carmen/carmena4/lib/A214INT/libcurl.so.4
#6 0x00007fae069f1d3a in curl_easy_cleanup () from /appl/local/carmen/carmena4/lib/A214INT/libcurl.so.4
#7 0x00007fae07975831 in oauth2_url_decode ()
from /appl/local/carmen/carmena4/lib/A214DOR/libdor_appsoauth.so.214.0
#8 0x00007fae07976206 in _oauth2_nv_list_parse ()
from /appl/local/carmen/carmena4/lib/A214DOR/libdor_appsoauth.so.214.0
#9 0x00007fae079764a6 in oauth2_parse_form_encoded_params ()
from /appl/local/carmen/carmena4/lib/A214DOR/libdor_appsoauth.so.214.0
#10 0x00007fae07963285 in oauth2_cfg_token_verify_add_options ()
from /appl/local/carmen/carmena4/lib/A214DOR/libdor_appsoauth.so.214.0
#11 0x00007fae0a058143 in TokenValidator::validate_token_with_jwks_uri(oauth2_log_t*, std::string const&, std::string const&) () from /appl/local/carmen/carmena4/lib/A214DOR/libdor_appsrest.so.214.0
```
Von: Hans Zandbelt ***@***.***>
Gesendet: Dienstag, 12. Oktober 2021 18:27
An: zmartzone/liboauth2 ***@***.***>
Cc: Gülden, Oliver ***@***.***>; Author ***@***.***>
Betreff: Re: [zmartzone/liboauth2] occasional :-) coredump (#30)
a bit of a long shot, but perhaps the "key" value was NULL? in that case this<af87627> should fix it
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#30 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWAXOWGUQCFBGUZTMF7QVYDUGROWBANCNFSM5F2QOUBA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
ok, I see, that is a multi-threading issue indeed; until I get around to protect that with a mutex internal to the library, the library is not multi-thread-safe indeed; thanks for reporting |
that was actually addressed in liboauth 1.4.4.1 |
Thank you very much for this great library.
Thank you very much for answering my previous question so fast!
Hopefully you have another hint for me ...
i recently got a coredump in our server (threaded c++ based on ms c++ restsdk).
am sorry ... but i am not able to provide any values here ... as the binary was stripped (sorry).
so i am not sure which of the two oauth2_log in oauth2_cache_get went wrong. (probably the second .. as it is dependent on the cache .. this is why i asked about thread-safety ... )
the server was running fine before this for 5 days .
any help is appreciated....
The text was updated successfully, but these errors were encountered: