Closed Bug 2081454 Opened 1 month ago Closed 1 month ago

Go back to kotlin-pointer-ffi

Categories

(Application Services :: General, defect)

defect

Tracking

(firefox158 fixed, firefox159 fixed, firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox158 --- fixed
firefox159 --- fixed
firefox160 --- fixed

People

(Reporter: bdk, Assigned: bdk)

References

Details

(Whiteboard: [fxsync-])

Attachments

(3 external files)

I believe https://bugzilla.mozilla.org/show_bug.cgi?id=2073758 is likely caused by us switching away from the kotlin-pointer-ffi when we upgraded to UniFFI 0.32.

I realized that we lost that code fairly soon after we merged so I monitored the 157 crash rates. The crash rates were fairly low, so I thought assumed that the issue was resolved by some other UniFFI fix in 0.32 and I focused on switching over to uniffi-bindgen-kotlin-jni, which is an improved version of kotlin-pointer-ffi. However, I was looking at the wrong release the whole time! The UniFFI upgrade ended up getting backed out of 157 because of the Glean-related issues so I should have been looking at 158. So when the we saw a new spike in crash rates I convinced myself that it couldn't be related to the UniFFI upgrade since that happened in the previous version.

One issue here is that we've started using glean-sym, which uses the regular FFI to call from libmegazord to libxul. I think this should be okay since we are still generating the regular FFI code and the pointer-ffi is a layer on top of that. However, we should verify this. I'll make sure to build Fenix and test that the places metrics, which use glean-sym, still work.

I think the steps needed here are:

  • UniFFI: rebase the branch over the UniFFI 0.32 branch and push the new version. I'm going to call this one kotlin-pointer-ffi-0.32
  • application-services: add back the Cargo.toml patch to use kotiln-pointer-ffi-0.32
  • Relman: uplift the patch to 158 and 159.

Looks like the glean code is working okay. I was able to send a test metrics ping with a placeholder value for the places_manager.run_maintenance_time metric:

https://debug-ping-preview.firebaseapp.com/pings/bdk-test/484dc7fe-1fb1-4bbb-a588-cee045d3b25e

(via GitHub webhook, authenticated as shared-secret)

Authored by https://github.com/bendk
https://github.com/mozilla/application-services/commit/7afac3d5d04ee81490e9a0947216c1ea15addd57
[main] Bug 2081454 - Go back to kotlin-pointer-ffi (#7654)

(via GitHub webhook, authenticated as shared-secret)

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Flags: qe-verify+
Resolution: --- → FIXED
See Also: → 2082166
Target Milestone: --- → 160 Branch
Blocks: 2082369
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: