Glean iOS UniffiInternalError.rustPanic("No database found") crash during tests
Categories
(Data Platform and Tools :: Glean: SDK, defect, P1)
Tracking
(Not tracked)
People
(Reporter: lmarceau, Assigned: janerik)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
While upgrading Glean iOS to 52.2.0 from 51.8.3, we experienced a crash in unit tests when using the Glean.shared.resetGlean(clearStores: true)
API. When we set this to false
with Glean.shared.resetGlean(clearStores: false)
then this fixes the crash, but makes tests harder to write since they can depend on previous states (since store isn't reset).
The stacktrace looks like:
2023-02-22 15:49:09.396363-0500 Client[91860:558780] [glean_core::dispatcher::global] Failed to launch a task on the queue. Discarding task.
2023-02-22 15:49:09.397620-0500 Client[91860:558780] [glean_core::metrics::counter] Couldn't get storage. Can't record counter 'glean.upload.pending_pings'.
thread '<unnamed>' panicked at 'No database found', glean-core/src/core/mod.rs:531:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2023-02-22 15:49:09.397877-0500 Client[91860:558780] [uniffi_core::ffi::rustcalls] Caught a panic calling rust code: "No database found"
2023-02-22 15:49:09.397967-0500 Client[91860:558795] [glean_core::core] Creating new Glean v52.2.0
2023-02-22 15:49:09.398393-0500 Client[91860:558795] [glean_core::database] Database initialized
Glean/glean.swift:4858: Fatal error: 'try!' expression unexpectedly raised an error: Glean.(unknown context at $10c453aa4).UniffiInternalError.rustPanic("No database found")
2023-02-22 15:49:09.400177-0500 Client[91860:558780] Glean/glean.swift:4858: Fatal error: 'try!' expression unexpectedly raised an error: Glean.(unknown context at $10c453aa4).UniffiInternalError.rustPanic("No database found")
(lldb)
More details in the upgrade PR. We turned off the clearStores
parameter to false for now to unblock the version upgrade.
Comment 1•2 years ago
|
||
Ah, the good ol' No database found
. We have some as-yet-unreleased changes that ought to resolve this in a release we were planning for this week anyway.
If you have a day or so of slack in your schedule, you could pick up 52.3.0 instead which ought to both fix this problem and have a tasty fix for bug 1716847 in it.
Ok good to know, we can wait for the update until that is released.
52.3.0 fixed the issue, closing the ticket. Thank you!
Hello! Turns out this is still happening even with 52.3.1. The screenshot is showing a crash when running unit tests. Has anyone else encountered this on that version?
Comment 5•2 years ago
|
||
I just saw this pop up in some local testing so it does appear to still be valid from what I can see. Thanks for reopening this bug, we will add this to the handful of iOS things we are looking into right now.
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 8•2 years ago
|
||
badboy merged PR #2430: "Bug 1818361 - Prevent another test-only issue: The storage going away when the uploader reports back its status" in 1ed9a4b.
We will probably have this in a release today or early next week, so we can get it into firefox-ios.
Description
•