Bug 196354 - Make libthr.so loadable
Summary: Make libthr.so loadable
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Konstantin Belousov
URL:
Keywords: feature, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2014-12-29 15:46 UTC by Konstantin Belousov
Modified: 2015-02-28 22:23 UTC (History)
1 user (show)

See Also:
koobs: exp-run?


Attachments
dlopenable libthr (141.82 KB, patch)
2014-12-29 15:46 UTC, Konstantin Belousov
no flags Details | Diff
libhtr_dlopen patch v2 (140.12 KB, patch)
2014-12-30 17:12 UTC, Konstantin Belousov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Belousov freebsd_committer freebsd_triage 2014-12-29 15:46:01 UTC
Created attachment 151071 [details]
dlopenable libthr

I request pre-commit exp-run for the patch which integrates libthr into libc as plugin, allowing dlopen("libpthread.so") to work instead of breaking the process which attempted it.  This should be very useful for programs which allow loadable modules, where modules may be linked with threading library.

I have somewhat low expectation on the detecting breakage from the build-only tests, but I think this is best we can do anyway.  Patch was extensively tested by Peter Holm with stress2.
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2014-12-29 16:12:29 UTC
Take for exp-run
Comment 2 Konstantin Belousov freebsd_committer freebsd_triage 2014-12-30 17:12:29 UTC
Created attachment 151127 [details]
libhtr_dlopen patch v2
Comment 3 Konstantin Belousov freebsd_committer freebsd_triage 2014-12-30 17:13:19 UTC
Previous version of the patch has significant issue with fork(2) in the threaded process.  Update should fix it.
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2015-01-03 10:01:27 UTC
Looks ok.
With the 1st patch,  lang/pike78 was hanging.
With the 2nd patch,  I couldn't find regressions.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2015-02-28 22:19:07 UTC
v2 landed as base r276630. Did you forget to close the bug or plan to continue?