• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IntelPython / dpnp / 29896921370
78%

Build:
DEFAULT BRANCH: master
Ran 22 Jul 2026 07:41AM UTC
Jobs 1
Files 263
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Jul 2026 06:29AM UTC coverage: 78.274% (+0.2%) from 78.116%
29896921370

push

github

web-flow
Fix hanging coverage workflow (#3004)

The GutHub coverage workflow started hanging right after the coverage
environment was bumped from Python 3.12 to 3.14 (#2922).

This PR fixes the hang by compiling the coverage build with
`CYTHON_USE_SYS_MONITORING=0`, forcing Cython to use its legacy
`settrace`-based line tracing instead of the `sys.monitoring` path that
becomes the default on Python 3.13+.

### Root cause

Coverage builds compile every Cython extension with line tracing
(`CYTHON_TRACE=1 CYTHON_TRACE_NOGIL=1` + `# cython: linetrace=True`). On
Python 3.13+, Cython gates its tracing implementation on
`CYTHON_USE_SYS_MONITORING` (`PY_VERSION_HEX >= 0x030d00B1`) and emits
`sys.monitoring` hooks directly into the compiled `.so`.

Those hooks fire exception/unwind events (`PyMonitoring_FireRaiseEvent`,
`PyMonitoring_FirePyUnwindEvent`, ...) **without preserving the
in-flight exception** — unlike the legacy path
(`__Pyx_call_line_trace_func`), which brackets the trace call with
`PyErr_Fetch`/`PyErr_Restore`. When an exception propagates out of an
instrumented `.pyx` frame, this corrupts the interpreter's error state:
the correct exception is turned into a `SystemError` ("returned a result
with an exception set"), and the process
then hangs.

This is an upstream Cython bug:
https://github.com/cython/cython/issues/6658 (open, same failure mode —
Cython + coverage + Python 3.13 `sys.monitoring` → `SystemError` and
hang).

The first test to trigger this is
`test_dlpack.py::TestDLPack::test_invaid_stream`, which does
`assert_raises(TypeError, x.__dlpack__, stream=<invalid>)`. The
`TypeError` is raised in the instrumented `dpnp/tensor/_usmarray.pyx`
(`_validate_and_use_stream`) and unwinds out through
`usm_ndarray.__dlpack__`, hitting the corruption.

#### Why not just rely on `core = "ctrace"`?

PR #2922 added `core = "ctrace"` in `pyproject.toml` to keep
**coverage.py** off the `sysmon` measurement core (needed for the
`Cython.Coverage` plugin). That is st... (continued)

1532 of 2862 branches covered (53.53%)

Branch coverage included in aggregate %.

26429 of 32860 relevant lines covered (80.43%)

7902.72 hits per line

Jobs
ID Job ID Ran Files Coverage
1 29896921370.1 22 Jul 2026 07:41AM UTC 263
78.27
GitHub Action Run
Source Files on build 29896921370
  • Tree
  • List 263
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29896921370
  • 987f2992 on github
  • Prev Build on master (#29494966097)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc