plasma-umass / scalene

Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python with AI-powered optimization proposals
Apache License 2.0
11.57k stars 388 forks source link

IndexError: pop from empty list #467

Open mkst opened 1 year ago

mkst commented 1 year ago

Describe the bug

The following exception is thrown, unsure the impact as this is my first time using scalene

Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.10/dist-packages/scalene/scalene_sigqueue.py", line 48, in run
    self.process(*item)
  File "/usr/local/lib/python3.10/dist-packages/scalene/scalene_profiler.py", line 1273, in alloc_sigqueue_processor
    last_file, last_line = Scalene.__invalidate_queue.pop(0)
IndexError: pop from empty list

To Reproduce

I'm trying to profile splat, as part of sssv decomp...reproduction steps will be difficult, but i'm just running:

scalene tools/splat/split.py sssv.us.yaml

Expected behavior No exceptions thrown for usual behaviour.

Desktop (please complete the following information):

Additional context I can't get scalene to serve anything up, unsure if thats related to this exception or just my bad luck..

Force1ess commented 8 months ago

Same problem, this problem happened when I tried to use scalene with multiprocessing or concurrent process pool

emeryberger commented 8 months ago

If you can provide a minimal working example (ok, "non-working") that would be immensely helpful - thanks!