JanJaapKo / domoticz-GoodWeSEMS

Domoticz GoodWe Solar Inverter plugin (SEMS API)
http://www.domoticz.com/forum/viewtopic.php?f=65&t=28983
MIT License
6 stars 4 forks source link

Clean install crashes on Bullseye #9

Closed zamiramir closed 2 years ago

zamiramir commented 2 years ago

Describe the bug Domoticz crashes completly after fatal error.

The error is caused when creating the first device. As I am not familiar with the Domoticz plugin implementation I could not investigate any further.

To Reproduce Steps to reproduce the behavior:

  1. Clean Domoticz installation
  2. git clone into plugins folder
  3. Restart service
  4. Add Hardware device as documented.
  5. Go to Devices tab, and Domoticz has crashed.

Expected behavior I would expect that all the devices would be visible.

Screenshots N/A

Domoticz environment (please complete the following information):

Additional context log:

2022-04-16 14:56:15.201  Omvormer: create station with id: '***' and inverters: 1
2022-04-16 14:56:15.202  Omvormer: inverter created: '***'
2022-04-16 14:56:15.202  Omvormer: PowerStation created: '***'
2022-04-16 14:56:15.202  Omvormer: inverter found with SN: '***'
2022-04-16 14:56:15.203  Error: Domoticz(pid:3235, tid:3256('Omvormer')) received fatal signal 11 (Segmentation fault)
2022-04-16 14:56:15.203  Error: siginfo address=0xca3, address=(nil)

Failure at: Stack trace: https://github.com/JanJaapKo/domoticz-GoodWeSEMS/blob/81011502709e09948829ca4838f93b7acda53803/GoodWe.py#L103-L104 from: https://github.com/JanJaapKo/domoticz-GoodWeSEMS/blob/81011502709e09948829ca4838f93b7acda53803/plugin.py#L127

JanJaapKo commented 2 years ago

Hey,

Did you run the plugin in debug mode? If not, can you tray. It should provide some more logging.

Which version of OS are you running? Addtionally, perhaps your missing this lib: sudo apt-get install python3-requests If this fixes it, let me know then I'll update the installation instructions. I've seen posts in the forum where missing dependencies led to sig 11 errors when using python higher than 3.7.x .....

zamiramir commented 2 years ago

EDIT: I think the issue is that I am runninng bullseye, which is causing issues. I will downgrade to buster and let you know.

The log in the first comment is the only relevant response for this plugin.

Domoticz crash log, relevant part:

  24   Thread 0x691ff200 (LWP 4008) "Omvormer"        0x768c34d4 in __GI___wait4 (pid=4009, stat_loc=0x695ff268, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27

Thread 24 (Thread 0x691ff200 (LWP 4008) "Omvormer"):
#0  0x768c34d4 in __GI___wait4 (pid=4009, stat_loc=0x695ff268, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
#1  0x0029121c in dumpstack_gdb(bool) ()
#2  0x002917e8 in signal_handler(int, siginfo_t*, void*) ()
#3  <signal handler called>
#4  raise (sig=11) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  <signal handler called>
#6  0x00000014 in ?? ()
#7  0x7593747c in _PyEval_EvalFrameDefault () from /lib/arm-linux-gnueabihf/libpython3.9.so
#8  0x68919c3c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

OS version: Raspbian GNU/Linux 11 (bullseye)

python3-requests is already the newest version (2.25.1+dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Unfortunatly does not solve my issue.

JanJaapKo commented 2 years ago

I've seen more issues with bullseye, I'm still on buster.... Let me know the outcome. Would also be relevant for the install instructions.... I'll prepare an empty SD card with bullseye for testing to see if I can find something, but that might take some time......

zamiramir commented 2 years ago

Downgraded to buster, everything works.

I think the plugin is ok for now, Domoticz needs to be fixed for this issue.

From my point of view we could close this issue. Or you could this issue to track the bullseye version. @JanJaapKo your choice ;)

JanJaapKo commented 2 years ago

Right. The unit tests did work on bulseye, I'm guessing? So it really is a Domoticz framework thing. I'll leave it open, will see what happens in the domoticz framework.

JanJaapKo commented 2 years ago

@zamiramir I've upgraded to bullseye. Apparently the python plugin framework is now more stable in bullseye with python 3.9 so I'm closing this issue.