-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
plugin: load plugin crash fatal error: runtime: no plugin module data #33072
Comments
Thanks for the report. You answered "Does this issue reproduce with the latest release?" with "Yes", I just want to confirm, did you test it with Go 1.12.7 or a different version? |
I used Go 1.12.7 and 1.11, both versions can reproduce this problem. |
I am having issue reproducible using this demo repository: https://gitlab.com/ztmr/goplugfail/-/jobs/276665302 In my case, I think that the plugin loader treats the cshared lib's memory as C memory because it was loaded as SO from C. That would make sense but is also not really correct. Any thoughts? |
This still happens in
|
/cc @ianlancetaylor @cherrymui per owners. |
I just found out using |
If I'm not mistaken, |
I'm seeing this happen with Golang The instructions for creating a plugin I'm following are for the I wanted to post in this Issue though because it seems related to what I'm experiencing and finding official information on this topic is not helpful. I think this issue is with the Standard Golang |
Getting the same error with golang |
I am also facing this issue with Golang 1.13.8, with below command please kindly help to resolve.. monstache -f monstache.test.config.toml fatal error: runtime: no plugin module data goroutine 1 [running]: |
This comment was marked as spam.
This comment was marked as spam.
With golang version 1.18.2 I'm not facing this issue anymore. @muhammedsaidkaya Seems like this is fixed now. |
Hitting the same issue. I use goreleaser to build both hosting process and the plugin:
- id: local-storage-amd64
binary: build/sysroot/usr/bin/local-storage
env:
- CGO_ENABLED=1
- CC=x86_64-linux-gnu-gcc
gcflags:
- all=-N -l
ldflags:
- -extldflags "-static"
tags:
- musl
- netgo
goos:
- linux
goarch:
- amd64
- id: local-storage-plugin-mergerfs-amd64
binary: build/sysroot/usr/lib/plugins/mergerfs.so
main: ./plugins/mergerfs
no_main_check: true
flags:
- -buildmode=plugin
env:
- CGO_ENABLED=1
- CC=x86_64-linux-gnu-gcc
gcflags:
- all=-N -l
ldflags:
- -extldflags
tags:
- musl
- netgo
goos:
- linux
goarch:
- amd64 Is this the same issue? |
This comment was marked as spam.
This comment was marked as spam.
Not sure if this helps, but I just had the same issue and I noticed that my plugin had a different go version: // main application go.mod
module app
go 1.22.5 // plugin go.mod
module plugin
go 1.23.4 It's also worth noting that:
Setting the same version in both files (1.22.5) fixed the issue. |
What 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
OutputWhat did you do?
What did you expect to see?
No crash
What did you see instead?
fatal error: runtime: no plugin module data
goroutine 1 [running]:
runtime.throw(0x40f2177, 0x1e)
/usr/local/go/src/runtime/panic.go:608 +0x72 fp=0xc000047b00 sp=0xc000047ad0 pc=0x402a602
plugin.lastmoduleinit(0xc00008c480, 0xc00000e038, 0x4302ad0, 0x42, 0x41c7da0)
/usr/local/go/src/runtime/plugin.go:22 +0xc03 fp=0xc000047c28 sp=0xc000047b00 pc=0x402baa3
plugin.open(0x40efb00, 0x10, 0x60, 0x0, 0x0)
/usr/local/go/src/plugin/plugin_dlopen.go:87 +0x3b3 fp=0xc000047ee0 sp=0xc000047c28 pc=0x40b19d3
plugin.Open(0x40efb00, 0x13, 0x2, 0x60, 0x0)
/usr/local/go/src/plugin/plugin.go:32 +0x35 fp=0xc000047f18 sp=0xc000047ee0 pc=0x40b11e5
main.main()
The text was updated successfully, but these errors were encountered: