Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Dec 2011 10:20:11 -0900 (AKST)
From:      Mel Flynn <mel@rachie.is-a-geek.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        MAINTAINER <kde@FreeBSD.org>
Subject:   ports/163513: [PATCH] Fix automoc4 hangs cosmetically.
Message-ID:  <201112211920.pBLJKBqv020715@datakitty.lan.rachie.is-a-geek.net>
Resent-Message-ID: <201112211930.pBLJUCKc028052@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         163513
>Category:       ports
>Synopsis:       [PATCH] Fix automoc4 hangs cosmetically.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 21 19:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Mel
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD datakitty.lan.rachie.is-a-geek.net 8.2-STABLE FreeBSD 8.2-STABLE #5: Fri Nov 11 11:35:54 AKST 2011 mel@datakitty.lan.rachie.is-a-geek.net:/data/obj/data/RELENG_8/src/sys/GENERIC amd64


	
>Description:
Automoc4 unpredictably hangs when calling cmake to print colored text.
The root cause lies in QProcess calling async unsafe functions in a thread
as analyzed here:
http://lists.freebsd.org/pipermail/freebsd-stable/2011-May/062603.html

The symptom is however easily mitigated by attached patch.
>How-To-Repeat:
Build one of the larger kde4 ports to increase chances of bug showing up.
Confirmed candidates (2 cores builds):
- x11/kde4-runtime
- x11/kdelibs4
- x11/kde4-baseapps
- deskutils/kdepimlibs4

>Fix:

Patch below uses a conservative 2 seconds for the QProcess to realize the
command has already finished.

--- patch-kde4automoc.cpp begins here ---
--- kde4automoc.cpp.orig	2009-01-22 09:50:09.000000000 -0900
+++ kde4automoc.cpp	2011-11-28 08:49:56.000000000 -0900
@@ -71,7 +71,7 @@
             QStringList args(cmakeEchoColorArgs);
             args << msg;
             cmakeEcho.start(cmakeExecutable, args, QIODevice::NotOpen);
-            cmakeEcho.waitForFinished(-1);
+            cmakeEcho.waitForFinished(2000);
         }
 
         QString builddir;
--- patch-kde4automoc.cpp ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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