The dtls-echo example fails an assertion when trying to send between 6Lo nodes with global addresses.
Compile dtls-echo with USEMODULE += gnrc_rpl auto_init_gnrc_rpl flash it to two nodes
Flash a third RIOT node with gnrc_networking and configure it as a root:
ifconfig 6 add 2001:db8::<blafoo>
rpl root 0 2001:db8::<blafoo>
Start a DTLS server on one of the dtls-echo nodes:
dtlss start
Send a DTLS message from the other dtls-echo node:
dtlsc 2001:db8::<foobar> "Hello world"
Originally reported in #9706.
DTLS server should receive message, DTLS client should receive an echo.
One of the two nodes aborts with a failed assertion.
Tested on IoT-Lab (both lille and saclay
I got a similar issue with the gcoap example, but I was unable to determine if there was a faulty commit affecting both cases. I tried with this specific example, due it was the base for some parts of dtls-echo.
Mhhhh I wasn't able to reproduce on current master with my local set-up on samr21-xpro...
Tried on IoT-LAB also and can not reproduce anymore :-/
Tried on IoT-LAB also and can not reproduce anymore :-/
I was wondering the chances that IoT-Lab was the source of the issues instead of the code. I was getting similar behavior even with previous commits that were well tested. But sadly, without physical nodes, I was unable to confirm my suspects.
Ok, then let's keep this open as a known issue for this (2018.07) release (@cladmi ?) in case it pops up again.
check
@rfuentess I retested on testbed in lille and saclay now (with static routes though) and I still wasn't able to reproduce :-/
For reference here is what I typed in saclay:
m3-11;ifconfig 6 add 2001:db8::1711:6b10:65fb:8936
1533712659.231696;m3-11;> ifconfig 6 add 2001:db8::1711:6b10:65fb:8936
1533712659.233530;m3-11;success: added 2001:db8::1711:6b10:65fb:8936/64 to interface 6
m3-12;nib route add 6 :: fe80::1711:6b10:65fb:8936
1533712668.781838;m3-12;> nib route add 6 :: fe80::1711:6b10:65fb:8936
m3-12;ifconfig 6 add 2001:db8::1711:6b10:65f4:4c36
1533712687.856782;m3-12;> ifconfig 6 add 2001:db8::1711:6b10:65f4:4c36
1533712687.859114;m3-12;success: added 2001:db8::1711:6b10:65f4:4c36/64 to interface 6
m3-11;nib route add 6 :: fe80::1711:6b10:65f4:4c36
1533712717.703103;m3-11;> nib route add 6 :: fe80::1711:6b10:65f4:4c36
m3-11;dtlss start
1533712732.614187;m3-11;> dtlss start
ifconfig
1533712746.248231;m3-12;> ifconfig
1533712746.248506;m3-12;Iface 6 HWaddr: 4c:36 Channel: 26 Page: 0 NID: 0x23
1533712746.248721;m3-11;> ifconfig
1533712746.248855;m3-11;Iface 6 HWaddr: 09:36 Channel: 26 Page: 0 NID: 0x23
1533712746.249689;m3-12; Long HWaddr: 15:11:6b:10:65:f4:4c:36
1533712746.250011;m3-11; Long HWaddr: 15:11:6b:10:65:fb:89:36
1533712746.251080;m3-12; TX-Power: 0dBm State: IDLE max. Retrans.: 3 CSMA Retries: 4
1533712746.251363;m3-11; TX-Power: 0dBm State: IDLE max. Retrans.: 3 CSMA Retries: 4
1533712746.254295;m3-11; AUTOACK ACK_REQ CSMA MTU:1280 HL:64 IPHC
1533712746.254730;m3-11; Source address length: 8
1533712746.255164;m3-11; Link type: wireless
1533712746.255571;m3-12; AUTOACK ACK_REQ CSMA MTU:1280 HL:64 IPHC
1533712746.256001;m3-12; Source address length: 8
1533712746.256431;m3-12; Link type: wireless
1533712746.256827;m3-12; inet6 addr: fe80::1711:6b10:65f4:4c36 scope: local VAL
1533712746.257288;m3-11; inet6 addr: fe80::1711:6b10:65fb:8936 scope: local VAL
1533712746.257803;m3-11; inet6 addr: 2001:db8::1711:6b10:65fb:8936 scope: global VAL
1533712746.258303;m3-12; inet6 addr: 2001:db8::1711:6b10:65f4:4c36 scope: global VAL
1533712746.258725;m3-11; inet6 group: ff02::1
1533712746.259168;m3-11;
1533712746.259560;m3-12; inet6 group: ff02::1
1533712746.259910;m3-12;
nib route
1533712752.910500;m3-12;> nib route
1533712752.910808;m3-11;> nib route
1533712752.910948;m3-11;2001:db8::/64 dev #6
1533712752.911275;m3-12;2001:db8::/64 dev #6
1533712752.912251;m3-12;default* via fe80::1711:6b10:65fb:8936 dev #6
1533712752.912507;m3-11;default* via fe80::1711:6b10:65f4:4c36 dev #6
m3-12;dtlsc fe80::1711:6b10:65fb:8936 "Hello world!"
1533712780.826290;m3-12;> dtlsc fe80::1711:6b10:65fb:8936 "Hello world!"
1533712780.881587;m3-11;>
1533712780.883461;m3-11;Server: got DTLS Data App: --- Hello world! --- (echo!)
1533712780.888110;m3-12;Client: got DTLS Data App -- Hello world! --
m3-12;dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712790.379565;m3-12;> dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712790.462528;m3-11;
1533712790.464557;m3-11;Server: got DTLS Data App: --- Hello world! --- (echo!)
1533712790.470389;m3-12;Client: got DTLS Data App -- Hello world! --
m3-12;dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712793.026323;m3-12;> dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712793.112409;m3-11;
1533712793.114327;m3-11;Server: got DTLS Data App: --- Hello world! --- (echo!)
1533712793.122251;m3-12;Client: got DTLS Data App -- Hello world! --
m3-12;dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712794.232123;m3-12;> dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712794.323025;m3-11;
1533712794.325541;m3-11;Server: got DTLS Data App: --- Hello world! --- (echo!)
1533712794.332093;m3-12;Client: got DTLS Data App -- Hello world! --
m3-12;dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712795.298078;m3-12;> dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712795.386145;m3-11;
1533712795.387710;m3-11;Server: got DTLS Data App: --- Hello world! --- (echo!)
1533712795.395559;m3-12;Client: got DTLS Data App -- Hello world! --
m3-12;dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712796.377982;m3-12;> dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712796.458651;m3-11;
1533712796.460446;m3-11;Server: got DTLS Data App: --- Hello world! --- (echo!)
1533712796.467966;m3-12;Client: got DTLS Data App -- Hello world! --
m3-12;dtlsc fe80::1711:6b10:65fb:8936 "Hello world!"
1533712797.903990;m3-12;> dtlsc fe80::1711:6b10:65fb:8936 "Hello world!"
1533712797.966181;m3-11;
1533712797.968126;m3-11;Server: got DTLS Data App: --- Hello world! --- (echo!)
1533712797.974969;m3-12;Client: got DTLS Data App -- Hello world! --
m3-12;dtlsc fe80::1711:6b10:65fb:8936 "Hello world!"
1533712799.004514;m3-12;> dtlsc fe80::1711:6b10:65fb:8936 "Hello world!"
1533712799.067621;m3-11;
1533712799.069372;m3-11;Server: got DTLS Data App: --- Hello world! --- (echo!)
1533712799.075233;m3-12;Client: got DTLS Data App -- Hello world! --
m3-12;dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712800.320563;m3-12;> dtlsc 2001:db8::1711:6b10:65fb:8936 "Hello world!"
1533712800.406043;m3-11;
1533712800.407897;m3-11;Server: got DTLS Data App: --- Hello world! --- (echo!)
1533712800.414683;m3-12;Client: got DTLS Data App -- Hello world! --
(version string, also for reference:)
1533712929.860941;m3-12;> 锟絤ain(): This is RIOT! (Version: 2018.10-devel-398-g3f3df-sarajevo)
1533712929.861846;m3-12;RIOT (Tiny)DTLS testing implementation
1533712929.862160;m3-12;All up, running the shell now
1533712929.871284;m3-11;> 锟絤ain(): This is RIOT! (Version: 2018.10-devel-398-g3f3df-sarajevo)
1533712929.872164;m3-11;RIOT (Tiny)DTLS testing implementation
1533712929.872506;m3-11;All up, running the shell now
So this was done in the current master as of writing this comment (3f3df74bcd9bd9a8962d67929adb6791bd285044)
@pokgak can you please look into this?
I managed to reproduce this by manually setting global addresses for the node using 2 unmodified dtls-echo firmware on iotlab-m3:
m3-11;ifconfig 5 add 2001:db8::1
1593733446.359799;m3-11;> ifconfig 5 add 2001:db8::1
1593733446.360544;m3-11;success: added 2001:db8::1/64 to interface 5
m3-12;ifconfig 5 add 2001:db8::2
1593733454.709320;m3-12;> ifconfig 5 add 2001:db8::2
1593733454.710112;m3-12;success: added 2001:db8::2/64 to interface 5
m3-11;dtlss start
1593733463.630917;m3-11;> dtlss start
m3-12;dtlsc 2001:db8::1 "Hello World"
1593733490.901670;m3-12;> dtlsc 2001:db8::1 "Hello World"
1593733500.904304;m3-12;0x80035a7
1593733500.905185;m3-12;*** RIOT kernel panic:
1593733500.905590;m3-12;FAILED ASSERTION.
1593733500.905950;m3-12;
1593733500.906297;m3-12;*** halted.
1593733500.906638;m3-12;
I cannot reproduce this on native using the same steps as above
By adding CFLAGS += -DDEBUG_ASSERT_VERBOSE to the Makefile I found the failing assert:
1593736614.081889;m3-11;sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c:335 => 0x8000e21
which points to this section of code: https://github.com/RIOT-OS/RIOT/blob/2ed76e2d45e8eb8f6ad895622aca14a3e6ad0eea/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c#L333-L338
After that, I added CFLAGS += -DCONFIG_GNRC_IPV6_NIB_ARSM=1 to the Makefile, and with that, I got no failed assertions any more. I don't think this is the solution, but at least we know what is causing this issue now :)
I managed to reproduce the FAILED_ASSERTION using only one samr21-xpro board flashed with the dtls-echo firmware. It should be easier to test this locally now:
> ifconfig 6 add 2001:db8::2 # add global ip for client
> dtlsc 2001:db8::1 "HELLO WORLD" # try to send to non-existent server
That's weird though. Hope I find some time to investigate.
Found it! See #14920.