[SERVER-49016] Ninja build reporting "no such file: /proc/cpuinfo" Created: 22/Jun/20 Updated: 29/Oct/23 Resolved: 10/Jul/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.5.1 |
| Fix Version/s: | 4.4.1, 5.0.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Sara Golemon | Assignee: | Daniel Moody |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v4.4
|
||||
| Sprint: | Dev Platform 2020-07-13 | ||||
| Participants: | |||||
| Description |
|
As of this morning, running `ninja -j500 install-core` on my dev box (ubuntu 18) for a `scons --ninja` build results in the build completing successfully, but with multiple warnings spammed to the output:
This pattern is repeated between each target object ad nauseum. Since my system certainly does have a world readable /proc/cpuinfo, I assume this is an icecream related issue where the build of that object is occurring on another machine (perhaps non-linux?). My scons invocation is:
|
| Comments |
| Comment by Githook User [ 06/Aug/20 ] | ||
|
Author: {'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}Message: (cherry picked from commit b9f0132fc51fe6c821a8ca2de6b34cfd0a6b8465) | ||
| Comment by Andrew Morrow (Inactive) [ 10/Jul/20 ] | ||
|
Tagging this for backport to v4.4 so we can keep the build system in sync once that branch opens up again. | ||
| Comment by Githook User [ 10/Jul/20 ] | ||
|
Author: {'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}Message: | ||
| Comment by Daniel Moody [ 08/Jul/20 ] | ||
|
in newer icecreams, it will actually force an empty proc/cpuinfo file.
I made a PR to support remapping any arbitrary file and allowing custom cpuinfo to be added: https://github.com/icecc/icecream/pull/548 | ||
| Comment by Daniel Moody [ 01/Jul/20 ] | ||
|
After some more investigation with acm, it does appear --addfile /proc/cpuinfo fixes the issue, however that was not observed at first because of issues related to
One downside to using --addfile /proc/cpuinfo is that it will always have different contents because it includes instantaneous info like current CPU freq, so the resulting compiler package will always have a different hash. This can cause unnecessary redistribution of the compiler package. It looks like icecream could easily support --addfile /proc/cpuinfo=/some/other/file so that any file could be remapped in place in the compiler package, so an feature request will be opened in the icecream repo. If and when that is implemented, our addfile can be updated to make a static copy of cpuinfo extracting the instantaneous info thats not necessary, resulting in compiler packages that hash match if nothing else changed. | ||
| Comment by Andrew Morrow (Inactive) [ 01/Jul/20 ] | ||
|
OK, the plot thickens. I'm building install-platform-test as a smaller target.
| ||
| Comment by Andrew Morrow (Inactive) [ 01/Jul/20 ] | ||
|
I tried the above suggestion, but it doesn't seem to work for me. I still see the errors. I confirmed that the generated tgz contained the file:
| ||
| Comment by Daniel Moody [ 01/Jul/20 ] | ||
|
acm in icecream.py, add --addfile /proc/cpuinfo to the create_env string: https://github.com/mongodb/mongo/blob/51d7101f5eeee0c1b26dd0c035be47effc6373b7/site_scons/site_tools/icecream.py#L58 | ||
| Comment by Andrew Morrow (Inactive) [ 01/Jul/20 ] | ||
|
daniel.moody - That would be a nice simple fix and also wouldn't require altering icecc-create-env, as a bonus. I am able to repro this locally so if you have a proposed fix I can give it a try. | ||
| Comment by Daniel Moody [ 30/Jun/20 ] | ||
|
possible we can add --addfile /proc/cpuinfo to our icecrean-create-env for clang? Maybe even based on version? I don't think that file matters for the remote host, so addfile will copy the local file for compiling on the remote. See: https://github.com/icecc/icecream/issues/176#issuecomment-299484912
I tested addfile and it worked on ubuntu 18 host, but I was not able to reproduce in the first place so I don't know. Could sara.golemon update this ticket with info about the host the command was run on | ||
| Comment by Andrew Morrow (Inactive) [ 29/Jun/20 ] | ||
|
This seems relevant: https://github.com/icecc/icecream/blob/0c7ef30dddb9ef813f281e9a51d703857721878e/README.md#clang-tries-to-read-proccpuinfo-and-fails |