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

Carbon Explorer Fails with Error CHECK in NumPossibleCPUsNoCache: cpus.has_value() (false) #4176

Closed
axsaucedo opened this issue Jul 28, 2024 · 7 comments · Fixed by #4187
Closed
Assignees
Labels
explorer Action items related to Carbon explorer code

Comments

@axsaucedo
Copy link

axsaucedo commented Jul 28, 2024

Description of the bug:

Carbon Explorer fails with error NumPossibleCPUsNoCache: cpus.has_value() (false)

Full error:

1 external/tcmalloc~/tcmalloc/internal/sysinfo.cc:124] CHECK in NumPossibleCPUsNoCache: cpus.has_value() (false) 
Program terminated with signal: SIGSEGV
Compiler returned: 139

Screenshot

image

What did you do, or what's a simple way to reproduce the bug?

Opened the default example in Chrome / Firefox and error appeared.

What did you expect to happen?

Default examples should work.

What actually happened?

Errors above.

Any other information, logs, or outputs that you want to share?

No response

@axsaucedo axsaucedo added the explorer Action items related to Carbon explorer code label Jul 28, 2024
@jonmeow
Copy link
Contributor

jonmeow commented Jul 29, 2024

@chandlerc It looks like this is just tcmalloc not handling compiler-explorer's environment. I expect having that work is more important than having tcmalloc, so I'll send you a rollback.

@jonmeow
Copy link
Contributor

jonmeow commented Jul 29, 2024

Thanks for reporting this, I've sent out a change to disable it. Note it'll probably be a day for compiler-explorer to pick up a new build.

@jonmeow
Copy link
Contributor

jonmeow commented Jul 29, 2024

Filed google/tcmalloc#245 regarding this

github-merge-queue bot pushed a commit that referenced this issue Jul 29, 2024
Per @axsaucedo on #4176, tcmalloc expects cpu information that
compiler-explorer is lacking in its sandboxing. There's probably a
better fix to be had, this is intended to be temporary.
@jonmeow
Copy link
Contributor

jonmeow commented Jul 29, 2024

tcmalloc is probably going to keep the behavior. Following up with compiler-explorer to see about whitelisting the /sys file now: compiler-explorer/compiler-explorer#6734

@jonmeow
Copy link
Contributor

jonmeow commented Jul 29, 2024

Note, this also follows some discussion with @zygoloid that even though glibc has a fallback for this situation, we will probably only support linux versions that have the /sys file.

@axsaucedo
Copy link
Author

axsaucedo commented Aug 3, 2024

Thank you for the prompt reply and context @jonmeow - it seems the carbon explorer is working for the time being with the workaround

chandlerc added a commit to chandlerc/carbon-lang that referenced this issue Aug 3, 2024
This tripped up the Compiler Explorer sandbox, but we think that is now
fixed: compiler-explorer/compiler-explorer#6734

Removing the workaround here, and once it's live and not crashing we can
close carbon-language#4176 as fixed (and without a temporary workaround).
@chandlerc
Copy link
Contributor

Root cause should be fixed in Compiler Explorer now: compiler-explorer/compiler-explorer#6734

Sent a PR to re-enable TCMalloc and once it's live and not crashing, should be able to resolve this fully.

github-merge-queue bot pushed a commit that referenced this issue Aug 5, 2024
This tripped up the Compiler Explorer sandbox, but we think that is now
fixed:
compiler-explorer/compiler-explorer#6734

Removing the workaround here, and once it's live and not crashing we can
close #4176 as fixed (and without a temporary workaround).
brymer-meneses pushed a commit to brymer-meneses/carbon-lang that referenced this issue Aug 15, 2024
…anguage#4177)

Per @axsaucedo on carbon-language#4176, tcmalloc expects cpu information that
compiler-explorer is lacking in its sandboxing. There's probably a
better fix to be had, this is intended to be temporary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
explorer Action items related to Carbon explorer code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants