Commit 9138df0
committed
ci: name the module the Windows coverage crash dies in
The first round of diagnostics placed the fault: the crash log holds
`open pid=...` and `entering pytest.main` and nothing else, so the
process dies while pytest loads its initial conftests -- before
collection, and far before any test runs. What it cannot say is which
module. Three additions, none of which touch machine state:
PYTHONVERBOSE makes the interpreter announce every import as it begins
one, so the last line written before the process dies names the module
it died in. Its output is stderr, so the session is redirected to a file
rather than left in the step log: a crash takes the tail of a pipe with
it, while each unbuffered write to a file has already reached the OS.
The Windows event log carries an Application Error record for every
process the OS kills, naming the faulting module and the offset within
it, and it does so whether or not crash dumps are configured. That is
the one fact no Python-level log can produce. Reading it needs no
registry key set and nothing restored afterwards, which a LocalDumps
setup would have on a machine shared with other jobs.
PYTHONFAULTHANDLER has so far written nothing at all, which leaves two
very different readings: the handler produced a traceback the dying
process failed to flush, or it never ran because the fault happened
outside any Python frame. run_pytest_with_stack.py now points
faulthandler at its own unbuffered file when PYTEST_FAULTLOG is set, so
still empty there means the handler genuinely had nothing to say.
The three logs upload together as an artifact. No behaviour change: the
step already carries continue-on-error, and every addition is inert on a
run that does not crash.
Signed-off-by: Rui Luo <ruluo@nvidia.com>1 parent 69822ac commit 9138df0
2 files changed
Lines changed: 88 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
393 | 401 | | |
394 | 402 | | |
395 | 403 | | |
396 | 404 | | |
| 405 | + | |
| 406 | + | |
397 | 407 | | |
398 | 408 | | |
399 | 409 | | |
400 | 410 | | |
401 | 411 | | |
402 | 412 | | |
403 | | - | |
| 413 | + | |
| 414 | + | |
404 | 415 | | |
405 | 416 | | |
406 | 417 | | |
| |||
411 | 422 | | |
412 | 423 | | |
413 | 424 | | |
414 | | - | |
| 425 | + | |
415 | 426 | | |
416 | 427 | | |
417 | 428 | | |
418 | 429 | | |
419 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
420 | 489 | | |
421 | 490 | | |
422 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
98 | 115 | | |
99 | 116 | | |
100 | 117 | | |
| |||
0 commit comments