From owner-svn-doc-head@FreeBSD.ORG Wed Apr 15 03:02:07 2015 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2243A17A; Wed, 15 Apr 2015 03:02:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7943CBB; Wed, 15 Apr 2015 03:02:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3F326nF075530; Wed, 15 Apr 2015 03:02:06 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3F326d4075529; Wed, 15 Apr 2015 03:02:06 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201504150302.t3F326d4075529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Wed, 15 Apr 2015 03:02:06 +0000 (UTC) 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 X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2015 03:02:07 -0000 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 The &os; Foundation + + + libthr improvements + + + + + Konstantin + Belousov + + kib@FreeBSD.org + + + + +

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.

+ +

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.

+ +

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:

+ +
    +
  • Invalid errno value seen after failed syscalls.
  • +
  • Broken libthr internal locks and critical sections ignored + by signals.
  • +
  • Hung attempts to lock mutexes.
  • +
  • Thread cancellation not occuring at guaranteed cancellation + points.
  • +
+ +

The main change was committed as r276630 to HEAD, with many + follow ups. It was merged to stable/10 in r277317.

+ + + The &os; Foundation +