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:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  2.2.1
lwIP version:  git head

Wed 04 Oct 2023 08:27:49 PM UTC, comment #2: 

Improved the HTTP client: without the 'settings' parameter, the caller only gets the HTTP body without knowing if the server sent SUCCESS (200) or any error. The code now returns with an error when the 'settings' parameter is NULL.

Fixed, thanks for reporting!

Simon Goldschmidt <goldsimon>
Group administrator
Wed 04 Oct 2023 06:44:29 AM UTC, comment #1: 

Passing NULL for the 'settings' parameter is not supported. I'll add a check for that.

Simon Goldschmidt <goldsimon>
Group administrator
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 goldsimon (Posted a comment)
  • -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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-04 goldsimon StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2023-10-04 goldsimon StatusNone In Progress
        Assigned toNone goldsimon
        Planned ReleaseNone 2.2.1
    2022-12-21 myzhang1029 Attached File- Added reprex.c, #54131
        Attached File- Added lwipopts.h, #54132

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code