Hi Jorge Nuno Loura, Yes, the patricia module is not thread safe. The library uses the patricia module must protect the tree. In this case the agent of Lock Service must protect it, but it forgot. The Lock Service has not been by anyone. You could raise a ticket and send a patch to fix it.
Best regards, Hieu -----Original Message----- From: Jorge Nuno Loura <jorge-n-lo...@alticelabs.com> Sent: Tuesday, June 8, 2021 5:59 PM To: opensaf-users@lists.sourceforge.net Subject: [users] Is patricia module thread safe? Hi, My application is multithreaded and uses the Lock Service. It executes locks/unlocks on multiple lock objects simultaneously. And very easly I got a crash. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x7693059c in search () from /usr/local/lib/libopensaf_core.so.0 [Current thread is 1 (Thread 0x53cff400 (LWP 2164))] (gdb) bt #0 0x7693059c in search () from /usr/local/lib/libopensaf_core.so.0 #1 0x769308d0 in ncs_patricia_tree_add () from /usr/local/lib/libopensaf_core.so.0 #2 0x76e9ffb4 in gla_lock_tree_find_and_add () from /usr/local/lib/libSaLck.so.0 #3 0x76e9bf50 in saLckResourceLock () from /usr/local/lib/libSaLck.so.0 I added a mutex to protect each patricia tree and the problem does not happen anymore. Does this change make sense? Regards, _______________________________________________ Opensaf-users mailing list Opensaf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-users _______________________________________________ Opensaf-users mailing list Opensaf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-users