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

Example http2_request doesn't work #1874

Closed
redchenjs opened this issue Apr 19, 2018 · 3 comments
Closed

Example http2_request doesn't work #1874

redchenjs opened this issue Apr 19, 2018 · 3 comments

Comments

@redchenjs
Copy link
Contributor

Environment

  • Core: ESP32
  • IDF version: fe907bd(master)
  • Development Env: Make
  • Operating System: Deepin
  • Power Supply: USB

Problem Description

When I use the master branch of esp-idf, example http2_request cause core panic and not usable, I found hd->hostname was NULL in sh2lib.c, so maybe there need to be a fix to make the example code work properly?

Steps to reproduce

  1. step1 Set WiFi configuration via 'make menuconfig'.
  2. step2 'make flash monitor'.

Debug Logs

I (3624) event: sta ip: 192.168.43.251, mask: 255.255.255.0, gw: 192.168.43.1
I (3624) http2-req: SYSTEM_EVENT_STA_GOT_IP
I (3624) http2-req: got ip:192.168.43.251

Connecting to server
Connection done
Guru Meditation Error: Core  1 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 1 register dump:
PC      : 0x400014fd  PS      : 0x00060530  A0      : 0x800e2afb  A1      : 0x3ffce220  
A2      : 0x00000000  A3      : 0xfffffffc  A4      : 0x000000ff  A5      : 0x0000ff00  
A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000000  A9      : 0x3ffce220  
A10     : 0x3ffae930  A11     : 0x3f40311c  A12     : 0x3ffce250  A13     : 0x3ffae8d8  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000010  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  

Backtrace: 0x400014fd:0x3ffce220 0x400e2af8:0x3ffce230 0x400d26cf:0x3ffce2a0
0x400e2af8: sh2lib_do_get at /home/redchenjs/workspace/esp32/test/http2_request/components/sh2lib/sh2lib.c:353

0x400d26cf: http2_task at /home/redchenjs/workspace/esp32/test/http2_request/main/http2_request_example_main.c:133


Rebooting...
@negativekelvin
Copy link
Contributor

@redchenjs
Copy link
Contributor Author

I added hd->hostname = strdup("xxxx"); to sh2lib_connect() function, but the example is still not working, the log always shows E (17193) sh2lib: [sh2-execute] HTTP2 session recv failed -507.

Debug Logs

I (13103) event: sta ip: 192.168.43.251, mask: 255.255.255.0, gw: 192.168.43.1
I (13103) http2-req: SYSTEM_EVENT_STA_GOT_IP
I (13103) http2-req: got ip:192.168.43.251

Connecting to server
Connection done
[data-prvd] Sending 11 bytes
E (17193) sh2lib: [sh2-execute] HTTP2 session recv failed -507
Error in send/receive
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction)
. Exception was unhandled.
Core 0 register dump:
PC      : 0x400d26fd  PS      : 0x00060830  A0      : 0x00000000  A1      : 0x3ffce2a0  
0x400d26fd: http2_task at /home/redchenjs/workspace/esp32/test/http2_request/main/http2_request_example_main.c:147

A2      : 0x00000000  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00000000  
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x800d26fd  A9      : 0x3ffce280  
A10     : 0x3ffce2a0  A11     : 0x00000000  A12     : 0x3ffb106c  A13     : 0x400d2618  
0x400d2618: handle_echo_response at /home/redchenjs/workspace/esp32/test/http2_request/main/http2_request_example_main.c:69

A14     : 0x00000000  A15     : 0x00000005  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff  

Backtrace: 0x400d26fd:0x3ffce2a0 0x7ffffffd:0x3ffce2d0
0x400d26fd: http2_task at /home/redchenjs/workspace/esp32/test/http2_request/main/http2_request_example_main.c:147


Rebooting...

@jitin17
Copy link
Contributor

jitin17 commented Apr 20, 2018

@redchenjs I am working on this issue, will try to resolve it ASAP.

@igrr igrr closed this as completed in d57495c Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants