pytest-xdist icon indicating copy to clipboard operation
pytest-xdist copied to clipboard

Question: Is there any way to add the stack trace in report if any test crashes due to Segmentation Fault

Open jay746 opened this issue 2 years ago • 3 comments

I have case where test is failing and in the report we get "worker 'gw0' crashed while running 'test_invalid_data]" On my screen I do the reason like below:

Fatal Python error: Segmentation fault

Thread 0x00007fca0ebc8700 (most recent call first):
  File "/tmp/lib/python3.8/site-packages/execnet/gateway_base.py", line 474 in read
  File "/tmp/lib/python3.8/site-packages/execnet/gateway_base.py", line 507 in from_io
  File "/tmp/lib/python3.8/site-packages/execnet/gateway_base.py", line 1049 in _thread_receiver
  File "/tmp/lib/python3.8/site-packages/execnet/gateway_base.py", line 296 in run
  File "/tmp/lib/python3.8/site-packages/execnet/gateway_base.py", line 361 in _perform_spawn

In the pytest-report which is html or xml both doesn't have trace info into it unlike the failure times. Is there any way That we can append the above info inside the report when run via xdist?

jay746 avatar Oct 18 '23 07:10 jay746

Currently xdist has no extra tool to manage fault handler passover

So atm a fault will land on stderr

RonnyPfannschmidt avatar Oct 18 '23 07:10 RonnyPfannschmidt

Any workaround in top of mind that I can explore?

jay746 avatar Oct 18 '23 07:10 jay746

Nope

RonnyPfannschmidt avatar Oct 18 '23 08:10 RonnyPfannschmidt