Skip to content

tests/lwip_sock_ip: failing on native when using IPV4 #17144

@fjmolinas

Description

@fjmolinas

Description

Testing #17115 I discovered that there seems to be some unsafe access somewhere in LWIP when using IPV4.

Bisecting leads to #16259, but that PR introduces mechanisms to identify unsafe code so it might be that it's just since that PR that we have the tools to identify an underlying issue.

Steps to reproduce the issue

LWIP_IPV6=0 LWIP_IPV4=1 make -C tests/lwip_sock_ip/ clean flash test -j

or

LWIP_IPV6=0 LWIP_IPV4=1 make -C tests/lwip_sock_udp/ clean flash test -j

Expected results

Passing tests

Actual results

main(): This is RIOT! (Version: 2021.10-devel-168-gc5060-HEAD)
code 0x11
Calling test_sock_udp_create4__EADDRINUSE()
Calling test_sock_udp_create4__EAFNOSUPPORT()
Calling test_sock_udp_create4__EINVAL_addr()
Calling test_sock_udp_create4__EINVAL_netif()
Calling test_sock_udp_create4__no_endpoints()
Calling test_sock_udp_create4__only_local()
Calling test_sock_udp_create4__only_local_port0()
Calling test_sock_udp_create4__only_local_reuse_ep()
Calling test_sock_udp_create4__only_remote()
Calling test_sock_udp_create4__full()
Calling test_sock_udp_recv4__EADDRNOTAVAIL()
Calling test_sock_udp_recv4__EAGAIN()
Calling test_sock_udp_recv4__ENOBUFS()
Calling test_sock_udp_recv4__ETIMEDOUT()
 * Calling sock_udp_recv()
 * (timed out with timeout 1000000)
Calling test_sock_udp_recv4__socketed()
Calling test_sock_udp_recv4__socketed_with_remote()
Calling test_sock_udp_recv4__socketed_with_port0()
Calling test_sock_udp_recv4__unsocketed()
Calling test_sock_udp_recv4__unsocketed_with_remote()
Calling test_sock_udp_recv4__with_timeout()
Calling test_sock_udp_recv4__non_blocking()
Calling test_sock_udp_recv4__aux()
Calling test_sock_udp_recv_buf4__success()
Assertion "Core lock held" failed at /home/francisco/workspace/RIOT2/build/pkg/lwip/src/core/ipv4/etharp.c:506
make[1]: *** [/home/francisco/workspace/RIOT2/Makefile.include:806: cleanterm] Aborted (core dumped)

and...

main(): This is RIOT! (Version: 2021.10-devel-168-gc5060-HEAD)
code 0x11
Calling test_sock_ip_create4__EAFNOSUPPORT()
Calling test_sock_ip_create4__EINVAL_addr()
Calling test_sock_ip_create4__EINVAL_netif()
Calling test_sock_ip_create4__no_endpoints()
Calling test_sock_ip_create4__only_local()
Calling test_sock_ip_create4__only_local_reuse_ep()
Calling test_sock_ip_create4__only_remote()
Calling test_sock_ip_create4__full()
Calling test_sock_ip_recv4__EADDRNOTAVAIL()
Calling test_sock_ip_recv4__EAGAIN()
Calling test_sock_ip_recv4__ENOBUFS()
Calling test_sock_ip_recv4__ETIMEDOUT()
 * Calling sock_ip_recv()
 * (timed out with timeout 1000000)
Calling test_sock_ip_recv4__socketed()
Calling test_sock_ip_recv4__socketed_with_remote()
Calling test_sock_ip_recv4__unsocketed()
Calling test_sock_ip_recv4__unsocketed_with_remote()
Calling test_sock_ip_recv4__with_timeout()
Calling test_sock_ip_recv4__non_blocking()
Calling test_sock_ip_recv4__aux()
Calling test_sock_ip_recv_buf4__success()
Assertion "Core lock held" failed at /home/francisco/workspace/RIOT2/build/pkg/lwip/src/core/ipv4/etharp.c:506
make[1]: *** [/home/francisco/workspace/RIOT2/Makefile.include:806: cleanterm] Aborted (core dumped)

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

Metadata

Metadata

Assignees

Labels

Area: networkArea: NetworkingArea: pkgArea: External package portsType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions