buglwIP - A Lightweight TCP/IP stack - Bugs: bug #63554, httpc_get_file_dns causes hard...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #63554: httpc_get_file_dns causes hard fault in tcp_input on RPi Pico W

Submitter:  Zhang Maiyun <myzhang1029>
Submitted:  Wed 21 Dec 2022 01:33:14 AM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  git head

Wed 21 Dec 2022 01:33:14 AM UTC, original submission:  

When I use httpc_get_file_dns to GET the host dyn.dns.he.net on a Raspberry Pi Pico,
the device enters a hard fault and hangs. It seems that the error corrupts the stack
because gdb is unable to produce a proper unwinding (through the JTAG/SWD interface).
I was able to reliable reproduce the hang on a second RPi Pico W with a GET request to
any paths, as long as they use the host dyn.dns.he.net. Other hosts, like bing.com or
example.com, succeed without any problem.

By using print-debugging, I was able to narrow down the hang to line 568 in
src/core/tcp_in.c:

if (inseg.p != NULL) {


Attached are the source files of a minimal example (also available at
https://github.com/myzhang1029/codes/tree/main/rpi-pico/2022_lwip_httpc_bug_reprex).

Zhang Maiyun <myzhang1029>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #54131:  reprex.c added by myzhang1029 (1KiB - application/octet-stream)
file #54132:  lwipopts.h added by myzhang1029 (5KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by myzhang1029 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-12-21 myzhang1029 Attached File- Added reprex.c, #54131
        Attached File- Added lwipopts.h, #54132

    Back to the top

    Powered by Savane 3.12