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

TCP is broken by Zephyr commit 3604c391e #3813

Closed
zephyrbot opened this issue Jul 12, 2017 · 2 comments
Closed

TCP is broken by Zephyr commit 3604c391e #3813

zephyrbot opened this issue Jul 12, 2017 · 2 comments
Assignees
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Milestone

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented Jul 12, 2017

Reported by Marti Bolivar:

Summary

Commit [3604c39|https://github.com/zephyrproject-rtos/zephyr/commit/3604c391e69d253fb985aa6d072283250b454e6e] ("net: udp: Remove NET_UDP_HDR() macro and direct access to net_buf") breaks TCP functionality in Zephyr. This is true even when UDP is enabled.

Additionally, the changes introduced to get_conn() in subsys/net/ip/connection.c by this commit would appear to cause extra problems in configurations where UDP is disabled. This follows because the call to net_udp_get_hdr() will always return NULL in those configurations. The change made in this commit to samples/net/mqtt_publisher/prj_96b_nitrogen.conf also appears to be incorrect and related, unless the intent is to require UDP for TCP to work as well.

Steps to reproduce:

Setup

  1. Check out zephyr-net-tools from https://github.com/zephyrproject-rtos/net-tools
  2. Build net-tools as described in https://www.zephyrproject.org/doc/subsystems/networking/qemu_setup.html#networking-with-qemu
  3. In terminal #1, run ./loop-socat.sh
  4. In terminal #2, run sudo ./loop-slip-tap.sh
  5. In terminal #3, run sudo ./echo-server -i tap0

Success case

Check out the commit immediately preceeding 3604c39, which is 8476da9, and run the echo_client application targeting QEMU for x86, with the project configuration altered to allow for linux <--> qemu communication as described in prj_qemu_x86.conf.

Observe the echo client application runs successfully.

Detailed logs, with diff shown for how to alter prj_qemu_x86.conf:

plop: ~/src/zephyr/samples/net/echo_client ((8476da9d9...)) mbolivar$ echo $BOARD
qemu_x86
plop: ~/src/zephyr/samples/net/echo_client ((8476da9d9...)) mbolivar$ echo $CONF_FILE
prj_qemu_x86.conf
plop: ~/src/zephyr/samples/net/echo_client ((8476da9d9...)) mbolivar$ echo $ZEPHYR_BASE
/home/mbolivar/src/zephyr
plop: ~/src/zephyr/samples/net/echo_client ((8476da9d9...)) mbolivar$ git --no-pager diff
diff --git a/samples/net/echo_client/prj_qemu_x86.conf b/samples/net/echo_client/prj_qemu_x86.conf
index faef753d1..bc2d3d2c5 100644
--- a/samples/net/echo_client/prj_qemu_x86.conf
+++ b/samples/net/echo_client/prj_qemu_x86.conf
@@ -32,7 +32,7 @@ CONFIG_NET_APP_SETTINGS=y
 # The addresses are selected so that qemu<->qemu connectivity works ok.
 # For linux<->qemu connectivity, create a new conf file and swap the
 # addresses (so that peer address is ending to 2).
-CONFIG_NET_APP_MY_IPV6_ADDR="2001:db8::2"
-CONFIG_NET_APP_PEER_IPV6_ADDR="2001:db8::1"
-CONFIG_NET_APP_MY_IPV4_ADDR="192.0.2.2"
-CONFIG_NET_APP_PEER_IPV4_ADDR="192.0.2.1"
+CONFIG_NET_APP_PEER_IPV6_ADDR="2001:db8::2"
+CONFIG_NET_APP_MY_IPV6_ADDR="2001:db8::1"
+CONFIG_NET_APP_PEER_IPV4_ADDR="192.0.2.2"
+CONFIG_NET_APP_MY_IPV4_ADDR="192.0.2.1"
plop: ~/src/zephyr/samples/net/echo_client ((8476da9d9...)) mbolivar$ make pristine && make run
Using /home/mbolivar/src/zephyr/boards/x86/qemu_x86/qemu_x86_defconfig as base
Merging /home/mbolivar/src/zephyr/kernel/configs/kernel.config
Merging prj_qemu_x86.conf
#
# configuration written to .config
#
make[1]: Entering directory '/home/mbolivar/src/zephyr'
make[2]: Entering directory '/home/mbolivar/src/zephyr/samples/net/echo_client/outdir/qemu_x86'
  GEN     ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/generated/generated_dts_board.conf
  UPD     include/generated/generated_dts_board.conf
  CHK     include/generated/generated_dts_board.conf
  Using /home/mbolivar/src/zephyr as source for kernel
  GEN     ./Makefile
  CHK     include/generated/version.h
  UPD     include/generated/version.h
  CHK     include/generated/generated_dts_board.h
  UPD     include/generated/generated_dts_board.h
  CHK     misc/generated/configs.c
  UPD     misc/generated/configs.c
  CHK     include/generated/offsets.h
  UPD     include/generated/offsets.h
  CC      lib/libc/minimal/source/stdlib/strtol.o
  CC      lib/libc/minimal/source/stdlib/strtoul.o
  CC      lib/libc/minimal/source/stdlib/atoi.o
  LD      lib/libc/minimal/source/stdlib/built-in.o
  CC      lib/libc/minimal/source/stdout/fprintf.o
  CC      lib/libc/minimal/source/stdout/prf.o
  CC      lib/libc/minimal/source/stdout/sprintf.o
  CC      lib/libc/minimal/source/stdout/stdout_console.o
  LD      lib/libc/minimal/source/stdout/built-in.o
  CC      lib/libc/minimal/source/string/string.o
  CC      lib/libc/minimal/source/string/strncasecmp.o
  CC      lib/libc/minimal/source/string/strstr.o
  LD      lib/libc/minimal/source/string/built-in.o
  LD      lib/libc/minimal/source/built-in.o
  LD      lib/libc/minimal/built-in.o
  LD      lib/libc/built-in.o
  LD      lib/built-in.o
  CC      kernel/version.o
  LD      kernel/built-in.o
  CC      kernel/alert.o
  CC      kernel/device.o
  CC      kernel/errno.o
  CC      kernel/idle.o
  CC      kernel/init.o
  CC      kernel/mailbox.o
  CC      kernel/mem_slab.o
  CC      kernel/mempool.o
  CC      kernel/msg_q.o
  CC      kernel/mutex.o
  CC      kernel/pipes.o
  CC      kernel/poll.o
  CC      kernel/queue.o
  CC      kernel/sched.o
  CC      kernel/sem.o
  CC      kernel/stack.o
  CC      kernel/sys_clock.o
  CC      kernel/system_work_q.o
  CC      kernel/thread.o
  CC      kernel/thread_abort.o
  CC      kernel/timer.o
  CC      kernel/work_q.o
  AR      kernel/lib.a
  CC      drivers/console/uart_console.o
  CC      drivers/console/uart_pipe.o
  LD      drivers/console/built-in.o
  CC      drivers/crc/crc16_sw.o
  LD      drivers/crc/built-in.o
  LD      drivers/display/built-in.o
  LD      drivers/ethernet/built-in.o
  CC      drivers/interrupt_controller/i8259.o
  CC      drivers/interrupt_controller/loapic_intr.o
  CC      drivers/interrupt_controller/system_apic.o
  CC      drivers/interrupt_controller/ioapic_intr.o
  LD      drivers/interrupt_controller/built-in.o
  CC      drivers/random/rand32_timestamp.o
  LD      drivers/random/built-in.o
  CC      drivers/serial/uart_ns16550.o
  LD      drivers/serial/built-in.o
  CC      drivers/slip/slip.o
  LD      drivers/slip/built-in.o
  CC      drivers/timer/hpet.o
  CC      drivers/timer/sys_clock_init.o
  LD      drivers/timer/built-in.o
  LD      drivers/built-in.o
  CC      misc/printk.o
  CC      misc/generated/configs.o
  LD      misc/generated/built-in.o
  LD      misc/built-in.o
  LD      boards/x86/qemu_x86/built-in.o
  LD      boards/built-in.o
  LD      ext/debug/built-in.o
  LD      ext/fs/built-in.o
  LD      ext/hal/built-in.o
  LD      ext/lib/crypto/built-in.o
  LD      ext/lib/built-in.o
  LD      ext/built-in.o
  LD      subsys/debug/built-in.o
  CC      subsys/logging/sys_log.o
  LD      subsys/logging/built-in.o
  CC      subsys/net/buf.o
  CC      subsys/net/ip/net_core.o
  CC      subsys/net/ip/net_if.o
  CC      subsys/net/ip/net_context.o
  CC      subsys/net/ip/net_pkt.o
  CC      subsys/net/ip/utils.o
  CC      subsys/net/ip/l2/ethernet.o
  CC      subsys/net/ip/l2/arp.o
  LD      subsys/net/ip/l2/built-in.o
  CC      subsys/net/ip/icmpv6.o
  CC      subsys/net/ip/nbr.o
  CC      subsys/net/ip/ipv6.o
  CC      subsys/net/ip/icmpv4.o
  CC      subsys/net/ip/ipv4.o
  CC      subsys/net/ip/route.o
  CC      subsys/net/ip/net_mgmt.o
  CC      subsys/net/ip/tcp.o
  CC      subsys/net/ip/net_shell.o
  CC      subsys/net/ip/net_stats.o
  CC      subsys/net/ip/connection.o
  LD      subsys/net/ip/built-in.o
  CC      subsys/net/lib/app/init.o
  CC      subsys/net/lib/app/client.o
  CC      subsys/net/lib/app/net_app.o
  LD      subsys/net/lib/app/built-in.o
  LD      subsys/net/lib/built-in.o
  LD      subsys/net/built-in.o
  CC      subsys/shell/shell_service.o
  CC      subsys/shell/shell.o
  LD      subsys/shell/modules/built-in.o
  LD      subsys/shell/built-in.o
  LD      subsys/built-in.o
  LD      tests/built-in.o
  LD      arch/common/built-in.o
  CC      arch/x86/core/cpuhalt.o
  CC      arch/x86/core/msr.o
  CC      arch/x86/core/irq_manage.o
  CC      arch/x86/core/sys_fatal_error_handler.o
  AS      arch/x86/core/crt0.o
  AS      arch/x86/core/cache_s.o
  CC      arch/x86/core/cache.o
  AS      arch/x86/core/excstub.o
  AS      arch/x86/core/intstub.o
  AS      arch/x86/core/swap.o
  CC      arch/x86/core/thread.o
  CC      arch/x86/core/fatal.o
  LD      arch/x86/core/built-in.o
  CC      arch/x86/soc/ia32/soc.o
  LD      arch/x86/soc/ia32/built-in.o
  LD      arch/x86/built-in.o
  LD      arch/built-in.o
  CC      src/echo-client.o
  CC      src/udp.o
  CC      src/tcp.o
  LD      src/built-in.o
  AR      libzephyr.a
  AR      libapplication.a
  LINK    zephyr.lnk
  HOSTCC  scripts/gen_idt/version.o
  HOSTCC  scripts/gen_idt/gen_idt.o
  HOSTLD  scripts/gen_idt/gen_idt
  SIDT    staticIdt.o
  BIN     zephyr.bin
To exit from QEMU enter: 'CTRL+a, x'
[QEMU] CPU: qemu32
qemu-system-i386: warning: Unknown firmware file in legacy mode: genroms/multiboot.bin

shell> [echo-client] [INF] init_app: Run echo client
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 433 bytes, received 433 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 433 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 773 bytes, received 640 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 640 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 773 bytes, received 133 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 133 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 744 bytes, received 536 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 536 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 744 bytes, received 208 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 208 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 199 bytes, received 199 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 199 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 466 bytes, received 466 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 466 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1141 bytes, received 640 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 640 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1141 bytes, received 501 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 501 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 20 bytes, received 20 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 20 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 663 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 912 bytes, received 640 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 640 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 912 bytes, received 272 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 272 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 72 bytes, received 72 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 72 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 277 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 1104 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1083 bytes, received 640 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 640 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1083 bytes, received 443 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 443 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 884 bytes, received 536 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 536 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 884 bytes, received 348 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 348 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 97 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 593 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1004 bytes, received 640 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 640 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1004 bytes, received 364 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 364 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 164 bytes, received 164 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 164 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 895 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 391 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 197 bytes, received 197 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 197 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 289 bytes, received 289 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 289 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 1086 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 932 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 994 bytes, received 640 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 640 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 994 bytes, received 354 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 354 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 204 bytes, received 204 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 204 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 1153 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 1109 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 499 bytes, received 499 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 499 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 326 bytes, received 326 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 326 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 130 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 184 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1134 bytes, received 640 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 640 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1134 bytes, received 494 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 494 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 864 bytes, received 536 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 536 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 864 bytes, received 328 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 328 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 1043 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 861 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 413 bytes, received 413 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 413 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 895 bytes, received 536 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 536 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 895 bytes, received 359 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 359 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 804 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 726 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 100 bytes, received 100 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 100 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1014 bytes, received 536 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 536 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 1014 bytes, received 478 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 478 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 457 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 741 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 216 bytes, received 216 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 216 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113ae0): Sent 497 bytes, received 497 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113ae0): Compared 497 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 1116 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113ae0): Compared 511 bytes, all ok
QEMU: Terminated
make[2]: Leaving directory '/home/mbolivar/src/zephyr/samples/net/echo_client/outdir/qemu_x86'
make[1]: Leaving directory '/home/mbolivar/src/zephyr'

