Skip to content

vsg hangs when analyzing large files #1526

@RasmusGOlsen

Description

@RasmusGOlsen

Environment
Ubuntu 22.04
Python 3.13.2
Vsg 3.35

Describe the bug
When vsg analyzes large files, it hangs. The specific file I used containts over 37000 lines. It may eventually complete, but I interruptet the process after 20 minutes of waiting,

To Reproduce
Steps to reproduce the behavior:

  1. vsg file.vhd
  2. wait for 20 min
  3. Ctrl+c
  4. See error
^CProcess ForkPoolWorker-11:
Process ForkPoolWorker-5:
Process ForkPoolWorker-16:
Process ForkPoolWorker-12:
Process ForkPoolWorker-2:
Process ForkPoolWorker-4:
Process ForkPoolWorker-3:
Process ForkPoolWorker-8:
Process ForkPoolWorker-10:
Process ForkPoolWorker-15:
Process ForkPoolWorker-13:
Process ForkPoolWorker-14:
Process ForkPoolWorker-6:
Process ForkPoolWorker-7:
Traceback (most recent call last):
  File "/net/fs01/firmware-tools/python/uv/cpython-3.13.2-linux-x86_64-gnu/lib/python3.13/multiprocessing/pool.py", line 856, in next
    item = self._items.popleft()
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rgo/devel/hdlcores/_env/HDLCores/bin/vsg", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/rgo/devel/hdlcores/_env/HDLCores/lib/python3.13/site-packages/vsg/__main__.py", line 154, in main
    for tResult in pool.imap(f, enumerate(commandLineArguments.filename)):
                   ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/net/fs01/firmware-tools/python/uv/cpython-3.13.2-linux-x86_64-gnu/lib/python3.13/multiprocessing/pool.py", line 861, in next
    self._cond.wait(timeout)
    ~~~~~~~~~~~~~~~^^^^^^^^^
  File "/net/fs01/firmware-tools/python/uv/cpython-3.13.2-linux-x86_64-gnu/lib/python3.13/threading.py", line 359, in wait
    waiter.acquire()
    ~~~~~~~~~~~~~~^^
KeyboardInterrupt

Expected behavior
Exit normally within a reasonable time

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions