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

[Bug]: Broken pipe when listening over tcp for events from meshtasticd (solved: blanking screen crashes meshtasticd) #5764

Open
bmidgley opened this issue Jan 5, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@bmidgley
Copy link

bmidgley commented Jan 5, 2025

Category

Other

Hardware

Linux Native

Firmware Version

2.5.15

Description

If I use the tcp listener from https://github.com/brad28b/meshtastic-cli-receive-text/blob/main/read_messages_tcp.py it gets stuck every once in a while, crashing in a background thread apparently. I can't rescue it and once it crashes, no events will be received.

bmidgley@nightvision:~ $ meshtastic --version
2.5.9
bmidgley@nightvision:~ $ python --version
Python 3.11.2
bmidgley@nightvision:~ $ dpkg -l | grep meshtastic
ii  meshtasticd                          2.5.15.79da236                      arm64        Native Linux Meshtastic binary.
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 1394, in run
    self.function(*self.args, **self.kwargs)
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 1062, in callback
    self.sendHeartbeat()
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 1051, in sendHeartbeat
    self._sendToRadio(p)
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 1126, in _sendToRadio
    self._sendToRadioImpl(toRadio)
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/stream_interface.py", line 120, in _sendToRadioImpl
    self._writeBytes(header + b)
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/tcp_interface.py", line 79, in _writeBytes
    self.socket.send(b)
BrokenPipeError: [Errno 32] Broken pipe

Relevant log output

No response

@bmidgley bmidgley added the bug Something isn't working label Jan 5, 2025
@bmidgley
Copy link
Author

bmidgley commented Jan 5, 2025

If I knew the exception had happened, I could restart my connection or exit the script. But it keeps running as if nothing is wrong.

@bmidgley
Copy link
Author

bmidgley commented Jan 6, 2025

Ok I've lost the exact log message, but I believe it was saying it would blank the screen, then crashed and restarted meshtasticd. I was still configured for a 2.8" waveshare screen. I think the blanking operation is dangerous with the configured and not present screen.

Removing the screen from the config is avoiding the crash.

I'm ok if you want to close or combine or whatever since the ticket has taken a turn.

@bmidgley bmidgley changed the title [Bug]: Broken pipe when listening over tcp for events from meshtasticd [Bug]: Broken pipe when listening over tcp for events from meshtasticd (solved: blanking a missing screen crashes meshtasticd) Jan 6, 2025
@bmidgley bmidgley changed the title [Bug]: Broken pipe when listening over tcp for events from meshtasticd (solved: blanking a missing screen crashes meshtasticd) [Bug]: Broken pipe when listening over tcp for events from meshtasticd (solved: blanking screen crashes meshtasticd) Jan 9, 2025
@bmidgley
Copy link
Author

bmidgley commented Jan 9, 2025

I'm seeing this crash even when the screen is present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant