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.

Segfault when executing from pytest

See original GitHub issue

Desired change

  • Rule(s): NA
  • Adjustment: This is a bug report, not an adjustment.

Explanation

When I execute flake8 using pytest like this pytest --flake8 --mypy I get the following segfault:

Current thread 0x00007ffff7ff4740 (most recent call first):
  File "venv/lib/python3.6/site-packages/flake8_simplify.py", 
line 941 in is_stmt_equal
  File "venv/lib/python3.6/site-packages/flake8_simplify.py", 
line 947 in is_stmt_equal
...
  File "venv/lib/python3.6/site-packages/flake8_simplify.py", 
line 947 in is_stmt_equal
  File "venv/lib/python3.6/site-packages/flake8_simplify.py", 
line 947 in is_stmt_equal
  ...
Segmentation fault

I know this error may not give enough information but I have no idea how to debug this. Also, I noticed this happens only in versions 0.12.0 to 0.14.1, but not in 0.11.0 and only with the exact parameters mentioned above. If for instance I run pytest --flake8 or just flake8 . --exclude venv the problem will not occur.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Sep 20, 2021

Thanks for merging!

1reaction
ghostcommented, Sep 16, 2021

@scganterh can you confirm if https://github.com/MartinThoma/flake8-simplify/pull/69 solves your issue? I believe it should.

@MartinThoma is there anything else I would need to do to help merge this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pytest segmentation fault and test fail - python - Stack Overflow
When I run this test using the PyCharm test runner, I get the following result: In the list of running or executed tests...
Read more >
Segmentation fault after test pytorch · Issue #8841 · pytest-dev ...
python 3.9, CentOS, I use pytest with pytorch, after test case runs success, I got Segmentation fault error, here is the case in...
Read more >
Solved: segmentation fault while pytest - Atlassian Community
Old builds stopped working recently. We get a segmanatation fault in something related to pymongo / or maybe to tensorflow.
Read more >
Sqlite segmentation fault regression when running tests (since ...
The segmentation fault occurs regardless of whether an in-memory or file-based database is used. When the file-based run crashes, the DB is around...
Read more >
[#ARROW-5863] [Python] Segmentation Fault via pytest-runner
When running pytest on projects using pyarrow==0.14.0 on Linux, I am getting segmentation faults, but interestingly only when run via ...
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