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

bluepy-helper crashes #486

Open
Rudd-O opened this issue Jun 13, 2022 · 1 comment
Open

bluepy-helper crashes #486

Rudd-O opened this issue Jun 13, 2022 · 1 comment

Comments

@Rudd-O
Copy link

Rudd-O commented Jun 13, 2022

Platform: RPi 3B

Version of modules (including bluepy):

[root@verena ~]# /opt/assistant/bin/pip3 list
Package                 Version
----------------------- -----------
acme                    1.22.0
aiodiscover             1.4.11
aiodns                  3.0.0
aiohttp                 3.8.1
aiohttp-cors            0.7.0
aiosignal               1.2.0
aiosqlite               0.17.0
aioswitcher             2.0.6
android-backup          0.2.0
anyio                   3.6.1
appdirs                 1.4.4
astral                  2.2
async-timeout           4.0.2
async-upnp-client       0.30.1
asyncstdlib             3.10.5
atomicwrites            1.4.0
attrs                   21.2.0
awesomeversion          22.5.2
backoff                 1.11.1
bcrypt                  3.1.7
bellows                 0.30.0
blockchain              1.4.4
bluepy                  1.3.0
boto3                   1.24.3
botocore                1.27.3
btlewrap                0.1.1
cachetools              5.2.0
casttube                0.2.1
certifi                 2022.5.18.1
cffi                    1.15.0
charset-normalizer      2.0.12
ciso8601                2.2.0
click                   8.1.3
click-log               0.4.0
coloredlogs             15.0.1
colorlog                6.6.0
construct               2.10.56
convertdate             2.4.0
crccheck                1.1
croniter                1.3.5
cryptography            36.0.2
defusedxml              0.7.1
denonavr                0.10.11
dnspython               2.2.1
ecdsa                   0.17.0
enum-compat             0.0.3
envs                    1.4
fnvhash                 0.1.0
frozenlist              1.3.0
future                  0.18.2
greenlet                1.1.2
gTTS                    2.2.4
h11                     0.12.0
hass-nabucasa           0.54.0
hijri-converter         2.2.4
holidays                0.13
home-assistant-frontend 20220601.0
homeassistant           2022.6.3
httpcore                0.15.0
httpx                   0.23.0
humanfriendly           10.0
idna                    3.3
ifaddr                  0.1.7
Jinja2                  3.1.2
jmespath                1.0.0
josepy                  1.13.0
jsonrpc-async           2.1.1
jsonrpc-base            2.1.1
jsonrpc-websocket       3.1.4
jsonschema              4.6.0
korean-lunar-calendar   0.2.1
lru-dict                1.1.7
MarkupSafe              2.1.1
micloud                 0.5
mitemp-bt               0.0.5
multidict               6.0.2
mutagen                 1.45.1
netifaces               0.11.0
numpy                   1.22.4
oauthlib                3.2.0
open-meteo              0.2.1
openwrt-luci-rpc        1.1.11
openwrt-ubus-rpc        0.0.2
packaging               21.3
Pillow                  9.1.1
pip                     21.3.1
PlexAPI                 4.11.2
plexauth                0.0.6
plexwebsocket           0.0.13
protobuf                4.21.1
pure-pcapy3             1.0.1
pyasn1                  0.4.8
pybotvac                0.0.23
pycares                 4.1.2
PyChromecast            12.1.3
pycognito               2022.1.0
pycountry               22.3.5
pycparser               2.21
pycryptodome            3.14.1
pydantic                1.9.0
PyJWT                   2.4.0
pykodi                  0.2.7
PyMeeus                 0.5.11
PyMetno                 0.9.0
PyNaCl                  1.5.0
pynut2                  2.1.2
pyOpenSSL               22.0.0
pyotp                   2.6.0
pyparsing               3.0.9
PyQRCode                1.2.1
pyRFC3339               1.1
pyroute2                0.6.11
pyroute2.core           0.6.11
pyroute2.ethtool        0.6.11
pyroute2.ipdb           0.6.11
pyroute2.ipset          0.6.11
pyroute2.ndb            0.6.11
pyroute2.nftables       0.6.11
pyroute2.nslink         0.6.11
pyrsistent              0.18.1
pyserial                3.5
pyserial-asyncio        0.6
python-dateutil         2.8.2
python-didl-lite        1.3.2
python-jose             3.3.0
python-miio             0.5.11
python-slugify          4.0.1
PyTurboJPEG             1.6.6
pytz                    2022.1
pytz-deprecation-shim   0.1.0.post0
pyudev                  0.22.0
pyusb                   1.2.1
PyYAML                  6.0
radios                  0.1.1
requests                2.27.1
requests-oauthlib       1.3.1
requests-toolbelt       0.9.1
rfc3986                 1.5.0
rpi-bad-power           0.1.0
rsa                     4.8
s3transfer              0.6.0
scapy                   2.4.5
securetar               2022.2.0
setuptools              59.6.0
six                     1.16.0
sniffio                 1.2.0
snitun                  0.31.0
spotipy                 2.19.0
SQLAlchemy              1.4.37
systembridge            2.3.1
text-unidecode          1.3
tqdm                    4.64.0
typing_extensions       4.2.0
tzdata                  2022.1
tzlocal                 4.2
urllib3                 1.26.9
voluptuous              0.13.1
voluptuous-serialize    2.5.0
wakeonlan               2.0.1
websockets              10.3
whois                   0.9.13
xmltodict               0.13.0
yarl                    1.7.2
zeroconf                0.38.6
zha-quirks              0.0.75
zigpy                   0.45.1
zigpy-deconz            0.16.0
zigpy-xbee              0.14.0
zigpy-zigate            0.7.4
zigpy-znp               0.7.0
Jun 13 11:37:31 verena systemd-coredump[1075]: [🡕] Process 1073 (bluepy-helper) of user 987 dumped core.
                                               
                                               Module linux-vdso.so.1 with build-id 9c8f5118c79b78d48382127746d1afbb694e27bc
                                               Module libpcre.so.1 with build-id 89be6dc6cc6935ba8e493891c7ed1223b2dcc811
                                               Metadata for module libpcre.so.1 owned by FDO found: {
                                               	"type" : "rpm",
                                               	"name" : "pcre",
                                               	"version" : "8.45-1.fc36.1",
                                               	"architecture" : "aarch64",
                                               	"osCpe" : "cpe:/o:fedoraproject:fedora:36"
                                               }
                                               
                                               Module libc.so.6 with build-id db0564aeb66e3827dc926b7566ba073de62a733e
                                               Module libglib-2.0.so.0 with build-id 01825488f7342ad610796fc0050eaf27c54112fd
                                               Metadata for module libglib-2.0.so.0 owned by FDO found: {
                                               	"type" : "rpm",
                                               	"name" : "glib2",
                                               	"version" : "2.72.2-1.fc36",
                                               	"architecture" : "aarch64",
                                               	"osCpe" : "cpe:/o:fedoraproject:fedora:36"
                                               }
                                               
                                               Module bluepy-helper with build-id e0dfcff0d088c2a878b6b82731d303a477d0c256
                                               Stack trace of thread 1073:
                                               #0  0x0000ffffa0302648 __pthread_kill_implementation (libc.so.6 + 0x82648)
                                               #1  0x0000ffffa02bab00 raise (libc.so.6 + 0x3ab00)
                                               #2  0x0000ffffa02a70f8 abort (libc.so.6 + 0x270f8)
                                               #3  0x0000ffffa02f5f5c __libc_message (libc.so.6 + 0x75f5c)
                                               #4  0x0000ffffa030d060 malloc_printerr (libc.so.6 + 0x8d060)
                                               #5  0x0000ffffa030dbd4 malloc_consolidate (libc.so.6 + 0x8dbd4)
                                               #6  0x0000ffffa030fe78 _int_malloc (libc.so.6 + 0x8fe78)
                                               #7  0x0000ffffa0311638 __libc_malloc (libc.so.6 + 0x91638)
                                               #8  0x0000ffffa02eafdc _IO_file_doallocate (libc.so.6 + 0x6afdc)
                                               #9  0x0000ffffa02fa004 _IO_doallocbuf (libc.so.6 + 0x7a004)
                                               #10 0x0000ffffa02f8198 _IO_file_xsgetn (libc.so.6 + 0x78198)
                                               #11 0x0000ffffa02f6c28 fread_unlocked (libc.so.6 + 0x76c28)
                                               #12 0x0000ffffa032d664 __tzfile_read (libc.so.6 + 0xad664)
                                               #13 0x0000ffffa032d0b4 tzset_internal (libc.so.6 + 0xad0b4)
                                               #14 0x0000ffffa032d33c __tz_convert (libc.so.6 + 0xad33c)
                                               #15 0x0000ffffa048f2a8 g_log_writer_format_fields (libglib-2.0.so.0 + 0x5f2a8)
                                               #16 0x0000ffffa0492f68 g_log_writer_standard_streams (libglib-2.0.so.0 + 0x62f68)
                                               #17 0x0000ffffa04930ac g_log_writer_default (libglib-2.0.so.0 + 0x630ac)
                                               #18 0x0000ffffa048e984 g_log_structured_array (libglib-2.0.so.0 + 0x5e984)
                                               #19 0x0000ffffa048ec90 g_log_default_handler (libglib-2.0.so.0 + 0x5ec90)
                                               #20 0x0000ffffa0490078 g_logv (libglib-2.0.so.0 + 0x60078)
                                               #21 0x0000ffffa04902d4 g_log (libglib-2.0.so.0 + 0x602d4)
                                               #22 0x0000ffffa04783dc g_io_channel_error_from_errno (libglib-2.0.so.0 + 0x483dc)
                                               #23 0x0000ffffa04debe0 g_io_unix_close (libglib-2.0.so.0 + 0xaebe0)
                                               #24 0x0000ffffa0478a18 g_io_channel_shutdown (libglib-2.0.so.0 + 0x48a18)
                                               #25 0x0000ffffa0478ccc g_io_channel_unref (libglib-2.0.so.0 + 0x48ccc)
                                               #26 0x0000ffffa0485958 g_source_unref_internal (libglib-2.0.so.0 + 0x55958)
                                               #27 0x0000ffffa04880b8 g_main_context_dispatch (libglib-2.0.so.0 + 0x580b8)
                                               #28 0x0000ffffa04e0944 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xb0944)
                                               #29 0x0000ffffa04874d8 g_main_loop_run (libglib-2.0.so.0 + 0x574d8)
                                               #30 0x0000000000402764 main (bluepy-helper + 0x2764)
                                               #31 0x0000ffffa02a73c8 __libc_start_call_main (libc.so.6 + 0x273c8)
                                               #32 0x0000ffffa02a74a0 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x274a0)
                                               #33 0x0000000000402870 _start (bluepy-helper + 0x2870)
                                               ELF object binary architecture: AARCH64
