1

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?

Helmut Grohne
  • 6,578
  • 2
  • 31
  • 67

1 Answers1

-3

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.

Helmut Grohne
  • 6,578
  • 2
  • 31
  • 67
  • 1
    Where should someone enable that flag? Is there a resource somewhere explaining how/why? – AleG Feb 21 '21 at 11:30
  • That is a Linux kernel configuration flag. I've updated the answer to make it more clear. – Helmut Grohne Sep 27 '21 at 11:53
  • So is it a flag available only when *building* a kernel? - it isn't obvious; I had that `clock_gettime...` error after a package upgrade, so no explicit building involved. – AleG Feb 09 '22 at 09:31
  • Yes, this is fully dependent on the configuration of the Linux kernel. Without the mentioned item, the relevant syscall is unavailable and systemd fails. – Helmut Grohne Feb 10 '22 at 10:18