plugin: Can't load (plugin.Open) multiple plugins with the same func/symbol types #32923
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
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
)?Alpine v3.10 running in docker (this setup works fine with the previous version of go used, 1.11.5)
go env
OutputWhat did you do?
Upgraded to Alpine v3.10, which includes go1.12.6 (From go1.11.5)
We have a list of plugins, the location of which (if they are to be loaded) are defined by a configuration file. Each plugin has the same set of functions so that the main program can invoke them in a loop, without knowing which plugin is executing it. I.e., the functions are
which get invoked by the main program via
The plugins are being loaded by the main program as such
The code was not changed between upgrading golang versions. We have not switched to using go modules. We build both the main program and the plugins in the same docker image (which is now Alpine 3.10 based)
Build command for the main program
Build command for the plugins
What did you expect to see?
The plugins all being loaded, as happens in go1.11.5
What did you see instead?
The first plugin will load fine. In fact, if we only try to load one plugin, it always loads. However, if we try to load multiple plugins with different names, but the same functions as described above, it would result in a segmentation fault 90% of the time. It wasn't every time, but restarting the image would cause the fault if it didn't happen the very first spin up (which sometimes it did) The part of the stack trace that was the same each time is as follows
I suspect that the issue comes from the typeslinkinit() in type.go, where it's trying to be smart about using previous types that it's seen, but I'm not 100% sure. I just know that unfortunately for now, we'll have to stay at go1.11.5 unless there's a resolution or workaround for this issue. Happy to provide more information in order to help you help us.
The text was updated successfully, but these errors were encountered: