Bug #249
closedKernel oops on batman-adv V
Added by Alvaro Antelo over 8 years ago. Updated almost 8 years ago.
0%
Description
Hi,
Not sure if I am posting this issue on the right place, but I am experiencing reproducible kernel oopses; as soon as the adhoc interfaces go up, all routers crash simultaneously. It is only happening with version V, I had no problems whatsoever with version IV.
The test setup involves two TP-LINK WDR-3600, one acting as a gateway and the other as a mesh node. Openwrt Chaos Calmer was compiled with the batman-adv development modules.
I am completely available to help in debugging this issue.
Attached are:
Instructions used to compile the firmware
Script to configure the gateway node
Script to configure the mesh node
output of cat /sys/kernel/debug/crashlog
Best regards,
Alvaro Antelo
Files
crash (16 KB) crash | output of cat /sys/kernel/debug/crashlog | Alvaro Antelo, 03/25/2016 12:13 AM | |
Compiling_Openwrt_CC_Batman-adv.sh (2.33 KB) Compiling_Openwrt_CC_Batman-adv.sh | Instructions used to compile the firmware | Alvaro Antelo, 03/25/2016 12:16 AM | |
mesh_node_with_batman_V.sh (7.69 KB) mesh_node_with_batman_V.sh | Script to configure the mesh node | Alvaro Antelo, 03/25/2016 12:18 AM | |
openwrt_gateway_with_batman_V.sh (8.85 KB) openwrt_gateway_with_batman_V.sh | Script to configure the gateway node | Alvaro Antelo, 03/25/2016 12:20 AM | |
Compiling_Openwrt_CC_Batman-adv.sh (2.52 KB) Compiling_Openwrt_CC_Batman-adv.sh | Alvaro Antelo, 03/29/2016 12:37 AM |
Updated by Alvaro Antelo over 8 years ago
Updated by Alvaro Antelo over 8 years ago
Updated by Sven Eckelmann over 8 years ago
- Assignee set to Marek Lindner
It is currently not allowed to compile batman-adv with BATMAN_V using the compat layer from batman-adv when you are using compat-wireless/backports. Instead you have to compile it using the backport/compat-layer of mac80211/compat-wireless. The kernel in 3.18 (ar71xx CC kernel) uses an incompatible structure definition (compared to compat-wireless/mac80211) for the station information. Your mac80211 (as result) will just overwrite parts of your stack (which causes a crash).
https://lists.open-mesh.org/mailman3/hyperkitty/list/b.a.t.m.a.n@lists.open-mesh.org/message/OKZSPP3SKHYZ3I7K553UFWTLRO6WSFG5/
https://patchwork.open-mesh.org/project/b.a.t.m.a.n./patch/1674394.xTpvsLY2Zu@sven-edge/
https://patchwork.open-mesh.org/project/b.a.t.m.a.n./patch/2360276.GhZ0sleNGR@sven-edge/
The https://git.open-mesh.org/openwrt-feed-batman-adv.git cannot (and most likely will not) support this. Please use instead https://github.com/openwrt-routing/packages after the next release (should be 2016.1).
@Marek Lindner: Do you want to change the devel feed of batman-adv to also drop the batadv compat layer in favor of the compat-wireless stuff or do you want to drop BATMAN_V support in it?
Updated by Sven Eckelmann over 8 years ago
Btw. you can try my test routing feed when you want to try batman-adv v2016.1 (unreleased) with BATMAN_V.
src-git routing https://github.com/ecsv/packages.git;batadv-2016.1preview
It is based on 05fa82f8789fce820f540d30e635dd24fb72cd1f (master) in case you want to port the patches to a specific CC version.
Updated by Alvaro Antelo over 8 years ago
Thank you Mr. Eckelmann,
I will compile your v2016.1 preview packages tomorrow and post the results here.
Happy Easter to all Open-Mesh developers!
Updated by Alvaro Antelo over 8 years ago
Mr. Eckelmann, I understood that I could use v2016.1preview packages with Chaos Calmer, please correct me if I'm wrong.
OpenWRT was compiled using the attached instructions. When applied to my two test nodes (gateway and mesh) there are no crashes, adhoc interfaces and bat0 go up, batman OGM and ELP messages appears to be exchanged normally, I saw for the first time wireless link throughput measurements but I am unable to establish connectivity between both nodes at the IP level.
Here is the output of some commands (on the gateway):
root@gateway:~# batctl if adhoc1: active root@gateway:~# batctl gw server (announced bw: 10.0/2.0 MBit) root@gateway:~# batctl o [B.A.T.M.A.N. adv 2016.1, MainIF/MAC: adhoc1/c4:e9:84:f9:d9:c7 (bat0 BATMAN_V)] Originator last-seen ( throughput) Nexthop [outgoingIF]: Potential nexthops ... c4:e9:84:f9:d7:a5 0.520s ( 59.9) c4:e9:84:f9:d7:a5 [ adhoc1]: c4:e9:84:f9:d7:a5 ( 59.9) root@gateway:~# batctl p c4:e9:84:f9:d7:a5 PING c4:e9:84:f9:d7:a5 (c4:e9:84:f9:d7:a5) 20(48) bytes of data 20 bytes from c4:e9:84:f9:d7:a5 icmp_seq=1 ttl=50 time=0.86 ms 20 bytes from c4:e9:84:f9:d7:a5 icmp_seq=2 ttl=50 time=0.84 ms 20 bytes from c4:e9:84:f9:d7:a5 icmp_seq=3 ttl=50 time=0.85 ms root@gateway:~# batctl tr c4:e9:84:f9:d7:a5 traceroute to c4:e9:84:f9:d7:a5 (c4:e9:84:f9:d7:a5), 50 hops max, 20 byte packets 1: c4:e9:84:f9:d7:a5 1.517 ms 0.829 ms 0.800 ms (this is weird...) root@gateway:~# batctl td adhoc1 Warning - packet contains unknown batman packet type: 0x04 Warning - packet contains unknown batman packet type: 0x04 Warning - packet contains unknown batman packet type: 0x03 Warning - packet contains unknown batman packet type: 0x03 root@gateway:~# batctl -v batctl 2016.0 [batman-adv: 2016.1] batctl 2016.0 [batman-adv: 2016.1] root@gateway:~# modinfo batman_adv module: /lib/modules/3.18.27/batman-adv.ko version: 2016.1 description: B.A.T.M.A.N. advanced author: Marek Lindner <mareklindner@neomailbox.ch>, Simon Wunderlich <sw@simonwunderlich.de> license: GPL depends: libcrc32c,crc16 root@gateway:~# batctl ll [ ] all debug output disabled (none) [x] messages related to routing / flooding / broadcasting (batman) [ ] messages related to route added / changed / deleted (routes) [ ] messages related to translation table operations (tt) [ ] messages related to bridge loop avoidance (bla) [ ] messages related to arp snooping and distributed arp table (dat) [ ] messages related to network coding (nc) root@gateway:~# batctl l oc1 [c4:e9:84:f9:d9:c7] (from OG: c4:e9:84:f9:d7:a5, seqno 1791251129, troughput 4294967295, TTL 50, V 15, tvlv_len 36) [ 633530] Searching and updating originator entry of received packet [ 633530] Searching and updating originator entry of received packet [ 633530] Forwarding OGM2 packet on adhoc1: throughput 299, ttl 49, received via adhoc1 [ 633580] Received ELP packet from c4:e9:84:f9:d7:a5 seqno 1763544464 ORIG: c4:e9:84:f9:d7:a5 [ 633810] Sending own OGM2 packet (originator gateway_adhoc1, seqno 3035952103, throughput 4294967295, TTL 50) on interface adhoc1 [c4:e9:84:f9:d9:c7] [ 634050] Sending broadcast ELP packet on interface adhoc1, seqno 1547039850 [ 634050] Sending unicast (probe) ELP packet on interface adhoc1 to c4:e9:84:f9:d7:a5 [ 634050] Sending unicast (probe) ELP packet on interface adhoc1 to c4:e9:84:f9:d7:a5 [ 634070] Received ELP packet from c4:e9:84:f9:d7:a5 seqno 1763544465 ORIG: c4:e9:84:f9:d7:a5 [ 634530] Received OGM2 packet via NB: c4:e9:84:f9:d7:a5, IF: adhoc1 [c4:e9:84:f9:d9:c7] (from OG: c4:e9:84:f9:d7:a5, seqno 1791251130, troughput 4294967295, TTL 50, V 15, tvlv_len 36) [ 634530] Searching and updating originator entry of received packet [ 634530] Searching and updating originator entry of received packet [ 634530] Forwarding OGM2 packet on adhoc1: throughput 299, ttl 49, received via adhoc1 [ 634560] Sending broadcast ELP packet on interface adhoc1, seqno 1547039851 [ 634560] Sending unicast (probe) ELP packet on interface adhoc1 to c4:e9:84:f9:d7:a5 [ 634560] Sending unicast (probe) ELP packet on interface adhoc1 to c4:e9:84:f9:d7:a5 [ 634560] Received ELP packet from c4:e9:84:f9:d7:a5 seqno 1763544466 ORIG: c4:e9:84:f9:d7:a5 [ 634830] Sending own OGM2 packet (originator gateway_adhoc1, seqno 3035952104, throughput 4294967295, TTL 50) on interface adhoc1 [c4:e9:84:f9:d9:c7] [ 635060] Received ELP packet from c4:e9:84:f9:d7:a5 seqno 1763544467 ORIG: c4:e9:84:f9:d7:a5
Updated by Sven Eckelmann over 8 years ago
No, v2016.1preview was for the current trunk. I just told you that you can backport the patches to CC when you want to.
And batctl is still 2016.0 (not 2016.2 which will feature the packet parser for OGMv2 and ELP).
But the thing you see now is not related to this topic. Can you please keep discuss it somewhere else (mailing list, irc) with node configuration information. It doesn't seem to be yet ready for a bug report because it could also be a problem in your setup (batctl p
already seems to work fine and the the packet forwarding wasn't touched by BATMAN_V; there is only one known problem which may be related but only happens when you add a non-active device to batman-adv with BATMAN_V: #248#note-4).
@Marek Lindner: can you please decide how we want to move forward with the build against the mac80211 package (especially the https://git.open-mesh.org/openwrt-feed-batman-adv.git part which already supports BATMAN_V without mac80211 driver support)
Updated by Sven Eckelmann over 8 years ago
The upstream pull request was closed and instead a new one was opened to also integrate the v2016.1 support: https://github.com/openwrt-routing/packages/pull/177
The branch is now called
src-git routing https://github.com/ecsv/packages.git;batadv_2016.1
It should be possible to copy the folder batman-adv/ folder to the CC openwrt-routing folder to get it working. I personally use it right now with an even older version than CC and it seems to work for me (tm).
Updated by Sven Eckelmann over 8 years ago
@Marek Lindner: Maybe the future of this feed could be discussed together with the future of the alfred feed (#250) at the battlemesh.
Updated by Marek Lindner over 8 years ago
- Status changed from New to Closed
Sven Eckelmann wrote:
It should be possible to copy the folder batman-adv/ folder to the CC openwrt-routing folder to get it working. I personally use it right now with an even older version than CC and it seems to work for me (tm).
These changes have been merged into the -devel package. Thanks!