Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Apr 2015 03:02:06 +0000 (UTC)
From:      Benjamin Kaduk <bjk@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r46553 - head/en_US.ISO8859-1/htdocs/news/status
Message-ID:  <201504150302.t3F326d4075529@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bjk
Date: Wed Apr 15 03:02:06 2015
New Revision: 46553
URL: https://svnweb.freebsd.org/changeset/doc/46553

Log:
  Add report on loading libthr dynamically
  
  Approved by:	hrs (mentor, implicit)

Modified:
  head/en_US.ISO8859-1/htdocs/news/status/report-2015-01-2015-03.xml

Modified: head/en_US.ISO8859-1/htdocs/news/status/report-2015-01-2015-03.xml
==============================================================================
--- head/en_US.ISO8859-1/htdocs/news/status/report-2015-01-2015-03.xml	Wed Apr 15 02:23:52 2015	(r46552)
+++ head/en_US.ISO8859-1/htdocs/news/status/report-2015-01-2015-03.xml	Wed Apr 15 03:02:06 2015	(r46553)
@@ -1802,4 +1802,53 @@ WITHOUT_FORTH=y</pre>
 
     <sponsor>The &os; Foundation</sponsor>
   </project>
+
+  <project cat='bin'>
+    <title>libthr improvements</title>
+
+    <contact>
+      <person>
+	<name>
+	  <given>Konstantin</given>
+	  <common>Belousov</common>
+	</name>
+	<email>kib@FreeBSD.org</email>
+      </person>
+    </contact>
+
+    <body>
+      <p>Historically, dynamic loading of the libthr.so thread
+	library into a single-threaded process did not work in &os;.
+	The longstanding recommendation to work-around the problem has
+	been to always link the main binary with -lpthread if there was
+	any chance of a need for threading functionality.  This project
+	converted libthr.so into a plugin for libc, which fixed the
+	known issues preventing dynaic loading of libthr.so.</p>
+
+      <p>After the fix, linking the main binary with -lpthread is
+	no longer requred, but is not harmful.  I recommend thoroughly
+	testing before removing libpthread from the libraries list in
+	favor of dynamic loading, though.  Note that potential problems
+	will be subtle and their user-visible manifestations in the
+	affected program even more surprising.</p>
+
+      <p>The following issues were present in the old version of
+	libthr with respect to dynamic loading, but are fixed as
+	a result of this work:</p>
+
+      <ul>
+	<li>Invalid errno value seen after failed syscalls.</li>
+	<li>Broken libthr internal locks and critical sections ignored
+	  by signals.</li>
+	<li>Hung attempts to lock mutexes.</li>
+	<li>Thread cancellation not occuring at guaranteed cancellation
+	  points.</li>
+      </ul>
+
+      <p>The main change was committed as r276630 to HEAD, with many
+	follow ups.  It was merged to stable/10 in r277317.</p>
+    </body>
+
+    <sponsor>The &os; Foundation</sponsor>
+  </project>
 </report>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504150302.t3F326d4075529>