After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733065 - thread_specific_ptr + dlclose library causes a SIGSEGV.
thread_specific_ptr + dlclose library causes a SIGSEGV.
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: general
2.40.x
Other Linux
: Normal major
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-07-11 14:23 UTC by qubicz
Modified: 2017-12-11 11:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample to reproduce issue (463 bytes, text/plain)
2014-07-11 14:23 UTC, qubicz
Details

Description qubicz 2014-07-11 14:23:46 UTC
Created attachment 280506 [details]
Sample to reproduce issue

This issue is similar to
https://svn.boost.org/trac/boost/ticket/3926

spawn thread
dlopen a shared library which uses libglib
dlclose the library
terminate the thread

observe the gpf:

Program received signal SIGSEGV, Segmentation fault.

Thread 140737343592192 (LWP 24044)

  • #0 ??
  • #1 __nptl_deallocate_tsd
    at pthread_create.c line 158
  • #2 start_thread
    at pthread_create.c line 325
  • #3 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

To reproduce please run attached sample:
gcc main.c -lpthread -ldl -g -o main && ./main

Looks like libglib doesn't clean up pthread key, since pthread_key_delete(1) solves the issue for me.

Another similar issue:
https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/730232/comments/5
Comment 1 Colin Walters 2014-07-11 15:01:28 UTC
We don't support dlclose on libgobject or above (including gio, gtk+).
Comment 3 Philip Withnall 2017-12-11 11:23:54 UTC
*** Bug 791462 has been marked as a duplicate of this bug. ***