Failure case

Check out the commit which introduced the regression, which is 3604c39, making sure to restart the echo-server binary. Run the same test as the success case. Observe TCP verification fails.

Detailed logs, as before:

plop: ~/src/zephyr/samples/net/echo_client ((8476da9d9...)) mbolivar$ git checkout 3604c39
M	samples/net/echo_client/prj_qemu_x86.conf
Previous HEAD position was 8476da9d9... net: icmp: Remove NET_ICMP_HDR() macro and direct access to net_buf
HEAD is now at 3604c391e... net: udp: Remove NET_UDP_HDR() macro and direct access to net_buf
plop: ~/src/zephyr/samples/net/echo_client ((3604c391e...)) mbolivar$ echo $BOARD
qemu_x86
plop: ~/src/zephyr/samples/net/echo_client ((3604c391e...)) mbolivar$ echo $CONF_FILE
prj_qemu_x86.conf
plop: ~/src/zephyr/samples/net/echo_client ((3604c391e...)) mbolivar$ echo $ZEPHYR_BASE
/home/mbolivar/src/zephyr
plop: ~/src/zephyr/samples/net/echo_client ((3604c391e...)) mbolivar$ git --no-pager diff
diff --git a/samples/net/echo_client/prj_qemu_x86.conf b/samples/net/echo_client/prj_qemu_x86.conf
index faef753d1..bc2d3d2c5 100644
--- a/samples/net/echo_client/prj_qemu_x86.conf
+++ b/samples/net/echo_client/prj_qemu_x86.conf
@@ -32,7 +32,7 @@ CONFIG_NET_APP_SETTINGS=y
 # The addresses are selected so that qemu<->qemu connectivity works ok.
 # For linux<->qemu connectivity, create a new conf file and swap the
 # addresses (so that peer address is ending to 2).
