-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime/cgo: cgo Process crashing due to fatal error while making cgo calls from go routines in interaction between go & c #67357
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
Comments
I tried removing gin and running a webserver using net/http. still the same error is ocurring. following is the stacktrace.
|
The panic message is telling you that a signal occurred while executing C code. It looks like a dereference of a NULL pointer or a call to a NULL function pointer. Can you run the program under a C debugger? That may show you where the C code is crashing. It is possible that you can get a stack trace of the C code if you import the package "github.com/ianlancetaylor/cgosymbolizer" somewhere. But that package doesn't always work and it is mainly tested on Linux, so it may not help in your case. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Go version
go1.22.3 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
The package https://github.com/herumi/bls-eth-go-binary is making cgo calls to decode public key certificate. I'm calling the function to decode the certificate from a gin handler which internally seems to be running on a go routine. If I dont use gin and instead setup cli using viper, it works.
What did you see happen?
CGO Function calls fail while calling from a go routine. same thing works when not calling from a go routine. following is the stacktrace.
What did you expect to see?
CGO wrapper which is decoding certificate should work along with gin framework in concurrent manner.
The text was updated successfully, but these errors were encountered: