GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
357 stars 21 forks source link

Syncthing Doesn't Work on 2019.09.18.14 preview #127

Closed kopolee11 closed 5 years ago

kopolee11 commented 5 years ago

I'm on the 2019.09.18.14 preview release on a Pixel 3. I tried to run the app Syncthing (https://github.com/syncthing/syncthing-android) and when that happened it wouldn't open and released the following two error logs.

Syncthing log --------- beginning of crash --------- beginning of main 09-21 10:41:24.348 W/SyncthingNativeCode(20428): error: "/data/app/com.nutomic.syncthingandroid-ZNg-HaeorofCro6MPl8RDA==/lib/arm64/libsyncthing.so": executable's TLS segment is underaligned: alignment is 8, needs to be at least 64 for ARM64 Bionic

Android log --------- beginning of crash 09-21 06:20:05.821 F/libc (32748): error: "/data/app/com.nutomic.syncthingandroid-ZNg-HaeorofCro6MPl8RDA==/lib/arm64/libsyncthing.so": executable's TLS segment is underaligned: alignment is 8, needs to be at least 64 for ARM64 Bionic 09-21 06:20:05.821 F/libc (32748): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 32748 (libsyncthing.so), pid 32748 (libsyncthing.so) 09-21 06:20:05.840 F/DEBUG (32753): 09-21 06:20:05.840 F/DEBUG (32753): Build fingerprint: 'Android/aosp_blueline/blueline:10/QP1A.190711.020/2019.09.18.14:user/release-keys' 09-21 06:20:05.840 F/DEBUG (32753): Revision: 'MP1.0' 09-21 06:20:05.841 F/DEBUG (32753): ABI: 'arm64' 09-21 06:20:05.846 F/DEBUG (32753): Timestamp: 2019-09-21 06:20:05-0400 09-21 06:20:05.846 F/DEBUG (32753): pid: 32748, tid: 32748, name: libsyncthing.so >>> /data/app/com.nutomic.syncthingandroid-ZNg-HaeorofCro6MPl8RDA==/lib/arm64/libsyncthing.so <<< 09-21 06:20:05.846 F/DEBUG (32753): uid: 10175 09-21 06:20:05.846 F/DEBUG (32753): signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- 09-21 06:20:05.846 F/DEBUG (32753): Abort message: 'error: "/data/app/com.nutomic.syncthingandroid-ZNg-HaeorofCro6MPl8RDA==/lib/arm64/libsyncthing.so": executable's TLS segment is underaligned: alignment is 8, needs to be at least 64 for ARM64 Bionic' 09-21 06:20:05.846 F/DEBUG (32753): x0 0000000000000000 x1 0000000000007fec x2 0000000000000006 x3 0000007fccaa27d0 09-21 06:20:05.847 F/DEBUG (32753): x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000038 09-21 06:20:05.847 F/DEBUG (32753): x8 00000000000000f0 x9 ac6d4912a7357800 x10 0000000000000000 x11 fffffff0ffffffdf 09-21 06:20:05.847 F/DEBUG (32753): x12 0000000000000001 x13 0000000000000018 x14 0000013fa6cebdf5 x15 0030d7a2d1791599 09-21 06:20:05.847 F/DEBUG (32753): x16 0000000000aa78c8 x17 0000000000000000 x18 00000071cdb48000 x19 0000000000007fec 09-21 06:20:05.847 F/DEBUG (32753): x20 0000000000007fec x21 00000000ffffffff x22 00000071ce9135b0 x23 00000071cd737b40 09-21 06:20:05.847 F/DEBUG (32753): x24 00000071cd6d2010 x25 00000071ce913000 x26 00000071ce9135a0 x27 00000071ce9139a0 09-21 06:20:05.847 F/DEBUG (32753): x28 00000071ce913000 x29 0000007fccaa2870 09-21 06:20:05.847 F/DEBUG (32753): sp 0000007fccaa27b0 lr 00000071ce8df368 pc 00000071ce8df394 09-21 06:20:05.854 F/DEBUG (32753): 09-21 06:20:05.854 F/DEBUG (32753): backtrace: 09-21 06:20:05.855 F/DEBUG (32753): #00 pc 00000000000df394 /apex/com.android.runtime/bin/linker64 (dl_abort+160) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 06:20:05.855 F/DEBUG (32753): #01 pc 00000000000ffdb0 /apex/com.android.runtime/bin/linker64 (dlZN15StaticTlsLayout27reserve_exe_segment_and_tcbEPK10TlsSegmentPKc+268) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 06:20:05.855 F/DEBUG (32753): #02 pc 0000000000051c40 /apex/com.android.runtime/bin/linker64 (dlZ27linker_setup_exe_static_tlsPKc+68) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 06:20:05.855 F/DEBUG (32753): #03 pc 000000000004cbe8 /apex/com.android.runtime/bin/linker64 (dlZL29__linker_init_post_relocationR19KernelArgumentBlockR6soinfo+3096) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 06:20:05.855 F/DEBUG (32753): #04 pc 000000000004bf74 /apex/com.android.runtime/bin/linker64 (dl_linker_init+404) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 06:20:05.855 F/DEBUG (32753): #05 pc 0000000000053294 /apex/com.android.runtime/bin/linker64 (dlstart+4) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) --------- beginning of main 09-21 10:41:23.443 E/yncthingandroi(20428): Not starting debugger since process cannot load the jdwp agent. 09-21 10:41:23.566 E/libc (20428): Access denied finding property "persist.device_config.runtime_native_boot.enable_apex_image" 09-21 10:41:23.566 I/AndroidRuntime(20428): Using default boot image 09-21 10:41:23.566 E/libc (20428): Access denied finding property "persist.device_config.runtime_native_boot.disable_lock_profiling" 09-21 10:41:23.566 I/AndroidRuntime(20428): Leaving lock profiling enabled 09-21 10:41:23.567 E/libc (20428): Access denied finding property "persist.device_config.runtime_native_boot.enable_generational_cc" 09-21 10:41:23.753 W/com.nutomic.syncthingandroid(20428): JNI RegisterNativeMethods: attempt to register 0 native methods for android.media.AudioAttributes 09-21 10:41:23.758 I/Zygote (20428): Calling ZygoteHooks.beginPreload() 09-21 10:41:23.758 I/Zygote (20428): Preloading shared libraries... 09-21 10:41:23.834 I/Zygote (20428): Called ZygoteHooks.endPreload() 09-21 10:41:23.853 I/Zygote (20428): Installed AndroidKeyStoreProvider in 19ms. 09-21 10:41:23.914 W/asset (20428): unable to execute idmap2: Permission denied 09-21 10:41:23.914 W/AssetManager(20428): 'idmap2 --scan' failed: no static="true" overlays targeting "android" will be loaded 09-21 10:41:24.179 W/ActivityThread(20428): handleWindowVisibility: no activity for token android.os.BinderProxy@f0c4c6b 09-21 10:41:24.297 I/SyncthingService(20428): shouldRun decision changed to true according to configured run conditions. 09-21 10:41:24.298 I/SyncthingService(20428): Shutting down background service 09-21 10:41:24.300 I/ConfigXml(20428): App started for the first time. Generating keys and config. 09-21 10:41:24.327 I/Adreno (20428): QUALCOMM build : 4a00b69, I4e7e888065 09-21 10:41:24.327 I/Adreno (20428): Build Date : 04/09/19 09-21 10:41:24.327 I/Adreno (20428): OpenGL ES Shader Compiler Version: EV031.26.06.00 09-21 10:41:24.327 I/Adreno (20428): Local Branch : mybranche95a5ea3-cf05-f19a-a0e7-5cb90179c3d8 09-21 10:41:24.327 I/Adreno (20428): Remote Branch : quic/gfx-adreno.lnx.1.0 09-21 10:41:24.327 I/Adreno (20428): Remote Branch : NONE 09-21 10:41:24.327 I/Adreno (20428): Reconstruct Branch : NOTHING 09-21 10:41:24.327 I/Adreno (20428): Build Config : S P 8.0.6 AArch64 09-21 10:41:24.337 I/SyncthingRunnable(20428): increaseInotifyWatches: Root is not available. Cannot increase inotify limit. 09-21 10:41:24.340 I/Adreno (20428): PFP: 0x016ee183, ME: 0x00000000 09-21 10:41:24.342 I/SyncthingRunnableIoNice(20428): Root is not available. Cannot nice syncthing. 09-21 10:41:24.348 F/libc (20467): error: "/data/app/com.nutomic.syncthingandroid-ZNg-HaeorofCro6MPl8RDA==/lib/arm64/libsyncthing.so": executable's TLS segment is underaligned: alignment is 8, needs to be at least 64 for ARM64 Bionic 09-21 10:41:24.348 W/SyncthingNativeCode(20428): error: "/data/app/com.nutomic.syncthingandroid-ZNg-HaeorofCro6MPl8RDA==/lib/arm64/libsyncthing.so": executable's TLS segment is underaligned: alignment is 8, needs to be at least 64 for ARM64 Bionic 09-21 10:41:24.348 F/libc (20467): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20467 (libsyncthing.so), pid 20467 (libsyncthing.so) 09-21 10:41:24.366 I/crash_dump64(20472): obtaining output fd from tombstoned, type: kDebuggerdTombstone 09-21 10:41:24.369 W/Gralloc3(20428): mapper 3.x is not supported 09-21 10:41:24.372 I/crash_dump64(20472): performing dump of process 20467 (target tid = 20467) 09-21 10:41:24.373 E/libc (20428): Access denied finding property "vendor.gralloc.disable_ahardware_buffer" 09-21 10:41:24.375 F/DEBUG (20472): 09-21 10:41:24.375 F/DEBUG (20472): Build fingerprint: 'Android/aosp_blueline/blueline:10/QP1A.190711.020/2019.09.18.14:user/release-keys' 09-21 10:41:24.375 F/DEBUG (20472): Revision: 'MP1.0' 09-21 10:41:24.375 F/DEBUG (20472): ABI: 'arm64' 09-21 10:41:24.381 F/DEBUG (20472): Timestamp: 2019-09-21 10:41:24-0400 09-21 10:41:24.381 F/DEBUG (20472): pid: 20467, tid: 20467, name: libsyncthing.so >>> /data/app/com.nutomic.syncthingandroid-ZNg-HaeorofCro6MPl8RDA==/lib/arm64/libsyncthing.so <<< 09-21 10:41:24.381 F/DEBUG (20472): uid: 10175 09-21 10:41:24.381 F/DEBUG (20472): signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- 09-21 10:41:24.382 F/DEBUG (20472): Abort message: 'error: "/data/app/com.nutomic.syncthingandroid-ZNg-HaeorofCro6MPl8RDA==/lib/arm64/libsyncthing.so": executable's TLS segment is underaligned: alignment is 8, needs to be at least 64 for ARM64 Bionic' 09-21 10:41:24.382 F/DEBUG (20472): x0 0000000000000000 x1 0000000000004ff3 x2 0000000000000006 x3 0000007fc2fec300 09-21 10:41:24.382 F/DEBUG (20472): x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000038 09-21 10:41:24.382 F/DEBUG (20472): x8 00000000000000f0 x9 e400cc23b05a3300 x10 0000000000000000 x11 fffffff0ffffffdf 09-21 10:41:24.382 F/DEBUG (20472): x12 0000000000000001 x13 0000000000000018 x14 00000185bd74c8fd x15 0014a388086e8ef5 09-21 10:41:24.382 F/DEBUG (20472): x16 0000000001046d8c x17 0000000000000000 x18 000000709d886000 x19 0000000000004ff3 09-21 10:41:24.382 F/DEBUG (20472): x20 0000000000004ff3 x21 00000000ffffffff x22 000000709dff95b0 x23 000000709ce1db40 09-21 10:41:24.382 F/DEBUG (20472): x24 000000709cdb8010 x25 000000709dff9000 x26 000000709dff95a0 x27 000000709dff99a0 09-21 10:41:24.382 F/DEBUG (20472): x28 000000709dff9000 x29 0000007fc2fec3a0 09-21 10:41:24.382 F/DEBUG (20472): sp 0000007fc2fec2e0 lr 000000709dfc5368 pc 000000709dfc5394 09-21 10:41:24.388 F/DEBUG (20472): 09-21 10:41:24.388 F/DEBUG (20472): backtrace: 09-21 10:41:24.388 F/DEBUG (20472): #00 pc 00000000000df394 /apex/com.android.runtime/bin/linker64 (dl_abort+160) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 10:41:24.388 F/DEBUG (20472): #01 pc 00000000000ffdb0 /apex/com.android.runtime/bin/linker64 (dlZN15StaticTlsLayout27reserve_exe_segment_and_tcbEPK10TlsSegmentPKc+268) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 10:41:24.388 F/DEBUG (20472): #02 pc 0000000000051c40 /apex/com.android.runtime/bin/linker64 (dlZ27linker_setup_exe_static_tlsPKc+68) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 10:41:24.388 F/DEBUG (20472): #03 pc 000000000004cbe8 /apex/com.android.runtime/bin/linker64 (dlZL29linker_init_post_relocationR19KernelArgumentBlockR6soinfo+3096) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 10:41:24.388 F/DEBUG (20472): #04 pc 000000000004bf74 /apex/com.android.runtime/bin/linker64 (_dllinker_init+404) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 10:41:24.388 F/DEBUG (20472): #05 pc 0000000000053294 /apex/com.android.runtime/bin/linker64 (dlstart+4) (BuildId: 46882b9b751fd980dcafb2e8654cad8a) 09-21 10:41:24.396 E/crash_dump64(20472): AM data write failed: Broken pipe 09-21 10:41:24.398 I/SyncthingRunnable(20428): Syncthing exited with code 134 09-21 10:41:24.398 W/SyncthingRunnable(20428): Syncthing has crashed (exit code 134) 09-21 10:41:24.473 E/SyncthingUtil(20428): Root is not available. Cannot fix permissions. 09-21 10:41:25.017 E/WindowManager(20428): 09-21 10:41:25.017 E/WindowManager(20428): android.view.WindowLeaked: Activity com.nutomic.syncthingandroid.activities.MainActivity has leaked window DecorView@42bafd4[MainActivity] that was originally added here 09-21 10:41:25.017 E/WindowManager(20428): at android.view.ViewRootImpl.(ViewRootImpl.java:597) 09-21 10:41:25.017 E/WindowManager(20428): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:377) 09-21 10:41:25.017 E/WindowManager(20428): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95) 09-21 10:41:25.017 E/WindowManager(20428): at android.app.Dialog.show(Dialog.java:342) 09-21 10:41:25.017 E/WindowManager(20428): at android.support.v7.app.AlertDialog$Builder.show(AlertDialog.java:1007) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.activities.StateDialogActivity.showLoadingDialog(StateDialogActivity.java:170) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.activities.StateDialogActivity.onServiceStateChange(StateDialogActivity.java:83) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.activities.StateDialogActivity.lambda$uNRRb03q4MIgOMMHxAYVlYqjYN8(Unknown Source:0) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.activities.-$$Lambda$StateDialogActivity$uNRRb03q4MIgOMMHxAYVlYqjYN8.onServiceStateChange(Unknown Source:2) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.service.SyncthingService.registerOnServiceStateChangeListener(SyncthingService.java:561) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.activities.StateDialogActivity.lambda$onCreate$0$StateDialogActivity(StateDialogActivity.java:41) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.activities.-$$Lambda$StateDialogActivity$beF8pOrhV7MoyJKJ_6PuwMPbOK0.onServiceConnected(Unknown Source:2) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.activities.-$$Lambda$eJ2UXebczcHGvwE8YVc7tS5inXM.accept(Unknown Source:2) 09-21 10:41:25.017 E/WindowManager(20428): at com.annimon.stream.Stream.forEach(Stream.java:1486) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.activities.SyncthingActivity.onServiceConnected(SyncthingActivity.java:73) 09-21 10:41:25.017 E/WindowManager(20428): at com.nutomic.syncthingandroid.activities.MainActivity.onServiceConnected(MainActivity.java:300) 09-21 10:41:25.017 E/WindowManager(20428): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1948) 09-21 10:41:25.017 E/WindowManager(20428): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1980) 09-21 10:41:25.017 E/WindowManager(20428): at android.os.Handler.handleCallback(Handler.java:883) 09-21 10:41:25.017 E/WindowManager(20428): at android.os.Handler.dispatchMessage(Handler.java:100) 09-21 10:41:25.017 E/WindowManager(20428): at android.os.Looper.loop(Looper.java:214) 09-21 10:41:25.017 E/WindowManager(20428): at android.app.ActivityThread.main(ActivityThread.java:7356) 09-21 10:41:25.017 E/WindowManager(20428): at java.lang.reflect.Method.invoke(Native Method) 09-21 10:41:25.017 E/WindowManager(20428): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 09-21 10:41:25.017 E/WindowManager(20428): at com.android.internal.os.ExecInit.main(ExecInit.java:43) 09-21 10:41:25.017 E/WindowManager(20428): at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) 09-21 10:41:25.017 E/WindowManager(20428): at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:338) 09-21 10:41:26.925 W/ActivityThread(20428): handleWindowVisibility: no activity for token android.os.BinderProxy@db4bc72 09-21 10:41:27.035 I/com.nutomic.syncthingandroid(20428): Waiting for a blocking GC Explicit 09-21 10:41:27.059 I/com.nutomic.syncthingandroid(20428): WaitForGcToComplete blocked Explicit on ClassLinker for 23.759ms 09-21 10:41:27.092 I/com.nutomic.syncthingandroid(20428): Explicit concurrent copying GC freed 995(42KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3366KB/6733KB, paused 91us total 33.142ms 09-21 10:41:27.106 I/com.nutomic.syncthingandroid(20428): Explicit concurrent copying GC freed 2766(172KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3209KB/6419KB, paused 29us total 13.740ms 09-21 10:41:29.519 W/ActivityThread(20428): handleWindowVisibility: no activity for token android.os.BinderProxy@bd479ea 09-21 10:41:29.604 I/com.nutomic.syncthingandroid(20428): Explicit concurrent copying GC freed 3700(224KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3409KB/6819KB, paused 17us total 14.397ms 09-21 10:41:29.619 I/com.nutomic.syncthingandroid(20428): Explicit concurrent copying GC freed 1097(79KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3361KB/6723KB, paused 16us total 13.321ms 09-21 10:41:30.540 W/ActivityThread(20428): handleWindowVisibility: no activity for token android.os.BinderProxy@acbe54e 09-21 10:41:30.571 W/ActivityThread(20428): handleWindowVisibility: no activity for token android.os.BinderProxy@666a768 09-21 10:41:30.663 I/com.nutomic.syncthingandroid(20428): Explicit concurrent copying GC freed 3434(202KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3638KB/7276KB, paused 19us total 15.051ms 09-21 10:41:30.679 I/com.nutomic.syncthingandroid(20428): Explicit concurrent copying GC freed 704(66KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3619KB/7239KB, paused 15us total 14.587ms 09-21 10:41:33.005 W/ActivityThread(20428): handleWindowVisibility: no activity for token android.os.BinderProxy@994ec3b --------- beginning of system 09-21 10:41:41.691 I/tflite (20428): Initialized TensorFlow Lite runtime.

thestinger commented 5 years ago

This is an upstream issue:

https://github.com/syncthing/syncthing-android/issues/1292

thestinger commented 5 years ago

https://github.com/syncthing/syncthing-android/issues/1291

thestinger commented 5 years ago

Try 1.2.2.3.

kopolee11 commented 5 years ago

@thestinger Thank you for pointing out the issues on upstream. I'm actually running 1.2.2.3 and didn't have a problem on the 2019.08.25.15 release, so I thought the error might be a result of one of the hardening changes of GrapheneOS. Now that I see it's an upstream issue I'll look there for further help. Thanks again!

thestinger commented 5 years ago

Try their official release instead of an F-Droid one if there are different options and if that's the issue, report it to F-Droid. That's just a guess about the cause.

kopolee11 commented 5 years ago

Good idea, I'll do that. I'm also going to try the Syncthing-Fork on F-Droid to see if I have the same problem there.

thestinger commented 5 years ago

I definitely expect you would hit the same issue on stock Android 10 or AOSP 10 though.

thestinger commented 5 years ago

So, you should be able to report it to F-Droid (maybe they have not updated the Go compiler) or whomever.

kopolee11 commented 5 years ago

Just an update. I tried Syncthing, Syncthing-Fork, and Syncthing Lite from the Aurora Store and wasn't able to start any of them. So I don't believe it's a F-Droid issue. It still might be an upstream issue.

bungabunga commented 5 years ago

I use Syncthing-Fork, installed from F-Droid, on Pixel 3, also 2019.09.18.14, and it works without issues.

kopolee11 commented 5 years ago

@bungabunga Thanks, good to know. I wonder why I'm having difficulties...

kopolee11 commented 5 years ago

Update for reference. The F-Droid build of Syncthing does have an issue which is being tracked here. https://gitlab.com/fdroid/fdroiddata/merge_requests/5448

As for the official version of Syncthing, that works fine. The only reason I was having trouble with it was because I foolishly forgot to make sure the Network permission was enabled. So user error on my part.