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

arc_summary -d error: TypeError: a bytes-like object is required, not 'str' #12457

Closed
loop-evgeny opened this issue Aug 5, 2021 · 3 comments
Closed
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@loop-evgeny
Copy link

loop-evgeny commented Aug 5, 2021

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version 18.04
Kernel Version 4.15.0-151-generic
Architecture x64
OpenZFS Version Unknown
# zfs version
unrecognized command 'version'

Python 3.6.9

Describe the problem you're observing

arc_summary -d reports the following error at the end of the normal arc_summary output:

...
DMU Prefetch Efficiency:					1.94k
	Hit Ratio:			0.26%	5
	Miss Ratio:			99.74%	1.94k

Traceback (most recent call last):
  File "/usr/sbin/arc_summary", line 991, in <module>
    main()
  File "/usr/sbin/arc_summary", line 986, in main
    page(Kstat)
  File "/usr/sbin/arc_summary", line 865, in _tunable_summary
    description_list = p.communicate()[0].strip().split('\0')
TypeError: a bytes-like object is required, not 'str'

Describe how to reproduce the problem

Run arc_summary -d

@loop-evgeny loop-evgeny added the Type: Defect Incorrect behavior (e.g. crash, hang) label Aug 5, 2021
@gdevenyi
Copy link
Contributor

gdevenyi commented Aug 5, 2021

Sounds like a python2/python3 problem.

@rincebrain
Copy link
Contributor

#6849

Ubuntu 18.04 ships a highly-patched 0.7.5, which is from December 2017. This was patched in master in November 2017 and in 0.7.x on January 30th.

I suggest you ask Ubuntu to cherrypick it or choose to run a newer version.

@loop-evgeny
Copy link
Author

Thanks, I did not find that issue when I searched for "is:issue arc_summary TypeError". Turns out you have to search for "is:issue arc_summary.py TypeError". This is a duplicate, then, closing.

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

No branches or pull requests

3 participants