question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hang while collecting; no troubleshooting available?

See original GitHub issue

G’day! pytest --doctest-modules is hanging while collecting ... and I can’t figure out why. I’m pretty sure it’s not #1217 / #2188 because I’m not using unittest.mock.call. I’m trying to crank up all the verbosity, but there’s no log output after the pre-collection pytestdebug output.

$ rm -rf .pytest_cache && rm -f pytestdebug.log && PYTEST_DEBUG=true python -m pytest --doctest-modules --log-level=DEBUG --debug --setup-show --collect-only -vv
  pytest_plugin_registered [hook]
      plugin: <_pytest.config.Config object at 0x7f0b283ec110>
      manager: <_pytest.config.PytestPluginManager object at 0x7f0b2911b590>
…
    pytest_cmdline_preparse [hook]
        config: <_pytest.config.Config object at 0x7f0b283ec110>
        args: ['--doctest-modules', '--log-level=DEBUG', '--debug', '--setup-show', '--collect-only', '-vv']
    finish pytest_cmdline_preparse --> [] [hook]
writing pytestdebug information to /workspace/pytestdebug.log
===== test session starts =====
platform linux -- Python 3.7.4, pytest-3.10.1, py-1.8.0, pluggy-0.13.0 -- /opt/conda/bin/python
using: pytest-3.10.1 pylib-1.8.0
setuptools registered plugins:
  pytest-sanic-1.1.2 at /opt/app/app-py3.7/lib/python3.7/site-packages/pytest_sanic/plugin.py
cachedir: .pytest_cache
rootdir: /workspace, inifile:
plugins: sanic-1.1.2
collecting ... 

If there’s a flag I missed, please let me know and I’ll close the issue with all due haste.

If there’s no way to figure out why collecting is hanging, please take this as a bug or feature issue to add a means to figure this out.

If you suspect it’s pytest-sanic, that strikes me as totally reasonable… and I still need to get the evidence to prove it, so please advise as above.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
xloemcommented, Jun 12, 2022

;P

it would be good if --verbose enumerated the files imported while collecting tests, or threw an error if one timed out. this would change a scenario that needs strace to debug into one that is clear.

but it’s not complicated for somebody to submit a PR adding that when they stumble onto this issue googling it in 3 more years.

1reaction
asottilecommented, Oct 28, 2019

--full-trace + ^C might also be helpful

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows-based computer freeze troubleshooting
This article describes how to troubleshoot freeze issues on Windows-based computers and servers. It also provides methods for collecting ...
Read more >
6 Troubleshoot Process Hangs and Loops - Oracle Help Center
This chapter provides information and guidance about some specific procedures for troubleshooting hanging or looping processes.
Read more >
Troubleshooting a virtual machine that has stopped responding
Virtual machines can become unresponsive/freeze/hang in the same way as a physical server for various reasons.
Read more >
Troubleshooting Hanging Situations in HANA - SAP Blogs
Database hangs during startup and does not start up. ... The remaining cache size is (in general) not available for HANA. If this...
Read more >
How to troubleshoot kernel crashes, hangs, or reboots with ...
Occurs when a memory request (Page Fault or kernel memory allocation) is made while not enough memory is available, thus the system terminates ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found