Comments (12)
Summary of user reported Fatal Python error: Segmentation fault
Note: I cannot reproduce this locally so I do not have a reproducer or trace available yet
Current thread 0x00007fe9aa0a0b38 (most recent call first):
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 158 in _orjson_bytes_default_encoder
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 188 in save_json
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 544 in _write_data
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58 in run
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
File "/usr/local/lib/python3.12/threading.py", line 1010 in run
File "/usr/local/lib/python3.12/threading.py", line 1073 in _bootstrap_inner
File "/usr/local/lib/python3.12/threading.py", line 1030 in _bootstrap
Current thread 0x00007f66a3f85b30 (most recent call first):
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 158 in _orjson_bytes_default_encoder
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 188 in save_json
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 544 in _write_data
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58 in run
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
File "/usr/local/lib/python3.12/threading.py", line 1010 in run
File "/usr/local/lib/python3.12/threading.py", line 1073 in _bootstrap_inner
File "/usr/local/lib/python3.12/threading.py", line 1030 in _bootstrap
Current thread 0x00007f74562ffb30 (most recent call first):
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 158 in _orjson_bytes_default_encoder
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 188 in save_json
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 544 in _write_data
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58 in run
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
File "/usr/local/lib/python3.12/threading.py", line 1010 in run
File "/usr/local/lib/python3.12/threading.py", line 1073 in _bootstrap_inner
File "/usr/local/lib/python3.12/threading.py", line 1030 in _bootstrap
https://github.com/home-assistant/core/blob/0c44051d2ab8a78d8b979aaf950f5dc1c5c5bfa4/homeassistant/helpers/entity_registry.py#L324
https://github.com/home-assistant/core/blob/6bff0c384ffb1d26d21b52b19eb92439549beb28/homeassistant/helpers/json.py#L70
Current thread 0x00007fd26097fb30 (most recent call first):
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 325 in as_storage_fragment
File "/usr/local/lib/python3.12/functools.py", line 995 in __get__
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 1312 in _data_to_save
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 541 in _write_data
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58 in run
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
File "/usr/local/lib/python3.12/threading.py", line 1010 in run
File "/usr/local/lib/python3.12/threading.py", line 1073 in _bootstrap_inner
File "/usr/local/lib/python3.12/threading.py", line 1030 in _bootstrap
Current thread 0x00007fb7989fbb38 (most recent call first):
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 158 in _orjson_bytes_default_encoder
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 188 in save_json
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 544 in _write_data
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58 in run
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
File "/usr/local/lib/python3.12/threading.py", line 1010 in run
File "/usr/local/lib/python3.12/threading.py", line 1073 in _bootstrap_inner
File "/usr/local/lib/python3.12/threading.py", line 1030 in _bootstrap
Current thread 0x00007f7bccdffb38 (most recent call first):
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 158 in _orjson_bytes_default_encoder
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 188 in save_json
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 544 in _write_data
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58 in run
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
File "/usr/local/lib/python3.12/threading.py", line 1010 in run
File "/usr/local/lib/python3.12/threading.py", line 1073 in _bootstrap_inner
File "/usr/local/lib/python3.12/threading.py", line 1030 in _bootstrap
Current thread 0x00007f4019bffb38 (most recent call first):
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 158 in _orjson_bytes_default_encoder
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 188 in save_json
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 544 in _write_data
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58 in run
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
File "/usr/local/lib/python3.12/threading.py", line 1010 in run
File "/usr/local/lib/python3.12/threading.py", line 1073 in _bootstrap_inner
File "/usr/local/lib/python3.12/threading.py", line 1030 in _bootstrap
Current thread 0x00007f0eae8ffb38 (most recent call first):
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 158 in _orjson_bytes_default_encoder
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 188 in save_json
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 544 in _write_data
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58 in run
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
File "/usr/local/lib/python3.12/threading.py", line 1010 in run
File "/usr/local/lib/python3.12/threading.py", line 1073 in _bootstrap_inner
File "/usr/local/lib/python3.12/threading.py", line 1030 in _bootstrap
from orjson.
Got another
Current thread 0x0000ffff4efdf758 (most recent call first):
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 158 in _orjson_bytes_default_encoder
File "/usr/src/homeassistant/homeassistant/helpers/json.py", line 188 in save_json
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 544 in _write_data
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58 in run
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
File "/usr/local/lib/python3.12/threading.py", line 1010 in run
File "/usr/local/lib/python3.12/threading.py", line 1073 in _bootstrap_inner
File "/usr/local/lib/python3.12/threading.py", line 1030 in _bootstrap
This one is a home assistant blue.
from orjson.
So thats one is aarch64
from orjson.
Looks like this commit has an aarch64 and x86_64 only path
58a73f3#diff-abdceb17520cb5accf57f4d4eed04d97b84d89b341ce6c14071b9b4f79390c5cR115
58a73f3#diff-abdceb17520cb5accf57f4d4eed04d97b84d89b341ce6c14071b9b4f79390c5cR116
from orjson.
Music Assistant reported the same issue and I think they went from 3.10.0 to 3.10.1 so that commit being the source tracks with the timeline
from orjson.
music-assistant/hass-music-assistant#2110 music-assistant/hass-music-assistant#2142
from orjson.
Looks like the problem is probably fixed in 3.10.2. Thanks
Unfortunately to looks like armv7 support is gone so we are stuck on 3.9.15
from orjson.
I tested 3.10.3 quite a bit today, and I couldn't repro the seg fault (I also couldn't repro it before on 3.10.1 though)
Everything does still appear to be working as expected on armv7 and wheels build ok for it.
from orjson.
We should get confirmation that the problem is fixed on May 29/30 from the next Home Assistant beta.
from orjson.
Awaiting Home Assistant 2024.6.x beta to provide confirmation the seg fault issue is solved
from orjson.
Ok, thanks for the report. I think this was the off-by-one fixed in 3.10.2. That also dropped arm7 wheels due the CI job breaking and not really being something I can fix. If someone if motivated enough to do a just cross-compile or cross-compile and test in QEMU job that would be welcome, I just can't. Please reopen if not fixed.
from orjson.
Thanks for following up
Home Assistant is successful building wheels for armv7 (and they work) on newer versions. I'll see about getting a PR together to add back armv7 later this week.
from orjson.
Related Issues (20)
- orjson disregards numpy byte order HOT 3
- Support something like OPT_STRICT_INTEGER for deserialization HOT 6
- update issue - orjson 3.10.1 on Almalinux 9
- Deserialize `datetime` HOT 1
- missing support datetime.timedelta
- Test failures with numpy==2.0.0rc1 HOT 3
- Support freezegun fake types
- Unlike `json.dumps`, `orjson.dumps` does not release memory, resulting in a much higher memory usage HOT 2
- Build failed on Python 3.13.0b1 linux/arm64 HOT 1
- orjson.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyType_GetDict
- 3.10.3: pytest fails in 6 units in test/test_datetime.py
- RFE: use `zoneinfo` instead of `pytz`
- Reconsider Nan / Inf support as opt-in behavior.
- OSS-Fuzz Integration
- Relaxing chrono version?
- Feature Request: Add support for serializing any class using a special method like `__json__` in ujson
- Unable to parse deep JSON data
- Support for CPython 3.13
- Crash reported with 3.10.2+ on aarch64 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orjson.