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

zfs_dbgmsg_enable has incorrect documentation, does not affect some dbgmsg prints #11984

Closed
rincebrain opened this issue May 1, 2021 · 0 comments
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@rincebrain
Copy link
Contributor

rincebrain commented May 1, 2021

System information

Type Version/Name
Distribution Name Debian
Distribution Version 10
Linux Kernel 4.19.0-14-amd64
Architecture x86_64
ZFS Version 0.8.6-1~bpo10+1

(This is also true on 2.0.3 and 2.1.0-rc4)

Describe the problem you're observing

Much to my surprise one day, when I went to set zfs_dbgmsg_enable=1, /proc/spl/kstat/zfs/dbgmsg was already full of entries! (And yes, it was set to 0 before I went to change it.) Nope, I'm wrong, I just assumed it, as the man page said, defaulted to 0, when I can see in the code and by testing in a VM that it defaults to 1.

So I concluded, maybe it solely functions to drop entries, and zfs-module-parameters(5) is stale. So after writing 1 to zfs_dbgmsg_enable, I wrote 0, and surprise, the contents of dbgmsg was unaffected!

Okay, maybe it only affects log lines printed by non-zero zfs_flags settings. Set zfs_dbgmsg_enable back to 1, set zfs_flags to 513, do a few send/recvs and zfs destroys, wc -l on dbgmsg before and after echoing 0 to zfs_dbgmsg_enable...no difference in line count. This was my misunderstanding.

So I tried setting zfs_dbgmsg_enable=0, and then doing a few more send/recvs, and checking the contents of dbgmsg - yup, the number of lines keeps incrementing. I guess it doesn't affect zfs_flags prints?

So I think either the documentation should be revised, or how it works (or doesn't) should be.

@rincebrain rincebrain added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels May 1, 2021
@rincebrain rincebrain changed the title zfs_dbgmsg_enable seems to be a noop zfs_dbgmsg_enable has incorrect documentation, does not affect some dbgmsg prints May 1, 2021
rincebrain added a commit to rincebrain/zfs that referenced this issue May 1, 2021
rincebrain added a commit to rincebrain/zfs that referenced this issue May 1, 2021
rincebrain added a commit to rincebrain/zfs that referenced this issue May 1, 2021
rincebrain added a commit to rincebrain/zfs that referenced this issue May 1, 2021
Changed the default specified for zfs_dbgmsg_enable, added
clarification of interaction with zfs_flags.

Signed-off-by: Rich Ercolani <[email protected]>
Closes openzfs#11984
rincebrain added a commit to rincebrain/zfs that referenced this issue May 4, 2021
Changed the default specified for zfs_dbgmsg_enable, added
clarification of interaction with zfs_flags.

Signed-off-by: Rich Ercolani <[email protected]>
Closes openzfs#11984
behlendorf pushed a commit to behlendorf/zfs that referenced this issue May 10, 2021
Changed the default specified for zfs_dbgmsg_enable, added
clarification of interaction with zfs_flags.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes openzfs#11984
Closes openzfs#11986
sempervictus pushed a commit to sempervictus/zfs that referenced this issue May 31, 2021
Changed the default specified for zfs_dbgmsg_enable, added
clarification of interaction with zfs_flags.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes openzfs#11984
Closes openzfs#11986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

1 participant