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 | head often prints out a Python error on 0.7.X #6965

Closed
rincebrain opened this issue Dec 15, 2017 · 1 comment
Closed

arc_summary | head often prints out a Python error on 0.7.X #6965

rincebrain opened this issue Dec 15, 2017 · 1 comment

Comments

@rincebrain
Copy link
Contributor

System information

Type Version/Name
Distribution Name Debian
Distribution Version 9.3
Linux Kernel 4.9.0-4-amd64
Architecture x86_64
ZFS Version 0.7.3-3
SPL Version 0.7.3-1

Describe the problem you're observing

I often use arc_summary | head when I just want to see the first few lines, and starting when I installed 0.7.3 (I was on 0.6.5.11 prior), arc_summary sometimes prints to stderr at the end like so:

# arc_summary |head -n 20

------------------------------------------------------------------------
ZFS Subsystem Report                            Fri Dec 15 00:39:00 2017
ARC Summary: (HEALTHY)
        Memory Throttle Count:                  0

ARC Misc:
        Deleted:                                76.91m
        Mutex Misses:                           8.67m
        Evict Skips:                            8.67m

ARC Size:                               24.17%  5.80    GiB
        Target Size: (Adaptive)         24.30%  5.83    GiB
        Min Size (Hard Limit):          4.06%   998.37  MiB
        Max Size (High Water):          24:1    24.00   GiB

ARC Size Breakdown:
        Recently Used Cache Size:       5.60%   334.10  MiB
        Frequently Used Cache Size:     94.40%  5.50    GiB

Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe

It seems to occur more frequently with smaller -n to head, but it's not guaranteed at any -n (head -n 1 produces it 10 out of 11 times when I tried it).

This never occurred in 0.6.5.X, to my recollection, so I would guess this came with the arc_summary move to Python3.

Describe how to reproduce the problem

Pipe arc_summary into head, or presumably anything else that might truncate its output before it's finished writing (tail or less do not ever produce this, for example)

@dswartz
Copy link
Contributor

dswartz commented Dec 15, 2017 via email

dinatale2 added a commit to dinatale2/zfs that referenced this issue Dec 15, 2017
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965
dinatale2 added a commit to dinatale2/zfs that referenced this issue Dec 16, 2017
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Requires-Builders: test style
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965
dinatale2 added a commit to dinatale2/zfs that referenced this issue Dec 17, 2017
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Requires-Builders: test style
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965
dinatale2 added a commit to dinatale2/zfs that referenced this issue Dec 17, 2017
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Requires-Builders: test style
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965
dinatale2 added a commit to dinatale2/zfs that referenced this issue Dec 17, 2017
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Jan 16, 2018
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Reviewed-by: Richard Elling <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965 
Closes openzfs#6969
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Jan 18, 2018
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Reviewed-by: Richard Elling <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965 
Closes openzfs#6969
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Jan 18, 2018
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Reviewed-by: Richard Elling <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965 
Closes openzfs#6969
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Jan 19, 2018
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Reviewed-by: Richard Elling <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965 
Closes openzfs#6969
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this issue Jan 29, 2018
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Reviewed-by: Richard Elling <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965
Closes openzfs#6969
tonyhutter pushed a commit that referenced this issue Feb 6, 2018
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Reviewed-by: Richard Elling <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes #6965 
Closes #6969
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this issue Feb 13, 2018
Using a command similar to 'arc_summary.py | head' causes
a broken pipe exception. Gracefully exit in the case of a
broken pipe in arc_summary.py.

Reviewed-by: Richard Elling <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes openzfs#6965
Closes openzfs#6969
rincebrain added a commit to rincebrain/zfs that referenced this issue May 12, 2021
So, it turns out arc_summary3 has the same problem documented for
the original arc_summary in openzfs#6965, and this was never caught
because of a flaw in the additions to the test case.

Redid those fixes for arc_summary3, corrected the test case to
fail correctly.

Signed-off-by: Rich Ercolani <[email protected]>
rincebrain added a commit to rincebrain/zfs that referenced this issue May 12, 2021
So, it turns out arc_summary3 has the same problem documented for
the original arc_summary in openzfs#6965, and this was never caught
because of a flaw in the additions to the test case.

Redid those fixes for arc_summary3, corrected the test case to
fail correctly.

Fixes: openzfs#12036

Signed-off-by: Rich Ercolani <[email protected]>
rincebrain added a commit to rincebrain/zfs that referenced this issue May 13, 2021
So, it turns out arc_summary3 has the same problem documented for
the original arc_summary in openzfs#6965, and this was never caught
because of a flaw in the additions to the test case.

Redid those fixes for arc_summary3, corrected the test case to
fail correctly.

Fixes: openzfs#12036

Signed-off-by: Rich Ercolani <[email protected]>
rincebrain added a commit to rincebrain/zfs that referenced this issue May 13, 2021
So, it turns out arc_summary3 has the same problem documented for
the original arc_summary in openzfs#6965, and this was never caught
because of a flaw in the additions to the test case.

Redid those fixes for arc_summary3, corrected the test case to
fail correctly.

Fixes: openzfs#12036

Signed-off-by: Rich Ercolani <[email protected]>
rincebrain added a commit to rincebrain/zfs that referenced this issue May 13, 2021
So, it turns out arc_summary3 has the same problem documented for
the original arc_summary in openzfs#6965, and this was never caught
because of a flaw in the additions to the test case.

Redid those fixes for arc_summary3, corrected the test case to
fail correctly.

Fixes: openzfs#12036

Signed-off-by: Rich Ercolani <[email protected]>
rincebrain added a commit to rincebrain/zfs that referenced this issue May 13, 2021
So, it turns out arc_summary3 has the same problem documented for
the original arc_summary in openzfs#6965, and this was never caught
because of a flaw in the additions to the test case.

Redid those fixes for arc_summary3, corrected the test case to
fail correctly.

Fixes: openzfs#12036

Signed-off-by: Rich Ercolani <[email protected]>
rincebrain added a commit to rincebrain/zfs that referenced this issue May 23, 2021
So, it turns out arc_summary[23] still have problems like the
one documented in openzfs#6965, and the test case didn't notice due to
a flaw.

Redid fixes for both arc_summary scripts, corrected the test case to
fail correctly.

Fixes: openzfs#12036

Signed-off-by: Rich Ercolani <[email protected]>
rincebrain added a commit to rincebrain/zfs that referenced this issue May 23, 2021
So, it turns out arc_summary[23] still have problems like the
one documented in openzfs#6965, and the test case didn't notice due to
a flaw.

Redid fixes for both arc_summary scripts, corrected the test case to
fail correctly.

Fixes: openzfs#12036

Signed-off-by: Rich Ercolani <[email protected]>
rincebrain added a commit to rincebrain/zfs that referenced this issue May 23, 2021
So, it turns out arc_summary[23] still have problems like the
one documented in openzfs#6965, and the test case didn't notice due to
a flaw.

Redid fixes for both arc_summary scripts, corrected the test case to
fail correctly.

Fixes: openzfs#12036

Signed-off-by: Rich Ercolani <[email protected]>
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

No branches or pull requests

2 participants