Skip to content

ESP32-S3 Ctrl-D caused hard crash after get message is sent to adafruit_requests object unless _free_sockets() is called  #6502

Closed
@RetiredWizard

Description

@RetiredWizard

CircuitPython version

Adafruit CircuitPython 7.3.0-dirty on 2022-06-19; FeatherS3 with ESP32S3
Adafruit CircuitPython 7.3.0-dirty on 2022-06-19; ESP32-S3-DevKitC-1-N8R2 with ESP32S3
Adafruit CircuitPython 8.0.0-alpha.1-13-gd0953e8f8 on 2022-06-19; FeatherS3 with ESP32S3

Code/REPL

import ssl,wifi,socketpool
import adafruit_requests as requests
from secrets import secrets
wifi.radio.connect(secrets["ssid"], secrets["password"])
socket = socketpool.SocketPool(wifi.radio)
https = requests.Session(socket, ssl.create_default_context())
TEXT_URL = "https://finance.yahoo.com/quote/%5EIXIC"
response = https.get(TEXT_URL)

Behavior

The code runs fine, you can even continue to use the response object, the following instruction will print the next 32 bytes of the stream:

    print(next(iter(response.iter_content(chunk_size=32))))

but after the .get message has been sent, unless https._free_sockets() is called, the next Ctrl-D causes the board to crash into safe mode. On the Devkit, the following is displayed over the UART connection:

  ESP-ROM:esp32s3-20210327
  Build:Mar 27 2021
  rst:0xc (RTC_SW_CPU_RST),boot:0x2a (SPI_FAST_FLASH_BOOT)
  Saved PC:0x421093ba
  SPIWP:0xee
  mode:DIO, clock div:2
  load:0x3fcd0108,len:0x132c
  load:0x403b6000,len:0xb80
  load:0x403ba000,len:0x2ea8
  entry 0x403b6238

Description

No response

Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions