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
structs for diabled plugins will not be freed #3399
Comments
Comment from firstyear (@Firstyear) at 2019-04-29 00:54:20 IIRC I attempted to have these freed but found some circular memory issue (I think?). Anyway, ASAN has a way to "ignore" known warnings at run time, see "suppressions" in https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer or "turning off instrumentation" here https://github.com/google/sanitizers/wiki/AddressSanitizer |
Comment from firstyear (@Firstyear) at 2019-04-29 00:54:21 Metadata Update from @Firstyear:
|
Comment from lkrispen (@elkris) at 2019-05-07 15:38:47 well, I prefer to fix these leaks to supressing the report. The fix is committed already and if we find issues we will address them. |
Comment from firstyear (@Firstyear) at 2019-05-08 02:34:49 I honestly do not remember what they were, which is why I was asking for this to be tested with ASAN - if that's all clear, then I have no concerns :) |
Comment from mreynolds (@mreynolds389) at 2019-05-09 17:54:22 Metadata Update from @mreynolds389:
|
Comment from mreynolds (@mreynolds389) at 2019-05-10 22:46:14 Yes as @Firstyear was concerned this fix causes a crash when doing a db2ldif -r. The plugin is freed because its not enabled in offline mode, and then we crash trying to compare the plugin name:
|
Comment from lkrispen (@elkris) at 2019-05-14 14:05:53
no, they are enabled, but only the plugins MMR depends on should be started. The problem is that not enabled plugins are now freed but remain in the plugin list and when searching the list for the plugins MMR depends on we access a freed plugin. The db2ldif -r crash is fixed by this change:
I will create a new PR |
Comment from vashirov (@vashirov) at 2019-05-17 12:31:32 Now the server crashes in suites/plugins/rootdn_plugin_test.py test:
|
Comment from vashirov (@vashirov) at 2019-05-17 17:50:35 |
Comment from lkrispen (@elkris) at 2019-05-21 09:56:36 sorry for creating so much trouble with this patch, will look into it and if a fix is not obvious we could decide to remove the patch (and live with some memory leaks). A first look at the asan report shows that the free was not the one introduced in the patch, will investigate |
Comment from firstyear (@Firstyear) at 2019-05-22 00:33:14 @elkris It's okay, I remember this leak drove me insane trying to fix it also ... I think it's why I chose to leave it, and opted for the plugin framework rewrite, with an intent to lift-and-shift all the v3 plugins to the v4 execution system which is much safer and better definitions of plugin metadata lifetimes. If you decide to keep digging ... good luck :D |
Comment from lkrispen (@elkris) at 2019-05-22 16:49:27
thanks for the encouragement :-) I will not spend too much time on it, but knowing that my patch causes a crash and not understanding why is not so satisfactory :-( |
Comment from lkrispen (@elkris) at 2019-05-23 13:10:27 ok, I didn't understand why it fails, but I do understand why we have memory leaks for not enabled plugins. It was introduced with the patch for 49186, in plugins_dependency_freeall() the freeing of plugins was commented out and move to plugin_freeall(). But this only frees enabled plugins. A new PR where the free in plugin_dependecy_freeall is handling not enabled plugins is coming |
Comment from lkrispen (@elkris) at 2020-02-26 16:24:12 |
Comment from lkrispen (@elkris) at 2020-02-26 16:24:22 Metadata Update from @elkris:
|
Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/50340
Asan shows leaks like this:
This affects plugins which are not enabled when read from dse.ldif. Enabled plugins are added to a plugin list and freed at shutdown
This is not a big deal from a memory usgae view, but makes it more difficult to analyze asan reports
The text was updated successfully, but these errors were encountered: