From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Oct 14 17:20:08 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A78106567A for ; Fri, 14 Oct 2011 17:20:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D6E198FC13 for ; Fri, 14 Oct 2011 17:20:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EHK7pX062112 for ; Fri, 14 Oct 2011 17:20:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9EHK7Fa062111; Fri, 14 Oct 2011 17:20:07 GMT (envelope-from gnats) Resent-Date: Fri, 14 Oct 2011 17:20:07 GMT Resent-Message-Id: <201110141720.p9EHK7Fa062111@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Guido Falsi Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25081106564A for ; Fri, 14 Oct 2011 17:17:08 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from megatron.madpilot.net (megatron.madpilot.net [88.149.173.206]) by mx1.freebsd.org (Postfix) with ESMTP id BA19A8FC1B for ; Fri, 14 Oct 2011 17:17:06 +0000 (UTC) Received: from megatron.madpilot.net (localhost [127.0.0.1]) by megatron.madpilot.net (Postfix) with ESMTP id 6D9081A62 for ; Fri, 14 Oct 2011 19:17:05 +0200 (CEST) Received: from megatron.madpilot.net ([127.0.0.1]) by megatron.madpilot.net (megatron.madpilot.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8fzL3y8hhzBm for ; Fri, 14 Oct 2011 19:17:03 +0200 (CEST) Received: by megatron.madpilot.net (Postfix, from userid 1000) id 12FB51A61; Fri, 14 Oct 2011 19:17:03 +0200 (CEST) Message-Id: <20111014171703.12FB51A61@megatron.madpilot.net> Date: Fri, 14 Oct 2011 19:17:03 +0200 (CEST) From: Guido Falsi To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/161591: [patch] audio/xmms2: workaround deadlock in waf (showing up on pointyhat too) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Guido Falsi List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2011 17:20:08 -0000 >Number: 161591 >Category: ports >Synopsis: [patch] audio/xmms2: workaround deadlock in waf (showing up on pointyhat too) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Oct 14 17:20:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Guido Falsi >Release: FreeBSD 8.2-STABLE amd64 >Organization: none >Environment: System: FreeBSD megatron.madpilot.net 8.2-STABLE FreeBSD 8.2-STABLE #2: Sun Aug 7 19:54:54 CEST 2011 root@megatron.madpilot.net:/usr/obj/usr/src/sys/MEGATRON amd64 >Description: This port was disabled on pointyhat due to runaway processes. I tracked this down to a deadlock condition in some python multithreaded code. I "fixed" this by adding a small sleep (0.02 seconds, should not slow down the build noticeabily). I'm aware this is not a proper fix for a deadlock, and just makes it less probable. I'm not experienced with multitheaded programming and have very superficial knowledge of python, so could not find a better fix. Please note that while this makes the deadlock condition not show up on my machines I can't be sure it fixes the problem on pointyhat until tested. I hope it does though. added file: files/patch-wafadmin-Task.py >How-To-Repeat: Trying to make the audio/xmms2 port on any 9.0-BETA machine. I only tested this on SMP machines, maybe on single core machines this is not going to show up. >Fix: diff -ruN xmms2.old/Makefile xmms2/Makefile --- xmms2.old/Makefile 2011-10-14 17:10:46.792667942 +0200 +++ xmms2/Makefile 2011-10-14 17:11:06.081664680 +0200 @@ -63,10 +63,6 @@ .include -.if defined(PACKAGE_BUILDING) -BROKEN= fails to build on pointyhat: runaway process -.endif - .if defined(XMMS2_SLAVE) EXCLUDE+= --without-xmms2d diff -ruN xmms2.old/files/patch-wafadmin-Task.py xmms2/files/patch-wafadmin-Task.py --- xmms2.old/files/patch-wafadmin-Task.py 1970-01-01 01:00:00.000000000 +0100 +++ xmms2/files/patch-wafadmin-Task.py 2011-10-14 17:11:05.857663308 +0200 @@ -0,0 +1,18 @@ +--- wafadmin/Task.py.orig 2010-02-19 18:43:54.000000000 +0100 ++++ wafadmin/Task.py 2011-10-14 14:36:57.000663231 +0200 +@@ -47,6 +47,7 @@ + import Build, Runner, Utils, Node, Logs, Options + from Logs import debug, warn, error + from Constants import * ++import time + + algotype = NORMAL + #algotype = JOBCONTROL +@@ -406,6 +407,7 @@ + def call_run(self): + if self.can_retrieve_cache(): + return 0 ++ time.sleep(0.02) + return self.run() + + def run(self): >Release-Note: >Audit-Trail: >Unformatted: