ports/171252: net-p2p/bitcoin suffers a spinlock problem (fix included)
Steven Lee
steven at roothosts.com
Sun Sep 2 13:40:09 UTC 2012
>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 at 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:
More information about the freebsd-ports-bugs
mailing list