-CONFIG_NET_APP_MY_IPV6_ADDR="2001:db8::2"
-CONFIG_NET_APP_PEER_IPV6_ADDR="2001:db8::1"
-CONFIG_NET_APP_MY_IPV4_ADDR="192.0.2.2"
-CONFIG_NET_APP_PEER_IPV4_ADDR="192.0.2.1"
+CONFIG_NET_APP_PEER_IPV6_ADDR="2001:db8::2"
+CONFIG_NET_APP_MY_IPV6_ADDR="2001:db8::1"
+CONFIG_NET_APP_PEER_IPV4_ADDR="192.0.2.2"
+CONFIG_NET_APP_MY_IPV4_ADDR="192.0.2.1"
plop: ~/src/zephyr/samples/net/echo_client ((3604c391e...)) mbolivar$ make pristine && make run
Using /home/mbolivar/src/zephyr/boards/x86/qemu_x86/qemu_x86_defconfig as base
Merging /home/mbolivar/src/zephyr/kernel/configs/kernel.config
Merging prj_qemu_x86.conf
#
# configuration written to .config
#
make[1]: Entering directory '/home/mbolivar/src/zephyr'
make[2]: Entering directory '/home/mbolivar/src/zephyr/samples/net/echo_client/outdir/qemu_x86'
  GEN     ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/generated/generated_dts_board.conf
  UPD     include/generated/generated_dts_board.conf
  CHK     include/generated/generated_dts_board.conf
  Using /home/mbolivar/src/zephyr as source for kernel
  GEN     ./Makefile
  CHK     include/generated/version.h
  UPD     include/generated/version.h
  CHK     include/generated/generated_dts_board.h
  UPD     include/generated/generated_dts_board.h
  CHK     misc/generated/configs.c
  UPD     misc/generated/configs.c
  CHK     include/generated/offsets.h
  UPD     include/generated/offsets.h
  CC      lib/libc/minimal/source/stdlib/strtol.o
  CC      lib/libc/minimal/source/stdlib/strtoul.o
  CC      lib/libc/minimal/source/stdlib/atoi.o
  LD      lib/libc/minimal/source/stdlib/built-in.o
  CC      lib/libc/minimal/source/stdout/fprintf.o
  CC      lib/libc/minimal/source/stdout/prf.o
  CC      lib/libc/minimal/source/stdout/sprintf.o
  CC      lib/libc/minimal/source/stdout/stdout_console.o
  LD      lib/libc/minimal/source/stdout/built-in.o
  CC      lib/libc/minimal/source/string/string.o
  CC      lib/libc/minimal/source/string/strncasecmp.o
  CC      lib/libc/minimal/source/string/strstr.o
  LD      lib/libc/minimal/source/string/built-in.o
  LD      lib/libc/minimal/source/built-in.o
  LD      lib/libc/minimal/built-in.o
  LD      lib/libc/built-in.o
  LD      lib/built-in.o
  CC      kernel/version.o
  LD      kernel/built-in.o
  CC      kernel/alert.o
  CC      kernel/device.o
  CC      kernel/errno.o
  CC      kernel/idle.o
  CC      kernel/init.o
  CC      kernel/mailbox.o
  CC      kernel/mem_slab.o
  CC      kernel/mempool.o
  CC      kernel/msg_q.o
  CC      kernel/mutex.o
  CC      kernel/pipes.o
  CC      kernel/poll.o
  CC      kernel/queue.o
  CC      kernel/sched.o
  CC      kernel/sem.o
  CC      kernel/stack.o
  CC      kernel/sys_clock.o
  CC      kernel/system_work_q.o
  CC      kernel/thread.o
  CC      kernel/thread_abort.o
  CC      kernel/timer.o
  CC      kernel/work_q.o
  AR      kernel/lib.a
  CC      drivers/console/uart_console.o
  CC      drivers/console/uart_pipe.o
  LD      drivers/console/built-in.o
  CC      drivers/crc/crc16_sw.o
  LD      drivers/crc/built-in.o
  LD      drivers/display/built-in.o
  LD      drivers/ethernet/built-in.o
  CC      drivers/interrupt_controller/i8259.o
  CC      drivers/interrupt_controller/loapic_intr.o
  CC      drivers/interrupt_controller/system_apic.o
  CC      drivers/interrupt_controller/ioapic_intr.o
  LD      drivers/interrupt_controller/built-in.o
  CC      drivers/random/rand32_timestamp.o
  LD      drivers/random/built-in.o
  CC      drivers/serial/uart_ns16550.o
  LD      drivers/serial/built-in.o
  CC      drivers/slip/slip.o
  LD      drivers/slip/built-in.o
  CC      drivers/timer/hpet.o
  CC      drivers/timer/sys_clock_init.o
  LD      drivers/timer/built-in.o
  LD      drivers/built-in.o
  CC      misc/printk.o
  CC      misc/generated/configs.o
  LD      misc/generated/built-in.o
  LD      misc/built-in.o
  LD      boards/x86/qemu_x86/built-in.o
  LD      boards/built-in.o
  LD      ext/debug/built-in.o
  LD      ext/fs/built-in.o
  LD      ext/hal/built-in.o
  LD      ext/lib/crypto/built-in.o
  LD      ext/lib/built-in.o
  LD      ext/built-in.o
  LD      subsys/debug/built-in.o
  CC      subsys/logging/sys_log.o
  LD      subsys/logging/built-in.o
  CC      subsys/net/buf.o
  CC      subsys/net/ip/net_core.o
  CC      subsys/net/ip/net_if.o
  CC      subsys/net/ip/net_context.o
  CC      subsys/net/ip/net_pkt.o
  CC      subsys/net/ip/utils.o
  CC      subsys/net/ip/l2/ethernet.o
  CC      subsys/net/ip/l2/arp.o
  LD      subsys/net/ip/l2/built-in.o
  CC      subsys/net/ip/icmpv6.o
  CC      subsys/net/ip/nbr.o
  CC      subsys/net/ip/ipv6.o
  CC      subsys/net/ip/icmpv4.o
  CC      subsys/net/ip/ipv4.o
  CC      subsys/net/ip/route.o
  CC      subsys/net/ip/net_mgmt.o
  CC      subsys/net/ip/udp.o
  CC      subsys/net/ip/tcp.o
  CC      subsys/net/ip/net_shell.o
  CC      subsys/net/ip/net_stats.o
  CC      subsys/net/ip/connection.o
  LD      subsys/net/ip/built-in.o
  CC      subsys/net/lib/app/init.o
  CC      subsys/net/lib/app/client.o
  CC      subsys/net/lib/app/net_app.o
  LD      subsys/net/lib/app/built-in.o
  LD      subsys/net/lib/built-in.o
  LD      subsys/net/built-in.o
  CC      subsys/shell/shell_service.o
  CC      subsys/shell/shell.o
  LD      subsys/shell/modules/built-in.o
  LD      subsys/shell/built-in.o
  LD      subsys/built-in.o
  LD      tests/built-in.o
  LD      arch/common/built-in.o
  CC      arch/x86/core/cpuhalt.o
  CC      arch/x86/core/msr.o
  CC      arch/x86/core/irq_manage.o
  CC      arch/x86/core/sys_fatal_error_handler.o
  AS      arch/x86/core/crt0.o
  AS      arch/x86/core/cache_s.o
  CC      arch/x86/core/cache.o
  AS      arch/x86/core/excstub.o
  AS      arch/x86/core/intstub.o
  AS      arch/x86/core/swap.o
  CC      arch/x86/core/thread.o
  CC      arch/x86/core/fatal.o
  LD      arch/x86/core/built-in.o
  CC      arch/x86/soc/ia32/soc.o
  LD      arch/x86/soc/ia32/built-in.o
  LD      arch/x86/built-in.o
  LD      arch/built-in.o
  CC      src/echo-client.o
  CC      src/udp.o
  CC      src/tcp.o
  LD      src/built-in.o
  AR      libzephyr.a
  AR      libapplication.a
  LINK    zephyr.lnk
  HOSTCC  scripts/gen_idt/version.o
  HOSTCC  scripts/gen_idt/gen_idt.o
  HOSTLD  scripts/gen_idt/gen_idt
  SIDT    staticIdt.o
  BIN     zephyr.bin
To exit from QEMU enter: 'CTRL+a, x'
[QEMU] CPU: qemu32
qemu-system-i386: warning: Unknown firmware file in legacy mode: genroms/multiboot.bin

shell> [echo-client] [INF] init_app: Run echo client
[echo-client] [DBG] tcp_received: (0x00113da0): Sent 1035 bytes, received 20 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113da0): Invalid data received
[echo-client] [DBG] tcp_received: (0x00113da0): Data mismatch
[echo-client] [DBG] tcp_received: (0x00113da0): Sent 1035 bytes, received 640 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113da0): Invalid data received
[echo-client] [DBG] tcp_received: (0x00113da0): Data mismatch
[echo-client] [DBG] tcp_received: (0x00113da0): Sent 1035 bytes, received 395 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113da0): Invalid data received
[echo-client] [DBG] tcp_received: (0x00113da0): Data mismatch
[echo-client] [DBG] tcp_received: (0x00113da0): Sent 527 bytes, received 20 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113da0): Invalid data received
[echo-client] [DBG] tcp_received: (0x00113da0): Data mismatch
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 1101 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 141 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 474 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 480 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 437 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 1143 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 824 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 969 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 182 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 377 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 603 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 329 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 1149 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 1030 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 257 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 452 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 33 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 645 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 1193 bytes, all ok
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 1071 bytes, all ok
[echo-client] [DBG] tcp_received: (0x00113da0): Sent 527 bytes, received 527 bytes
[echo-client] [DBG] compare_tcp_data: (0x00113da0): Invalid data received
[echo-client] [DBG] tcp_received: (0x00113da0): Data mismatch
[echo-client] [DBG] compare_udp_data: (0x00113da0): Compared 1064 bytes, all ok
QEMU: Terminated
make[2]: Leaving directory '/home/mbolivar/src/zephyr/samples/net/echo_client/outdir/qemu_x86'
make[1]: Leaving directory '/home/mbolivar/src/zephyr'

(Imported from Jira ZEP-2380)

@zephyrbot
Copy link
Collaborator Author

by Jukka Rissanen:

#776

@zephyrbot
Copy link
Collaborator Author

by Jukka Rissanen:

Fixed by commit 7474553

@zephyrbot zephyrbot added priority: high High impact/importance bug area: Networking bug The issue is a bug, or the PR is fixing a bug labels Sep 23, 2017
@zephyrbot zephyrbot added this to the v1.9.0 milestone Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants