[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams
Rudolph Froger added the comment: Thanks all for the fixes! -- ___ Python tracker <https://bugs.python.org/issue32849> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams
Rudolph Froger added the comment: > Could it be simply because daemon is respawned from a process that does have > a valid stdin at the time of respawn? Yes, that could certainly be the case. Thanks! -- ___ Python tracker <https://bugs.python.org/issue32849> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams
Rudolph Froger added the comment: Thanks for all the research! My crashing Python process is started by a shell process which is launched by the Freebsd daemon tool, this might explain why stdin in no longer valid. But I'm not sure why it can be solved, sometimes, by restarting the the daemon. -- ___ Python tracker <https://bugs.python.org/issue32849> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams
Rudolph Froger added the comment: I've tried your quick tests a few times but couldn't reproduce it immediately. The problem is a bit hard to reproduce anyway because launching Python processes can go well for a long time (many days; launching many processes every minute) until suddenly all NEW processes get aborted. It seems as if somehow something in the relation to the parent process goes wrong somehow. I've seen it happening with Python as the parent process but also with a plain shell process as the parent. Just starting Python (python -c "x = 1") can be enough to trigger this so it's not something which can be blamed on some library. -- ___ Python tracker <https://bugs.python.org/issue32849> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams
Change by Rudolph Froger : -- type: -> crash ___ Python tracker <https://bugs.python.org/issue32849> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams
New submission from Rudolph Froger : Sometimes a new Python 3.6.4 process is aborted by the kernel (FreeBSD 11.1) (before loading my Python files). Found in syslog: kernel: pid 22433 (python3.6), uid 2014: exited on signal 6 (core dumped) Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [Errno 9] Bad file descriptor I've been able to run ktrace on such a Python process, see attachment. See around line 940: "RET fstat -1 errno 9 Bad file descriptor" -- files: alles-23978 messages: 312194 nosy: rudolphf priority: normal severity: normal status: open title: Fatal Python error: Py_Initialize: can't initialize sys standard streams versions: Python 3.6 Added file: https://bugs.python.org/file47444/alles-23978 ___ Python tracker <https://bugs.python.org/issue32849> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com