Bug 1637515 - type mismatch error in killsnoop
Summary: type mismatch error in killsnoop
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bcc
Version: 28
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jiri Olsa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1636293
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-09 11:45 UTC by Kazuo Moriwaka
Modified: 2018-11-03 01:47 UTC (History)
4 users (show)

Fixed In Version: bcc-0.7.0-3.fc29 bcc-0.7.0-3.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1636293
Environment:
Last Closed: 2018-11-03 00:00:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kazuo Moriwaka 2018-10-09 11:45:18 UTC
Description of problem:

When killsnoop output traces, TypeError happens.


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

# rpm -qa|grep bcc
bcc-tools-0.7.0-2.fc28.x86_64
bcc-0.7.0-2.fc28.x86_64
python3-bcc-0.7.0-2.fc28.x86_64


How reproducible:

Always


Steps to Reproduce:
1. $ sudo /usr/share/bcc/tools/killsnoop
2. open new terminal emulator 

Actual results:

$ sudo /usr/share/bcc/tools/killsnoop
TIME      PID    COMM             SIG  TPID   RESULT



Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 234, in 'calling callback function'
  File "/usr/lib/python3.6/site-packages/bcc/table.py", line 572, in raw_cb_
    callback(cpu, data, size)
  File "./killsnoop", line 143, in print_event
    event.pid, event.comm, event.sig, event.tpid, event.ret))
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'
(and this traceback repeats)


Additional info:

This case is a similar case of #1636293

    printb(b"%-9s %-6d %-16s %-4d %-6d %d" % (strftime("%H:%M:%S"),
        event.pid, event.comm, event.sig, event.tpid, event.ret))

b"%-9s" needs a binary object, but strftime returns a string object.

Thanks,

Comment 1 Rafael Fonseca 2018-10-09 11:58:46 UTC
Thank you for the report. I've created an issue upstream [1]

[1] https://github.com/iovisor/bcc/issues/2002

Comment 2 Rafael Fonseca 2018-10-11 07:53:32 UTC
A fix has been proposed https://github.com/iovisor/bcc/pull/2007.

Comment 3 Fedora Update System 2018-10-22 11:19:57 UTC
bcc-0.7.0-3.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e02f9f4072

Comment 4 Fedora Update System 2018-10-22 11:34:21 UTC
bcc-0.7.0-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c725b64c41

Comment 5 Fedora Update System 2018-10-22 19:24:09 UTC
bcc-0.7.0-3.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e02f9f4072

Comment 6 Fedora Update System 2018-10-22 23:54:43 UTC
bcc-0.7.0-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c725b64c41

Comment 7 Fedora Update System 2018-11-03 00:00:55 UTC
bcc-0.7.0-3.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-11-03 01:47:11 UTC
bcc-0.7.0-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.