running domoticz->Fatal Python error: drop_gil: GIL is not locked

On various Hardware and OS systems: pi / windows / routers / nas, etc
Post Reply
bassie127
Posts: 14
Joined: Tuesday 22 March 2016 11:37
Target OS: Raspberry Pi
Domoticz version:
Contact:

running domoticz->Fatal Python error: drop_gil: GIL is not locked

Post by bassie127 » Saturday 18 August 2018 13:17

I compiled domoticz on Arch linux (AUR package https://aur.archlinux.org/packages/domoticz/).
* Building is OK.
* When I start domoticz via: systemctl start domoticz it crashes with "Fatal Python error: drop_gil: GIL is not locked".
* I have searched but cannot find a solution.
All tips appreciated.

Service file:
--------------------
[Unit]
Description=Domoticz Daemon
After=network.target

[Service]
User=http
Group=http
PermissionsStartOnly=true
ExecStartPre=/usr/bin/install -d -m 0700 -o http -g http /var/run/domoticz
ExecStart=/opt/domoticz/domoticz -www 8090 -pidfile /var/run/domoticz/domoticz.pid
PIDFile=/var/run/domoticz/domoticz.pid
WorkingDirectory=/opt/domoticz
#RestartSec=5
#Restart=on-failure

[Install]
WantedBy=multi-user.target
---------------------------------

Log below:
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.517 Status: Domoticz V4.5876 (c)2012-2016 GizMoCuz
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.517 Status: Build Hash: b97777b, Date: 2016-11-09 12:33:42
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.517 Status: Startup Path: /opt/domoticz/
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.612 Status: PluginSystem: Started, Python version '3.7.0'.
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.620 Active notification Subsystems: gcm, http (2/13)
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.621 Status: WebServer(HTTP) started on address: :: with port 8090
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.637 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.637 Error: WebServer(SSL) check privileges for opening ports below 1024
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.637 Status: Proxymanager started.
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.639 Starting shared server on: :::6144
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.639 Status: TCPServer: shared server started...
Aug 18 13:06:44 RPI3 domoticz[20602]: 2018-08-18 13:06:44.640 Status: RxQueue: queue worker started...
Aug 18 13:06:46 RPI3 domoticz[20602]: 2018-08-18 13:06:46.641 Status: EventSystem: reset all events...
Aug 18 13:06:46 RPI3 domoticz[20602]: 2018-08-18 13:06:46.642 Status: EventSystem: reset all device statuses...
Aug 18 13:06:46 RPI3 domoticz[20602]: Fatal Python error: drop_gil: GIL is not locked
Aug 18 13:06:46 RPI3 domoticz[20602]: Current thread 0x71cfd3e0 (most recent call first):
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap_external>", line 81 in _path_stat
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap_external>", line 87 in _path_is_mode_type
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap_external>", line 102 in _path_isdir
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap_external>", line 1447 in path_hook_for_FileFinder
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap_external>", line 1197 in _path_hooks
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap_external>", line 1221 in _path_importer_cache
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap_external>", line 1249 in _get_spec
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap_external>", line 1280 in find_spec
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap>", line 906 in _find_spec
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap>", line 963 in _find_and_load_unlocked
Aug 18 13:06:46 RPI3 domoticz[20602]: File "<frozen importlib._bootstrap>", line 983 in _find_and_load
Aug 18 13:06:46 RPI3 systemd[1]: Started Process Core Dump (PID 20613/UID 0).

bolderbast
Posts: 5
Joined: Thursday 06 September 2018 17:39
Target OS: Linux
Domoticz version:
Contact:

Re: running domoticz->Fatal Python error: drop_gil: GIL is not locked

Post by bolderbast » Monday 24 September 2018 12:24

Hi,

did you ever get this resolved? I'm currently experiencing the same issue.

Thanks!

bolderbast
Posts: 5
Joined: Thursday 06 September 2018 17:39
Target OS: Linux
Domoticz version:
Contact:

Re: running domoticz->Fatal Python error: drop_gil: GIL is not locked

Post by bolderbast » Monday 24 September 2018 14:16

Because the error is python related, I decided to downgrade the 2 python packages that were upgraded just before the issue occurred:
  • python-setuptools (1:40.4.3-1 -> 1:40.2.0-1)
  • python (3.7.0-4 -> 3.6.6-1)
Now I don't get the error anymore.
For me this is an acceptable workaround. I hope a future update of python or domoticz will fix this issue.

loesje
Posts: 1
Joined: Saturday 27 October 2018 22:15
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: running domoticz->Fatal Python error: drop_gil: GIL is not locked

Post by loesje » Saturday 27 October 2018 22:24

I saw some other projects that solved the issue, and they all reference https://vstinner.github.io/python37-gil-change.html. This post also explains why it still works with older versions of Python. (the complete story: https://bugs.python.org/issue20891)

Seems like that Domoticz needs a fix to be able to use the latest Python version. I think that this issue is about the same problem.

User avatar
Dnpwwo
Posts: 767
Joined: Sunday 23 March 2014 10:00
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: running domoticz->Fatal Python error: drop_gil: GIL is not locked

Post by Dnpwwo » Sunday 28 October 2018 4:58

Are you building beta or stable?

Python 3.7 support was added in beta and tested in Windows a while ago
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw

zynexiz
Posts: 19
Joined: Tuesday 07 February 2017 14:14
Target OS: Raspberry Pi
Domoticz version: 3.8805
Location: Sweden
Contact:

Re: running domoticz->Fatal Python error: drop_gil: GIL is not locked

Post by zynexiz » Thursday 01 November 2018 21:45

bolderbast wrote:
Monday 24 September 2018 14:16
Because the error is python related, I decided to downgrade the 2 python packages that were upgraded just before the issue occurred:
  • python-setuptools (1:40.4.3-1 -> 1:40.2.0-1)
  • python (3.7.0-4 -> 3.6.6-1)
Now I don't get the error anymore.
For me this is an acceptable workaround. I hope a future update of python or domoticz will fix this issue.
Where did you find the downgrade installation? Culdn't find any in repos for Arch (only AUR). Trying to compile it myself now, but run in to some problem with it (hopefully my fix will work).

-- Mike

bolderbast
Posts: 5
Joined: Thursday 06 September 2018 17:39
Target OS: Linux
Domoticz version:
Contact:

Re: running domoticz->Fatal Python error: drop_gil: GIL is not locked

Post by bolderbast » Monday 26 November 2018 21:25

zynexiz wrote:
Thursday 01 November 2018 21:45
bolderbast wrote:
Monday 24 September 2018 14:16
Because the error is python related, I decided to downgrade the 2 python packages that were upgraded just before the issue occurred:
  • python-setuptools (1:40.4.3-1 -> 1:40.2.0-1)
  • python (3.7.0-4 -> 3.6.6-1)
Now I don't get the error anymore.
For me this is an acceptable workaround. I hope a future update of python or domoticz will fix this issue.
Where did you find the downgrade installation? Culdn't find any in repos for Arch (only AUR). Trying to compile it myself now, but run in to some problem with it (hopefully my fix will work).

-- Mike
I had the previous version in my pacman cache: /var/cache/pacman/pkg/
Hope you have them too!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests