#1150850 Test should run in a new process group

#1150850#3
Date:
2026-10-13 21:47:22 UTC
From:
To:
I was just witnessing a vip-manager2 autopkgtest run take down a whole
Jenkins node:

https://jengus.postgresql.org/job/vip-manager2-autopkgtest/65/architecture=amd64,distribution=sid/console

20:37:06 2026-10-13T18:37:03.839Z	␛[34mINFO␛[0m	Removing address 10.0.2.123/32 on ceth1
20:37:06 Ncat: Version 7.991 ( https://nmap.org/ncat )
20:37:06 Ncat: TIMEOUT.
20:37:06 ␛[0;32m### You've reached the end of the script, all "tests" have successfully been passed! ###␛[0m
20:37:06
20:37:06 Session terminated, killing shell...autopkgtest [18:37:06]: ERROR: Received signal 15, cleaning up...
20:37:06 E: Caught signal ‘Terminated’: terminating immediately
20:37:06 FATAL: command execution failed
20:37:06 java.nio.channels.ClosedChannelException

The same failure is also visible on ci.debian.net, albeit less loudly:

https://ci.debian.net/packages/v/vip-manager2/testing/amd64/76553962/

155s Ncat: Connection from 10.0.2.123:35736.
155s ### You've reached the end of the script, all "tests" have successfully been passed! ###
155s
156s Session terminated, killing shell...autopkgtest [13:25:38]: test clientcert_test: -----------------------]
▾ test clientcert_test: test results
157s autopkgtest [13:25:39]: test clientcert_test:  - - - - - - - - - - results - - - - - - - - - -
157s clientcert_test      FAIL non-zero exit status 143

So, something in the test sends a kill signal to the process group and
autopkgtest just dies.

There are bugs on several layers:
* ncat being killed should not take the whole process group down (#1150845)
* autopkgtest should isolate itself against that happening (this bug)
* and on apt.postgresql.org, the "newpid" isolation layer should also
  isolate (https://github.com/df7cb/newpid/commit/2e37c0be35563da7835f3dd57f0256a8ce9edf1c)

Afaict the proper fix is calling setsid(). (If interactive sessions
are involved, it's more complex, see the newpid fix.)

Christoph

#1150850#6
Date:
2026-10-15 14:12:42 UTC
From:
To:
Hello,

Bug #1150850 in autopkgtest reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/ci-team/autopkgtest/-/commit/eb98362c36299f0af7c9576d37bc7348e2077a23
------------------------------------------------------------------------
wrapper: run tests in their own session and process group

Use setsid to prevent group-wide signals from tests from terminating the
wrapper. Add a regression test doing a group-wide SIGTERM.

Closes: #1150850
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1150850