fix: retain native debug symbols#988
Conversation
e52d1d4 to
f64bc5a
Compare
f64bc5a to
008aa9c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24257037c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| readelf_bin=$(find_readelf) | ||
|
|
||
| has_debug_metadata() { | ||
| "$readelf_bin" -S "$1" | grep -Eq '\.(symtab|debug_|gnu_debugdata)' |
There was a problem hiding this comment.
Require full DWARF symbols before accepting fallback archives
Fresh evidence after the prior fix: this predicate now treats .gnu_debugdata or a bare .symtab as sufficient debug metadata. When AGP does not emit native-debug-symbols.zip and the fallback validates merged/stripped release libraries that still retain only mini debug data or symbol-table-only sections, just release can still publish an archive that does not satisfy the debugSymbolLevel = "FULL" goal and will leave native crashes without file/line symbolication. Please require .debug_* DWARF sections for this release path, or explicitly downgrade the build/config/docs to SYMBOL_TABLE-only.
Useful? React with 👍 / 👎.
| variant="mainnetRelease" | ||
| output="app/build/outputs/native-debug-symbols/$variant/native-debug-symbols.zip" | ||
| output_dir=$(dirname "$output") | ||
| required_libs="libbitkitcore.so libldk_node.so libvss_rust_client_ffi.so" |
There was a problem hiding this comment.
This validator still skips libpaykit.so. The release APK includes Paykit via implementation(libs.paykit), and the resolved artifact ships jni/arm64-v8a/libpaykit.so and jni/armeabi-v7a/libpaykit.so, but required_libs only checks bitkitcore, ldk-node, and VSS. Could we validate every copied .so, or add libpaykit.so to this required set, so just release cannot pass with incomplete Paykit symbols?
Refs #982
Related
This PR keeps native debug symbols in Android release artifacts so production native crashes can be symbolicated cleanly.
Description
The production SIGABRT from mainnet
2.2.0/ build181symbolicates intolibbitkitcore.so, around the native on-chain address-info lookup path. The runtime guard is in synonymdev/bitkit-core#95; this PR consumes the published native-symbol package releases and hardens Android release symbol handling.This PR:
bitkit-core-androidto0.1.70, published from fix: publish android debug symbols bitkit-core#99 with Android native debug metadata and 16 KB LOAD-alignment validation.ldk-node-androidto0.7.0-rc.48, published from fix: publish android debug symbols ldk-node#84 with Android native debug metadata and 16 KB LOAD-alignment validation.vss-client-androidto0.5.17, published from fix: publish android debug symbols vss-rust-client-ffi#13 with Android native debug metadata and 16 KB LOAD-alignment validation.just releaseremove stale symbol archives, build the mainnet APK/AAB, and validateapp/build/outputs/native-debug-symbols/mainnetRelease/native-debug-symbols.zipbefore release use.scripts/create-native-debug-symbols.shso it validateslibbitkitcore.so,libldk_node.so, andlibvss_rust_client_ffi.sofor the release ABIs before reporting success.native-debug-symbols.zipfilename, attach it to GitHub/internal release storage, upload it to Play for the exact version/build, and verify Play lists native debug symbols after upload.Upstream packages:
com.synonym:bitkit-core-android:0.1.70from https://github.com/synonymdev/bitkit-core/actions/runs/27030312346com.synonym:ldk-node-android:0.7.0-rc.48from https://github.com/synonymdev/ldk-node/actions/runs/27030312422com.synonym:vss-client-android:0.5.17from https://github.com/synonymdev/vss-rust-client-ffi/actions/runs/27030312526Preview
N/A
QA Notes
Manual Tests
release symbols:Ranscripts/create-native-debug-symbols.shagainst stripped native libs before the upstream package releases and verified it refused to create a fake archive.release docs:Verified README and.agents/commands/release.mdtell the releaser to keepnative-debug-symbols.zipin GitHub/internal storage, upload it to Play for the exact version/build, and treat Play Console listing as upload verification.release:Ranjust releaseafter consuming the published core, LDK, and VSS artifacts. It exited 0 and validatedapp/build/outputs/native-debug-symbols/mainnetRelease/native-debug-symbols.zip.release:Upload the mainnet AAB to Play, then uploadnative-debug-symbols.zipfor the exact version/build in App bundle explorer -> Downloads -> Assets. Verify Play lists the native debug symbols after upload.mainnet regression:Foreground sync -> Activity: wallet data loads without a native crash.mainnet regression:Receive -> copy/show on-chain address -> return Home: receive flow still works.mainnet regression:Send -> prepare on-chain send with standard fee: fee estimate and confirmation flow still works.Automated Checks
app/src/test/java/to/bitkit/build/NativeReleaseConfigTest.kt../gradlew testDevDebugUnitTest --tests to.bitkit.build.NativeReleaseConfigTest.sh -n scripts/create-native-debug-symbols.sh.GITHUB_TOKEN=$GITHUB_PAT just compile.GITHUB_TOKEN=$GITHUB_PAT just test.GITHUB_TOKEN=$GITHUB_PAT just lint.GITHUB_TOKEN=$GITHUB_PAT just release; producednative-debug-symbols.zipat 210 MB.just lintstill prints two pre-existing detekt warnings inAppViewModel.ktandSupportScreen.kt, but exits successfully.