Syncthing-android: Disable "NAT Traversal" if kernel is 3.4.x

Created on 13 Oct 2019  路  9Comments  路  Source: syncthing/syncthing-android

There have been some reportings, that the newer version of Syncthing cause some phones to reboot.

After some digging, we have narrowed it down to a kernel bug in the 3.4.x kernel (@klausenbusk, @khumarahn, @shscs911, @kisenberg and neden is all running a 3.4.x kernel and is experiencing that the phone reboot):

We should therefor disable "NAT Traversal" as default if the kernel is 3.4.x

Kernel oops:

[  267.441171] Unable to handle kernel NULL pointer dereference at virtual address 000001f8
[  267.497146] pgd = c3180000
[  267.499130] [000001f8] *pgd=00000000
[  267.508805] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[  267.513169] Modules linked in: wlan(C) adsprpc
[  267.517564] CPU: 0    Tainted: G        WC    (3.4.113-gbf6ef2d36c86-23805-g4526a855e63a #1)
[  267.526049] PC is at rt_fill_info.constprop.6+0x22c/0x388
[  267.531451] LR is at rtnetlink_put_metrics+0xb0/0xd0
[  267.536334] pc : [<c0766078>]    lr : [<c071b27c>]    psr: 60000013
[  267.536334] sp : d1dedba8  ip : c35970ec  fp : 00002785
[  267.547779] r10: 00000000  r9 : 00000000  r8 : d1dedbbc
[  267.553059] r7 : 00000000  r6 : c35970a4  r5 : c53f30c0  r4 : cfe6ed80
[  267.559499] r3 : 00000000  r2 : 00000000  r1 : c35970e8  r0 : 00000000
[  267.566061] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  267.573111] Control: 10c5787d  Table: 8338006a  DAC: 00000015
[  267.578940] 
[  267.578940] PC: 0xc0765ff8:
[  267.583122] 5ff8  ebef327a e3500000 ba000069 e595307c e5952064 e1520003 0a000007 e58d3014
[  267.591271] 6018  e1a00004 e3a01005 e3a02004 e1a03008 ebef326e e3500000 ba00005d e5951014
[  267.599420] 6038  e1a00004 e3c11001 ebfed461 e3500000 ba000057 e5953078 e3530000 0a000007
[  267.607599] 6058  e58d3014 e1a00004 e3a01010 e3a02004 e1a03008 ebef325d e3500000 ba00004c
[  267.615748] 6078  e59721f8 e3720001 1a000006 e3590000 e1d5a3f4 01a07009 01a0b007 01a09007
[  267.623897] 6098  1a000009 ea00002a e28d3018 e1a00004 e3a01019 e5232008 e3a02004 ebef324b
[  267.632076] 60b8  e3500000 1a00003a eaffffef e5953088 e5933094 e3530000 ca00000a e59f70ec
[  267.640225] 60d8  e08f7007 e5d73000 e3530000 1a000005 e59f00dc e3a0106d e08f0000 ebe49a3e
[  267.648374] 
[  267.648374] LR: 0xc071b1fc:
[  267.652647] b1fc  1a000024 e2488004 e3a07001 e1a04000 e28d9004 e5b83004 e3530000 0a00000e
[  267.660796] b21c  e58d3004 e1a00005 e1a01007 e3a02004 e1a03009 ebf05dec e3500000 e2844001
[  267.668945] b23c  aa000005 e59510ac e1a00005 e0611006 ebffa05d e3e00059 ea00000e e2877001
[  267.677124] b25c  e357000f 1affffea e3540000 1a000005 e59510ac e1a00005 e0611006 ebffa052
[  267.685273] b27c  e1a00004 ea000003 e59530a0 e0663003 e1c630b0 e5950050 e28dd00c e8bd83f0
[  267.693422] b29c  e92d43f0 e24dd024 e1a04001 e1a09002 e59d6044 e3a01000 e3a02020 e1a07000
[  267.701602] b2bc  e1a0000d e1a08003 e1a0500d ebeff53c e59f206c e5943040 e79f2002 e58d3000
[  267.709751] b2dc  e5943048 e5920000 e0630000 ebe5dcfe e59d3048 e3560000 e58d0004 e58d9014
[  267.717900] 
[  267.717900] SP: 0xd1dedb28:
[  267.722234] db28  e049eba4 c0f451c0 c0cb9368 ffffd9d8 00000000 c0c82100 00000004 c0766078
[  267.730321] db48  60000013 ffffffff d1dedb94 d1dedbbc 00000000 c000d9d8 00000000 c35970e8
[  267.738501] db68  00000000 00000000 cfe6ed80 c53f30c0 c35970a4 00000000 d1dedbbc 00000000
[  267.746650] db88  00000000 00002785 c35970ec d1dedba8 c071b27c c0766078 60000013 ffffffff
[  267.754799] dba8  0000000c 00000000 00000000 c0d7f940 d5eb8840 010aa8c0 00000000 08080808
[  267.762978] dbc8  cfe6ed80 d6da1200 d5eb8840 c0d7f940 00000000 00000000 00002785 c0768174
[  267.771127] dbe8  c0955574 c00f080c c27c0540 d1dedbfc 00400000 00000018 00000001 00000000
[  267.779276] dc08  00000000 00000000 00002785 6b0aa8c0 08080808 00000000 00000000 d6da121c
[  267.787456] 
[  267.787456] IP: 0xc359706c:
[  267.791698] 706c  00000001 437ef21f 0000003e 00000000 00000000 00000000 00000000 00000000
[  267.799847] 708c  00000000 00000000 00000000 00000000 00000000 00000000 0000001c 00000018
[  267.808026] 70ac  5d9de85d 00001923 00002002 010000fe 00000200 000f0008 000000fe 00010008
[  267.816175] 70cc  08080808 00040008 00000018 00070008 6b0aa8c0 00050008 010aa8c0 00080004
[  267.824324] 70ec  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.832504] 710c  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.840653] 712c  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.848802] 714c  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.856981] 
[  267.856981] R1: 0xc3597068:
[  267.861223] 7068  00000000 00000001 437ef21f 0000003e 00000000 00000000 00000000 00000000
[  267.869403] 7088  00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000001c
[  267.877552] 70a8  00000018 5d9de85d 00001923 00002002 010000fe 00000200 000f0008 000000fe
[  267.885701] 70c8  00010008 08080808 00040008 00000018 00070008 6b0aa8c0 00050008 010aa8c0
[  267.893880] 70e8  00080004 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.902029] 7108  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.910178] 7128  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.918357] 7148  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.926506] 
[  267.926506] R4: 0xcfe6ed00:
[  267.930749] ed00  00000000 00000000 d8fbc300 00000000 00000000 00000000 00000000 00000000
[  267.938928] ed20  00000000 00000000 00000000 00000000 00000000 00000000 d599cd80 d599c3c0
[  267.947077] ed40  cfe6ed40 cfe6ed40 cfe6ed48 cfe6ed48 e00427e0 00000000 00000000 00000000
[  267.955226] ed60  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.963406] ed80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.971554] eda0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.979703] edc0  00000000 00000000 c53f30c0 00000000 00000044 00000000 00000000 00000000
[  267.987883] ede0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  267.996032] 
[  267.996032] R5: 0xc53f3040:
[  268.000274] 3040  00000000 00000000 d6230e80 00000000 00000000 00000000 00000000 00000000
[  268.008454] 3060  00000000 00000000 00000000 00000000 00000000 00000000 c9eff5c0 00000000
[  268.016603] 3080  c53f3080 c53f3080 c53f3088 c53f3088 d01b1e10 00000000 00000000 00000000
[  268.024782] 30a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  268.032931] 30c0  00000000 c015a8bc 00000000 c31d8000 c0d81180 c0f42fe1 00000000 c53f30c0
[  268.041080] 30e0  d649da00 00000000 c071589c c076f5c4 00000001 ffff0000 00000000 00000000
[  268.049259] 3100  00000001 00000000 ffffd9d8 c3916780 08080808 00000000 9e4f1577 00000000
[  268.057408] 3120  00000001 08080808 6b0aa8c0 00000000 00000018 00000000 00000000 010aa8c0
[  268.065557] 
[  268.065557] R6: 0xc3597024:
[  268.069891] 7024  732e746e 6854006f 75616665 705f746c 3a706f72 b0003073 00000000 00000000
[  268.077979] 7044  00000000 00000000 6c73676b 6d69742d 6e696c65 00000065 00000000 00000000
[  268.086128] 7064  00000000 00000000 00000001 437ef21f 0000003e 00000000 00000000 00000000
[  268.094307] 7084  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  268.102456] 70a4  0000001c 00000018 5d9de85d 00001923 00002002 010000fe 00000200 000f0008
[  268.110605] 70c4  000000fe 00010008 08080808 00040008 00000018 00070008 6b0aa8c0 00050008
[  268.118785] 70e4  010aa8c0 00080004 00000000 00000000 00000000 00000000 00000000 00000000
[  268.126934] 7104  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  268.135083] 
[  268.135113] R8: 0xd1dedb3c:
[  268.139417] db3c  c0c82100 00000004 c0766078 60000013 ffffffff d1dedb94 d1dedbbc 00000000
[  268.147504] db5c  c000d9d8 00000000 c35970e8 00000000 00000000 cfe6ed80 c53f30c0 c35970a4
[  268.155684] db7c  00000000 d1dedbbc 00000000 00000000 00002785 c35970ec d1dedba8 c071b27c
[  268.163833] db9c  c0766078 60000013 ffffffff 0000000c 00000000 00000000 c0d7f940 d5eb8840
[  268.171982] dbbc  010aa8c0 00000000 08080808 cfe6ed80 d6da1200 d5eb8840 c0d7f940 00000000
[  268.180161] dbdc  00000000 00002785 c0768174 c0955574 c00f080c c27c0540 d1dedbfc 00400000
[  268.188310] dbfc  00000018 00000001 00000000 00000000 00000000 00002785 6b0aa8c0 08080808
[  268.196459] dc1c  00000000 00000000 d6da121c 00000000 00000000 00000000 00000000 00000000
[  268.204639] Process ip (pid: 6435, stack limit = 0xd1dec2f0)
[  268.210285] Stack: (0xd1dedba8 to 0xd1dee000)
[  268.214619] dba0:                   0000000c 00000000 00000000 c0d7f940 d5eb8840 010aa8c0
[  268.222829] dbc0: 00000000 08080808 cfe6ed80 d6da1200 d5eb8840 c0d7f940 00000000 00000000
[  268.231008] dbe0: 00002785 c0768174 c0955574 c00f080c c27c0540 d1dedbfc 00400000 00000018
[  268.239157] dc00: 00000001 00000000 00000000 00000000 00002785 6b0aa8c0 08080808 00000000
[  268.247245] dc20: 00000000 d6da121c 00000000 00000000 00000000 00000000 00000000 00000000
[  268.255486] dc40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  268.263634] dc60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  268.271783] dc80: 00000000 00000000 00000000 d6da1224 d6da1200 d5eb8840 00000078 e0471c00
[  268.279902] dca0: 00000002 d1dedd70 00000000 c071d06c 00000000 00000000 00000000 00000000
[  268.288112] dcc0: 00000000 00000000 00000000 d6da1200 d5eb8840 c071cdc0 d1dedd04 00000000
[  268.296261] dce0: 00000024 c07367d0 d5eb8840 00000024 d5eb8840 c071c2ac e0207400 c0736208
[  268.304379] dd00: d1adac00 7fffffff 00000000 00000000 d5eb8840 d1dedf74 d1adac00 c07365fc
[  268.312589] dd20: 00000000 00000000 00000000 d1caf140 d58d3680 00000000 00001923 00002785
[  268.320738] dd40: 00002785 00000000 00000002 00000000 d33e7a40 d1dedd70 00000024 d1dedf74
[  268.328918] dd60: d1dede5c 00000000 00000000 c06fac50 c0008180 d7dcf8f0 c0ceaa84 00000024
[  268.337005] dd80: d33e7a40 00000028 d1dedd2c d1dedf74 00000000 c001b250 c0cb467c 00000000
[  268.345215] dda0: 00000000 c013e274 b0a35000 c52bafc0 c0fae87c c2fc30d4 00000000 00000001
[  268.353395] ddc0: ffffffff 00000000 00000000 00000000 00000000 00000000 d1d47a80 d7d07d68
[  268.361483] dde0: 00000000 00000000 be8c8000 d7d07d68 d1dedd70 c0141204 0000000f 00000028
[  268.369632] de00: 00000000 00000028 000000c8 d1dedebc d1dec000 c0cb3808 00000000 d1dede5c
[  268.377872] de20: d1dedebc c0cb3808 00000000 d1dede5c 00000000 d33e7a40 d1dede9c 00000024
[  268.386021] de40: 00000000 00000000 d1dedf74 c06fc164 00000008 c0cb3808 be8c8000 be8cf51c
[  268.394140] de60: 00000000 c031f8dc d1dedfb0 be8c8000 00000000 c001a7c8 00000200 c001a7c8
[  268.402350] de80: d1dede90 00000000 00000000 c0eab868 00000000 c0eab868 00000000 00000000
[  268.410498] dea0: d1dede88 00000000 d1adac00 00000000 00000000 00000000 00000000 00000010
[  268.418647] dec0: 00000000 00000000 be8cf928 b0d95008 0000000c 00000000 0000000c c06fb498
[  268.426766] dee0: c0cb3808 00000817 c0d63c94 00000007 c0d63c24 be8c8000 d1dedfb0 b0d875ba
[  268.434976] df00: be8cf4f8 c0008480 b0d875b6 c000852c 00001923 00000000 d1dedf24 00000000
[  268.443155] df20: d1dedf08 00000000 d1adac00 00000000 c0cf43c0 00000001 c27bd388 72efb332
[  268.451243] df40: 00000000 d33e7a40 d1dedf74 00000000 be8c7354 c000dfe4 d1dec000 00200000
[  268.459453] df60: be8cf4f8 c06fd1fc 00000000 00000000 fffffff7 d1dedebc 0000000c d1dede5c
[  268.467633] df80: 00000001 00000000 00000000 00000000 b0d95004 b0d95004 be8cf4f8 be8c7388
[  268.475782] dfa0: 00000128 c000dfc8 b0d95004 be8cf4f8 00000003 be8c7354 00000000 be8cf388
[  268.483869] dfc0: b0d95004 be8cf4f8 be8c7388 00000128 0000041c 5d9de85d b0d875ba be8cf4f8
[  268.492110] dfe0: be8c7350 be8c7340 b0a2e567 b0b1de6c 600d0010 00000003 20746f6e 6e206562
[  268.500259] [<c0766078>] (rt_fill_info.constprop.6+0x22c/0x388) from [<c0768174>] (inet_rtm_getroute+0x214/0x250)
[  268.510514] [<c0768174>] (inet_rtm_getroute+0x214/0x250) from [<c071d06c>] (rtnetlink_rcv_msg+0x2ac/0x2e8)
[  268.520158] [<c071d06c>] (rtnetlink_rcv_msg+0x2ac/0x2e8) from [<c07367d0>] (netlink_rcv_skb+0x58/0xb4)
[  268.529375] [<c07367d0>] (netlink_rcv_skb+0x58/0xb4) from [<c071c2ac>] (rtnetlink_rcv+0x1c/0x28)
[  268.538226] [<c071c2ac>] (rtnetlink_rcv+0x1c/0x28) from [<c0736208>] (netlink_unicast+0x154/0x1f0)
[  268.547138] [<c0736208>] (netlink_unicast+0x154/0x1f0) from [<c07365fc>] (netlink_sendmsg+0x2a4/0x324)
[  268.556447] [<c07365fc>] (netlink_sendmsg+0x2a4/0x324) from [<c06fac50>] (sock_sendmsg+0xb0/0xd8)
[  268.565298] [<c06fac50>] (sock_sendmsg+0xb0/0xd8) from [<c06fc164>] (___sys_sendmsg.part.6+0x19c/0x244)
[  268.574607] [<c06fc164>] (___sys_sendmsg.part.6+0x19c/0x244) from [<c06fd1fc>] (__sys_sendmsg+0x50/0x74)
[  268.584129] [<c06fd1fc>] (__sys_sendmsg+0x50/0x74) from [<c000dfc8>] (__sys_trace_return+0x0/0x18)
[  268.593071] Code: e1a03008 ebef325d e3500000 ba00004c (e59721f8) 
[  268.599725] [sched_delayed] sched: RT throttling activated
[  268.646268] ---[ end trace 60c4914c671b4ae5 ]---

