bcc icon indicating copy to clipboard operation
bcc copied to clipboard

fileslower 0 cause error info loop

Open justlooks opened this issue 7 years ago • 6 comments

this can not be stop until I type "kill -9"

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 314, in 'calling callback function'
  File "/usr/lib/python2.7/site-packages/bcc/table.py", line 650, in raw_cb_
    callback(cpu, data, size)
  File "./fileslower", line 229, in print_event
    if event.name_len > DNAME_INLINE_LEN:
NameError: global name 'DNAME_INLINE_LEN' is not defined
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 314, in 'calling callback function'
  File "/usr/lib/python2.7/site-packages/bcc/table.py", line 650, in raw_cb_
    callback(cpu, data, size)
  File "./fileslower", line 229, in print_event
    if event.name_len > DNAME_INLINE_LEN:
NameError: global name 'DNAME_INLINE_LEN' is not defined
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 314, in 'calling callback function'
  File "/usr/lib/python2.7/site-packages/bcc/table.py", line 650, in raw_cb_
    callback(cpu, data, size)
  File "./fileslower", line 229, in print_event
    if event.name_len > DNAME_INLINE_LEN:
NameError: global name 'DNAME_INLINE_LEN' is not defined

justlooks avatar Feb 27 '19 09:02 justlooks

Hey

What kernel and OS are you running? and version of bcc?

Al

On Wed, Feb 27, 2019 at 9:01 AM justlooks [email protected] wrote:

this can not be stop until I type "kill -9"

Traceback (most recent call last): File " ctypes/callbacks.c", line 314, in 'calling callback function' File "/usr/lib/python2.7/site-packages/bcc/table.py", line 650, in raw_cb callback(cpu, data, size) File "./fileslower", line 229, in print_event if event.name_len > DNAME_INLINE_LEN: NameError: global name 'DNAME_INLINE_LEN' is not defined Traceback (most recent call last): File " ctypes/callbacks.c", line 314, in 'calling callback function' File "/usr/lib/python2.7/site-packages/bcc/table.py", line 650, in raw_cb callback(cpu, data, size) File "./fileslower", line 229, in print_event if event.name_len > DNAME_INLINE_LEN: NameError: global name 'DNAME_INLINE_LEN' is not defined Traceback (most recent call last): File " ctypes/callbacks.c", line 314, in 'calling callback function' File "/usr/lib/python2.7/site-packages/bcc/table.py", line 650, in raw_cb callback(cpu, data, size) File "./fileslower", line 229, in print_event if event.name_len > DNAME_INLINE_LEN: NameError: global name 'DNAME_INLINE_LEN' is not defined

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iovisor/bcc/issues/2235, or mute the thread https://github.com/notifications/unsubscribe-auth/ADPbVEI01yJiyMzcc_wi7bBIPjkbWkNpks5vRklggaJpZM4bUBct .

mcaleavya avatar Feb 27 '19 09:02 mcaleavya

ok I can see this with the latest version of bcc

root@henky:~/bcc/tools# ./fileslower.py 1 Tracing sync read/writes slower than 1 ms TIME(s) COMM TID D BYTES LAT(ms) FILENAME Traceback (most recent call last): File "ctypes/callbacks.c", line 315, in 'calling callback function' File "/usr/lib/python2.7/dist-packages/bcc/table.py", line 650, in raw_cb callback(cpu, data, size) File "./fileslower.py", line 229, in print_event if event.name_len > DNAME_INLINE_LEN: NameError: global name 'DNAME_INLINE_LEN' is not defined

I am not sure as to why this is failing now as compared to previously - but declaring DNAME_INLINE_LEN to be say 32 as a python variable resolves the issue - happy to do a pull request but would like to understand the failure more as this was showing as working on previous versions where I had a file > 32 chars it was limited and appended with dots.

root@henky:~/bcc/tools# ./fileslower.py 1 Tracing sync read/writes slower than 1 ms TIME(s) COMM TID D BYTES LAT(ms) FILENAME 3.268 prometheus 1285 W 3123 1.96 45030fed915769.db 13.267 prometheus 1285 W 3123 1.73 47f09950ff0807.db 23.274 prometheus 1351 W 3123 7.73 47fc9950ff014b.db 33.268 prometheus 1351 W 3123 1.93 5a665c3eabcb2c.db

Al

On Wed, Feb 27, 2019 at 9:24 AM [email protected] wrote:

Hey

What kernel and OS are you running? and version of bcc?

Al

On Wed, Feb 27, 2019 at 9:01 AM justlooks [email protected] wrote:

this can not be stop until I type "kill -9"

Traceback (most recent call last): File " ctypes/callbacks.c", line 314, in 'calling callback function' File "/usr/lib/python2.7/site-packages/bcc/table.py", line 650, in raw_cb callback(cpu, data, size) File "./fileslower", line 229, in print_event if event.name_len > DNAME_INLINE_LEN: NameError: global name 'DNAME_INLINE_LEN' is not defined Traceback (most recent call last): File " ctypes/callbacks.c", line 314, in 'calling callback function' File "/usr/lib/python2.7/site-packages/bcc/table.py", line 650, in raw_cb callback(cpu, data, size) File "./fileslower", line 229, in print_event if event.name_len > DNAME_INLINE_LEN: NameError: global name 'DNAME_INLINE_LEN' is not defined Traceback (most recent call last): File " ctypes/callbacks.c", line 314, in 'calling callback function' File "/usr/lib/python2.7/site-packages/bcc/table.py", line 650, in raw_cb callback(cpu, data, size) File "./fileslower", line 229, in print_event if event.name_len > DNAME_INLINE_LEN: NameError: global name 'DNAME_INLINE_LEN' is not defined

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iovisor/bcc/issues/2235, or mute the thread https://github.com/notifications/unsubscribe-auth/ADPbVEI01yJiyMzcc_wi7bBIPjkbWkNpks5vRklggaJpZM4bUBct .

mcaleavya avatar Feb 27 '19 09:02 mcaleavya

I think 51d62d36bd072530a238ac147a61b631fdc44659 broke it.

arighi avatar Feb 27 '19 17:02 arighi

Thanks I was wondering this morning where the ctype structures went but didn’t have a lot of time to investigate further

Al

On 27 Feb 2019, at 17:32, Andrea Righi [email protected] wrote:

I think 51d62d3 broke it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

mcaleavya avatar Feb 27 '19 17:02 mcaleavya

Fixed by #2236 . Thanks!

boat0 avatar Feb 27 '19 18:02 boat0

Thanks I was wondering this morning where the ctype structures went but didn’t have a lot of time to investigate further Al

https://github.com/iovisor/bcc/commit/3156303439960602667b2e1dc05aebfe43ad0066

boat0 avatar Feb 27 '19 18:02 boat0