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

zloop fails with zdb: leaked MOS object (persistent error log) #14434

Closed
ahrens opened this issue Jan 25, 2023 · 1 comment · Fixed by #14442
Closed

zloop fails with zdb: leaked MOS object (persistent error log) #14434

ahrens opened this issue Jan 25, 2023 · 1 comment · Fixed by #14442
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@ahrens
Copy link
Member

ahrens commented Jan 25, 2023

System information

Type Version/Name
Distribution Name
Distribution Version
Kernel Version
Architecture
OpenZFS Version 9cd71c8

Describe the problem you're observing

When running zloop, sometimes zdb fails due to detecting leaked objects:

MOS object 733 (persistent error log) leaked
MOS object 734 (persistent error log) leaked

It's possible that this is a bug in zdb: it might need to be taught about the new DMU_OT_ERROR_LOG objects that were introduced by #12812 (cc @gamanakis). e.g. in dump_mos_leaks(), we simply call mos_obj_refd(spa->spa_errlog_last), but now the spa_errlog_last contains a mapping from objset id to another DMU_OT_ERROR_LOG object, which also needs to be marked as in-use.

Describe how to reproduce the problem

zloop.sh

Include any warning/errors/backtraces from the system logs

@ahrens ahrens added the Type: Defect Incorrect behavior (e.g. crash, hang) label Jan 25, 2023
@gamanakis
Copy link
Contributor

Thanks for reporting this. I have an idea how to fix it. Will take a look.

behlendorf pushed a commit that referenced this issue Feb 2, 2023
With the persistent error log feature we need to account for
spa_errlog_{scrub, last} containing mappings to other error log objects,
which need to be marked as in-use as well.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: George Amanakis <[email protected]>
Closes #14442 
Closes #14434
lundman pushed a commit to openzfsonwindows/openzfs that referenced this issue Mar 3, 2023
With the persistent error log feature we need to account for
spa_errlog_{scrub, last} containing mappings to other error log objects,
which need to be marked as in-use as well.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: George Amanakis <[email protected]>
Closes openzfs#14442 
Closes openzfs#14434
@ryao ryao mentioned this issue Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants