Incorrect format on config.metabib_field insert results in segmentation fault
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Unassigned | ||
3.0 |
Won't Fix
|
Undecided
|
Unassigned | ||
3.1 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
EG 3.1
During an upgrade to EG 3.1.0, a number of new rows with mods33 xpath values are inserted into config.
How to test:
1. Create an EG 3.0.6 database.
2. ALTER TABLE config.
3. Upgrade the database to 3.1.0.
4. UPDATE config.
5. UPDATE biblio.record_entry SET id = id WHERE id = 1;
The final update fails and the database connection is lost; other connections to the same cluster may also be affected. Postgres logs and dmesg show a segfault.
Most users will never run into this problem, since the default cmf format was changed to mods33 way back in 2009. But a proper database update script was never created for that change, and certain very old EG installs may still have mods32 as the default.
I propose several fixes:
1. Ensure the default value for config.
2. Modify the rows inserted by db update 1100 to ensure they use the correct format value.
3. In future, always specify a format value when inserting new rows into config.
I'm not sure whether upgrade/
Changed in evergreen: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Galen Charlton (gmc) |
milestone: | none → 3.1.2 |
Changed in evergreen: | |
milestone: | 3.1.2 → 3.1.3 |
Changed in evergreen: | |
milestone: | 3.1.3 → 3.1.4 |
Changed in evergreen: | |
milestone: | 3.1.4 → 3.1.5 |
Changed in evergreen: | |
milestone: | 3.1.5 → 3.1.6 |
Changed in evergreen: | |
milestone: | 3.1.6 → 3.2.1 |
Changed in evergreen: | |
milestone: | 3.2.1 → 3.2.2 |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
I've just come across this as well. Excellent description, and not surprising considering our database epoch is 2008.
I eliminated the segfaults by updating with: metabib_ field set xpath=regexp_ replace( xpath,' mods32' ,'mods33' ,'g') where xpath ~ 'mods32';
update config.