Closed Bug 1565757 Opened 5 years ago Closed 5 years ago

Enabling rust PGO causes a "networking function(s) being imported in the rust static library" error

Categories

(Firefox Build System :: General, task)

task
Not set
normal

Tracking

(firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

Details

Attachments

(1 file)

Enabling rust PGO seems to have caused some sort of check_binary error for the instrumented build which is pretty odd:

[task 2019-07-13T00:07:20.115Z] 00:07:20     INFO -  TEST-UNEXPECTED-FAIL | check_networking | libgkrust.a | Identified 13 networking function(s) being imported in the rust static library (accept,bind,connect,getaddrinfo,getsockname,getsockopt,listen,recv,recvfrom,send,sendto,setsockopt,socket)
[task 2019-07-13T00:07:20.115Z] 00:07:20     INFO -  /builds/worker/workspace/build/src/config/makefiles/rust.mk:250: recipe for target '/builds/worker/workspace/build/src/obj-firefox/x86_64-unknown-linux-gnu/release/libgkrust.a' failed

glandium, do you have any idea what's going on here? It looks like you did the original review of this check in bug 1376621. I confirmed that we only see this error when enabling rust pgo, just upgrading to rust 1.37 beta doesn't cause an issue.

Flags: needinfo?(mh+mozilla)

I can only guess PGO disables some kinds of optimizations, at least during the instrumented build. It seems fair to disable the check during those. However, that makes me realize that xLTO completely obliterates that test, and that's a big concern.

Flags: needinfo?(mh+mozilla)

(In reply to Mike Hommey [:glandium] from comment #2)

I can only guess PGO disables some kinds of optimizations, at least during the instrumented build. It seems fair to disable the check during those. However, that makes me realize that xLTO completely obliterates that test, and that's a big concern.

Is there a reasonable way to detect this is an instrumented build in rust.mk?

Flags: needinfo?(mh+mozilla)

We don't need to run binary checks on the instrumntation builds, only the final optimized build.

Blocks: 1437452
No longer blocks: 1564638

mshal helped me figure out a solution, looks like we're good to go.

Flags: needinfo?(mh+mozilla)
Pushed by erahm@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/47cd8671b12c
Don't run networking binary checks on PGO instrumented builds. r=mshal
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → erahm
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: