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/race: doesn't support the plugin package #24245
Comments
/cc @dvyukov |
Sounds like an issue to our production application, which enables users to build their own Go plugins to enhance the application. It would be nice if this would get a fix. Is this complicated or just not prioritized yet, because of plugin is not first class anyhow? |
It's not prioritized. It would help if somebody could figure out what the actual problem is. It may be obvious, it may not; I don't know. |
I've tested this by building the core app with |
In my case, a simple plugin that runs an http server with a simple handler func for root path // plugin.go
func Init() {
http.HandleFunc("/", func (w http.ResponseWriter, _ *http.Request) {
fmt.Fprint(w, "Hello World")
})
http.ListenAndServe(":3000", nil)
}
// load-plugin.go
func main () {
p, err := plugin.Open("plugin.so")
if err != nil {
panic(err)
}
sym, err := p.Lookup("Init")
if err != nil {
panic(err)
}
init := sym.(func())
init()
} Error:
|
What did you do?
What did you expect to see?
A
DATA RACE
output similar to this one:What did you see instead?
No output. I reproduced it 100% on both linux and darwin.
System details
The text was updated successfully, but these errors were encountered: