Open tshirtman opened 4 years ago
anyone ever figure this out?
Adding the below code to tests/__init__.py
suppressed the messages. Courtesy of jpype-project/jpype#561.
try:
import faulthandler
faulthandler.enable()
faulthandler.disable()
except:
pass
Adding the below code to
tests/__init__.py
suppressed the messages. Courtesy of jpype-project/jpype#561.except: pass
Avoid catch-all exception handlers.
At the least change it to except Exception
so it stop trapping CTRL-C and similar, but far better to enumerate the exceptions you are concerned about so that real problems are not ignored.
kivy/kivy
is suffering the same issue, and we risked to fail to find a bug before having a release: https://github.com/kivy/kivy/issues/8484
I tried pytest -p no:faulthandler
yesterday on kivy/kivy
.
The stacktrace disappeared, but the CI did not failed (as it should).
Did the CI failed (if it was expected to) on your use-case?
If you remove the faulthandler by adding -p no:faulthandler
, then the actual problem is gone. There is no need for the process to have a non-zero exit code.
There maybe a bug in Pytest in the process exit code for when the faulthandler does kick in BUT the interplay with Java's signal handler is clearly part of problem here.
To report an issue for PyTest, a minimum reproducible case would need to show that python code raising an SIGTERM is incorrectly handled in PyTest.
If you remove the faulthandler by adding -p no:faulthandler, then the actual problem is gone. There is no need for the process to have a non-zero exit code.
FYI, I've just added -p no:faulthandler
to our kivy-sdk-packager
job (which differently from kivy/kivy
is failing), and now we have a failure, in the middle of the tests, but without the stacktrace.
See: https://github.com/kivy/kivy-sdk-packager/actions/runs/7037739831/job/19153199996?pr=95
So, at least in this case, the problem does not disappear, but instead will just be hidden (if applied on kivy/kivy
)
Do you instead get an hserr pid log file, ie the Java signal handler does its thing instead?
As remarked by cmakdonald, the windows builds seem to raise a memory access violation:
But then go on to mark all tests as successful, which is quite peculiar.