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

samples: http_get: cannot run on QEMU #39627

Closed
gopiotr opened this issue Oct 21, 2021 · 1 comment · Fixed by #39787
Closed

samples: http_get: cannot run on QEMU #39627

gopiotr opened this issue Oct 21, 2021 · 1 comment · Fixed by #39787
Assignees
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@gopiotr
Copy link
Collaborator

gopiotr commented Oct 21, 2021

Describe the bug
After build samples/net/sockets/http_get/ for QEMU and run it, program finish with FATAL ERROR.

To Reproduce
Steps to reproduce the behavior:

  1. Run in separate terminals two programs: ./loop-socat.sh and sudo ./loop-slip-tap.sh from net-tools repository (https://github.com/zephyrproject-rtos/net-tools)
  2. In third terminal build samples/net/sockets/http_get/ for QEMU by command:
    west build -p always -b qemu_x86 samples/net/sockets/http_get/
  3. Run sample by command:
    west build -t run
  4. observe errors

Expected behavior
Program should send http GET request and print response.

Impact
Cannot run samples on QEMU, which require access to Internet

Logs and console output

-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: qemu32,+nx,+pae
SeaBIOS (version zephyr-v1.0.0-0-g31d4e0e-dirty-20200714_234759-fv-az50-zephyr)
Booting from ROM..*** Booting Zephyr OS build v2.7.99-611-g9cb94df57a94 ***
Preparing HTTP GET request for http://google.com:80/
[00:00:00.020,000] <inf> net_config: Initializing network
[00:00:00.030,000] <inf> net_config: IPv4 address: 192.0.2.1
[00:00:00.030,000] <err> os: Page fault at address 0x24717e (error code 0x10)
[00:00:00.030,000] <err> os: Linear address not present in page tables
[00:00:00.030,000] <err> os: Access violation: supervisor thread not allowed to execute
[00:00:00.030,000] <err> os: PTE: not present
[00:00:00.030,000] <err> os: EAX: 0x00000000, EBX: 0x00000000, ECX: 0x00000000, EDX: 0x00127500
[00:00:00.030,000] <err> os: ESI: 0x00000000, EDI: 0x0010bfdc, EBP: 0x0012fa7c, ESP: 0x0012fa6c
[00:00:00.030,000] <err> os: EFLAGS: 0x00000202 CS: 0x0008 CR3: 0x00137000
[00:00:00.030,000] <err> os: call trace:
[00:00:00.030,000] <err> os: EIP: 0x0024717e
[00:00:00.030,000] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
[00:00:00.030,000] <err> os: Current thread: 0x1284c0 (unknown)
[00:00:00.040,000] <err> os: Halting system
FAILED: zephyr/CMakeFiles/run /home/redbeard/zephyrproject/zephyr/build/zephyr/CMakeFiles/run
cd /home/redbeard/zephyrproject/zephyr/build && /home/redbeard/zephyr-sdk-0.13.1/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-i386 -m 4 -cpu qemu32,+nx,+pae -device isa-debug-exit,iobase=0xf4,iosize=0x04 -no-reboot -nographic -no-acpi -net none -pidfile qemu.pid -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -serial unix:/tmp/slip.sock -kernel /home/redbeard/zephyrproject/zephyr/build/zephyr/zephyr.elf
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/redbeard/zephyrproject/zephyr/build --target run

Environment (please complete the following information):

  • Linux (Ubuntu 20.04.3 LTS)
  • Toolchain - Zephyr SDK
  • Zephyr v2.7.99
@gopiotr gopiotr added the bug The issue is a bug, or the PR is fixing a bug label Oct 21, 2021
@gopiotr
Copy link
Collaborator Author

gopiotr commented Oct 21, 2021

I checked that on Zephyr v2.6.99 this sample works properly.

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: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants