sudo apt-get dist-upgrade --simulate exit code: 124

Recent test run failed with systemcheck in sys-whonix showing sudo apt-get dist-upgrade --simulate exit code: 124 error. This is a fresh install of template (no updates installed on top). Otherwise, available updates are listed. I can’t find what 124 exit code means, any idea?

The message is visible here:

1 Like

That’s weird. I have no idea how that could happen. No recent changes in Whonix package repository. If a user would report this, I would request to run the following commands to gather more debug information.

  • sudo dpkg --audit ; echo $?

  • sudo dpkg --configure -a ; echo $?

  • sudo apt-get dist-upgrade --simulate ; echo $?

Might make sense to add this to Qubes QA? That seems to be a useful test for any Debian based template.

Now it comes to mind that exit code 124 isn’t from APT. It’s the exit code of timeout.

This is the command that systemcheck is running

  • sudo --non-interactive /usr/libexec/helper-scripts/apt-get-update-simulate

This is what then essentially, simplified happens:

timeout_after="10"
kill_after="5"

timeout \
   --kill-after="$kill_after" \
   "$timeout_after" \
   apt-get dist-upgrade --simulate

So apt-get dist-upgrade --simulate didn’t complete within 10 seconds and sigterm was sufficient to terminate apt-get. (sigkill --kill-after was not needed.)

   ## `timeout` returns:
   ## - 124 if sigterm was sufficient
   ## - 137 if needed to use kill.

The question now is…

apt-get dist-upgrade --simulate didn’t complete within 10 seconds

Why? Slow system? High system load?

Transitory issue?

Might be the first time that was ever reported. 10 seconds seems more than enough time for this.

The error message by systemcheck could be better. I didn’t add the complex parsing/notification since this wasn’t expected.

That could be the case very much. Nested virtualization is slow. This is the first time I see this specific issue, but if it will repeat, I may need to increase timeout for the test setup…

1 Like

Ok, if it continues to be an issue, then…

…I could also simply increase the timeout there.