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

DBD::SQLite::db prepare failed #54

Open
satishdotpatel opened this issue Nov 1, 2021 · 6 comments
Open

DBD::SQLite::db prepare failed #54

satishdotpatel opened this issue Nov 1, 2021 · 6 comments

Comments

@satishdotpatel
Copy link

satishdotpatel commented Nov 1, 2021

How do i fix this issue?

Package version rasdaemon 0.6.5-1ubuntu1.1

# ras-mc-ctl --summary
No Memory errors.

No PCIe AER errors.

No Extlog errors.

DBD::SQLite::db prepare failed: no such table: devlink_event at /usr/sbin/ras-mc-ctl line 1181.
Can't call method "execute" on an undefined value at /usr/sbin/ras-mc-ctl line 1182.
@adatum
Copy link

adatum commented Nov 24, 2021

I get a similar error in rasdaemon v0.6.7 on Fedora 35 with different lines referenced:

$ ras-mc-ctl --errors
No Memory errors.

DBD::SQLite::db prepare failed: no such column: dev_name at /usr/sbin/ras-mc-ctl line 1350.
Can't call method "execute" on an undefined value at /usr/sbin/ras-mc-ctl line 1351.

Other mentions of this type of error:
#53
#30

@mchehab
Copy link
Owner

mchehab commented May 20, 2022

Did you upgrade your systems or rasdaemon? It sounds to me that it is using an outdated mysql database. Yeah, we probably need to add some feature at rasdaemon for it to update the database in case of changes between two versions.

@kengruven
Copy link

kengruven commented Dec 26, 2022

Do you mean SQLite? I don't see any references to MySQL in rasdaemon.
I got this error, and I just installed rasdaemon (on Debian 11) for the first time today. Apart from deleting the database file on purge, I don't see anything in the Debian source which has anything to do with database management.

@TuningYourCode
Copy link

Just adding more context: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973053

It seems that Debian Bullseye ships a broken version. Fixed/newer version seems to be in unstable. Easiest workaround currently looks like to just add the missing table into the sqlite file.

@TuningYourCode
Copy link

Quick & dirty workaround for debian bullseye:

# sqlite3 /var/lib/rasdaemon/ras-mc_event.db
CREATE TABLE devlink_event (id INTEGER PRIMARY KEY, timestamp TEXT, bus_name TEXT, dev_name TEXT, driver_name TEXT, reporter_name TEXT, msg TEXT);
CREATE TABLE disk_errors (id INTEGER PRIMARY KEY, timestamp TEXT, dev TEXT, sector INTEGER, nr_sector INTEGER, error TEXT, rwbs TEXT, cmd TEXT);
.exit

@kengruven
Copy link

I can confirm that the version in Debian "unstable" today works without error.

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

5 participants