Closed Bug 1953945 Opened 9 months ago Closed 9 months ago

[ERROR error_support::handling] suggest-unexpected: Error executing SQL: UNIQUE constraint failed: keywords_metrics.record_id (context: keyword metrics insert)

Categories

(Application Services :: Suggest, defect, P1)

Firefox 138

Tracking

(firefox137 unaffected, firefox138 fixed)

RESOLVED FIXED
Tracking Status
firefox137 --- unaffected
firefox138 --- fixed

People

(Reporter: mozilla, Assigned: adw)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [sng])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0

Steps to reproduce:

Download the firefox nightly tar file
Untar into a directory in my home directory, ~/src/firefox
Run directly from that directory, ~/src/firefox/firefox

Actual results:

with the latest nightly 138

[GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
[ERROR error_support::handling] suggest-unexpected: Error executing SQL: UNIQUE constraint failed: keywords_metrics.record_id (context: keyword metrics insert)
[ERROR error_support::handling] suggest-unexpected: Error executing SQL: UNIQUE constraint failed: yelp_subjects.keyword (context: <none>)
^CExiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.

with firefox 136

[GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
[ERROR error_support::handling] suggest-unexpected: Error opening database: Incompatible database version: 33
^CExiting due to channel error.
Exiting due to channel error.

Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.

Expected results:

nightly starts successfully

I tried it with 136 also, and it got the second error.

I am posting this from another user, with the system installed version of firefox, 136. It works here, but didn't work for the other user where this failure is occurring.

The nightly repository from yesterday worked just fine. Unfortunately, I also updated my system since yesterday, so it might be some side effect of an updated package on the system. Not having UNIQUE in a SQL query sounds like it is missing pretty basic database functionality, which suggests a security issue.

One update was related to mozilla,
mozilla-openh264-0:2.4.1-2.fc41.x86_64 type remove package (caused by mozilla-openh264-0:2.5.1-1.fc41.x86_64)
And there were some others that might be relevant.
php-pgsql-0:8.3.17-1.fc41.x86_64 type remove package (caused by php-pgsql-0:8.3.19-1.fc41.x86_64)
php-odbc-0:8.3.17-1.fc41.x86_64 type remove package (caused by php-odbc-0:8.3.19-1.fc41.x86_64)
php-mysqlnd-0:8.3.17-1.fc41.x86_64 type remove package (caused by php-mysqlnd-0:8.3.19-1.fc41.x86_64)
python3-sqlalchemy-0:2.0.38-1.fc41.x86_64 type remove package (caused by python3-sqlalchemy-0:2.0.39-1.fc41.x86_64)

[GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
This error has been happening since nightly switched from 137 to 138.

I will continue trying things to see if I can get it to successfully start. If I do, I'll post the workaround, and close this bug.

The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Address Bar

User error. Even though those warnings and errors showed up, the browser was actually starting, just in a different window. The window it usually starts in. Apologies for the noise.

Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Resolution: --- → WORKSFORME

Thanks for filing this. The errors are a real bug, a regression from bug 1952588 and bug 1946621. They shouldn't stop Firefox from working properly though, as you found out.

When I run new profile with a build before bug 1952588 landed and then run it with a build with bug 1952588 fixed, I see:

[ERROR error_support::handling] suggest-unexpected: Error executing SQL: UNIQUE constraint failed: keywords_metrics.record_id (context: keyword metrics insert)
[ERROR error_support::handling] suggest-unexpected: Error executing SQL: UNIQUE constraint failed: yelp_subjects.keyword (context: <none>)

The problem is the DB remains populated with the data from the old quicksuggest collection when the store tries to insert data from the new collections. That violates uniqueness constraints in tables where the unique data comes directly from the records, like record IDs.

Normally this isn't a problem because, before inserting new data, the store removes rows from the DB that came from deleted and updated records. It's a problem now because the collections are different, and after bug 1952588 the SuggestStore doesn't know anything about the old collection anymore, and none of the suggestions tables keep track of which collection their rows came from. Record IDs yes, collections no.

Assignee: nobody → adw
Blocks: 1946617
Severity: -- → S3
Status: RESOLVED → REOPENED
Component: Address Bar → Suggest
Ever confirmed: true
Keywords: regression
Priority: -- → P1
Product: Firefox → Application Services
Regressed by: 1952588
Resolution: WORKSFORME → ---
Whiteboard: [sng]
Status: REOPENED → ASSIGNED
See Also: → 1952407

Authored by https://github.com/0c0w3
https://github.com/mozilla/application-services/commit/d773da92641d92930b7308300e9fc2746a05ce6a
[main] Bug 1953945 - Fix uniqueness constraint errors in Suggest due to new RS collections.

Status: ASSIGNED → RESOLVED
Closed: 9 months ago9 months ago
Flags: qe-verify+
Resolution: --- → FIXED
Blocks: 1954177
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: