From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 67A906DE1489 for ; Mon, 20 May 2019 17:44:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.172 X-Spam-Level: X-Spam-Status: No, score=-0.172 tagged_above=-999 required=5 tests=[AWL=0.029, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Dr5F9315R6GO for ; Mon, 20 May 2019 17:44:32 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id 8CBBF6DE146C for ; Mon, 20 May 2019 17:44:32 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1558399470; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=NLIo9+HMVZHyYxAJSpiuYvESnOwsp0qDxiVLGKV4eL4=; b=QzSursf12hXH+H83fD6saIRQHFvgvki1RxxMzLKVTDpXYG5P6ItYJfMr Art7m4SxEeo+1DbBFPF/KXxSjlLlCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1558399469; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=NLIo9+HMVZHyYxAJSpiuYvESnOwsp0qDxiVLGKV4eL4=; b=c1FiSPDGYDjrLaTfmQ14xyTB3CKPYWBJvZKj0HkvvXmpX69gg47f7u0t xJu9ni7BagQsMex5ZWkYH6sbL8s5tSqWYOzWvceDPa9MWYyMSd5VpPNr1P IFe/NjQr3EscKWxVJiZ+RQFHzP5wmIfZ3Psjkmo7W0TVAXGQRILfrCDXRg NwqG0gZLBmG729jWepDfi4DkG7qZwQsx7hI0NnH9FZU7L60RpjfrDjZnp2 QMvUl9rdN2D5GPVltWW/yJpbBdCS/R3yywRgTJUe2BnzgptvuDkLXNptHZ 5hQh1H9WgBRdGGH9llOGSitYnd9LSGxurjS4t7dZOau+l4zELS3M8w== Received: from fifthhorseman.net (unknown [38.109.115.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id B1761F99D; Mon, 20 May 2019 20:44:29 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 0ED01201C0; Mon, 20 May 2019 20:44:21 -0400 (EDT) From: Daniel Kahn Gillmor To: David Bremner , notmuch@notmuchmail.org Subject: Re: parallel tests broken on Debian stable In-Reply-To: <87pnocadqp.fsf@fifthhorseman.net> References: <87ef56io5d.fsf@tethera.net> <878sv1avfc.fsf@fifthhorseman.net> <87pnocadqp.fsf@fifthhorseman.net> Autocrypt: addr=dkg@fifthhorseman.net; prefer-encrypt=mutual; keydata= mDMEXEK/AhYJKwYBBAHaRw8BAQdAr/gSROcn+6m8ijTN0DV9AahoHGafy52RRkhCZVwxhEe0K0Rh bmllbCBLYWhuIEdpbGxtb3IgPGRrZ0BmaWZ0aGhvcnNlbWFuLm5ldD6ImQQTFggAQQIbAQUJA8Jn AAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBMS8Lds4zOlkhevpwvIGkReQOOXGBQJcQsbzAhkB AAoJEPIGkReQOOXG4fkBAO1joRxqAZY57PjdzGieXLpluk9RkWa3ufkt3YUVEpH/AP9c+pgIxtyW +FwMQRjlqljuj8amdN4zuEqaCy4hhz/1DbgzBFxCv4sWCSsGAQQB2kcPAQEHQERSZxSPmgtdw6nN u7uxY7bzb9TnPrGAOp9kClBLRwGfiPUEGBYIACYWIQTEvC3bOMzpZIXr6cLyBpEXkDjlxgUCXEK/ iwIbAgUJAeEzgACBCRDyBpEXkDjlxnYgBBkWCAAdFiEEyQ5tNiAKG5IqFQnndhgZZSmuX/gFAlxC v4sACgkQdhgZZSmuX/iVWgD/fCU4ONzgy8w8UCHGmrmIZfDvdhg512NIBfx+Mz9ls5kA/Rq97vz4 z48MFuBdCuu0W/fVqVjnY7LN5n+CQJwGC0MIA7QA/RyY7Sz2gFIOcrns0RpoHr+3WI+won3xCD8+ sVXSHZvCAP98HCjDnw/b0lGuCR7coTXKLIM44/LFWgXAdZjm1wjODbg4BFxCv50SCisGAQQBl1UB BQEBB0BG4iXnHX/fs35NWKMWQTQoRI7oiAUt0wJHFFJbomxXbAMBCAeIfgQYFggAJhYhBMS8Lds4 zOlkhevpwvIGkReQOOXGBQJcQr+dAhsMBQkB4TOAAAoJEPIGkReQOOXGe/cBAPlek5d9xzcXUn/D kY6jKmxe26CTws3ZkbK6Aa5Ey/qKAP0VuPQSCRxA7RKfcB/XrEphfUFkraL06Xn/xGwJ+D0hCw== Date: Mon, 20 May 2019 20:44:20 -0400 Message-ID: <87mujgab6j.fsf@fifthhorseman.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 00:44:33 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon 2019-05-20 19:49:02 -0400, Daniel Kahn Gillmor wrote: > However, i tried selectively upgrading all the versions of all of these > packages *except for gdb* to the version in buster (or to the version > from backports, in the case of the kernel). and i'm *still* seeing the > problem on the stretch system. > > So perhaps it's some interaction between timeout and gdb? I haven't > managed to test that particular combination yet. Ok, i just went ahead and tested gdb 8.2.1-2 on a stretch system (after rolling back my other package upgrades. Getting gdb installed cleanly required upgrading libc6, libssl1.1, and libpython (3.5 to 3.7) and associated packages to their versions from buster, as well as pulling in a few libraries whose sonames weren't already in stretch at all (libipt2, libncursesw6, libtinfo6). once gdb was upgraded, the tests passed with moreutils parallel with timeout enabled. So the combination that tickles the problem is: * GNU timeout (either version) * moreutils parallel (either version) * gdb 7.12-6 (stretch) and the problem goes away when gdb is upgraded to 8.2.1-2. I wasn't able to whittle it down to a smaller reliable test, unfortunately, but hopefully this is enough for someone else to pick it up and run with it. Digging around a bit further, i see back in 2011 9ade8160a6a3f6f55996d7a58dc2cd81a6df8395 from amdragon (cc'ed, though i haven't heard from him since 2016) that introduced this comment (now in tests/T380-atomicity.sh): # -tty /dev/null works around a conflict between the 'timeout' wrapper # and gdb's attempt to control the TTY. [=E2=80=A6] gdb -tty /dev/null -batch -x $TEST_DIRECTORY/atomicity.gdb notmuch >/de= v/null 2>/dev/null I tried adding "-tty /dev/null" to every place where ${TEST_GDB} was invoked (in T050, T060, and T070), and i found that it produced test failures in T050 and T060. However, just directing stdin from /dev/null on those runs of ${TEST_GDB} solved the problem for me. (see patch below) Leaving any of those three gdb invocations without anything changed meant that "make -j4 check" would hang pretty reliably with processes stopped by SIGTTOU again with gdb from stretch. Again, i don't understand any of this mechanism in detail, but the following patch appears to avoid hangs of the test suite for me on a stock debian stretch installation, and is (i think) a narrower change than the earlier proposal that forced stdin from /dev/null on all the tests uniformly. If no one objects, i can propose this as an actual patch, but i'd feel much happier if someone who understands this particular situation can propose it with a clearer justifiation. Regards, --dkg diff --git a/test/T050-new.sh b/test/T050-new.sh index dfc8508f..9b3d41df 100755 =2D-- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -366,7 +366,7 @@ run EOF =20 ${TEST_GDB} --batch-silent --return-child-result -x notmuch-new-vanish.gdb= \ =2D --args notmuch new 2>OUTPUT 1>/dev/null + --args notmuch new 2>OUTPUT 1>/dev/null > OUTPUT =20 # Clean up the file in case gdb isn't available. diff --git a/test/T060-count.sh b/test/T060-count.sh index 0c0bf473..a393edb6 100755 =2D-- a/test/T060-count.sh +++ b/test/T060-count.sh @@ -116,7 +116,7 @@ EOF backup_database test_begin_subtest "error message from query_search_messages" ${TEST_GDB} --batch-silent --return-child-result -x count-files.gdb \ =2D --args notmuch count --output=3Dfiles '*' 2>OUTPUT 1>/dev/null + --args notmuch count --output=3Dfiles '*' 2>OUTPUT 1>/dev/null < /dev/= null cat < EXPECTED notmuch count: A Xapian exception occurred A Xapian exception occurred performing query diff --git a/test/T070-insert.sh b/test/T070-insert.sh index 05be473a..2d281fe6 100755 =2D-- a/test/T070-insert.sh +++ b/test/T070-insert.sh @@ -267,12 +267,14 @@ for code in FILE_NOT_EMAIL READ_ONLY_DATABASE UPGRAD= E_REQUIRED PATH_ERROR; do test_begin_subtest "EXIT_FAILURE when index_file returns $code" test_expect_code 1 \ "${TEST_GDB} --batch-silent --return-child-result \ + -tty /dev/null \ -ex 'set args insert < $gen_msg_filename' \ -x index-file-$code.gdb notmuch" =20 test_begin_subtest "success exit with --keep when index_file returns $= code" test_expect_code 0 \ "${TEST_GDB} --batch-silent --return-child-result \ + -tty /dev/null \ -ex 'set args insert --keep < $gen_msg_filename' \ -x index-file-$code.gdb notmuch" done @@ -281,12 +283,14 @@ for code in OUT_OF_MEMORY XAPIAN_EXCEPTION ; do test_begin_subtest "EX_TEMPFAIL when index_file returns $code" test_expect_code 75 \ "${TEST_GDB} --batch-silent --return-child-result \ + -tty /dev/null \ -ex 'set args insert < $gen_msg_filename' \ -x index-file-$code.gdb notmuch" =20 test_begin_subtest "success exit with --keep when index_file returns $= code" test_expect_code 0 \ "${TEST_GDB} --batch-silent --return-child-result \ + -tty /dev/null \ -ex 'set args insert --keep < $gen_msg_filename' \ -x index-file-$code.gdb notmuch" done --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQTJDm02IAobkioVCed2GBllKa5f+AUCXONJ5AAKCRB2GBllKa5f +G3aAP9kYN6dxiBbaBVYDbLsCROJdlEqViDZwH6a/sKTJovOtAD+P1H2jx6wC+0K pcMzQzxVGbdjziyPx6LpY5VT9lLZpQs= =j+qv -----END PGP SIGNATURE----- --=-=-=--