lsofgraph-python icon indicating copy to clipboard operation
lsofgraph-python copied to clipboard

RuntimeError: maximum recursion depth exceeded in cmp

Open a-khakimov opened this issue 6 years ago • 8 comments

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse file system /run/user/1000/doc
      Output information may be incomplete.
Traceback (most recent call last):
  File "lsofgraph.py", line 183, in <module>
    print_graph(procs, conns)
  File "lsofgraph.py", line 168, in print_graph
    if files[0]['proc'] != files[1]['proc']:
RuntimeError: maximum recursion depth exceeded in cmp
Error: <stdin>: syntax error in line 295 near ''

a-khakimov avatar Apr 12 '18 17:04 a-khakimov

made some changes, could u please test?

akme avatar Apr 12 '18 18:04 akme

I did not make any changes. Just downloaded repo and ran command from readme. I use Python 2.7.12

a-khakimov avatar Apr 15 '18 09:04 a-khakimov

I did some changes, pull them and test if it fails, please

akme avatar Apr 15 '18 10:04 akme

unfortunately nothing has changed same mistake

a-khakimov avatar Apr 15 '18 16:04 a-khakimov

Seems that I have same mistake also, script just from git

I use Centos 4.9 in Docker environment

  File "lsofgraph.py", line 183, in <module>
    print_graph(procs, conns)
  File "lsofgraph.py", line 168, in print_graph
    if files[0]['proc'] != files[1]['proc']:
RuntimeError: maximum recursion depth exceeded in cmp
Error: <stdin>: syntax error in line 15

widgetii avatar Apr 18 '18 07:04 widgetii

Could you please try to set higher limit for recursion? Like this: sys.setrecursionlimit(15000)

akme avatar Apr 21 '18 18:04 akme

I tried to add, but still same error

Here is my dump of lsof output lsof.zip

widgetii avatar Apr 23 '18 08:04 widgetii

Does not help adding a line sys.setrecursionlimit(15000). Python 2.7.12 Linux Mint 18.3. Use ssh -l root 11.10.23.200 'lsof -n -F' | python lsofgraph.py | unflatten -l 1 -c 6 | dot -T jpg > /tmp/a.jpg

Python answer: File "lsofgraph.py", line 184, in print_graph(procs, conns) File "lsofgraph.py", line 169, in print_graph if files[0]['proc'] != files[1]['proc']: RuntimeError: maximum recursion depth exceeded in cmp Error: : syntax error in line 72 near ''

ssh is connected to the kernel 2.4.32, lsof version 4.77.

powerpxe avatar May 12 '18 12:05 powerpxe