Version Information

App Version: 1.3.0
Syncthing Version: v1.3.0
Android Version: Android 9 / [LineageOS 16](https://forum.xda-developers.com/galaxy-s4-mini/orig-development/rom-lineageos-16-0-s4-mini-t3833063)

cc @Catfriend1

frozen-due-to-age

All 9 comments

This would be treating the symptom, not the cause.
Lineage folks should fix this, or atleast I'd like to be pointed at an issue/bug report their side.

This would be treating the symptom, not the cause.
Lineage folks should fix this, or atleast I'd like to be pointed at an issue/bug report their side.

You are correct, it isn't ideal, but I think it is unlikely that the bug will be fixed. 3.4.x has been EOL for years (3.4.113 was released 2016-10-26).

I'm using a unofficial build so I can't report the bug to LineageOS, but I have reported it here. @khumarahn are you running a official build? If yes, could you please report it upstream?

I am running an official build, though a few months old. I will be happy to submit a bug report. But it will take some time: I need to update, to test, and currently I am traveling.

I updated to today's build of lineageos, and I cannot reproduce the problem. Kernel is 3.4.113-lineageos-gf44b4b1 (the one I had issues was 3.4.113-lineageos-g42d61bd). Syncthing is 1.3.0, NAT traversal is on.

I updated to today's build of lineageos, and I cannot reproduce the problem. Kernel is 3.4.113-lineageos-gf44b4b1 (the one I had issues was 3.4.113-lineageos-g42d61bd). Syncthing is 1.3.0, NAT traversal is on.

I think https://github.com/LineageOS/android_kernel_cyanogen_msm8974/commit/f44b4b19da1541fce8440ffa1e59cdb722cf10b5 is the fix, the referred fairphone issue has a very similar call trace.

I think LineageOS/android_kernel_cyanogen_msm8974@f44b4b1 is the fix, the referred fairphone issue has a very similar call trace.

This is definitely the fix (yeh!), running ip route get 8.8.8.8 gives the exact same call trace.

Right, I think we can close this. They found the bug and are releasing the fix. Us working around it is just a hack.

Right, I think we can close this. They found the bug and are releasing the fix. Us working around it is just a hack.

I won't expect that all affected ROM get the fix, some of the ROMs is EOL. I'm not sure it is a issue as most of the affected phones is 4-6 years old and will probably be replaced soonish.

For those who don't get an official fix from the rom developer, they could use Syncthing-Fork.

Was this page helpful?
0 / 5 - 0 ratings