Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sd-event: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported #3037

Merged
merged 1 commit into from
Apr 18, 2016

Conversation

lkundrak
Copy link
Contributor

It was added in 2.6.39, and causes an assertion to fail when running in mock
hosted on 2.6.32-based RHEL-6:

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

@lkundrak
Copy link
Contributor Author

This is a follow-up to #2843 (comment)

@poettering poettering added sd-event good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Apr 14, 2016
@keszybz keszybz removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Apr 14, 2016
@keszybz
Copy link
Member

keszybz commented Apr 14, 2016

I don't get it. Why change just this one place, and not the other two?

src/core/dbus-timer.c:                b = now(CLOCK_BOOTTIME);
src/core/timer.c:        a = now(CLOCK_BOOTTIME);
src/libsystemd/sd-event/sd-event.c:        e->timestamp_boottime = now(CLOCK_BOOTTIME);

@poettering
Copy link
Member

indeed, those should be fixed too...

…orted

It was added in 2.6.39, and causes an assertion to fail when running in mock
hosted on 2.6.32-based RHEL-6:

Assertion 'clock_gettime(map_clock_id(clock_id), &ts) == 0' failed at systemd/src/basic/time-util.c:70, function now(). Aborting.
@keszybz keszybz merged commit 6f7202c into systemd:master Apr 18, 2016
poettering added a commit to poettering/systemd that referenced this pull request Apr 20, 2016
Before we invoke now(CLOCK_BOOTTIME), let's make sure we actually have that
clock, since now() will otherwise hit an assert.

Specifically, let's refuse CLOCK_BOOTTIME early in sd-event if the kernel
doesn't actually support it.

This is a follow-up for systemd#3037, and specifically:

systemd#3037 (comment)
poettering added a commit to poettering/systemd that referenced this pull request Apr 20, 2016
Before we invoke now(CLOCK_BOOTTIME), let's make sure we actually have that
clock, since now() will otherwise hit an assert.

Specifically, let's refuse CLOCK_BOOTTIME early in sd-event if the kernel
doesn't actually support it.

This is a follow-up for systemd#3037, and specifically:

systemd#3037 (comment)
poettering added a commit to poettering/systemd that referenced this pull request Apr 22, 2016
Before we invoke now(CLOCK_BOOTTIME), let's make sure we actually have that
clock, since now() will otherwise hit an assert.

Specifically, let's refuse CLOCK_BOOTTIME early in sd-event if the kernel
doesn't actually support it.

This is a follow-up for systemd#3037, and specifically:

systemd#3037 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants