!RROtHmAaQIkiJzJZZE:nixos.org

NixOS Infrastructure

424 Members
Next Infra call: 2024-07-11, 18:00 CEST (UTC+2) | Infra operational issues backlog: https://github.com/orgs/NixOS/projects/52 | See #infra-alerts:nixos.org for real time alerts from Prometheus.133 Servers

Load older messages


SenderMessageTime
21 Oct 2021
@baloo_:matrix.orgbalooNot entirely sure I read the test driver correctly but, we’re just sending it a sigterm right?19:30:44
@baloo_:matrix.orgbalooone option would be to just SIGKILL, which should work and is just fine. (we don't care about the consistency of any open file, they are either readonly or about to be deleted)19:32:07
@k900:0upti.meK900Yes19:32:08
@k900:0upti.meK900I find it weird that it seems to lock up when sigterm'd19:32:29
@k900:0upti.meK900On one hand, we don't care, and it's probably qemu's fault19:32:36
@k900:0upti.meK900 On the other hand, it really shouldn't do that 19:32:40
@baloo_:matrix.orgbaloo

one other is to ask qemu to quit like:

echo "quit" | socat STDIO UNIX-CONNECT:./console.pipe

with qemu started like:

-mon chardev=con0,mode=readline \
    -chardev socket,id=con0,path=./console.pipe,server,nowait \
19:32:59
@k900:0upti.meK900There's already a socket for that19:33:18
@k900:0upti.meK900It's what all the commands run through19:33:23
@baloo_:matrix.orgbaloothe socket the commands run through is the serial console of the inner vm19:33:49
@baloo_:matrix.orgbaloothis is the monitor socket of qemu itself19:33:58
@k900:0upti.meK900There's a second socket for the monitor too19:34:02
@baloo_:matrix.orgbaloo
diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py
index e659b0c04f5..1518bf3562a 100755
--- a/nixos/lib/test-driver/test-driver.py
+++ b/nixos/lib/test-driver/test-driver.py
@@ -1021,6 +1021,7 @@ class Machine:
         assert self.process
         assert self.shell
         assert self.monitor
+        self.send_monitor_command("quit")
         self.process.terminate()
         self.shell.close()
         self.monitor.close()

I'd give this a try

19:36:41
@janne.hess:helsinki-systems.deJanne HeßI'll do that19:36:57
@k900:0upti.meK900https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/test-driver/test-driver.py#L95719:37:14
@k900:0upti.meK900That's weird19:37:16
@k900:0upti.meK900Also that whole thing should probably use the JSON protocol...19:37:33
@janne.hess:helsinki-systems.deJanne Heß
In reply to @baloo_:matrix.org
diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py
index e659b0c04f5..1518bf3562a 100755
--- a/nixos/lib/test-driver/test-driver.py
+++ b/nixos/lib/test-driver/test-driver.py
@@ -1021,6 +1021,7 @@ class Machine:
         assert self.process
         assert self.shell
         assert self.monitor
+        self.send_monitor_command("quit")
         self.process.terminate()
         self.shell.close()
         self.monitor.close()

I'd give this a try

Still hangs at the end
19:39:26
@k900:0upti.meK900Can you get a traceback?19:41:19
@janne.hess:helsinki-systems.deJanne Heßin python?19:41:28
@janne.hess:helsinki-systems.deJanne Heßpy-spy should be enough?19:41:34
@k900:0upti.meK900Yeah19:41:56
@janne.hess:helsinki-systems.deJanne Heßoh lol it failed more horribly now19:43:00
@janne.hess:helsinki-systems.deJanne Heß
clean up
kill machine (pid 9)
machine: sending monitor command: quit
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/nix/store/97w52ckcjnfiz89h3lh7zf1kysgfm2s8-python3-3.9.6/lib/python3.9/contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "/nix/store/7v40kpl69d7ydhm2mz7wkl8q04yc8xly-nixos-test-driver/bin/.nixos-test-driver-wrapped", line 172, in nested
    yield
  File "/nix/store/7v40kpl69d7ydhm2mz7wkl8q04yc8xly-nixos-test-driver/bin/.nixos-test-driver-wrapped", line 1139, in clean_up
    machine.release()
  File "/nix/store/7v40kpl69d7ydhm2mz7wkl8q04yc8xly-nixos-test-driver/bin/.nixos-test-driver-wrapped", line 1039, in release
    self.send_monitor_command("quit")
  File "/nix/store/7v40kpl69d7ydhm2mz7wkl8q04yc8xly-nixos-test-driver/bin/.nixos-test-driver-wrapped", line 509, in send_monitor_command
    self.monitor.send(message)
BrokenPipeError: [Errno 32] Broken pipe
19:43:11
@k900:0upti.meK900Huh19:43:21
@k900:0upti.meK900That looks like QEMU is dead19:43:34
@k900:0upti.meK900But not like19:43:40
@k900:0upti.meK900All the way dead19:43:42
@k900:0upti.meK900But presumably dead enough to close the monitor socket?19:44:02
@janne.hess:helsinki-systems.deJanne Heß

it properly failed this time:

Process 43896: /nix/store/97w52ckcjnfiz89h3lh7zf1kysgfm2s8-python3-3.9.6/bin/python3 /nix/store/7v40kpl69d7ydhm2mz7wkl8q04yc8xly-nixos-test-driver/bin/.nixos-test-driver-wrapped
Python v3.9.6 (/nix/store/97w52ckcjnfiz89h3lh7zf1kysgfm2s8-python3-3.9.6/bin/python3.9)

Thread 0x7FFFF77EB340 (active)
    _shutdown (threading.py:1448)
Thread 0x7FFFF6191640 (active)
    process_serial_output (.nixos-test-driver-wrapped:931)
    run (threading.py:910)
    _bootstrap_inner (threading.py:973)
    _bootstrap (threading.py:930)
19:45:27

Show newer messages


Back to Room ListRoom Version: 6