openhpi2 / openhpi_bug_test

0 stars 0 forks source link

Destroying the locked mutex #1869

Closed openhpi2 closed 8 years ago

openhpi2 commented 9 years ago

Locked mutex is getting destroyed. and below is the problem captured by the valgrind.

==6497== Thread 1: ==6497== Destroying locked mutex: mutex 0x7af6ba0, recursion count 1, owner 1. ==6497== at 0x4C3162B: pthread_mutex_destroy (in /usr/lib/valgrind/vgpreload_drd-amd64-linux.so) ==6497== by 0x5C3459B: g_mutex_clear (gthread-posix.c:114) ==6497== by 0x4E68A6D: wrap_g_static_mutex_free_clear (sahpi_wrappers.c:273) ==6497== by 0x527DE8B: thread_cleanup (oh_ssl.c:295) ==6497== by 0x527DF4D: oh_ssl_finit (oh_ssl.c:364) ==6497== by 0x41419A: oh_finit (init.c:216) ==6497== by 0x4128FB: main (openhpid-posix.cpp:442) ==6497== mutex 0x7af6ba0 was first observed at: ==6497== at 0x4C3107F: pthread_mutex_init (in /usr/lib/valgrind/vgpreload_drd-amd64-linux.so) ==6497== by 0x5C342E6: g_mutex_impl_new (gthread-posix.c:101) ==6497== by 0x5C34384: g_mutex_get_impl (gthread-posix.c:125) ==6497== by 0x5C345B8: g_mutex_lock (gthread-posix.c:210) ==6497== by 0x4E68AA1: wrap_g_static_mutex_lock (sahpi_wrappers.c:289) ==6497== by 0x527DB6C: lock_function (oh_ssl.c:142) ==6497== by 0x6F3B78E: SSL_get_ex_data_X509_STORE_CTX_idx (in /lib/x86_64-linux-gnu/libssl.so.1.0.0) ==6497== by 0x6F38906: SSL_CTX_new (in /lib/x86_64-linux-gnu/libssl.so.1.0.0) ==6497== by 0x527DF82: oh_ssl_ctx_init (oh_ssl.c:399) ==6497== by 0x7F1D792: soap_open (oa_soap_callsupport.c:534) ==6497== by 0x7ECCDA1: get_oa_state (oa_soap_utils.c:258) ==6497== by 0x7ECCA2F: get_oa_soap_info (oa_soap_utils.c:151) ==6497==

Reported by: hemanthreddy

openhpi2 commented 9 years ago

Below is the fix for this issue

Index: ssl/oh_ssl.c

--- ssl/oh_ssl.c (revision 7613) +++ ssl/oh_ssl.c (working copy) @@ -292,6 +292,7 @@ g_free(mutexes); mutexes = NULL; }

Original comment by: hemanthreddy

openhpi2 commented 9 years ago

Fixed in Trunk Rev. 7618

Original comment by: hemanthreddy

openhpi2 commented 9 years ago

Diff:


--- old
+++ new
@@ -1,4 +1,3 @@
-
 Locked mutex is getting destroyed. and below is the problem captured by the valgrind.

 ==6497== Thread 1:

Original comment by: hemanthreddy

openhpi2 commented 9 years ago

Original comment by: dr_mohan