Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lwip: invalid state transition on ieee802154_submac users #17208

Open
fjmolinas opened this issue Nov 16, 2021 · 0 comments
Open

lwip: invalid state transition on ieee802154_submac users #17208

fjmolinas opened this issue Nov 16, 2021 · 0 comments
Assignees
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@fjmolinas
Copy link
Contributor

Description

When using LWIP send/receive results in an invalid state change on BOARD's using the submit an invalid state change sequence happens which leads to an assert.

Steps to reproduce the issue

On one BOARD (e.g. an nrf52840 or cc2538) start a tcp, udp or ip server. From another BOARD send message to such server.

BOARD=nrf52840-mdk LWIP_IPV4=0 LWIP_IPV6=1 make -C tests/lwip --no-print-directory -j flash term
ifconfig
Iface L60 HWaddr: ae:8d:fe:e1:e0:2c:e1:2d Link: up State: up
         Link type: wireless
         inet6 addr: fe80:0:0:0:ac8d:fee1:e02c:e12d scope: link
ip server start 255
BOARD=nrf52840-mdk LWIP_IPV4=0 LWIP_IPV6=1 make -C tests/lwip --no-print-directory -j flash term
ip send fe80:0:0:0:ac8d:fee1:e02c:e12d 255 aaa

Expected results

The message is sent and received.

Actual results

Invalid state change.

2021-11-16 08:16:14,455 # ip send fe80:0:0:0:ac8d:fee1:e02c:e12d 255 aaaa
2021-11-16 08:16:14,456 # RX--(BH)->INVALID
2021-11-16 08:16:14,456 # 0x202b7b
2021-11-16 08:16:14,457 # *** RIOT kernel panic:
2021-11-16 08:16:14,458 # FAILED ASSERTION.
2021-11-16 08:16:14,458 #
2021-11-16 08:16:14,471 #       pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current
2021-11-16 08:16:14,474 #         - | isr_stack            | -        - |   - |    512 (  220) (  292) | 0x20000000 | 0x200001c8
2021-11-16 08:16:14,487 #         1 | main                 | pending  Q |   7 |   1536 ( 1216) (  320) | 0x20001424 | 0x20001564
2021-11-16 08:16:14,491 #         2 | lwip_netdev_mux      | running  Q |   3 |   1024 (  544) (  480) | 0x20003d18 | 0x20004074
2021-11-16 08:16:14,503 #         3 | tcpip_thread         | bl mbox  _ |   1 |   1024 (  600) (  424) | 0x20001be8 | 0x20001ef4
2021-11-16 08:16:14,505 #           | SUM                  |            |     |   4096 ( 2580) ( 1516)
2021-11-16 08:16:14,505 #
2021-11-16 08:16:14,506 # *** halted.
2021-11-16 08:16:14,506 #
2021-11-16 08:16:14,506 #
2021-11-16 08:16:14,518 # Context before hardfault:
2021-11-16 08:16:14,518 #    r0: 0x0000000d
2021-11-16 08:16:14,519 #    r1: 0x00000000
2021-11-16 08:16:14,520 #    r2: 0x22400000
2021-11-16 08:16:14,521 #    r3: 0x00000000
2021-11-16 08:16:14,521 #   r12: 0x00213f1b
2021-11-16 08:16:14,522 #    lr: 0x00201d83
2021-11-16 08:16:14,523 #    pc: 0x00202268
2021-11-16 08:16:14,523 #   psr: 0x21000000
2021-11-16 08:16:14,524 #
2021-11-16 08:16:14,524 # FSR/FAR:
2021-11-16 08:16:14,533 #  CFSR: 0x00000000
2021-11-16 08:16:14,534 #  HFSR: 0x80000000
2021-11-16 08:16:14,535 #  DFSR: 0x00000002
2021-11-16 08:16:14,536 #  AFSR: 0x00000000
2021-11-16 08:16:14,536 # Misc
2021-11-16 08:16:14,537 # EXC_RET: 0xfffffffd
2021-11-16 08:16:14,538 # Active thread: 2 "lwip_netdev_mux"
2021-11-16 08:16:14,539 # Attempting to reconstruct state for debugging...
2021-11-16 08:16:14,540 # In GDB:
2021-11-16 08:16:14,550 #   set $pc=0x202268
2021-11-16 08:16:14,550 #   frame 0
2021-11-16 08:16:14,550 #   bt
2021-11-16 08:16:14,551 #
2021-11-16 08:16:14,552 # ISR stack overflowed by at least 16 bytes.

Versions

Operating System Environment
----------------------------
         Operating System: "Ubuntu" "20.04.1 LTS (Focal Fossa)"
                   Kernel: Linux 5.13.0-1017-oem x86_64 x86_64
             System shell: /usr/bin/dash (probably dash)
             make's shell: /usr/bin/dash (probably dash)

Installed compiler toolchains
-----------------------------
               native gcc: gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0
        arm-none-eabi-gcc: arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
                  avr-gcc: missing
         mips-mti-elf-gcc: missing
           msp430-elf-gcc: missing
       riscv-none-elf-gcc: missing
  riscv64-unknown-elf-gcc: missing
     riscv-none-embed-gcc: missing
     xtensa-esp32-elf-gcc: missing
   xtensa-esp8266-elf-gcc: missing
                    clang: Ubuntu clang version 12.0.0-3ubuntu1~21.04.2

Installed compiler libs
-----------------------
     arm-none-eabi-newlib: "3.3.0"
      mips-mti-elf-newlib: missing
        msp430-elf-newlib: missing
    riscv-none-elf-newlib: missing
riscv64-unknown-elf-newlib: missing
  riscv-none-embed-newlib: missing
  xtensa-esp32-elf-newlib: missing
xtensa-esp8266-elf-newlib: missing
                 avr-libc: missing (missing)

Installed development tools
---------------------------
                   ccache: ccache version 4.2
                    cmake: cmake version 3.18.4
                 cppcheck: Cppcheck 2.3
                  doxygen: 1.9.1
                      git: git version 2.30.2
                     make: GNU Make 4.3
                  openocd: Open On-Chip Debugger 0.11.0+dev-00282-gae6de2f93-dirty (2021-07-29-18:16)
                   python: Python 3.9.5
                  python2: Python 2.7.18
                  python3: Python 3.9.5
                   flake8: error: /usr/bin/python3: No module named flake8
               coccinelle: spatch version 1.1.1-00068-g49826315 compiled with OCaml version 4.08.1

1772628

@fjmolinas fjmolinas changed the title lwip: invalid state transicion on ieee802154_submac users lwip: invalid state transition on ieee802154_submac users Nov 16, 2021
@aabadie aabadie added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

4 participants