Skip to content

Dynamic loading breaks behavior for a plugin who is both remap and global. #6400

@zizhong

Description

@zizhong

While migrating to ATS 9, we found an issue with Plugin Factory.
We have a bunch of plugins, where TSPluginInit() and TSRemapNewInstance(). In TSPluginInit(), we initialize global configs.
In ATS 9, for every remap (re)load, it makes a copy of the shared objects and dlopen it one more time. So, in memory, there will be multiple shared object context. Since the new context doesn’t have the config initialization, and other setups in TSPluginInit(), the code is broken.
I know the loading plugins multiple times is needed for dynamically loading the remap plugins. It breaks the behavior for any plugin both a global plugin and a remap plugin.
Could we add an option to let the user disable the dynamic loading of the plugin?
@gtenev @bryancall

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions