From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: bug#28779: tests/workers.scm failure Date: Tue, 10 Oct 2017 15:48:42 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1wnH-0007qh-2X for bug-guix@gnu.org; Tue, 10 Oct 2017 11:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1wnD-0006pR-85 for bug-guix@gnu.org; Tue, 10 Oct 2017 11:50:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1wnD-0006ot-3h for bug-guix@gnu.org; Tue, 10 Oct 2017 11:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e1wnC-0000lN-PS for bug-guix@gnu.org; Tue, 10 Oct 2017 11:50:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1wm5-0006rW-53 for bug-guix@gnu.org; Tue, 10 Oct 2017 11:48:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1wm2-0006GU-2Z for bug-guix@gnu.org; Tue, 10 Oct 2017 11:48:53 -0400 Received: from esa1.cray.iphmx.com ([68.232.142.33]:31738) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1wm1-0006FJ-Ij for bug-guix@gnu.org; Tue, 10 Oct 2017 11:48:49 -0400 Content-Language: en-US List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 28779@debbugs.gnu.org Roughly 1 in 2 runs of tests/workers.scm fails on my system. Output: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D GNU Guix 0.13.0.3413-984e3-dirty: ./test-suite.log =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D # TOTAL: 1 # PASS: 0 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 .. contents:: :depth: 2 FAIL: tests/workers =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D test-name: enqueue location: /home/users/bavier/src/guix/tests/workers.scm:26 source: + (test-equal + "enqueue" + 4242 + (let* ((pool (make-pool)) + (result 0) + (#{1+!}# (let ((lock (make-mutex))) + (lambda () + (with-mutex lock (set! result (+ result 1))))))) + (let loop ((i 4242)) + (unless + (zero? i) + (pool-enqueue! pool #{1+!}#) + (loop (- i 1)))) + (let poll () + (unless + (pool-idle? pool) + (pk 'busy result) + (sleep 1) + (poll))) + result)) expected-value: 4242 actual-value: 4241 result: FAIL To me the reason seems to be that the 'pool-idle? procedure indicates wheth= er or not the task queue is empty, not whether all tasks have completed exe= cution, so the poll loop exits before all 1+! updates are finished and the = test fails. =20 Most failures show "actual-value: 4241", but I have also seen "actual-value= : 4239" and "actual-value: 4240", which points to a race condition. On this system '(current-processor-count) =3D> 128' Eric Bavier, Scientific Libraries, Cray Inc.