Compiler segmentation fault when upgrading ESPHome from 2023.10.3 to 2023.12.5

When upgrading from 2023.10.3 to 2023.12.5 I get failures from 5 of 8 devices.

INFO ESPHome 2023.12.5
INFO Reading configuration /config/esphome/wz.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing wz (board: esp01_1m; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
Compiling .pioenvs/wz/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/wz/src/esphome/components/api/list_entities.cpp.o
Compiling .pioenvs/wz/src/esphome/components/api/proto.cpp.o
Compiling .pioenvs/wz/src/esphome/components/api/subscribe_state.cpp.o
Compiling .pioenvs/wz/src/esphome/components/api/user_services.cpp.o
Compiling .pioenvs/wz/src/esphome/components/captive_portal/captive_portal.cpp.o
Compiling .pioenvs/wz/src/esphome/components/dallas/dallas_component.cpp.o
Compiling .pioenvs/wz/src/esphome/components/dallas/esp_one_wire.cpp.o
Compiling .pioenvs/wz/src/esphome/components/esp8266/core.cpp.o
Compiling .pioenvs/wz/src/esphome/components/esp8266/gpio.cpp.o
Compiling .pioenvs/wz/src/esphome/components/esp8266/preferences.cpp.o
Compiling .pioenvs/wz/src/esphome/components/logger/logger.cpp.o
Compiling .pioenvs/wz/src/esphome/components/md5/md5.cpp.o
Compiling .pioenvs/wz/src/esphome/components/mdns/mdns_component.cpp.o
Compiling .pioenvs/wz/src/esphome/components/mdns/mdns_esp32.cpp.o
Compiling .pioenvs/wz/src/esphome/components/mdns/mdns_esp8266.cpp.o
during IPA pass: visibility
src/esphome/components/mdns/mdns_esp8266.cpp:46:1: internal compiler error: Segmentation fault
   46 | }  // namespace esphome
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
*** [.pioenvs/wz/src/esphome/components/mdns/mdns_esp8266.cpp.o] Error 1
========================= [FAILED] Took 12.09 seconds =========================
1 Like

Each of the failing compiles abended in very different stages of the compile process, i.e. when compiling different modules. The errors did not always show as “segmentation fault” but also as “internal compiler error”.

After several attempts (2 to 5, depending on device) I was able to “fix” every device. The problem has been resolved so far as all my devices work for now. Nevertheless, it would be good to have an explanation for the compile errors.

What platform are you running ESPHome on?