@baudneo
Copy link

baudneo commented Feb 17, 2024

I am getting the same thing. The connection is in a weird state. I connect to the device and send/receieve some data between devices. The helper crashes but the connection remains open. I can sometimes use gatt_write_char to the mesh but when I try and use gatt_read_char, python throws an exception saying Helper not started (did you call connect()?).

Heres my coredump

[email protected] - Process Core Dump
     Loaded: loaded (/usr/lib/systemd/system/[email protected]; static)
     Active: inactive (dead)
       Docs: man:systemd-coredump(8)

Feb 17 11:21:53 archtooth systemd[1]: Started Process Core Dump (PID 5676/UID 0).
Feb 17 11:21:53 archtooth systemd-coredump[5677]: [🡕] Process 5672 (bluepy-helper) of user 1000 dumped core.

                                                  Stack trace of thread 5672:
                                                  #0  0x000076461c8ad32c n/a (libc.so.6 + 0x8d32c)
                                                  #1  0x000076461c85c6c8 raise (libc.so.6 + 0x3c6c8)
                                                  #2  0x000076461c8444b8 abort (libc.so.6 + 0x244b8)
                                                  #3  0x000076461c845395 n/a (libc.so.6 + 0x25395)
                                                  #4  0x000076461c8b72a7 n/a (libc.so.6 + 0x972a7)
                                                  #5  0x000076461c8b7f8c n/a (libc.so.6 + 0x97f8c)
                                                  #6  0x000076461c8ba578 n/a (libc.so.6 + 0x9a578)
                                                  #7  0x000076461c8bb8ea malloc (libc.so.6 + 0x9b8ea)
                                                  #8  0x000076461c895f1a _IO_file_doallocate (libc.so.6 + 0x75f1a)
                                                  #9  0x000076461c8a4c89 _IO_doallocbuf (libc.so.6 + 0x84c89)
                                                  #10 0x000076461c8a2a65 _IO_file_underflow (libc.so.6 + 0x82a65)
                                                  #11 0x000076461c897950 __getdelim (libc.so.6 + 0x77950)
                                                  #12 0x000076461c8487b3 n/a (libc.so.6 + 0x287b3)
                                                  #13 0x000076461c848b2c n/a (libc.so.6 + 0x28b2c)
                                                  #14 0x000076461c8b06af n/a (libc.so.6 + 0x906af)
                                                  #15 0x000076461c8479c6 n/a (libc.so.6 + 0x279c6)
                                                  #16 0x000076461c846576 __gconv_open (libc.so.6 + 0x26576)
                                                  #17 0x000076461c846148 iconv_open (libc.so.6 + 0x26148)
                                                  #18 0x000076461ca393ce g_iconv_open (libglib-2.0.so.0 + 0x373ce)
                                                  #19 0x000076461ca398fd g_convert (libglib-2.0.so.0 + 0x378fd)
                                                  #20 0x000076461ca39a79 n/a (libglib-2.0.so.0 + 0x37a79)
                                                  #21 0x000076461ca3a374 g_locale_to_utf8 (libglib-2.0.so.0 + 0x38374)
                                                  #22 0x000076461ca80569 g_strerror (libglib-2.0.so.0 + 0x7e569)
                                                  #23 0x000076461cab8fc8 n/a (libglib-2.0.so.0 + 0xb6fc8)
                                                  #24 0x000076461ca4d3e3 g_io_channel_shutdown (libglib-2.0.so.0 + 0x4b3e3)
                                                  #25 0x000076461ca4d662 g_io_channel_unref (libglib-2.0.so.0 + 0x4b662)
                                                  #26 0x000076461ca5ad3d n/a (libglib-2.0.so.0 + 0x58d3d)
                                                  #27 0x000076461ca5c08c n/a (libglib-2.0.so.0 + 0x5a08c)
                                                  #28 0x000076461caba3a7 n/a (libglib-2.0.so.0 + 0xb83a7)
                                                  #29 0x000076461ca5cb97 g_main_loop_run (libglib-2.0.so.0 + 0x5ab97)
                                                  #30 0x00005d58698f87c9 n/a (/home/baudneo/cync2mqtt/venv/lib/python3.11/site-packages/bluepy/bluepy-helper + 0x67c9)
                                                  ELF object binary architecture: AMD x86-64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants