Phones reboot with Syncthing 1.30 under LineageOS 16 on HTC m8

I did a clear install of LineageOS 16 on an HTC m8 and Syncthing 1.2.2. Everythings run fine. Yesterday, Google Play Store updates Syncthing to 1.30. After few minutes later my phone reboots by itself. After it came up again and maybe 30 seconds later, the phone did reboot again. This happend until I managed to disable Syncthing. Also the phone got hot.

I have another HTC m8 to install and did also a clear install of LineageOs 16. I also installed Syncthing 1.30 from Play Store. A few seconds after starting Syncthing and granted all necessary rights, Syncthing began to create its key and the phone rebooted by itself.

Maybe with release of version 1.30, there seems to be somethong wrong. Two working and clean installed phones get in boot loop after Syncthing 1.3 was installed. Version 1.2.2 works fine on it.

No app should be able to force a phone to reboot. Sure, syncthing probably does some scanning which uses a lot of cpu which makes the phone hot, but that should not be enough to force the phone to reboot.

Sadly nothing important changed in syncthing for this to happen, best I can suggest is to see if the logs (both phone and syncthing) have any hints.

I am having the same issue on my OnePlus One running custom DirtyUnicorns 12 ROM based on Android Oreo. Opening the Syncthing app reboots the phone to bootlogo. I can confirm that it was working well before the last update. Is it somehow related to this: https://github.com/syncthing/syncthing-android/issues/1001 ? Unfortunately I don’t have access to my phone now. Will post the logs as soon as I get my phone back.

After putting one of the phones into the fridge for an hour, I tried to start Syncthing with deleted data and cache. There seems to be no overheating, cause the phone rebooted after nearly the same time. A resart of Syncthing leads me directly to the log. The syncthing log is empty. The Android log shows: --------- beginning of main 10-02 20:34:30.287 E/libEGL ( 7525): error mmaping cache file: Invalid argument (22) 10-02 20:34:30.309 I/SyncthingService( 7525): shouldRun decision changed to true according to configured run conditions. 10-02 20:34:30.310 I/SyncthingService( 7525): Shutting down background service 10-02 20:34:30.334 W/ConfigXml( 7525): Cannot read ‘/data/user/0/com.nutomic.syncthingandroid/files/config.xml’ 10-02 20:34:30.334 W/ConfigXml( 7525): org.xml.sax.SAXParseException: Unexpected end of document 10-02 20:34:30.334 W/ConfigXml( 7525): at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:125) 10-02 20:34:30.334 W/ConfigXml( 7525): at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:183) 10-02 20:34:30.334 W/ConfigXml( 7525): at com.nutomic.syncthingandroid.util.ConfigXml.readConfig(ConfigXml.java:100) 10-02 20:34:30.334 W/ConfigXml( 7525): at com.nutomic.syncthingandroid.util.ConfigXml.(ConfigXml.java:72) 10-02 20:34:30.334 W/ConfigXml( 7525): at com.nutomic.syncthingandroid.service.SyncthingService$StartupTask.doInBackground(SyncthingService.java:354) 10-02 20:34:30.334 W/ConfigXml( 7525): at com.nutomic.syncthingandroid.service.SyncthingService$StartupTask.doInBackground(SyncthingService.java:339) 10-02 20:34:30.334 W/ConfigXml( 7525): at android.os.AsyncTask$2.call(AsyncTask.java:333) 10-02 20:34:30.334 W/ConfigXml( 7525): at java.util.concurrent.FutureTask.run(FutureTask.java:266) 10-02 20:34:30.334 W/ConfigXml( 7525): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 10-02 20:34:30.334 W/ConfigXml( 7525): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 10-02 20:34:30.334 W/ConfigXml( 7525): at java.lang.Thread.run(Thread.java:764) 10-02 20:34:30.365 I/Adreno-EGL( 7525): <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I741a3d36ca) 10-02 20:34:30.365 I/Adreno-EGL( 7525): OpenGL ES Shader Compiler Version: E031.29.00.00 10-02 20:34:30.365 I/Adreno-EGL( 7525): Build Date: 04/04/16 Mon 10-02 20:34:30.365 I/Adreno-EGL( 7525): Local Branch: mybranch19053788 10-02 20:34:30.365 I/Adreno-EGL( 7525): Remote Branch: quic/LA.BF.1.1.3_rb1.12 10-02 20:34:30.365 I/Adreno-EGL( 7525): Local Patches: NONE 10-02 20:34:30.365 I/Adreno-EGL( 7525): Reconstruct Branch: NOTHING 10-02 20:34:30.373 I/ConfigStore( 7525): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 10-02 20:34:30.373 I/ConfigStore( 7525): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0 10-02 20:34:30.373 I/OpenGLRenderer( 7525): Initialized EGL, version 1.4 10-02 20:34:30.380 W/Adreno-EGL( 7525): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE 10-02 20:34:30.389 W/Adreno-EGL( 7525): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE 10-02 20:34:30.476 E/libEGL ( 7525): error mmaping cache file: Invalid argument (22) 10-02 20:34:38.842 W/ActivityThread( 7525): handleWindowVisibility: no activity for token android.os.BinderProxy@1c384a1 10-02 20:34:38.926 W/Adreno-EGL( 7525): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE 10-02 20:34:40.992 W/Adreno-EGL( 7525): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE

@kisenberg: This is not good, but expected after a clear data and cache. If the config does not repopulate, reinstall the app please.

20:34:30.334 W/ConfigXml( 7525): Cannot read ‘/data/user/0/com.nutomic.syncthingandroid/files/config.xml’ 10-02 20:34:30.334 W/ConfigXml( 7525): org.xml.sax.SAXParseException: Unexpected end of document

That still shouldn’t reboot the phone.

I am also clueless what causes a reboot here … :-/

Clean install of LineageOS 16, several clean install of Syncthing 1.30 (also with cleared data and cache), also update from running 1.2.2 or clean install of Syncthing 1.3 with imported config; all the same behavior: both phones(!) reboot. No problem with 1.2.2. Was there a change in libraries or version of software components from 1.2.2 to 1.30? I’m clueless.

It’s a great work from the maintainer. I love the tool. It would be a pain not to use it anymore.

Found an interesting source to read:

Maybe this is an Android framework issue as framework can generally spoken be triggered by a normal user space app causing reboot by crashing the system server process.

Hi,

did some investigation together with @shscs911 and this is the result:

image

The phone reboot only happens reproducibly if the NAT Traverse option is enabled in Syncthing Options.

To the devs reading this: Any idea which commit/change could have caused this behaviour between v1.2.2 and v1.3.0 ? If required, I can make a custom build and continue testing with @shscs911 taking “one commit out” for example and see if it works okay then.

Nothing has changed in that area. We are building with new go that could cause this I guess.

Very strange, I’ve built with go1.13 before official on v1.2.2 and users reported it worked without reboot symptoms… :woman_shrugging:

In case too many people affected we could disable nat traversal by default in the app.

that’s the changes. You can try doing a git bisect, to figure out which commit causes it.

1 Like

Thanks, Audrius :-).

Just for my understanding: Is the QUIC stuff enabled by the NAT checkbox -or- in other words, which checkbox in Syncthing’s settings enables QUIC (which is on by default)? I don’t want to point fingers, but @shscs911 could try to disable QUIC came to my thought now reading the commit list…?!

Quic was there before 1.3

Just to say, I have the same with Zuk Z1 on Lineageos 16.0. I opened an issue on github, but Audrius closed it and pointed me here.

How do you downgrade? An attempt to downgrade with f-droid gives “unknown error”.

Don’t want to reinstall the app, because then I need to configure everything again.

@khumarahn Does disabling the nat checkbox help you?

How do I disable the nat checkbox? I start syncthing and the phone reboots, I can’t do anything.

@Catfriend1 Is there a way to disable NAT, without running the synchronization?

I didn’t downgrade. Fortunately one day before, I did a clean install of one of the phones. So I made a backup of the settings, installed the phone, installed Synchting 1.2.2 and all went well. The next day, I wanted to hand over the new installed phone and I saw an information about an update to syncthing 1.30. After the update, well, you know the story.

So I uninstalled 1.30, installed 1.2.2.4 from F-Droid and was able to restore my backup. If you rooted your phone, you may try to get your config from /data/data/com.nutomic.syncthingandroid/