-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Handle broken pipes in arc_summary #6969
Conversation
FWIW, a more comprehensive solution is to implement a generic signal handler that exits quietly. This allows you to catch SIGINT (aka control+c) gracefully, too. |
I'm still able to cause a warning with the patch using python 2.7.12 on Ubuntu 16.04.
|
4803edd
to
ba11438
Compare
@behlendorf I'm not seeing that error doing the same test on Ubuntu 16.04 with python 2.7.12 with the current version of the patch. Can you test it one more time? |
ba11438
to
4a7ff4c
Compare
I wonder if this is a bug in the Python interpreter; i can reproduce it easily running
However we did get a EPIPE, so why doesn't the try/except work? From
|
@loli10K Thanks for looking into it. I think I might try what @richardelling suggested and implement a signal handler and see if it yields better results. |
337e785
to
deec9ec
Compare
@loli10K I think the Thanks for your help! |
deec9ec
to
5ae8daa
Compare
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]>
5ae8daa
to
3c87f68
Compare
@dinatale2 i'm still seeing the same error message even with |
Codecov Report
@@ Coverage Diff @@
## master #6969 +/- ##
==========================================
+ Coverage 75.25% 75.28% +0.02%
==========================================
Files 296 296
Lines 95453 95453
==========================================
+ Hits 71837 71864 +27
+ Misses 23616 23589 -27
Continue to review full report at Codecov.
|
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
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
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
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
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
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
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
Description
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.
Motivation and Context
#6965
How Has This Been Tested?
In a CentOS 7 VM.
Types of changes
Checklist:
Signed-off-by
.