-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
runtime: systemstack call caused SIGSEGV under race mode #45768
Comments
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For questions please refer to https://github.com/golang/go/wiki/Questions |
@seankhliao hello, I've changed to title and I think this is a (maybe) bug report now. Could you please reopen the issue? |
@davecheney Thanks very much! |
runtime.systemstack is a runtime internal function. It is not supposed to be called outside of the runtime. Your use case is not supported. Thanks. |
@cherrymui |
Calling Sorry this is not helpful, but I believe that it is accurate. |
Hi all,
I'm trying to get time using
CLOCK_REALTIME_COARSE
andCLOCK_MONOTONIC_COARSE
for performance reasons, and need to use vdso call by hand-written assembly code. That is, I want to reimplementtime.Now
usingCLOCK_REALTIME_COARSE
andCLOCK_MONOTONIC_COARSE
.I referenced the code in runtime and found that there's an issue #20427 indicates that I need to switch to g0 for vdso calls.
I tried to link the
runtime.systemstack
and use it to do vdso calls:My code is something like this:
The code runs well without
-race
, but I encountered fatal error duringgo test -race
:I debuged and found that this error exists after the
systemstack
call and before calling my closure(which means this sigsegv is not caused by my code), so I wonder if this is a bug of the race detector or this is my misuse ofsystemstack
?gdb result
OutputWhat version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputThe text was updated successfully, but these errors were encountered: