Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when initiating for 2 inverters simultaneous #69

Open
brjhaverkamp opened this issue Jan 14, 2023 · 0 comments
Open

Crash when initiating for 2 inverters simultaneous #69

brjhaverkamp opened this issue Jan 14, 2023 · 0 comments

Comments

@brjhaverkamp
Copy link

Hello Nmakel,

I am chasing an issue on my domoticz where I experience a hard seg fault on initialization. I am suspicious that this is a deeper modbus issue, so I am making this issue to see if you can shine your light on it.

This christmasbreak I updated my domoticz setup from rp2->rp3, buster->bullseye and python 2.7->3.9
I did a completely fresh install.
I have 2 solaredge inverters and use the domoticz plugin from Addie Janssen for reading out my inverters over modbus for many years now (https://github.com/addiejanssen/domoticz-solaredge-modbustcp-plugin)

Now I have a strange issue that on starting domoticz, it crashes about 3 out of 5 times. When it doesn't crash, it keeps running rock-solid. But in the initization phase something goes wrong regularly.
In the crash-log and console output, it points at the solaredge module, which in turn points at your python module, but the last reference is even in asyncio.py (see the output below)
I found that this only happens if I have 2 instances of the plugin simultaneously enabled. With only one plugin enabled, it is very stable.
So my question is, do you see any reason why two (almost simultaneous) initiations of solaredge-modbus would be risky? And how this can be solved? Or is this even lower in the modbus module itself?

I have a discussion on the domoticz forum running on this as well:https://www.domoticz.com/forum/viewtopic.php?p=297778#p297778

Kind regards,

Bert Haverkamp

Dec 30 17:29:04 joulebox domoticz: Mosquitto Joulebox: connected to: localhost:1883
Dec 30 17:29:05 joulebox domoticz[90919]: Fatal Python error: Segmentation fault
Dec 30 17:29:05 joulebox domoticz[90919]: Current thread 0x0000007f997f9f80 (most recent call first):
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 228 in _call_with_frames_removed
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1108 in create_module
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 565 in module_from_spec
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 666 in _load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 986 in _find_and_load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1007 in _find_and_load
Dec 30 17:29:05 joulebox domoticz[90919]: File "/usr/lib/python3.9/asyncio/events.py", line 786 in
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 228 in _call_with_frames_removed
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 790 in exec_module
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 680 in _load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 986 in _find_and_load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1007 in _find_and_load
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 228 in _call_with_frames_removed
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1058 in _handle_fromlist
Dec 30 17:29:05 joulebox domoticz[90919]: File "/usr/lib/python3.9/asyncio/base_events.py", line 40 in
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 228 in _call_with_frames_removed
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 790 in exec_module
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 680 in _load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 986 in _find_and_load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1007 in _find_and_load
Dec 30 17:29:05 joulebox domoticz[90919]: File "/usr/lib/python3.9/asyncio/init.py", line 8 in
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 228 in _call_with_frames_removed
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 790 in exec_module
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 680 in _load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 986 in _find_and_load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1007 in _find_and_load
Dec 30 17:29:05 joulebox domoticz[90919]: File "/usr/local/lib/python3.9/dist-packages/pymodbus/client/base.py", line 4 in
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 228 in _call_with_frames_removed
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 790 in exec_module
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 680 in _load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 986 in _find_and_load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1007 in _find_and_load
Dec 30 17:29:05 joulebox domoticz[90919]: File "/usr/local/lib/python3.9/dist-packages/pymodbus/client/init.py", line 5 in
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 228 in _call_with_frames_removed
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 790 in exec_module
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 680 in _load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 986 in _find_and_load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1007 in _find_and_load
Dec 30 17:29:05 joulebox domoticz[90919]: File "/usr/local/lib/python3.9/dist-packages/solaredge_modbus/init.py", line 7 in
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 228 in _call_with_frames_removed
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 790 in exec_module
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 680 in _load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 986 in _find_and_load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1007 in _find_and_load
Dec 30 17:29:05 joulebox domoticz[90919]: File "/var/www/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 54 in
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 228 in _call_with_frames_removed
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 790 in exec_module
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 680 in _load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 986 in _find_and_load_unlocked
Dec 30 17:29:05 joulebox domoticz[90919]: File "", line 1007 in _find_and_load
Dec 30 17:29:05 joulebox domoticz[90919]: domoticz: Domoticz(pid:90919, tid:90938('Solarpanels din')) received fatal signal 11 (Segmentation fault)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant