Open orzechszek opened 1 year ago
Can you try to use this with the lowest supported version of Theengs Decoder? pip install TheengsDecoder==1.3.0
.
Wait, we didn't have a TheengsDecoder package then, ignore that suggestion π
Already installed TheengsDecoder version 1.3.0 and under testing π Should I revert changes?
No I'm curious now that it's under testing whether something in a recent Decoder release leads to your issue.
Error occurs again with version 1.3.0:
Apr 7 10:39:10 openhab kernel: [87680.127489] python3[86690]: segfault at 0 ip 00007f2fb3f753bd sp 00007f2fb15e3ed8 error 4 in libc.so.6[7f2fb3e22000+179000] Apr 7 10:39:10 openhab kernel: [87680.127538] Code: e1 c5 f8 77 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 89 f8 48 89 fa c5 f9 ef c0 25 ff 0f 00 00 3d e0 0f 00 00 0f 87 33 01 00 00 <c5> fd 74 0f c5 fd d7 c1 85 c0 74 57 f3 0f bc c0 c5 f8 77 c3 66 66
Ok, I think you'll need to investigate the core dump. Are you able to do that? You need to install the python3-dbg
package on the same machine and then run gdb python3-dbg core.python3.0.d17642bc1c99473cad951ae65472ba6b.9616.1680771946000000
. I'm not that experienced with it, but I hope it shows us more information.
Unfortunately I'm not a programmer :/. Maybe somebody else can help ?
Do you see whether this segfault always occurs after decoding a specific Bluetooth device? Or is it random? What's the latest decoding you see as an MQTT message or in the Gateway's console output before it segfaults?
By the way, can you try running with log_level set to INFO instead of DEBUG to see whether that makes a difference?
In logs I see that segfault appears after these two:
`DEBUG:BLEGateway:D2:64:5C:XX:XX:XX:AdvertisementData(local_name='RDL52832', manufacturer_data= {76: b'\x02\x15\xfd\xa5\x06\x93\xa4\xe2O\xb1\xaf\xcf\xc6\xeb\x07dx%\x00\x01\x00\x02\xd8'}, rssi=-85)
DEBUG:BLEGateway:D9:1C:BC:XX:XX:XX:AdvertisementData(local_name='RDL52832', manufacturer_dat a={76: b'\x02\x15\xfd\xa5\x06\x93\xa4\xe2O\xb1\xaf\xcf\xc6\xeb\x07dx%\x00\x01\x00\x02\xd8'}, rssi=-74)`
It seems it happens when beacon appears in a system, but randomly and it must be gone for longer time, because when I hide it for a while and shows again, it works properly.
I'll try with INFO level.
Can you try to disable the RDL52832 devices, e.g. by removing their battery? If the gateway doesn't crash after this, then the segfault is probably triggered by the RDL52832 decoder.
This time it was working quite longer without RDL in a system, but even RDL it's a cause, I think it would be better to ask somebody for analyze to prevent such cases. This beacon is a great solution for presence detection.
@orzechszek
Could you try with the new Theengs Gateway release v1.0.0, to see if it changes anything for you?
Thanks
@DigiH issue still exists π’ , coredump attached if needed. core.python3.0.d17642bc1c99473cad951ae65472ba6b.2977489.1681919117000000.zip
Should I provide anything else to help ?
Edit:
@DigiH , I've noticed that crash happened not only with mentioned beacons. Can you test run configuration:
python3 -m TheengsGateway -H "192.168.X.X" -ll "INFO" -tb 2 -sd 10
I just read that the RDL52832 might be causing your issue, so I implemented the above change on the Decoder side. Unfortunately I don't have enough knowledge on the Gateway Python side to test and see what your issue might still be :(
Details from dump if it can helps:
`#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
from /usr/local/lib/python3.10/dist-packages/TheengsDecoder/_decoder.cpython-310-x86_64-linux-gnu.so
from /usr/local/lib/python3.10/dist-packages/TheengsDecoder/_decoder.cpython-310-x86_64-linux-gnu.so
from /usr/local/lib/python3.10/dist-packages/TheengsDecoder/_decoder.cpython-310-x86_64-linux-gnu.so
args=<optimized out>, kwargs=<optimized out>) at ../Objects/methodobject.c:552
callable=<built-in method decodeBLE of module object at remote 0x7f9587ceade0>, args=<optimized out>, nargs=1, keywords=0x0)
at ../Objects/call.c:215
callable=<optimized out>, tstate=<optimized out>) at ../Include/cpython/abstract.h:112
tstate=<optimized out>) at ../Include/cpython/abstract.h:99
at ../Include/cpython/abstract.h:123
at ../Python/ceval.c:5891
f=Frame 0x7f958000a9b0, for file /usr/local/lib/python3.10/dist-packages/TheengsGateway/ble_gateway.py, line 320, in detection_callback (self=<Gateway(broker='192.168.X.X', port=1883, username='', password='', adapter='', scanning_mode='active', stopped=False, clock_updates={}, discovery=0, scan_time=12, time_between_scans=3, sub_topic='home/TheengsGateway/+', pub_topic='home/TheengsGateway/BTtoMQTT', lwt_topic='home/TheengsGateway/LWT', presence_topic='home/TheengsGateway/presence', presence=0, publish_all=1, time_sync=[], time_format=False, client=<Client(_transport='tcp', _protocol=4, _userdata=None, _sock=<socket at remote 0x7f9587149de0>, _sockpairR=None, _sockpairW=None, _keepalive=60, _connect_timeout=<float at remote 0x7f95868b62d0>, _client_mode=0, _clean_session=True, _client_id=b'', _username=b'', _password=b'', _in_packet={'command': 0, 'have_remaining': 0, 'remaining_count': [], 'remaining_mult': 1, 'remaining_length': 0, 'packet': <bytearray at remote 0x7f95879afaf0>, 'to_process': 0, 'pos': 0}...(truncated), tstate=0x565071e55cb0)
at ../Include/internal/pycore_ceval.h:46
tstate=0x565071e55cb0) at ../Python/ceval.c:5065
func=<function at remote 0x7f9587135990>) at ../Objects/call.c:342
callable=<function at remote 0x7f9587135990>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Objects/classobject.c:53
callable=<method at remote 0x7f958713ef00>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Include/cpython/abstract.h:123
at ../Python/ceval.c:5891
f=Frame 0x7f958000a790, for file /usr/local/lib/python3.10/dist-packages/bleak/backends/bluezdbus/scanner.py, line 279, in _handle_advertising_data (self=<BleakScannerBlueZDBus(_callback=<method at remote 0x7f958713ef00>, _service_uuids=None, seen_devices={'D9:1C:BC:0C:XX:XX': (<BLEDevice(address='D9:1C:BC:0C:XX:XX', name='RDL52832', details={'path': '/org/bluez/hci0/dev_D9_1C_BC_0C_XX_XX', 'props': {'Address': 'D9:1C:BC:0C:XX:XX', 'AddressType': 'random', 'Name': 'RDL52832', 'Alias': 'RDL52832', 'Paired': False, 'Bonded': False, 'Trusted': False, 'Blocked': False, 'LegacyPairing': False, 'Connected': False, 'UUIDs': [], 'Adapter': '/org/bluez/hci0', 'ManufacturerData': {76: <bytearray at remote 0x7f958715f730>}, 'ServicesResolved': False, 'RSSI': -65, 'ServiceData': {'00001803-0000-1000-8000-00805f9b34fb': <bytearray at remote 0x7f958715f830>}}}, rssi=-65, metadata={'uuids': [...], 'manufacturer_data': {76: b'\x02\x15\xfd\xa5\x06\x93\xa4\xe2O\xb1\xaf\xcf\xc6\xeb\x07dx%\x00\x01\x00\x02\xd8'}}) at remote 0x7f958...(truncated), tstate=0x565071e55cb0)
at ../Include/internal/pycore_ceval.h:46
tstate=0x565071e55cb0) at ../Python/ceval.c:5065
func=<function at remote 0x7f95871353f0>) at ../Objects/call.c:342
callable=<function at remote 0x7f95871353f0>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Objects/classobject.c:53
callable=<method at remote 0x7f958713f8c0>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Include/cpython/abstract.h:123
at ../Python/ceval.c:5891
f=Frame 0x7f95871520e0, for file /usr/local/lib/python3.10/dist-packages/bleak/backends/bluezdbus/manager.py, line 878, in _run_advertisement_callbacks (self=<BlueZManager(_bus=<MessageBus at remote 0x7f958711a500>, _bus_lock=<Lock(_waiters=None, _locked=False) at remote 0x7f958712a7d0>, _properties={'/org/bluez': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.AgentManager1': {}, 'org.bluez.ProfileManager1': {}}, '/org/bluez/hci0': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.Adapter1': {'Address': 'D0:7E:35:67:18:43', 'AddressType': 'public', 'Name': 'openhab', 'Alias': 'openhab', 'Class': 268, 'Powered': True, 'Discoverable': False, 'DiscoverableTimeout': 180, 'Pairable': False, 'PairableTimeout': 0, 'Discovering': True, 'UUIDs': ['00001801-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '0000180a-0000-1000-8000-00805f9b34fb'], 'Modalias': 'usb:v1D6Bp0...(truncated), tstate=0x565071e55cb0)
at ../Include/internal/pycore_ceval.h:46
tstate=0x565071e55cb0) at ../Python/ceval.c:5065
kwnames=<optimized out>) at ../Objects/call.c:342
callable=<function at remote 0x7f9587135000>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Include/cpython/abstract.h:123
at ../Python/ceval.c:5891
f=Frame 0x7f9580007300, for file /usr/local/lib/python3.10/dist-packages/bleak/backends/bluezdbus/manager.py, line 764, in _parse_msg (self=<BlueZManager(_bus=<MessageBus at remote 0x7f958711a500>, _bus_lock=<Lock(_waiters=None, _locked=False) at remote 0x7f958712a7d0>, _properties={'/org/bluez': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.AgentManager1': {}, 'org.bluez.ProfileManager1': {}}, '/org/bluez/hci0': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.Adapter1': {'Address': 'D0:7E:35:67:XX:XX', 'AddressType': 'public', 'Name': 'openhab', 'Alias': 'openhab', 'Class': 268, 'Powered': True, 'Discoverable': False, 'DiscoverableTimeout': 180, 'Pairable': False, 'PairableTimeout': 0, 'Discovering': True, 'UUIDs': ['00001801-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '0000180a-0000-1000-8000-00805f9b34fb'], 'Modalias': 'usb:v1D6Bp0246d0541', 'Roles'...(truncated), tstate=0x565071e55cb0)
at ../Include/internal/pycore_ceval.h:46
tstate=0x565071e55cb0) at ../Python/ceval.c:5065
kwnames=<optimized out>) at ../Objects/call.c:342
arg=(<BlueZManager(_bus=<MessageBus at remote 0x7f958711a500>, _bus_lock=<Lock(_waiters=None, _locked=False) at remote 0x7f958712a7d0>, _properties={'/org/bluez': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.AgentManager1': {}, 'org.bluez.ProfileManager1': {}}, '/org/bluez/hci0': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.Adapter1': {'Address': 'D0:7E:35:67:XX:XX', 'AddressType': 'public', 'Name': 'openhab', 'Alias': 'openhab', 'Class': 268, 'Powered': True, 'Discoverable': False, 'DiscoverableTimeout': 180, 'Pairable': False, 'PairableTimeout': 0, 'Discovering': True, 'UUIDs': ['00001801-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '0000180a-0000-1000-8000-00805f9b34fb'], 'Modalias': 'usb:v1D6Bp0246d0541', 'Roles': ['central', 'peripheral']}, 'org.freedesktop.DBus.Properties': {}, 'org.bluez.GattManager1': {}, 'org.bluez.Media1': {}, 'org.bluez.Net...(truncated), func=<function at remote 0x7f9587134f70>)
at src/dbus_fast/message_bus.c:37223
arg1=<BlueZManager(_bus=<MessageBus at remote 0x7f958711a500>, _bus_lock=<Lock(_waiters=None, _locked=False) at remote 0x7f958712a7d0>, _properties={'/org/bluez': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.AgentManager1': {}, 'org.bluez.ProfileManager1': {}}, '/org/bluez/hci0': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.Adapter1': {'Address': 'D0:7E:35:67:XX:XX', 'AddressType': 'public', 'Name': 'openhab', 'Alias': 'openhab', 'Class': 268, 'Powered': True, 'Discoverable': False, 'DiscoverableTimeout': 180, 'Pairable': False, 'PairableTimeout': 0, 'Discovering': True, 'UUIDs': ['00001801-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '0000180a-0000-1000-8000-00805f9b34fb'], 'Modalias': 'usb:v1D6Bp0246d0541', 'Roles': ['central', 'peripheral']}, 'org.freedesktop.DBus.Properties': {}, 'org.bluez.GattManager1': {}, 'org.bluez.Media1': {}, 'org.bluez.Netw...(truncated), arg2=<optimized out>)
at src/dbus_fast/message_bus.c:37256
__pyx_v_self=__pyx_v_self@entry=0x7f958711a500, __pyx_v_msg=__pyx_v_msg@entry=0x7f958798d260,
__pyx_skip_dispatch=__pyx_skip_dispatch@entry=1) at src/dbus_fast/message_bus.c:16166
__pyx_v_self=0x7f958711a500) at src/dbus_fast/message_bus.c:17806
__pyx_v_msg=<dbus_fast.message.Message at remote 0x7f958798d260>) at src/dbus_fast/message_bus.c:17786
self=<MessageBus at remote 0x7f958711a500>, func=<cython_function_or_method at remote 0x7f9587914a00>)
at src/dbus_fast/message.c:10739
func=<cython_function_or_method at remote 0x7f9587914a00>) at src/dbus_fast/message.c:10788
args=args@entry=(<MessageBus at remote 0x7f958711a500>, <dbus_fast.message.Message at remote 0x7f958798d260>), kw=kw@entry=0x0)
at src/dbus_fast/message.c:10764
arg=(<MessageBus at remote 0x7f958711a500>, <dbus_fast.message.Message at remote 0x7f958798d260>),
func=<cython_function_or_method at remote 0x7f9587914a00>) at src/dbus_fast/aio/message_reader.c:4150
arg1=<MessageBus at remote 0x7f958711a500>, arg2=arg2@entry=<dbus_fast.message.Message at remote 0x7f958798d260>)
at src/dbus_fast/aio/message_reader.c:4183
at src/dbus_fast/aio/message_reader.c:2213
unused=<optimized out>) at src/dbus_fast/aio/message_reader.c:2059
args=<optimized out>, nargs=0, keywords=0x0) at ../Objects/call.c:215
func=<built-in method run of _contextvars.Context object at remote 0x7f958713e4c0>, args=0x7f9588bd0688, nargsf=<optimized out>,
kwnames=0x0) at ../Objects/methodobject.c:446
func=<built-in method run of _contextvars.Context object at remote 0x7f958713e4c0>, trace_info=0x7f95867e5410,
tstate=<optimized out>) at ../Python/ceval.c:5915
f=Frame 0x7f9587c73c50, for file /usr/lib/python3.10/asyncio/events.py, line 80, in _run (self=<Handle at remote 0x7f958714a140>),
tstate=0x565071e55cb0) at ../Include/internal/pycore_ceval.h:46
tstate=0x565071e55cb0) at ../Python/ceval.c:5065
kwnames=<optimized out>) at ../Objects/call.c:342
callable=<function at remote 0x7f95887669e0>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Include/cpython/abstract.h:123
at ../Python/ceval.c:5891
f=Frame 0x7f9580000bb0, for file /usr/lib/python3.10/asyncio/base_events.py, line 1896, in _run_once (self=<_UnixSelectorEventLoop(_timer_cancelled_count=0, _closed=False, _stopping=False, _ready=<collections.deque at remote 0x7f958799fe20>, _scheduled=[<TimerHandle at remote 0x7f95879821f0>], _default_executor=None, _internal_fds=1, _thread_id=140280183285440, _clock_resolution=<float at remote 0x7f9587d2e5d0>, _exception_handler=None, _debug=False, slow_callback_duration=<float at remote 0x7f9588ffe7f0>, _current_handle=None, _task_factory=None, _coroutine_origin_tracking_enabled=False, _coroutine_origin_tracking_saved_depth=None, _asyncgens=<WeakSet(data=set(), _remove=<function at remote 0x7f9587135bd0>, _pending_removals=[], _iterating=set()) at remote 0x7f958712b190>, _asyncgens_shutdown_called=False, _executor_shutdown_called=False, _selector=<EpollSelector(_fd_to_key={4: <SelectorKey at remote 0x7f9587127ba0>, 7: <SelectorKey at remote 0x7f9587156a20>}, _map=<_SelectorMapping(_selector=<...>) at remote ...(truncated), tstate=0x565071e55cb0)
at ../Include/internal/pycore_ceval.h:46
tstate=0x565071e55cb0) at ../Python/ceval.c:5065
kwnames=<optimized out>) at ../Objects/call.c:342
callable=<function at remote 0x7f958815af80>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Include/cpython/abstract.h:123
at ../Python/ceval.c:5891
f=Frame 0x7f95879aa0e0, for file /usr/lib/python3.10/asyncio/base_events.py, line 600, in run_forever (self=<_UnixSelectorEventLoop(_timer_cancelled_count=0, _closed=False, _stopping=False, _ready=<collections.deque at remote 0x7f958799fe20>, _scheduled=[<TimerHandle at remote 0x7f95879821f0>], _default_executor=None, _internal_fds=1, _thread_id=140280183285440, _clock_resolution=<float at remote 0x7f9587d2e5d0>, _exception_handler=None, _debug=False, slow_callback_duration=<float at remote 0x7f9588ffe7f0>, _current_handle=None, _task_factory=None, _coroutine_origin_tracking_enabled=False, _coroutine_origin_tracking_saved_depth=None, _asyncgens=<WeakSet(data=set(), _remove=<function at remote 0x7f9587135bd0>, _pending_removals=[], _iterating=set()) at remote 0x7f958712b190>, _asyncgens_shutdown_called=False, _executor_shutdown_called=False, _selector=<EpollSelector(_fd_to_key={4: <SelectorKey at remote 0x7f9587127ba0>, 7: <SelectorKey at remote 0x7f9587156a20>}, _map=<_SelectorMapping(_selector=<...>) at remote...(truncated), tstate=0x565071e55cb0)
at ../Include/internal/pycore_ceval.h:46
at ../Python/ceval.c:5065
at ../Objects/call.c:342
tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Objects/classobject.c:61
tstate=<optimized out>) at ../Python/ceval.c:5943
f=Frame 0x7f9587985380, for file /usr/lib/python3.10/threading.py, line 953, in run (self=<Thread(_target=<method at remote 0x7f95868e1680>, _name='Thread-1 (run_forever)', _args=(), _kwargs={}, _daemonic=True, _ident=140280183285440, _native_id=204974, _tstate_lock=<_thread.lock at remote 0x7f958713e500>, _started=<Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f958713e480>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f958713e480>, release=<built-in method release of _thread.lock object at remote 0x7f958713e480>, _waiters=<collections.deque at remote 0x7f958799ffa0>) at remote 0x7f958712b3a0>, _flag=True) at remote 0x7f958712b370>, _is_stopped=False, _initialized=True, _stderr=<_io.TextIOWrapper at remote 0x7f9588f71220>, _invoke_excepthook=<function at remote 0x7f9587135cf0>) at remote 0x7f958712b340>), tstate=0x565071e55cb0) at ../Include/internal/pycore_ceval.h:46
tstate=0x565071e55cb0) at ../Python/ceval.c:5065
kwnames=<optimized out>) at ../Objects/call.c:342
callable=<function at remote 0x7f95888e5ea0>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Include/cpython/abstract.h:123
at ../Python/ceval.c:5891
f=Frame 0x7f9587c73490, for file /usr/lib/python3.10/threading.py, line 1016, in _bootstrap_inner (self=<Thread(_target=<method at remote 0x7f95868e1680>, _name='Thread-1 (run_forever)', _args=(), _kwargs={}, _daemonic=True, _ident=140280183285440, _native_id=204974, _tstate_lock=<_thread.lock at remote 0x7f958713e500>, _started=<Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f958713e480>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f958713e480>, release=<built-in method release of _thread.lock object at remote 0x7f958713e480>, _waiters=<collections.deque at remote 0x7f958799ffa0>) at remote 0x7f958712b3a0>, _flag=True) at remote 0x7f958712b370>, _is_stopped=False, _initialized=True, _stderr=<_io.TextIOWrapper at remote 0x7f9588f71220>, _invoke_excepthook=<function at remote 0x7f9587135cf0>) at remote 0x7f958712b340>), tstate=0x565071e55cb0) at ../Include/internal/pycore_ceval.h:46
tstate=0x565071e55cb0) at ../Python/ceval.c:5065
kwnames=<optimized out>) at ../Objects/call.c:342
callable=<function at remote 0x7f95888e6170>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Include/cpython/abstract.h:123
at ../Python/ceval.c:5891
f=Frame 0x7f9587144040, for file /usr/lib/python3.10/threading.py, line 973, in _bootstrap (self=<Thread(_target=<method at remote 0x7f95868e1680>, _name='Thread-1 (run_forever)', _args=(), _kwargs={}, _daemonic=True, _ident=140280183285440, _native_id=204974, _tstate_lock=<_thread.lock at remote 0x7f958713e500>, _started=<Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f958713e480>, acquire=<buistate_lock=<_thread.lock at remote 0x7f958713e500>, _started=<Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f958713e480>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f958713e480>, release=<built-in method release of _thread.lock object at remote 0x7f958713e480>, _waiters=<collections.deque at remote 0x7f958799ffa0>) at remote 0x7f958712b3a0>, _flag=True) at remote 0x7f958712b370>, _is_stopped=False, _initialized=True, _stderr=<_io.TextIOWrapper at remote 0x7f9588f71220>, _invoke_excepthook=<function at remote 0x7f9587135cf0>) at remote 0x7f958712b340>), tstate=0x565071e55cb0) at ../Include/internal/pycore_ceval.h:46
tstate=0x565071e55cb0) at ../Python/ceval.c:5065
kwnames=<optimized out>) at ../Objects/call.c:342
callable=<function at remote 0x7f95888e6170>, tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Include/cpython/abstract.h:123
at ../Python/ceval.c:5891
f=Frame 0x7f9587144040, for file /usr/lib/python3.10/threading.py, line 973, in _bootstrap (self=<Thread(_target=<method at remote 0x7f95868e1680>, _name='Thread-1 (run_forever)', _args=(), _kwargs={}, _daemonic=True, _ident=140280183285440, _native_id=204974, _tstate_lock=<_thread.lock at remote 0x7f958713e500>, _started=<Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f958713e480>, acquire=<bui--Type <RET> for more, q to quit, c to continue without paging--
lt-in method acquire of _thread.lock object at remote 0x7f958713e480>, release=<built-in method release of _thread.lock object at remote 0x7f958713e480>, _waiters=<collections.deque at remote 0x7f958799ffa0>) at remote 0x7f958712b3a0>, _flag=True) at remote 0x7f958712b370>, _is_stopped=False, _initialized=True, _stderr=<_io.TextIOWrapper at remote 0x7f9588f71220>, _invoke_excepthook=<function at remote 0x7f9587135cf0>) at remote 0x7f958712b340>), tstate=0x565071e55cb0) at ../Include/internal/pycore_ceval.h:46
at ../Python/ceval.c:5065
at ../Objects/call.c:342
tstate=0x565071e55cb0) at ../Include/cpython/abstract.h:114
at ../Objects/classobject.c:61
`
Many crashes I've also noticed just after:
May 8 03:16:10 openhab python3[3021029]: INFO:BLEGateway:Sent
{"servicedatauuid": "fe95", "servicedata": "58585b05ff4b588138c1a4fad0e6e2c8f8050047ca521a", "manufacturerdata":
75004204018060f83f517e368ffa3f517e368e01000000000000", "name": "LE_WH-1000XM4", "id": "F8:3F:51:XX:XX:XX", "rssi": -76, "mfr": "Samsung Electronics Co. Ltd."}to topic
home/TheengsGateway/BTtoMQTT/F83F51XXXXXX
Many crashes I've also noticed just after:
In case this undecoded and unknown "LE_WH-1000XM4" headset, with its very long servicedata and manufacturerdata, is actually the cause of the crash, could you test starting with -pa 0
-pa PUBLISH_ALL, --publish_all PUBLISH_ALL Publish all (1) or only decoded (0) advertisements (default:1)
I've noticed recently,, that I'm getting segfault quite often
Apr 6 11:07:17 openhab kernel: [ 2958.011031] python3[13034]: segfault at 0 ip 00007f332d7753bd sp 00007f332adb8df8 error 4 in libc.so.6 [7f332d622000+179000] Apr 6 11:07:17 openhab kernel: [ 2958.011077] Code: e1 c5 f8 77 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 89 f8 48 89 fa c5 f9 ef c0 25 ff 0f 00 00 3d e0 0f 00 00 0f 87 33 01 00 00 <c5> fd 74 0f c5 fd d7 c1 85 c0 74 57 f3 0f bc c0 c5 f8 77 c3 66 66
Coredump in attachment.
core.python3.0.d17642bc1c99473cad951ae65472ba6b.9616.1680771946000000.zst.zip
Environment Output of
python -m TheengsGateway.diagnose
Theengs Gateway Diagnostics
Package Versions
Python
Operating System
Configuration
Bluetooth adapters
Default adapter: hci0
hci0