# Random reboots while syncing

**URL:** https://forum.syncthing.net/t/random-reboots-while-syncing/2855
**Category:** Android
**Created:** [May 25, 2015, 5:10pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855 "2015-05-25T17:10:58Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [May 25, 2015, 5:10pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/1 "2015-05-25T17:10:58Z")

</div>

Hey, I’m not sure if this is happening to everyone or just me.

I use a Nexus 4, and I have 6 folders syncronizing. In total there is less than 200mb, but the phone always reboot while syncing. I check logcats and the log of syncthing but there is nothing weird.

In pc-syncthing’s log, it just says that it lost the conection, and in the logcat it sais that art kill the process.

I’m using Android 5.1.1, do you want me to provide all the logs?

Thanks

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [May 25, 2015, 7:56pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/2 "2015-05-25T19:56:17Z")

</div>

If there is a crash yes, or reasons why ART killed it.

---

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [May 25, 2015, 8:55pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/3 "2015-05-25T20:55:35Z")

</div>

I was doing some logcats, but now the phone just reboot, there is nothing weird in the logcats, they just stop loggins.

Here you got an example: [link](http://pastebin.com/mB8HEzis)

What I noticed is that every time the phone reboots this line appears, only before rebooting, not before:

> E/WifiStateMachine( 559): WifiStateMachine CMD\_START\_SCAN source -2 txSuccessRate=6032,67 rxSuccessRate=3213,41 targetRoamBSSID=any RSSI=-54

Also, there isn’t anything strange in syncthing’s log, so any idea?

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [May 25, 2015, 9:07pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/4 "2015-05-25T21:07:51Z")

</div>

Well if the phone reboots that implies a hardware problem. If syncthing restarts, that’s potentially a problem with syncthing.

---

<div class="post-metadata">

### Author: ![Nutomic](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nutomic/32/270_2.png) [@Nutomic](https://forum.syncthing.net/u/Nutomic)
#### Post date: [May 25, 2015, 10:56pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/5 "2015-05-25T22:56:52Z")

</div>

What ROM are you using? Do you have root enabled in Syncthing? What is the CPU usage?

The log looks normal, that error is from Android I think.

Anyway, phone crashing is either a hardware or ROM problem (unless the app is using root).

---

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [May 26, 2015, 7:00am UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/6 "2015-05-26T07:00:13Z")

</div>

It shouldn’t be a hardware problem as I play heavy games for example, and I never have randon reboots, just while this app is in background.

I was using undervolting, but I restored to stock values, but no luck.

I’m using Chroma’s rom based on aosp, and the cpu usage is around 20% while syncing. I’m not using root because then app crash. Do you think that using it as root could solve the problem?

---

<div class="post-metadata">

### Author: ![Nutomic](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nutomic/32/270_2.png) [@Nutomic](https://forum.syncthing.net/u/Nutomic)
#### Post date: [May 27, 2015, 9:43pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/7 "2015-05-27T21:43:26Z")

</div>

Without a log showing an error no one can tell.

What I mean is, if the app doesn’t use root, it should never cause problems like a reboot. So I think it’s a problem with the ROM/hardware.

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [May 28, 2015, 1:04pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/9 "2015-05-28T13:04:01Z")

</div>

Does the phone get hot? It could be that the hashing overheats the CPU causing the phone to reboot.

---

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [May 28, 2015, 1:14pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/10 "2015-05-28T13:14:39Z")

</div>

Okey, just testing I think I found what’s causing my device to reboot (It just stuck, turn off and then turn on)

I have my pc with syncthing on, and in my device I’m syncing some folders. After syncthing-android starts, it sets the folderobserver, and I have folders like the screenshots one. When I take a screenshot, this appear in the log:

```
/PostTask( 3881): Calling Rest API at https://127.0.0.1:8384/rest/db/scan
V/PostTask( 3881): API call parameters: folder

```

So nothing wrong here, I imagine, that the syncthing android’s server is calling the app to sync, right?

The problem is that after this line, there are like a hundred other in just a few seconds, as you can see here ([pastebin](http://pastebin.com/g9BSAGA0)), but I dind’t change any other file

My thought is that syncthing-android starts a loop calling the server to sync, and due to all the continuous calls, the system just reboot to avoid that.

Could be the problem this one?

Btw, it is not due to cpu getting hot, because it’s cool after the app start (the cpu being using is no more than 10%)

---

<div class="post-metadata">

### Author: ![Nutomic](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nutomic/32/270_2.png) [@Nutomic](https://forum.syncthing.net/u/Nutomic)
#### Post date: [May 28, 2015, 2:36pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/11 "2015-05-28T14:36:09Z")

</div>

How fast do those lines appear?

The app is polling every 10 seconds to update the GUI, so that would be normal.

---

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [May 28, 2015, 3:04pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/12 "2015-05-28T15:04:45Z")

</div>

After I take the screenshot, all this lines appears in about 3s, and they stop because the phone freeze and reboot

---

<div class="post-metadata">

### Author: ![Nutomic](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nutomic/32/270_2.png) [@Nutomic](https://forum.syncthing.net/u/Nutomic)
#### Post date: [May 30, 2015, 9:21pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/13 "2015-05-30T21:21:12Z")

</div>

This is actually odd. Are you sure it’s not due to bufferng? (ie did you start logcat on another device before testing?)

Is there anything else in the logs before that? Possibliy using `adb logcat -s SyncthingNativeCode:v` or `adb logcat *:W`?

---

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [May 31, 2015, 12:07pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/14 "2015-05-31T12:07:28Z")

</div>

> [@Nutomic](#):
>
> adb logcat -s SyncthingNativeCode:v

At first, another error that I have been having is that when I use the root options, it stuck loading the app:

I/SyncthingNativeCode( 545): [7T7AM] 12:05:56 INFO: syncthing v0.11.6 (go1.4.2 linux-arm android) [unknown-user@android.syncthing.net](mailto:unknown-user@android.syncthing.net) 2015-05-23 23:58:46 UTC I/SyncthingNativeCode( 545): [7T7AM] 12:05:56 INFO: Database block cache capacity 14675 KiB I/SyncthingNativeCode( 545): [7T7AM] 12:05:56 FATAL: Cannot open database: leveldb/storage: corrupted or incomplete CURRENT file - Is another copy of Syncthing already running? E/SyncthingNativeCode( 545): Syncthing binary crashed with error code 1

I will delete the data and configure again the folder and tell you.

---

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [June 5, 2015, 7:44pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/15 "2015-06-05T19:44:17Z")

</div>

Nothing weird, It has to be my hardware:/ I need to find another one running lollipop in his nexus 4 to check if it has the same problem as me

---

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [June 10, 2015, 8:05am UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/16 "2015-06-10T08:05:36Z")

</div>

I noticed that my neuxs 4 get stuck and reboot while syncing, so if there any way to limitate the number of folders that are being syncing at the same time?

Maybe, if we sync folder by folder or two folders at the same time, we can be sure that the device will support the activity. I can also test if this could be a possible solution if you manage to make this feature in the app

What do you think?

---

<div class="post-metadata">

### Author: ![Nutomic](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nutomic/32/270_2.png) [@Nutomic](https://forum.syncthing.net/u/Nutomic)
#### Post date: [June 10, 2015, 8:59am UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/17 "2015-06-10T08:59:01Z")

</div>

There is no such feature. You could try to remove some of your repos, and see if that fixes it.

@calmh @AudriusButkevicius Do you have any idea for the log above?

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [June 10, 2015, 9:16am UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/18 "2015-06-10T09:16:43Z")

</div>

I think that’s just an unfinished corrupt transaction. You can fix it by removing the CURRENT file.

---

<div class="post-metadata">

### Author: ![Nutomic](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nutomic/32/270_2.png) [@Nutomic](https://forum.syncthing.net/u/Nutomic)
#### Post date: [June 10, 2015, 11:14am UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/19 "2015-06-10T11:14:21Z")

</div>

There’s a button in the app settings for this, “reset database”.

---

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [June 10, 2015, 11:41am UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/20 "2015-06-10T11:41:58Z")

</div>

Yeah, I just delete the data of the app and import the config to have all my repos.

So, if it works well using a less number of repos… Is there any change to add to the android-app a setting to reduce the number of repos being syncing at the same time?

I will be testing that to tell you

---

<div class="post-metadata">

### Author: ![yaymalaga](https://forum.syncthing.net/user_avatar/forum.syncthing.net/yaymalaga/32/1376_2.png) [@yaymalaga](https://forum.syncthing.net/u/yaymalaga)
#### Post date: [June 11, 2015, 6:40pm UTC](https://forum.syncthing.net/t/random-reboots-while-syncing/2855/21 "2015-06-11T18:40:42Z")

</div>

Okey, I have been doing some tests.

The problem is related with the number of files that the folder have or the size they have.

I tried syncing a folder with around 100 photopgrahs and it randomly got stuck and the phone did a hard-reboot.

I also tried with a folder that had around 10 files, but they were heavy (around 150mb) and the same happened.

If I sync folders that don’t have so many files and their size is normal I have no problems.

[Next page](https://forum.syncthing.net/t/random-reboots-while-syncing/2855.md?page=2)
