-
Notifications
You must be signed in to change notification settings - Fork 502
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
deCONZ 2.05.85 crashes with Segmentation fault #3427
Comments
I have the same behaviour. Do you have an Elko Super TR as well? If you don't I will create my own issue. Describe the bugI just upgraded to 2.05.85. deCONZ crashes after few minutes. I suspect the bug is related to the following PR: #3329 Steps to reproduce the behaviorThe bug is reproduced at each launch. If the Elko Super TR is removed from the network, deCONZ is running fine. Environment
deCONZ Logs20:48:53:923 ZCL configure reporting rsp seq: 51 0x000B57FFFE8CC7F2 for ep: 0x01 cluster: 0x0008 attr: 0x0000 status: 0x00 Full log: |
@arnerek You saved this one, otherwise I would have closed it. So far, I've spotted two errors (usage of wrong function), but that shouldn't lead to a segfault. For another candidate related to polling, I'm not too sure. Could you make a core dump as described in the wiki? That would presumably help speeding up the search. |
Here is a core dump: |
I discovered that by completely deleting all content in the config folder (/root/.local/share/dresden-elektronik/deCONZ) instead of carrying it over from my previous version, and then reinstalled deCONZ, I no longer got the segfault. |
@oywino Does the Segmentation Fault reappear when adding the Super TR? |
The funny thing is that the Super TR appeared in deConz without me doing anything. But with a new (0xYYYY) name-code. I haven't tried to add it to Phoscon - is that what you mean? |
Is the Super TR available in the Rest API? After deleting my Super TR nodes, deCONZ .85 is running fine. Immediately after adding this through Phoscon I get Segfault and also after new startup attempts. |
Yes, you are right. At first it was not available in the API. After adding it through Phoscon, I too immediately got Segfault. |
@SwoopX Thanks! I compiled your code. I had to add VENDOR_EMBER in two of the function calls. Unfortunately, the segmentation fault is still there. By mistake I copied the .84 libde_rest_plugin.so. This is running flawlessly with deconz .85 (this maybe obviously for you but I thought I could mention it) |
Crap. Where did you need to add that and why? |
In the two calls: addTaskThermostatReadWriteAttribute The function call was not in agreement with definition, so compilation failed. I thought there was a missing manufacturer code. Do you agree? |
Ah, in my memory, the mfc was optional and defaulting to 0... It should have been 0 or 0x0000 btw since you mentioned that the attributes are not manufacturer specific. Anyway, that shouldn't have made any difference... |
I have never used that, but there is some tool to read the core dump to have more informations ? Or it s something platform dependant too ? |
Since the rest_plugin from .84 works, maybe I could compile different commits from .84 to .85 and see for which version the seg fault is appearing? Can this contribute to debugging? I could also provide new core dump to see if it has changed (not sure if previous dump gave indication on which call that caused the seg fault?) I got this from gdb: |
Ha yep, this error message can be usefull yes. We know the command now.
There is a defaut value ? |
Sorry, I am new with gdb but this backtrack should be consistent with @SwoopX fixes branch. 0 0x72ce2af8 in Resource::item(char const*) const () from /usr/share/deCONZ/plugins/libde_rest_plugin.so |
Cool, that should help. I'll check it out. |
@arnerek Could you please try replacing the current code in
|
Sorry! Still same Segmentation fault! I made a dirty trick:
I no longer have Segmentation Fault so at least some progress. I expect this has something to do with LightNode manufacture name. I notice that the Manufacturer name from the Rest API is Heiman. |
Thanks. The Heiman thing is interesting, as it shouldn't be. Is a light resource created for it? That should also not happen... |
No light resource created. Maybe I should remove and add again in the new version? { |
Let me double check that Heiman thing. I might have changed some Vendor ID in the debugging |
Just checked some more. The "Heiman" manufacturer name is still present with the SwoopX:fixes branch + #3427 (comment) + disabling polling for ZHAThermostats. Should I try to remove node and add again in 2.05.85? |
I just added a protection to change the manufacturer to Heiman in the PR so that shouldn't happen again. I still don't see the root cause for the segfault to occur. |
I follow this thread with great interest. Regretfully I'm not able to contribute much, but I depend on you guys to solve this. |
Ok, but in Deconz when reading the Manufacturer name attribute is ELKO. I was just asking if this was an indication of a logical error in the API. I will continue to add more debug statements in order to pin-point where the segmentation fault is occurring. |
lightNode pointer wasn't guarded to check for nullptr in RStateOn handler. Issue: dresden-elektronik#3427
Hi. I've done some debugging with @manup and looks like we've found a possible candidate for this one. Seems that you have a certain combination of values, not too common, that's causing it. @arnerek Would be cool if you could include the upcoming changes by manup locally and test it. All changes/fixes are now included in the official master branch. |
Thanks for the update. I can now confirm with the .86 release that this solved the segmentation fault! Great work :) |
Congratulation!! Any chance for us to see .86 on Docker HUB ? |
Great! That's up to marthoc, but usually doesn't take long |
That Heiman as manufacturer is a thing, as it also happened to me with Tuya/Moes TRV. It was correct in deCONZ, but REST API calls said Heiman. After @Smanar made changes to his Tuya branch it's correct in API as well. It's issue #3440 |
I can confirm now that .86 runs in Docker without any segmentation fault. |
I have the new attributes in the list but the new attributes are not updating. It is also interesting that one Super TR has manufacturer Elko while the other Super TR has Heiman: "config": { { |
Lol, I m realy bored by this heiman ^^. If you want I can remove the line in the fonction, SwoopX (that we have talked the last time) ? |
First of all, it is no surprise that the device is not visible in Phoscon, as it is just another REST API client. Also take note, that we're here in the REST API respository. So in that matter, please raise that in the Phoscon beta repository. Secondly, you should reset and re-pair the devices. This deletes the current sensors (or marks them as such) and creates a new one with all current capabilities. Having no updates in terms of value updates could have 2 reasons: 1. bindings have been missed. Should also be resolved by reset/re-pair. 2. The device does not support attribte reporting. Lastly, please note that we're driving here on the highway in the night without any lights. No dev has the device at hand to sniff and see what's over the air, so all is based on best effort. Anyway, please raise a new issue if anything's not working and we can see what to do. As is is not topic related anymore, I'm closing this. @Smanar, Heiman is no topic for this device anymore as I prevented it to happen. No issue from my end. |
Describe the bug
Steps to reproduce the behavior
Expected behavior
Screenshots
Environment
deCONZ Logs
Additional context
The text was updated successfully, but these errors were encountered: