Date: Sun, 2 Sep 2012 13:36:51 GMT From: Steven Lee <steven@roothosts.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/171252: net-p2p/bitcoin suffers a spinlock problem (fix included) Message-ID: <201209021336.q82DapEE020590@red.freebsd.org> Resent-Message-ID: <201209021340.q82De8AX002213@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 171252 >Category: ports >Synopsis: net-p2p/bitcoin suffers a spinlock problem (fix included) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 02 13:40:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Steven Lee >Release: 9.0-RELEASE-p3 >Organization: RootHosts, Inc. >Environment: FreeBSD devel1.roothosts.com.local 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #6: Sun Aug 26 05:38:45 MDT 2012 steven@devel1.roothosts.com.local:/sys/amd64/compile/DEVEL amd64 >Description: net-p2p/bitcoin seems to have the same spinlock problem as it does on OSX. I think the bug is somewhere inside of boost, but I am unable to locate it. >How-To-Repeat: Install net-p2p/bitcoin (GUI or console version) and let it connect to the network. After ~20 minutes the process will consume 100% CPU and stay there even when the debug log indicates that the process isn't busy. >Fix: Found the fix in util.h. The bitcoin developers had included a fix for OSX that works on FreeBSD. Attached is a patch against the latest port to simply enable the fix. Patch attached with submission follows: --- work/bitcoin-bitcoin-6e0c5e3/src/util.h.orig 2012-09-02 08:13:29.000000000 -0500 +++ work/bitcoin-bitcoin-6e0c5e3/src/util.h 2012-09-02 08:14:08.000000000 -0500 @@ -290,8 +290,6 @@ LeaveCritical(); \ } -#ifdef MAC_OSX -// boost::interprocess::interprocess_semaphore seems to spinlock on OSX; prefer polling instead class CSemaphore { private: @@ -328,9 +326,6 @@ val++; } }; -#else -typedef boost::interprocess::interprocess_semaphore CSemaphore; -#endif inline std::string i64tostr(int64 n) { >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209021336.q82DapEE020590>