-
Notifications
You must be signed in to change notification settings - Fork 25
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
Receiving Segmentation fault when running 'busylight on' #228
Comments
Could you give me a little more information about the host the SEGFAULT is occurring on? Some idea of which light, OS and CPU architecture would be helpful. I'm curious what the result of this small python program is on your host in the environment that import hid
for device in hid.enumerate():
print(device) This is the code that is SEGFAULT'ing at line 37 in There is a bug which might be applicable to your situation, but it's a guess without more context. |
Hi, sure, Thanks, Linux Mint 21.1 Vera Was previously working. python3
|
Weird, I totally expected that to SEGFAULT and would definitively point towards So when you said, "previously working" could you fill in some context? Did hardware/software change or did it just stop working all of a sudden? Could you elaborate more about how you installed Also could you run the crashing command with the $ busylight -D on If a core file is generated, that could potentially give us more information about what's going wrong as well. If you have gdb installed on your machine, you could use that to inspect the core file. A stack trace is what we're after, something like: $ gdb `path/to/python3` path/to/corefile
(gdb) bt To be honest, it's been a while since I've had to do this sort of debugging on Linux so all of that might not be strictly correct but the vague shape of how to get a back trace from the core file. I know that's a lot to ask for but I haven't seen this kind of failure before and I haven't been able to replicate it yet on the only Linux box I have handy (RaspPi). |
So I'm considering that this might be an asyncio problem, does the following short python snippet crash? from busylight.lights import Blynclight
light = Blynclight.first_light()
light.on((0,255,0)) # turn on green |
Hi JnyJny, Was previously working for several days fine but not sure what caused it to stop working, whether it was an update, (there's been so many lately). Here's the output: busylight -D on Current thread 0x00007f8d1805d000 (most recent call first): Extension modules: hid (total: 1) |
...and the output from the snippet:
|
(can't seem to find a dump file when running |
Well, that is interesting. There is no use of asyncio in that batch of code, so it's less likely that the problem is asyncio tickling an edge case in As an experiment, could you try this? $ cd /tmp
$ python3 -m venv venv
$ source venv/bin/activate
$ python3 -m pip install busylight
$ which busylight # should say something like /tmp/venv/bin/busylight
$ busylight -D on
$ deactivate # to turn off this virtual environment
$ rm /tmp/venv # to get rid of the virtual environment when you are done I'm hoping that a fresh install of all the requirements into a virtual environment will allow busylight to execute without a SEGFAULT. |
hmmh, can't seem to get the installation to run in the venv:
|
Interesting.. what version of python did you use to create the virtual environment? $ python3 --version
$ which python3 |
|
Well this is embarrassing, let's try: $ cd /tmp
$ python3 -m venv venv
$ source venv/bin/activate
$ python3 -m pip install busylight-for-humans
$ which busylight
$ busylight on I rarely install from PyPI and forgot that the proper name for busylight is |
Well that went further till the last command:
|
Tried this way with -D
|
Thanks for the install output! I went through the versions of the installed dependencies and they all track with what I think should be installed. Did you set up/modify the udev rules for your Linux installation? If so, can you share the contents of your rules? |
NP!
|
I don't see anything wrong with the udev rules, so it's probably time to start thinking about finding the core file and trying to get a stack trace to see a more low level description of how the code crashed. Before we start looking for and at the core file, can you save the output of the |
I don't seem to have a 'messages' in /var/log |
/var/log/messages is one location where syslog messages are stored, no worries. Looking at My thoughts are leading me towards a hardware problem (bad hub, bad device or bad cable). I'd unplug everything and plug the Blynclight in directly to a USB port (if possible) and see if that causes a crash. |
Hi JnyJny, Thanks for the feedback!, I'll try that and let you know. |
Hi JnyJny, Many thanks for the excellent troubleshooting and busylight! Turned out to be the docking station/hub issue after receiving several updates. Plugging directly in has resolved. Best, |
That is great news! I was running out of ideas TBH :) Sorry you are having trouble with your docking station and I hope you get it sorted out. |
The text was updated successfully, but these errors were encountered: