archerne / hastarlink

Starlink Statistics and Alerts Integration
GNU General Public License v3.0
10 stars 1 forks source link

Segmentation fault #7

Open Matz88 opened 1 year ago

Matz88 commented 1 year ago

Hello, I'm getting frequent reboots since I have installed the integration via HACS on a raspeberry with: Home Assistant 2022.12.0 Supervisor 2022.11.2 Operating System 9.3

Looking at the home-assistant.log.fault I have a python segmentation fault with traces down to this integration:

Fatal Python error: Segmentation fault

Thread 0x9f14de38 (most recent call first):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/usr/src/homeassistant/homeassistant/components/recorder/executor.py", line 17 in _worker_with_shutdown_hook
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x9ef51e38 (most recent call first):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/usr/src/homeassistant/homeassistant/components/recorder/executor.py", line 17 in _worker_with_shutdown_hook
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xa04c4ec0 (most recent call first):
  File "/usr/local/lib/python3.10/site-packages/scapy/supersocket.py", line 259 in select
  File "/usr/local/lib/python3.10/site-packages/scapy/sendrecv.py", line 1175 in _run
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xb05b82f0 (most recent call first):
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 671 in _run_event_loop
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 662 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xb1dff2f0 (most recent call first):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xb21ff2f0 (most recent call first):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xb25ff2f0 (most recent call first):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xb2b5f2f0 (most recent call first):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xb2c632f0 (most recent call first):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xb2db22f0 (most recent call first):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xb3dff2f0 (most recent call first):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0xb41482f0 (most recent call first):
  File "/usr/local/lib/python3.10/logging/handlers.py", line 1505 in dequeue
  File "/usr/local/lib/python3.10/logging/handlers.py", line 1556 in _monitor
  File "/usr/local/lib/python3.10/threading.py", line 953 in run
  File "/usr/local/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/usr/local/lib/python3.10/threading.py", line 973 in _bootstrap

Current thread 0xb6f1d020 (most recent call first):
  File "/usr/local/lib/python3.10/site-packages/grpc/_channel.py", line 1550 in _close
  File "/usr/local/lib/python3.10/site-packages/grpc/_channel.py", line 1568 in close
  File "/usr/local/lib/python3.10/site-packages/starlink_grpc.py", line 568 in close
  File "/config/custom_components/starlink/dish_common.py", line 188 in shutdown
  File "/config/custom_components/starlink/dish_grpc_text.py", line 300 in main
  File "/config/custom_components/starlink/__init__.py", line 174 in get
  File "/config/custom_components/starlink/__init__.py", line 109 in _async_update_data
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205 in _async_refresh
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151 in _handle_refresh_interval
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80 in _run
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1896 in _run_once
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 600 in run_forever
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 633 in run_until_complete
  File "/usr/src/homeassistant/homeassistant/runner.py", line 119 in run
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 191 in main
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 203 in <module>
  File "/usr/local/lib/python3.10/runpy.py", line 86 in _run_code
  File "/usr/local/lib/python3.10/runpy.py", line 196 in _run_module_as_main

Extension modules: _cffi_backend, multidict._multidict, yarl._quoting_c, ciso8601, aiohttp._helpers, aiohttp._http_writer, _brotli, aiohttp._http_parser, aiohttp._websocket, cchardet._cchardet, frozenlist._frozenlist, markupsafe._speedups, yaml._yaml, PIL._imaging, simplejson._speedups, sqlalchemy.cimmutabledict, sqlalchemy.cprocessors, sqlalchemy.cresultproxy, dbus_fast.signature, dbus_fast._private.marshaller, dbus_fast.message, dbus_fast._private.unmarshaller, dbus_fast.unpack, dbus_fast.aio.message_reader, numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, psutil._psutil_linux, psutil._psutil_posix, websockets.speedups, av.logging, av._core, av.bytesource, av.buffer, av.audio.format, av.enum, av.error, av.utils, av.option, av.descriptor, av.container.pyio, av.dictionary, av.format, av.stream, av.container.streams, av.sidedata.motionvectors, av.sidedata.sidedata, av.packet, av.container.input, av.bitstream.filter, av.bitstream.context, av.container.output, av.container.core, av.codec.context, av.video.format, av.video.reformatter, av.plane, av.video.plane, av.video.frame, av.video.stream, av.codec.codec, av.frame, av.audio.layout, av.audio.plane, av.audio.frame, av.audio.stream, av.audio.fifo, av.filter.pad, av.filter.link, av.filter.context, av.filter.graph, av.filter.filter, av.audio.resampler, matplotlib._c_internal_utils, matplotlib._path, kiwisolver._cext, matplotlib._image, psycopg2._psycopg, grpc._cython.cygrpc (total: 89)
archerne commented 1 year ago

In looking at those threads, they appear to just the the stack traces of HA shutting down. For the starlink one, it is just showing how it got to the shutdown/close connections. The other 12 appear to be how other integrations got to their shutdown/close function as well. I don't see anything here that says starlink integration is causing an issue

Matz88 commented 1 year ago

Oh sorry, maybe a did too fast 1+1 having them appeared after the integration installation, which I find super good anyhow! Is there a way to trace it to the but of code actually generating the segmentation fault?

Matz88 commented 1 year ago

Hello, I further checked in the last days, I can definitely confirm that it is somehow linked to this integration. I have disabled all addons and integrations, then turned them on one by one till this one. No issue with any of the others for several hours, instead I had a reboot within one hour from re-enabling the starlink integration...