[riot-users] Failed assertion after receiving two packets

Robert Hartung hartung at ibr.cs.tu-bs.de
Mon Dec 18 12:46:05 CET 2017


Hi *,

I am transmitting data from various IEEE 802.15.4 nodes. When two
packets are received close to each other, an assertion fails:

> 2017-12-18 09:05:32,821 - INFO # Contents: 'Hello from  1 (94)'
> 2017-12-18 09:05:32,836 - INFO # Contents: 'Hello from  4 (526)'
> 2017-12-18 09:05:32,868 - INFO # sys/net/gnrc/pktbuf_static/gnrc_pktbuf_static.c:230 => n/a
> 2017-12-18 09:05:32,868 - INFO # *** RIOT kernel panic:
> 2017-12-18 09:05:32,886 - INFO # FAILED ASSERTION.
> 2017-12-18 09:05:32,887 - INFO # 
> 2017-12-18 09:05:32,932 - INFO # 	pid | name                 | state    Q | pri | stack  ( used) | base addr  | current     
> 2017-12-18 09:05:32,980 - INFO # 	  1 | idle                 | pending  Q |  15 |    768 (   88) |     0x1eb7 |     0x2174 
> 2017-12-18 09:05:33,028 - INFO # 	  2 | main                 | bl mutex _ |   7 |    768 (  246) |     0x21b7 |     0x23c7 
> 2017-12-18 09:05:33,076 - INFO # 	  3 | at86rf2xx            | bl rx    _ |   2 |    512 (  242) |     0x3de3 |     0x3f44 
> 2017-12-18 09:05:33,124 - INFO # 	  4 | dump_thread          | running  Q |   8 |    768 (  766) |     0x1b49 |     0x1dea 
> 2017-12-18 09:05:33,171 - INFO # 	  5 | send_thread          | bl mutex _ |   9 |    768 (  170) |     0x1809 |     0x1a6d 
> 2017-12-18 09:05:33,204 - INFO # 	    | SUM                  |            |     |   3584 ( 1512)
> 2017-12-18 09:05:33,205 - INFO # 
> 2017-12-18 09:05:33,205 - INFO # *** halted.
> 2017-12-18 09:05:33,219 - INFO # 

The assertion that fails is:

> assert(pkt->users > 0);

The application runs fine when packets are received separately. However,
if there is more than one packet in the buffer (that's what I suspect
right now), my application fails. The applications code is attached. Any
one having an idea why this fails? Is the application correct? Maybe
some mutex is failing low-level-ish? Maybe threading on my node (based
on atmega1284p and atmega_common cpu) is corrupted?

Best Regards,
Robert

-- 
Robert Hartung, M.Sc.

Technische Universität Braunschweig
Institut für Betriebssysteme und Rechnerverbund
Mühlenpfordtstr. 23, Raum 115
38106 Braunschweig

Fon: +49 (531) 391 - 3264
Fax: +49 (531) 391 - 5936
E-Mail: hartung at ibr.cs.tu-bs.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 5983 bytes
Desc: not available
URL: <http://lists.riot-os.org/pipermail/users/attachments/20171218/bdc8bcc4/attachment.c>
-------------- next part --------------
APPLICATION=software
BOARD ?= inga_blue
RIOTBASE ?= $(CURDIR)/../../RIOT/

DEVELHELP ?= 1
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += ps
USEMODULE += saul_default
USEMODULE += gnrc
USEMODULE += gnrc_netdev_default
USEMODULE += auto_init_gnrc_netif
#USEMODULE += gnrc_txtsnd
#USEMODULE += gnrc_pktdump

NODE_ID ?= 0
CFLAGS += -DNODE_ID=$(NODE_ID)
CFLAGS += -DDEBUG_ASSERT_VERBOSE

include $(RIOTBASE)/Makefile.include


More information about the users mailing list