-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
util: fix sign-compare warning #12856
Conversation
cc @mrc0mmand |
Ugh...
The first and second errors might be ok. On renew, we first assign a new address, then remove the old address. But I have no idea why the new address still has secondary flag after the old address is removed.
The last one looks critical, as |
@mrc0mmand Is the kernel updated? Or, some default sysctl value is changed? |
Since the box got recently updated, I'd say the first one. |
@mrc0mmand Indeed. The compiler is also updated. Previously
but now
I use
and everything is fine. So, at least the sign compare issue seems to be introduced (or investigated?) by gcc-9. |
Apparently, something else has changed with the newer gcc, as the hwdb test and update service started failing pretty reliably. |
The runtime difference is now quite significant:
|
Also, looking at results from older CI runs with gcc 8.3.0, the performance issue is indeed caused by newer gcc:
|
It seems the performance hit is caused by
I guess I could switch the |
With gcc9 the detect_stack_use_after_return introduces a severe performance overhead causing timing issues in the testsuite. Let's disable it (only for gcc run) until a proper solution is found See systemd/systemd#12856
With gcc9 the detect_stack_use_after_return introduces a severe performance overhead causing timing issues in the testsuite. Let's disable it (only for gcc run) until a proper solution is found See systemd/systemd#12856
Well, I prepared a temporary workaround in systemd/systemd-centos-ci#135, but looking & comparing further results from older CI runs, everything with the gcc9 takes at least twice as much time. Given that, I'd rather downgrade the gcc than started stockpiling workarounds, and tried to investigate the performance issue in the meanwhile. |
@mrc0mmand I agree it would probably be better to downgrade gcc (if it's not too complicated).
Just to be sure, do you mean ASan only? |
Not really, it applies even to the standard vagrant job without sanitizers: gcc-8:
gcc-9:
|
Since I'm not particularly familiar with Arch, @eworm-de @falconindy I'm wondering what is the best way to pin down |
So far I'm trying to follow https://wiki.archlinux.org/index.php/Arch_Linux_Archive#How_to_downgrade_one_package, hopefully it's going to work Edit: I meant the section below, which replaces the repositories with a snapshot: https://wiki.archlinux.org/index.php/Arch_Linux_Archive#How_to_restore_all_packages_to_a_specific_date |
As far as I understand, it will hide those |
Anyway, it if helps to make the CI green, I'm all for it. Those failures are new and need looking into, which might take a while. |
@evverx the issue with sanitizers is reproducible on Fedora as well, so I filed a bug in RH Bugzilla. I considered using the official gcc Bugzilla, but according to the guidelines they don't like bug reports from gcc snapshots bundled with distributions and I wasn't in a mood to compile my own gcc :-) Also, the CI run in systemd/systemd-centos-ci#136 passed, so I'll merge it and slowly start re-triggering failed CI jobs. However, the tests still take a slightly more time than usual, so there's maybe something else going on... |
I am not sure whether the error is false positive or not. So, I added 'postponed' label. But ok to close this if it is confirmed that the error is false positive. I hope the errors in networkd are also false positive. |
src/basic/time-util.c
Outdated
@@ -267,7 +267,7 @@ static char *format_timestamp_internal( | |||
|
|||
assert(buf); | |||
|
|||
if (l < | |||
if (l < (size_t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, i wonder if it wouldn't be better to cast the whole addition instead of just the first value of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Done.
d9a87a6
to
5262bfa
Compare
@mrc0mmand Updated. |
BTW, without this commit, gcc-9.1.1 can build systemd successfully. So, I think the issue is a bug of gcc-9.1.0. |
OK, this change is very small and not particularly ugly, let's just merge it. |
Ah, I just thought it has moved to some optimization level, but that's not the case, thanks for the explanation. The
And I think you already opened a PR for the error. |
Fixes https://ci.centos.org/job/systemd-pr-build-vagrant/2460/console.