linuxsystemdyear2038

systemd aborts in clock_gettime


When booting systemd on a 5.4 kernel or later on a 32bit CPU, systemd aborts:

Assertion 'clock_gettime(map_clock_id(clock_id), &ts) == 0' failed at ../src/basic/time-util.c:55, function now(). Aborting.

Why?


Solution

  • Enable CONFIG_COMPAT_32BIT_TIME when building the Linux kernel. Doing so will enable the relevant syscall. When the syscall is unavailable, it will return -ENOSYS triggering the assertion.

    It became easier to disable around 5.4 and can now be disabled by allnoconfig.