You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling the function getJobs in a thread crash the application.
It seems that some functions are not thread-safe. How can I handle it?
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "test3.py", line 19, in print_jobs
"job-uri", "job-state"])))
cups.IPPError: (1280, 'No such file or directory')
Fatal Python error: PyEval_RestoreThread: NULL tstate
Current thread 0x76f6cad0 (most recent call first):
File "test3.py", line 34 in<module>
Abandon
I've tried to reproduce the issue with your script, but with no luck... are you able to get me C backtraces (the pycups is a module for python written in C) for both issues you see in pibooth?
The first is the one you experience with your script, and the other is Fatal Python error: PyEval_RestoreThread: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL).
When I got a similar bug about incorrect thread handling, python3 process itself got segfault and generated coredump, where I could see thread conflict causing the crash. Does python3 process running pibooth get SIGSEGV as well? If it does, you can get the backtrace from its coredump.
Calling the function
getJobs
in a thread crash the application.It seems that some functions are not thread-safe. How can I handle it?
I'm using the following script to reproduce it:
The text was updated successfully, but these errors were encountered: