Skip to content
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

sync_repl crashes if enabled while dynamic plugin is enabled #5407

Closed
tbordaz opened this issue Aug 9, 2022 · 1 comment
Closed

sync_repl crashes if enabled while dynamic plugin is enabled #5407

tbordaz opened this issue Aug 9, 2022 · 1 comment
Assignees
Labels
Need BZ The ticket needs to be cloned to a BZ priority_high need urgent fix / highly valuable / easy to fix
Milestone

Comments

@tbordaz
Copy link
Contributor

tbordaz commented Aug 9, 2022

Issue Description
Dynamic plugin (nsslapd-dynamic-plugins) allows to initialize and start a plugin while the server is running. sync_repl expects that pre/post operation callbacks are called for each operation. For a MOD that enables the plugin, the preop is not called (plugin not init/started), while the postop is called as the plugin as been init/started.
Because of this the postop callback is missing the primary operation and crash

Package Version and Platform:
Since 1.3.9

Steps to Reproduce
run tests/tickets/ticket48013_test.py

Expected results
The server should not crash

@tbordaz tbordaz added the needs triage The issue will be triaged during scrum label Aug 9, 2022
@tbordaz tbordaz self-assigned this Aug 9, 2022
@tbordaz tbordaz added Need BZ The ticket needs to be cloned to a BZ priority_high need urgent fix / highly valuable / easy to fix and removed needs triage The issue will be triaged during scrum labels Aug 9, 2022
@tbordaz tbordaz added this to the 1.3.10 milestone Aug 9, 2022
tbordaz added a commit to tbordaz/389-ds-base that referenced this issue Aug 10, 2022
…bled

Bug description:
	When dynamic plugin is enabled, if a MOD enables sync_repl plugin
	then sync_repl init function registers the postop callback
        that will be called for the MOD itself while the preop
        has not been called.
        postop expects preop to be called and so primary operation
        to be set. When it is not set it crashes

Fix description:
	If the primary operation is not set, just return

relates: 389ds#5407

Reviewed by: Mark Reynolds
tbordaz added a commit that referenced this issue Aug 10, 2022
…bled (#5411)

Bug description:
	When dynamic plugin is enabled, if a MOD enables sync_repl plugin
	then sync_repl init function registers the postop callback
        that will be called for the MOD itself while the preop
        has not been called.
        postop expects preop to be called and so primary operation
        to be set. When it is not set it crashes

Fix description:
	If the primary operation is not set, just return

relates: #5407

Reviewed by:
tbordaz added a commit that referenced this issue Feb 2, 2024
…bled (#5411)

Bug description:
        When dynamic plugin is enabled, if a MOD enables sync_repl plugin
        then sync_repl init function registers the postop callback
        that will be called for the MOD itself while the preop
        has not been called.
        postop expects preop to be called and so primary operation
        to be set. When it is not set it crashes

Fix description:
        If the primary operation is not set, just return

relates: #5407
@tbordaz
Copy link
Contributor Author

tbordaz commented Feb 2, 2024

e867d14..ff1d65d 389-ds-base-2.2
a2f60b8..692c4ce 389-ds-base-1.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Need BZ The ticket needs to be cloned to a BZ priority_high need urgent fix / highly valuable / easy to fix
Projects
None yet
Development

No branches or pull requests

2 participants