Bug 256941 - Add CLOCK_*_COARSE compat defines for Linux
Summary: Add CLOCK_*_COARSE compat defines for Linux
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Warner Losh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-02 17:47 UTC by Warner Losh
Modified: 2021-07-12 21:35 UTC (History)
1 user (show)

See Also:
imp: exp-run-


Attachments
Proposed patch for defines (2.29 KB, application/mbox)
2021-07-02 17:47 UTC, Warner Losh
no flags Details
Proposed patch for defines (2.35 KB, patch)
2021-07-03 17:15 UTC, Warner Losh
no flags Details | Diff
Latest patch with visibility changes. (7.98 KB, patch)
2021-07-05 23:24 UTC, Warner Losh
no flags Details | Diff
Proposed patch for defines, with visibility changes from review (7.98 KB, patch)
2021-07-05 23:26 UTC, Warner Losh
no flags Details | Diff
final patch from review (7.82 KB, patch)
2021-07-08 06:00 UTC, Warner Losh
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Warner Losh freebsd_committer 2021-07-02 17:47:33 UTC
Created attachment 226174 [details]
Proposed patch for defines

In updating the X server, it became clear we should just provide CLOCK_*_COARSE compat defines. This rates an exp run.
Comment 1 Warner Losh freebsd_committer 2021-07-02 17:48:09 UTC
flag for exp-run....
Comment 2 Warner Losh freebsd_committer 2021-07-02 17:49:25 UTC
I suppose I should own this.

https://reviews.freebsd.org/D30988

is the code review. Enough people have accepted it that it's time to see what an exp run says.
Comment 3 Warner Losh freebsd_committer 2021-07-03 17:15:25 UTC
Created attachment 226198 [details]
Proposed patch for defines

updated based on recent comments code review
also fixes attachment type
Comment 4 Warner Losh freebsd_committer 2021-07-05 23:24:06 UTC
Created attachment 226255 [details]
Latest patch with visibility changes.

Based on review feedback, I've limited the visibility of things a bit for strictly compliant POSIX environments.
Comment 5 Warner Losh freebsd_committer 2021-07-05 23:26:01 UTC
Created attachment 226256 [details]
Proposed patch for defines, with visibility changes from review

Review noted some namespace contamination that I needed to correct. This updated patch fixes that. If the exp run has already started, please don't abort: the delta isn't worth it, but if it hasn't, then this is quite likely the final version I'll commit...
Comment 6 Antoine Brodin freebsd_committer 2021-07-06 07:45:56 UTC
Exp-run looks fine with the previous version of the patch
Comment 7 Antoine Brodin freebsd_committer 2021-07-06 07:46:39 UTC
(In reply to Antoine Brodin from comment #6)
(the version from 3rd July)
Comment 8 Warner Losh freebsd_committer 2021-07-08 06:00:33 UTC
Created attachment 226294 [details]
final patch from review
Comment 9 Warner Losh freebsd_committer 2021-07-08 06:01:37 UTC
Antoine, unfortunately review pointed out things that needed to change that in the opinion of one of the reviewers needed another exp run. The diff won't change again.
Comment 10 Antoine Brodin freebsd_committer 2021-07-12 09:01:08 UTC
New failure logs (there may be 2 or 3 false positives):

http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/bamp-lv2-g20210212.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/bangr-lv2-1.4.0.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/bchoppr-lv2-1.10.8.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/bjumblr-lv2-1.6.6.8.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/boops-lv2-1.6.4.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/bschaffl-lv2-1.4.6.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/bsequencer-lv2-1.8.8.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/bshapr-lv2-0.13.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/bslizr-lv2-1.2.16.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/midi-matrix-lv2-0.28.0_1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/moony-lv2-0.36.0_1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/sherlock-lv2-0.28.0_1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/vm-lv2-0.14.0_1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/gnome-todo-40.0.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/mdb-20210125_1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/cataclysm-dda-tiles-0.f,1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/kodi-addon-game.libretro.beetle-psx-0.9.44.22.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/libretro-beetle_pcfx-0.20200504.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/libretro-beetle_psx-0.20210128_1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/libretro-desmume2015-0.20210131_1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/libretro-yabause-0.20210204.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/RetroArch-1.9.0_1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/kgraphviewer-2.4.3_4.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/intercal-0.31.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/pocl-1.6_1.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/thunderbird-78.12.0.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/ng_ipacct-20210316.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/ktorrent-21.04.2.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/fb303-g20210511.log
http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/ztoolkit-0.1.2.log
Comment 11 Warner Losh freebsd_committer 2021-07-12 15:22:18 UTC
So, CLOCK_MONOTONIC, CLOCK_REALTIME  and CLOCK*CPUTIME_ID are defined in glibc for POXIC_C_SOURCE >= 199309. I'm dubious at best about this interpretation, but don't have the relevant standards to confirm. Of course, glibc also defines CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC_COARSE and REALTIME_COARSE here as well, and those aren't defined in any standard, so I think glibc's pedantry should be suspect. However, there's a lot of stuff that depends on at least the standard defined ones being defined, perhaps too early, so I'll do that and try again.

Bugs in the ports themselves:

http://gohan04.nyi.freebsd.org/data/main-amd64-PR256941-default/2021-07-10_18h40m23s/logs/errors/pocl-1.6_1.log

References CLOCK_UPTIME_FAST: This is doubly wrong. UPTIME is FreeBSD specific, and UPTIME_FAST doubly so since we're the only folks that have a _FAST name.

There's also 4 ports that can't find boost, some that don't install (not because of this) and thunderbird is a mystery, but seems legitimately not this issue.

(assigning back to me and changing exp run to - for failure, if that's bogus of me, please let me know and/or do the right things).
Comment 12 Warner Losh freebsd_committer 2021-07-12 21:35:53 UTC
At the very least, this is waiting for pocl to be updated to 1.7.
The maintainer has asked me to wait until that's done and then
submit a patch.