-
Notifications
You must be signed in to change notification settings - Fork 258
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
stored: fix crashes of storage tools when autoxflate plugin is loaded #1348
Conversation
96b50aa
to
0fdc73f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIR we have autoxflate in the "basic" bareos test.
We should add more sub-tests that run the tools (at least bextract, bls and bscan) on the volumes created by the basic backup/restore test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests look promising, but apparently we have memory leaks in the tools when autoxflate is enabled, thus the tests fail in the sanitizer stage.
I think there is also a fixture missing, as with enough parallelism (i.e. -j 100
) the tests failed on my machine, too.
5bdb0d8
to
0b112db
Compare
2698bbf
to
fa08600
Compare
This call lets the autoxflate plugin setup the compression buffers.
When records are translated by a plugin the plugin will allocate its own record. In this scenario ReadRecords() is supposed to call FreeRecord() which it didn't do.
fa08600
to
10ddce9
Compare
10ddce9
to
b109580
Compare
The low level storage tools bcopy, bextract, bls, bscan and btape load sd plugins if they are configured.
Unfortunately, the plugin event
bSdEventSetupRecordTranslation
was not emitted before, so that the autoxflate plugin did not setup the compression buffers.Now, all these tools do emit the plugin event, and the autoxflate-sd plugin also checks for the buffer before using it and emits an message otherwise.
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
General
Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.Source code quality
bareos-check-sources --since-merge
does not report any problemsTests