-
-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Error executing query: (sqlite3.DatabaseError) database disk image is malformed #121468
Comments
Done some investigation, possible hardware ssd issue. After some time /mnt/data becomes read-only (drive /dev/sdb8) Seems there are some file system errors:
Tried to stop docker daemon then umount and run fsck but I was not successfull:
What is the correct way to run fsck on HAOS? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem
After some time home assistant UI is not working correctly and there are multiple errors in logs.
To recover from this state, I have to manually restart the server.
After restart, everything works correctly.
What version of Home Assistant Core has the issue?
core-2024.2.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
home-assistant.log.1.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2024-06-28 04:15:10.200 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: SELECT anon_1.metadata_id, anon_1.state, anon_1.last_updated_ts, anon_1.attributes FROM (SELECT anon_2.metadata_id AS metadata_id, anon_2.state AS state, anon_2.last_updated_ts AS last_updated_ts, anon_2.attributes AS attributes FROM (SELECT states.metadata_id AS metadata_id, states.state AS state, ? AS last_updated_ts, CASE WHEN (state_attributes.shared_attrs IS NULL) THEN states.attributes ELSE state_attributes.shared_attrs END AS attributes FROM states JOIN (SELECT states.metadata_id AS max_metadata_id, max(states.last_updated_ts) AS max_last_updated FROM states WHERE states.last_updated_ts >= ? AND states.last_updated_ts < ? AND states.metadata_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) GROUP BY states.metadata_id) AS anon_3 ON states.metadata_id = anon_3.max_metadata_id AND states.last_updated_ts = anon_3.max_last_updated LEFT OUTER JOIN state_attributes ON states.attributes_id = state_attributes.attributes_id WHERE states.last_updated_ts >= ? AND states.last_updated_ts < ? AND states.metadata_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) AS anon_2 UNION ALL SELECT anon_4.metadata_id AS metadata_id, anon_4.state AS state, anon_4.last_updated_ts AS last_updated_ts, anon_4.attributes AS attributes FROM (SELECT states.metadata_id AS metadata_id, states.state AS state, states.last_updated_ts AS last_updated_ts, CASE WHEN (state_attributes.shared_attrs IS NULL) THEN states.attributes ELSE state_attributes.shared_attrs END AS attributes FROM states LEFT OUTER JOIN state_attributes ON states.attributes_id = state_attributes.attributes_id WHERE (states.last_changed_ts = states.last_updated_ts OR states.last_changed_ts IS NULL) AND states.metadata_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND states.last_updated_ts > ? AND states.last_updated_ts < ?) AS anon_4) AS anon_1 ORDER BY anon_1.metadata_id, anon_1.last_updated_ts] [parameters: (0, 1718302302.213129, 1719536999.999999, 247, 267, 55, 54, 238, 395, 48, 50, 51, 52, 53, 18, 19, 20, 21, 22, 23, 235, 241, 244, 24, 340, 341, 132, 342, 136, 137, 343, 139, 141, 140, 344, 345, 346, 146, 147, 347, 348, 150, 349, 350, 153, 154, 155, 156, 351, 159 ... 120 parameters truncated ... 132, 342, 136, 137, 343, 139, 141, 140, 344, 345, 346, 146, 147, 347, 348, 150, 349, 350, 153, 154, 155, 156, 351, 159, 158, 352, 161, 162, 164, 354, 356, 355, 254, 358, 170, 171, 172, 39, 359, 360, 174, 362, 363, 260, 391, 392, 393, 394, 1719536999.999999, 1719537300.0)] (Background on this error at: https://sqlalche.me/e/20/4xp6)
Additional information
System Information
Home Assistant Cloud
Home Assistant Supervisor
Dashboards
Recorder
The text was updated successfully, but these errors were encountered: