glean-core should not crash when unknown handles are provided
Categories
(Data Platform and Tools :: Glean: SDK, defect, P1)
Tracking
(Not tracked)
People
(Reporter: Dexter, Assigned: janerik)
Details
(Whiteboard: [telemetry:glean-rs:m5])
Attachments
(1 file)
In the current implementation, if we call Glean.setUploadEnabled before Glean.initialize, we crash. Trying to use glean-core in Fenix, results in the following trace:
A/DEBUG: pid: 13365, tid: 13365, name: lla.fenix.debug >>> org.mozilla.fenix.debug <<<
A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
A/DEBUG: x0 0000000000000000 x1 0000000000003435 x2 0000000000000006 x3 0000000000000008
A/DEBUG: x4 1afefefefeff1e0b x5 1afefefefeff1e0b x6 1afefefefeff1e0b x7 7f7f7f7f7f7f7f7f
A/DEBUG: x8 0000000000000083 x9 00000078cee790a0 x10 fffffff87ffffbdf x11 0000000000000001
A/DEBUG: x12 28f5c28f5c28f5c3 x13 0000000000000064 x14 00000078301c2fad x15 0000007fc4d34cc8
A/DEBUG: x16 00000078ceeb32c8 x17 00000078cedf0dcc x18 0000000000000040 x19 0000000000003435
A/DEBUG: x20 0000000000003435 x21 0000000000000000 x22 00000078301c0590 x23 000000783023b328
A/DEBUG: x24 0000000000000000 x25 0000000000000009 x26 0000000000000001 x27 00000078311f9218
A/DEBUG: x28 000000784bae0460 x29 0000007fc4d34f30
A/DEBUG: sp 0000007fc4d34ef0 lr 00000078cede594c pc 00000078cede5974
A/DEBUG: backtrace:
A/DEBUG: #00 pc 0000000000021974 /system/lib64/libc.so (abort+116)
A/DEBUG: #01 pc 00000000001bec94 /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libglean_ffi.so
A/DEBUG: #02 pc 00000000001bc640 /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libglean_ffi.so
A/DEBUG: #03 pc 00000000001bd6dc /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libglean_ffi.so
A/DEBUG: #04 pc 00000000001bd5d0 /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libglean_ffi.so
A/DEBUG: #05 pc 000000000013df00 /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libglean_ffi.so
A/DEBUG: #06 pc 00000000000463cc /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libglean_ffi.so
A/DEBUG: #07 pc 00000000000290a0 /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libglean_ffi.so (glean_set_upload_enabled+56)
A/DEBUG: #08 pc 000000000000fe40 /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libjnidispatch.so (ffi_call_SYSV+96)
A/DEBUG: #09 pc 000000000000f630 /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libjnidispatch.so (ffi_call+292)
A/DEBUG: #10 pc 0000000000005b80 /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libjnidispatch.so
A/DEBUG: #11 pc 0000000000007a24 /data/app/org.mozilla.fenix.debug-27C90uP7CxYpwAVyQkB41Q==/lib/arm64/libjnidispatch.so (Java_com_sun_jna_Native_invokeVoid+32)
This seem to indicate that the Rust internals panic when an unknown/initialized Glean handle is provided. We should not do that, we should rather print an error message.
| Reporter | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Description
•