Bug 1658692

Summary: Multiple tools do not exit properly when interrupted by keyboard.
Product: Red Hat Enterprise Linux 8 Reporter: John Pittman <jpittman>
Component: bccAssignee: Jerome Marchand <jmarchan>
Status: CLOSED ERRATA QA Contact: Jean-Tsung Hsiao <jhsiao>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.0CC: jhsiao, jmarchan, jolsa, nweddle, rdossant, skozina, tcleveng, zsun
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.8.0-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 20:42:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1680631    
Bug Blocks: 1696304, 1701002    

Description John Pittman 2018-12-12 16:49:16 UTC
Description of problem:

Traceback when exiting biosnoop command

^CTraceback (most recent call last):
  File "./biosnoop", line 189, in <module>
    b.perf_buffer_poll()
  File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 1216, in perf_buffer_poll
    lib.perf_reader_poll(len(readers), readers, timeout)

Version-Release number of selected component (if applicable):

kernel-4.18.0-40.el8.x86_64
bcc-0.7.0-3.el8.x86_64
bcc-tools-0.7.0-3.el8.x86_64

Steps to reproduce:

Execute biosnoop
ctrl-c to stop

Actual results:

Traceback

Expected results:

Exit should be smoother with ctrl-c
Good example would be biotop

Comment 1 Jerome Marchand 2018-12-13 13:28:28 UTC
So far the issue has been reported for biosnoop and mdflush. But several other tools suffer from the same issue.

Comment 2 Jerome Marchand 2018-12-14 15:48:40 UTC
*** Bug 1658778 has been marked as a duplicate of this bug. ***

Comment 8 Jean-Tsung Hsiao 2019-04-22 18:32:25 UTC
Still saw the same issue:

^CTraceback (most recent call last):
  File "/usr/share/bcc/tools/biosnoop", line 190, in <module>
    b.perf_buffer_poll()
  File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 1216, in perf_buffer_poll
    lib.perf_reader_poll(len(readers), readers, timeout)
KeyboardInterrupt
[root@netqe29 ~]# 

[root@netqe29 ~]# rpm -q bcc
bcc-0.7.0-5.el8.x86_64
[root@netqe29 ~]# rpm -q bcc-tools
bcc-tools-0.7.0-5.el8.x86_64
[root@netqe29 ~]# uname -a
Linux netqe29.knqe.lab.eng.bos.redhat.com 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@netqe29 ~]# 

Hi Jerome,
Is this really an issue?
If it is an issue, it has not got fixed yet. Why put it ON_QA?
Thanks!
Jean

Comment 9 Ziqian SUN (Zamir) 2019-04-23 01:32:30 UTC
Hi Jean,

Will you please try bcc-0.8.0-1? It works for me with the updated version.

Hi Jerome,

Will you please fix the 'Fixed in Version' here?

Comment 10 Jerome Marchand 2019-04-23 11:14:48 UTC
(In reply to Ziqian SUN (Zamir) from comment #9)
> Hi Jean,
> 
> Will you please try bcc-0.8.0-1? It works for me with the updated version.
> 
> Hi Jerome,
> 
> Will you please fix the 'Fixed in Version' here?

Sure thing.

Comment 11 Jean-Tsung Hsiao 2019-04-23 15:10:18 UTC
The fix has been verified.

253.439863000  kworker/10:1   22677  sda     W  180899936 4096       0.04
283.648090000  xfsaild/dm-0   1103   sda     W  128448192 16384      0.09
283.648099000  xfsaild/dm-0   1103   sda     W  154660872 4096       0.09
283.648102000  xfsaild/dm-0   1103   sda     W  154660896 8192       0.09
283.648110000  xfsaild/dm-0   1103   sda     W  159230912 32768      0.10
283.648129000  xfsaild/dm-0   1103   sda     W  207091328 16384      0.12
283.648131000  xfsaild/dm-0   1103   sda     W  207378752 16384      0.12
313.855928000  kworker/10:1   22677  sda     W  180899944 4096       0.04
313.856050000  xfsaild/dm-0   1103   sda     W  128446464 4096       0.03
344.063865000  kworker/10:1   22677  sda     W  180899952 4096       0.04
344.063985000  xfsaild/dm-0   1103   sda     W  128446464 4096       0.03
^C[root@netqe29 ~]# rpm -q bcc
bcc-0.8.0-1.el8.x86_64
[root@netqe29 ~]#

Comment 13 errata-xmlrpc 2019-11-05 20:42:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3327