pct exec fails with code 129

stan23

New Member
Sep 11, 2025
1
0
1
Hi,
I am running a script on my host to update the LXCs. It worked fine in PVE8 and the LXCs on Debian 12.

Now I migrated to PVE9 and updated most LXCs to Debian 13.

This command is passing:

Bash:
root@NUC:~#pct exec 202 -- bash -c "apt update"; echo $?                                                                                                        
Hit:1 http://deb.debian.org/debian trixie InRelease                                                                                                                    
Get:2 http://deb.debian.org/debian trixie-updates InRelease [47.3 kB]                                                                                                  
Get:3 http://security.debian.org/debian-security trixie-security InRelease [43.4 kB]                                                                                   
Fetched 90.7 kB in 0s (390 kB/s)                                                                                                                                       
10 packages can be upgraded. Run 'apt list --upgradable' to see them.                                                                                                  
0

This command is failing in 9 of 10 trials for a LXC running Debian 13 that has updates pending:

Bash:
root@NUC:~#pct exec 202 -- bash -c "apt list --upgradable"; echo $?
libnss-systemd/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
libpam-systemd/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
libsystemd-shared/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
libsystemd0/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
libudev1/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
systemd-cryptsetup/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
systemd-sysv/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
systemd-timesyncd/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
systemd/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
udev/stable-updates 257.8-1~deb13u2 amd64 [upgradable from: 257.8-1~deb13u1]
129

It happens for privileged and unprivileged LXCs.
For the only LXC that is still on Debian 12 the command is working fine.

Exit code 129 indicates "Fatal error signal 1" but where does this come from? Is there any log that I should check or any further information that I should provide?

Regards, Marco
 
Last edited:
are you sure this is caused by "pct", and not simply the return value of your apt invocation?

edit: seems to be apt specific.. maybe caused by the new pager behaviour of apt?
 
Last edited:
I tested that as well - apt seems to return 129 while being executed with pct, but:

Bash:
root@pve3:~# pct exec 1050 --keep-env 1 -- bash -c 'ls /root' ; echo $?
ssl_check.sh  update.sh
0
root@pve3:~# pct exec 1050 --keep-env 1 -- bash -c 'ls /root/thisfiledoesnotexist' ; echo $?
ls: cannot access '/root/thisfiledoesnotexist': No such file or directory
2

This works fine

My assumption now is, that apt expects to have a "real" terminal, but whilst executed from a script there isn't one?
 
Last edited:
yeah, since Trixie apt has a new pager feature, that might be the culprit. currently, "apt" is not supposed to be used in scripts anyway, but just "apt-get". this is planned to change upstream, with "apt" finally getting stable (versioned!) output that can be relied upon, but that is not yet released.