From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Adding a TOR system test - confusing results Date: Mon, 23 Jul 2018 20:11:51 -0700 Message-ID: <87wotltjig.fsf@gmail.com> References: <87k1pmhkp9.fsf@gmail.com> <87y3e2tjfm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhnjx-0003c2-Bd for guix-devel@gnu.org; Mon, 23 Jul 2018 23:11:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhnjw-0000B4-97 for guix-devel@gnu.org; Mon, 23 Jul 2018 23:11:57 -0400 In-Reply-To: <87y3e2tjfm.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 23 Jul 2018 11:01:17 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > The problem has to do with =E2=80=98make-forkexec-constructor/container= =E2=80=99: it > creates a process (with =E2=80=98run-container=E2=80=99) that exec=E2=80= =99s the program, and > then returns immediately. Thus we know that a process was created, but > we don=E2=80=99t know that soon after that it exited because of a failed = =E2=80=98exec=E2=80=99 > call. > > If you run it in a VM, you=E2=80=99ll notice that shepherd tries to respa= wn it > several times in a row and eventually disables the service. > > The test above is unreliable because during this fail/respawn cycle, the > service keeps going up and down. > > The solution here would be to use a PID file for the Tor service. That > would (1) allow us to properly detect failure to run Tor, and (2) > provide better synchronization with Tor startup. That makes sense. TOR supports a PID file, so I'll give that a try. In the meantime, there is another similar mystery I could not solve. Consider the attached patch, which applies cleanly on top of the first patch in my previous email. This is what it does when I run it: =2D-8<---------------cut here---------------start------------->8--- $ make -j 1 check-system TESTS=3Dtor [...] This is the GNU system. Welcome. komputilo login: Jul 24 03:07:46.688 [notice] Tor 0.3.3.9 (git-45028085ea18= 8baf) running on Linux with L. Jul 24 03:07:46.692 [notice] Tor can't help you if you use it wrong! Learn = how to be safe at https://wwwg Jul 24 03:07:46.702 [notice] Read configuration file "/gnu/store/g4h37si0fj= qijrqp6smn6jq23bqj1051-torrc". Jul 24 03:07:46.731 [notice] Scheduler type KIST has been enabled. Jul 24 03:07:46.733 [notice] Opening Socks listener on 127.0.0.1:9050 QEMU runs as PID 4 connected to QEMU's monitor read QEMU monitor prompt connected to guest REPL %%%% Starting test tor (Writing full log to "tor.log") marionette is ready # of expected passes 1 @ build-succeeded /gnu/store/g35kgsr3298k2s15nn3f8qpcxbdxrvrl-tor-test.drv - TOTAL: 1 PASS: /gnu/store/ghkrf4cx4mkmzjyx1m8hdg5hbk6zjzb2-tor-test =2D-8<---------------cut here---------------end--------------->8--- Why does it pass? The (sleep 999999) form appears to be totally ignored, and I don't understand why. It's concerning to me that I can't understand how the code is being executed. I expected the test to hang. =2D-=20 Chris --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Sleep-for-about-278-hours-during-the-TOR-test.patch Content-Transfer-Encoding: quoted-printable From=2029bcb8ed3181a6d871d04311a484f1bdffa476a8 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Mon, 23 Jul 2018 20:10:09 -0700 Subject: [PATCH] Sleep for about 278 hours during the TOR test. =2D-- gnu/tests/networking.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/tests/networking.scm b/gnu/tests/networking.scm index 1128e3448..7984525bc 100644 =2D-- a/gnu/tests/networking.scm +++ b/gnu/tests/networking.scm @@ -375,6 +375,7 @@ subnet 192.168.1.0 netmask 255.255.255.0 { '(begin (use-modules (gnu services herd) (srfi srfi-1)) + (sleep 999999) (live-service-running (find (lambda (live) (memq 'tor =2D-=20 2.18.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAltWmPcACgkQ3UCaFdgi Rp13uBAAj0crmjs5iQHEe9BuUO0cfL7wobOgqhmPPjp+dV127OkKiO8NDtBiEvul PA+2InGvG7T2qteyRsxb+nTH38UzuB4Cy3MRnSbyJcYQRf/BSLDTgGjI3djq/OMG d3za0EnFAfMe0wKtAkxFaSTKFy6bVgc+GxVsxEQJRRjNY7zh+KlvV/cDPp+CbCuO t/18HquTHRil6NccUPA1wucturKF9FX/tGNo0A8OTqQNd2BO5JkUKu78HmlZpZv/ Ek1ELBgXWavIRZFfFEFLKSewfuiHLJa+B5IPbevuGrt9tvARJvun96hmwrB6azVS hlgq8uMR0cpV+dvVKIL82/m3Uy/HPUZzdxM9GVCtsAOXhN1J9/u7tcNaZGLIg94C 9hMcMyMhJCepT3CW5hpLR6TzS2/yF7Qg0AjFSct31QR3dlc5YgQQ2DelSoUKgphC aKw02BXhLjrZ7+r30QKPYLvLJjD7EmyY/rYv2EfKFqMAXbum2Nayun+XSMhxa2QU 9Z/u7IC5ZadiCSGXOzAUkg7HkfVe7XjKT4tVCdnJlfPtzFvBlAlQkdRZywPXPGz5 EcyUjvUggeohRLjbXLISp8PlGCgTVngP19QFIHL05MMZunJOsuxUeb10H2aSVxJX e//7wjEOco2wFQ7v15CkPfHYNdqDOgpZ+st/5E3Fa+WCerRIK00= =Ccry -----END PGP SIGNATURE----- --==-=-=--