From 17403afeb453f2cc89cdb6ad7e017c1c90fbbc17 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Mon, 4 Nov 2024 14:36:35 +0100 Subject: [PATCH] test: pcap: Avoid creating dumpcap zombies Story time: In the days of yore, we generated PCAPs using tcpdump, which will flush any buffered packets to its output file on reception of SIGUSR2. Therefore we sent a USR2 before terminating the capture. At some point, we switched over to use tshark to capture packets for us, but the SIGUSR2 sayed in place. It turns out, tshark will just die on USR2, abandoning the dumpcap child it has created, which means the enclosing network namespace can't be properly torn down. Therefore: Remove skip sending USR2 and just send TERM directly. --- test/infamy/netns.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/infamy/netns.py b/test/infamy/netns.py index 52e9590e..caf327f0 100644 --- a/test/infamy/netns.py +++ b/test/infamy/netns.py @@ -253,7 +253,6 @@ class Pcap: # terminating the capture. time.sleep(sleep) - self.proc.send_signal(signal.SIGUSR2) self.proc.terminate() try: _, stderr = self.proc.communicate(5)