Skip to content

PS-10102 [9.7] Fix of tests for component_keyring_kmip and crashes of component when a KMIP server inaccessible#6104

Open
lukin-oleksiy wants to merge 2 commits into
percona:trunkfrom
lukin-oleksiy:PS-10102-10.x-fix-tests-and-crashes
Open

PS-10102 [9.7] Fix of tests for component_keyring_kmip and crashes of component when a KMIP server inaccessible#6104
lukin-oleksiy wants to merge 2 commits into
percona:trunkfrom
lukin-oleksiy:PS-10102-10.x-fix-tests-and-crashes

Conversation

@lukin-oleksiy

Copy link
Copy Markdown
Contributor

This PR contains 2 commits: First fixes crashed in the situation when a KMIP server inaccessible; Second commit fixes tests suite for component_keyring_kmip

https://perconadev.atlassian.net/browse/PS-10102

When component_keyring_kmip is loaded but keyring initialization fails
(e.g. KMIP server not running or misconfigured), g_keyring_operations
remains a null unique_ptr. Any subsequent call to a keyring service
method (generate, store, remove, read, encrypt, decrypt, iterator)
dereferences this null pointer, triggering an assertion in
unique_ptr::operator*() and aborting the server.

Add a null guard at the start of every service method that dereferences
g_keyring_operations, returning true (error) immediately when the
keyring has not been successfully initialized.
https://perconadev.atlassian.net/browse/PS-10102

Various fixes of component_keyring_kmip MTR tests to run successfully on PyKMIP and CosmianKMS servers.
Some tests are excluded from parallel run.
The CosmianKMS KMIP server now is main for testing, but PyKMIP server is still supported
@lukin-oleksiy
lukin-oleksiy requested a review from jankowsk July 24, 2026 12:48

@jankowsk jankowsk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants