MagicStack / MagicStack/uvloop

[openbsd] test_fs_event.py causes Segmentation fault in python

Open
#620 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Cython
Stars
11.9k
Forks
616
PR merge metrics
No merged PRs in 30d

Description

  • uvloop version: 0.20.0
  • Python version: 3.11.9
  • Platform: OpenBSD
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: Yes
  • Does uvloop behave differently from vanilla asyncio? How?:

Test output for the specific test

===>  Regression tests for py3-uvloop-0.20.0
cd /usr/ports/pobj/py-uvloop-0.20.0-python3/uvloop-0.20.0 && env PYTHONASYNCIODEBUG=1 py.test -vvv 'tests/test_fs_event.py::Test_UV_FS_EVENT_CHANGE::test_fs_event_change'
============================= test session starts ==============================
platform openbsd7 -- Python 3.11.9, pytest-8.2.0, pluggy-1.5.0 -- /usr/local/bin/python3.11
cachedir: .pytest_cache
rootdir: /usr/ports/pobj/py-uvloop-0.20.0-python3/uvloop-0.20.0
configfile: pyproject.toml
collecting ... collected 1 item

tests/test_fs_event.py::Test_UV_FS_EVENT_CHANGE::test_fs_event_change Fatal Python error: Segmentation fault

Current thread 0x0000063d21efb7d0 (most recent call first):
  File "/usr/ports/pobj/py-uvloop-0.20.0-python3/uvloop-0.20.0/tests/test_fs_event.py", line 49 in test_fs_event_change
  File "/usr/local/lib/python3.11/unittest/case.py", line 579 in _callTestMethod
  File "/usr/local/lib/python3.11/unittest/case.py", line 623 in run
  File "/usr/local/lib/python3.11/unittest/case.py", line 678 in __call__
  File "/usr/local/lib/python3.11/site-packages/_pytest/unittest.py", line 343 in runtest
  File "/usr/local/lib/python3.11/site-packages/_pytest/runner.py", line 173 in pytest_runtest_call
  File "/usr/local/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/usr/local/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/local/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/usr/local/lib/python3.11/site-packages/_pytest/runner.py", line 241 in <lambda>
  File "/usr/local/lib/python3.11/site-packages/_pytest/runner.py", line 341 in from_call
  File "/usr/local/lib/python3.11/site-packages/_pytest/runner.py", line 240 in call_and_report
  File "/usr/local/lib/python3.11/site-packages/_pytest/runner.py", line 135 in runtestprotocol
  File "/usr/local/lib/python3.11/site-packages/_pytest/runner.py", line 116 in pytest_runtest_protocol
  File "/usr/local/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/usr/local/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/local/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/usr/local/lib/python3.11/site-packages/_pytest/main.py", line 364 in pytest_runtestloop
  File "/usr/local/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/usr/local/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/local/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/usr/local/lib/python3.11/site-packages/_pytest/main.py", line 339 in _main
  File "/usr/local/lib/python3.11/site-packages/_pytest/main.py", line 285 in wrap_session
  File "/usr/local/lib/python3.11/site-packages/_pytest/main.py", line 332 in pytest_cmdline_main
  File "/usr/local/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/usr/local/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/local/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/usr/local/lib/python3.11/site-packages/_pytest/config/__init__.py", line 178 in main
  File "/usr/local/lib/python3.11/site-packages/_pytest/config/__init__.py", line 206 in console_main
  File "/usr/local/bin/py.test", line 8 in <module>

Extension modules: uvloop.loop (total: 1)
Segmentation fault (core dumped)
*** Error 139 in . (Makefile:40 'do-test')
*** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3090 '/usr/ports/pobj/py-uvloop-0.20.0-python3/.test_done': @cd /usr/ports/devel/...)
*** Error 2 in /usr/ports/devel/py-uvloop (/usr/ports/infrastructure/mk/bsd.port.mk:2704 'test': @lock=py3-uvloop-0.20.0;  export _LOCKS_HEL...)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The failure is reported at line 49 of tests/test_fs_event.py; first run the provided pytest command with PYTHONASYNCIODEBUG=1 on OpenBSD. Investigate the uvloop.loop segmentation fault during test_fs_event_change, and verify that the targeted test completes without a crash when done.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.