Skip to content

Berry crash on ESP32 with short oneliner #24602

@sfromis

Description

@sfromis

PROBLEM DESCRIPTION

Running this command with a Berry one-liner in the console crashes Tasmota
Br import math var u1 if 1.1==0 var u2=1 end

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in discussions
  • Searched the problem in the docs
  • Searched the problem in the chat
  • Problem is not scripter related, in this case open a discussion and tag gemu2015
  • Device used (e.g., Sonoff Basic): ESP32-D0WD-V3 v3.0 dev board
  • Tasmota binary firmware version number used: 15.3.0.3(f56d12b-tasmota32)-3.3.7(2026-03-30T10:14:45)
    • Pre-compiled
    • Self-compiled
  • Flashing tools used: esptool.py
  • Provide the output of command: Backlog Template; Module; GPIO 255:
  Configuration output here:
(Default config after flashing)
14:07:35.365 CMD: Backlog Template; Module; GPIO 255
14:07:35.365 SRC: Serial
14:07:35.366 CMD: Grp 0, Cmd 'BACKLOG', Idx 1, Len 26, Pld -99, Data 'Template; Module; GPIO 255'
14:07:35.415 SRC: Backlog
14:07:35.415 CMD: Grp 0, Cmd 'TEMPLATE', Idx 1, Len 0, Pld -99, Data ''
14:07:35.419 RSL: RESULT = {"NAME":"ESP32-DevKit","ARCH":"ESP32","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1}
14:07:35.665 SRC: Backlog
14:07:35.666 CMD: Grp 0, Cmd 'MODULE', Idx 1, Len 0, Pld -99, Data ''
14:07:35.667 RSL: RESULT = {"Module":{"1":"ESP32-DevKit"}}
14:07:35.915 SRC: Backlog
14:07:35.916 CMD: Grp 0, Cmd 'GPIO', Idx 1, Len 3, Pld 255, Data '255'
14:07:35.922 RSL: RESULT = {"GPIO0":{"None":0},"GPIO1":{"None":0},"GPIO2":{"None":0},"GPIO3":{"None":0},"GPIO4":{"None":0},"GPIO5":{"None":0},"GPIO6":{"None":0},"GPIO7":{"None":0},"GPIO8":{"None":0},"GPIO9":{"None":0},"GPIO10":{"None":0},"GPIO11":{"None":0},"GPIO12":{"None":0},"GPIO13":{"None":0},"GPIO14":{"None":0},"GPIO15":{"None":0},"GPIO16":{"None":0},"GPIO17":{"None":0},"GPIO18":{"None":0},"GPIO19":{"None":0},"GPIO20":{"None":0},"GPIO21":{"None":0},"GPIO22":{"None":0},"GPIO23":{"None":0},"GPIO24":{"None":0},"GPIO25":{"None":0},"GPIO26":{"None":0},"GPIO27":{"None":0},"GPIO32":{"None":0},"GPIO33":{"None":0},"GPIO34":{"None":0},"GPIO35":{"None":0},"GPIO36":{"None":0},"GPIO37":{"None":0},"GPIO38":{"None":0},"GPIO39":{"None":0}}

  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  No rules

  • Provide the output of this command: Status 0:
  STATUS 0 output here:
14:08:14.903 CMD: status 0
14:08:14.904 SRC: Serial
14:08:14.904 CMD: Grp 0, Cmd 'STATUS', Idx 1, Len 1, Pld 0, Data '0'
14:08:14.907 RSL: STATUS = {"Status":{"Module":1,"DeviceName":"xxxxx","FriendlyName":["xxxxx"],"Topic":"tasmota_xxxxxx","ButtonTopic":"0","Power":"0","PowerLock":"0","PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}}
14:08:14.953 RSL: STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"xxxxx","OtaUrl":"http://ota.tasmota.com/tasmota32/tasmota32.bin","RestartReason":"Software reset CPU","Uptime":"0T00:04:01","StartupUTC":"2026-03-30T13:04:13","Sleep":50,"CfgHolder":4617,"BootCount":99,"BCResetTime":"2025-12-09T18:39:36","SaveCount":99}}
14:08:14.977 RSL: STATUS2 = {"StatusFWR":{"Version":"15.3.0.3(f56d12b-tasmota32)","BuildDateTime":"2026-03-30T10:14:45","Core":"3.3.7","SDK":"5.3.4.260127","CpuFrequency":160,"Hardware":"ESP32-D0WD-V3 v3.0","CR":"404/699"}}
14:08:15.001 RSL: STATUS3 = {"StatusLOG":{"SerialLog":4,"WebLog":4,"MqttLog":0,"FileLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["xxxxx",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C80001000600003C5A0A192800000000","00000080","00006000","00004000","00000000"]}}
14:08:15.035 RSL: STATUS4 = {"StatusMEM":{"ProgramSize":2070,"Free":809,"Heap":121,"StackLowMark":3,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashChipId":"1640EF","FlashFrequency":80,"FlashMode":"DIO","Features":["0809","9F9AD7DF","0015A001","B7F7BFCF","05DA9BC4","E0360DC7","480840D2","20200000","D4BC482D","810A80F1","00200814"],"Drivers":"1,2,!3,!4,!5,7,!8,9,10,11,12,!14,!16,!17,!20,!21,!24,26,!27,29,!34,!35,38,50,52,!59,!60,62,!63,!66,!67,!68,!73,!75,82,!86,!87,!88,!91,!121","Sensors":"1,2,3,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,26,31,34,37,39,40,42,43,45,51,52,55,56,58,59,64,66,67,74,85,92,95,98,103,105,109,119,127","I2CDriver":"7,8,9,10,11,12,13,14,15,17,18,20,24,29,31,36,41,42,44,46,48,58,62,65,69,76,77,82,89,97"}}
14:08:15.103 RSL: STATUS5 = {"StatusNET":{"Hostname":"tasmota-xxxxxx-xxxx","IPAddress":"192.168.xx.xx","Gateway":"192.168.xx.xx","Subnetmask":"255.255.254.0","DNSServer1":"192.168.xx.xx","DNSServer2":"0.0.0.0","Mac":"xx:xx:xx:xx:xx:xx","IP6Global":"xxxx:::::::xxxx","IP6Local":"fe80::xxxx:xxxx:xxxx:xxxx%st2","Ethernet":{"Hostname":"","IPAddress":"0.0.0.0","Gateway":"0.0.0.0","Subnetmask":"0.0.0.0","DNSServer1":"192.168.xx.xx","DNSServer2":"0.0.0.0","Mac":"xx:xx:xx:xx:xx:xx","IP6Global":"","IP6Local":""},"Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":16.0}}
14:08:15.148 RSL: STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_xxxxxx","MqttUser":"DVES_USER","MqttCount":0,"MqttTLS":0,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}}
14:08:15.183 RSL: STATUS7 = {"StatusTIM":{"UTC":"2026-03-30T13:08:15Z","Local":"2026-03-30T14:08:15","StartDST":"2026-03-29T02:00:00","EndDST":"2026-10-25T03:00:00","Timezone":"+01:00","Sunrise":"06:31","Sunset":"19:17"}}
14:08:15.198 RSL: STATUS10 = {"StatusSNS":{"Time":"2026-03-30T14:08:15"}}
14:08:15.214 RSL: STATUS11 = {"StatusSTS":{"Time":"2026-03-30T14:08:15","Uptime":"0T00:04:02","UptimeSec":242,"Heap":123,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"Berry":{"HeapUsed":4,"Objects":50},"Wifi":{"AP":1,"SSId":"xxxxx","BSSId":"xx:xx:xx:xx:xx:xx","Channel":1,"Mode":"HT20","RSSI":100,"Signal":-37,"LinkCount":1,"Downtime":"0T00:00:03"},"Hostname":"tasmota-xxxxxx-xxxx","IPAddress":"192.168.xx.xx"}}

  • Set weblog to 4 and then, when you experience your issue, provide the output of the Console log:
  Console output here:
14:10:35.601 CMD: Br  import math  var u1  if 1.1==0  var u2=1  end
14:10:35.602 SRC: Serial
14:10:35.603 CMD: Grp 0, Cmd 'BR', Idx 1, Len 45, Pld -99, Data 'import math  var u1  if 1.1==0  var u2=1  end'
Guru Meditation Error: Core  1 panic'ed (LoadStoreError). Exception was unhandled.

Core  1 register dump:
PC      : 0x4015f358  PS      : 0x00060930  A0      : 0x80161885  A1      : 0x3ffd26b0  
A2      : 0x3ffd3f7c  A3      : 0x40097424  A4      : 0x4009742c  A5      : 0x3ffd44c8  
A6      : 0x00000001  A7      : 0x3ffd3f7c  A8      : 0x00000002  A9      : 0x00000001  
A10     : 0x3ffd3f7c  A11     : 0x00000001  A12     : 0x00000002  A13     : 0x40097424  
A14     : 0x4009742c  A15     : 0x00000000  SAR     : 0x0000001b  EXCCAUSE: 0x00000003  
EXCVADDR: 0x40097424  LBEG    : 0x4008d685  LEND    : 0x4008d6a9  LCOUNT  : 0x8015f530  

Backtrace: 0x4015f355:0x3ffd26b0 0x40161882:0x3ffd26d0 0x40166ac3:0x3ffd27f0 0x4015787c:0x3ffd2810 0x40158ca4:0x3ffd2830 0x40158e15:0x3ffd28b0 0x4011696e:0x3ffd28f0 0x400d4bf6:0x3ffd2970 0x40118cbf:0x3ffd29a0 0x4013ffaa:0x3ffd29c0 0x400d9864:0x3ffd29e0 0x400d9a18:0x3ffd2ae0 0x400db309:0x3ffd2b50 0x4017a243:0x3ffd2bc0

ELF file SHA256: 312e550e0

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:268
ho 0 tail 12 room 4
load:0x40078000,len:13264
load:0x40080400,len:4
load:0x40080404,len:2928
entry 0x4008055c

00:00:00.002 HDW: ESP32-D0WD-V3 v3.0 

TO REPRODUCE

Issue same Berry oneliner again. Does not depend on config or what else is going on.

EXPECTED BEHAVIOUR

{"Br":"nil"} indicating successful execution without output.

SCREENSHOTS

N/A

ADDITIONAL CONTEXT

I'm seeing this on ESP32 and ESP32-S2, but not on ESP32-S3 and ESP32-C3
Issue was first seen by @ullix in this thread - and mentioned to @s-hadinger #24524 (comment)
Test case above is a simplified version of the one from that thread, and it does no longer fail if removing any bits.

Tasmota binary and map is:
https://github.com/tasmota/install/releases/download/2026-03-30.d.f56d12b1bfb19c6fbb020d64003aa4be62b0140a/tasmota32.bin
https://github.com/tasmota/install/releases/download/2026-03-30.d.f56d12b1bfb19c6fbb020d64003aa4be62b0140a/tasmota32.factory.bin
https://github.com/tasmota/install/releases/download/2026-03-30.d.f56d12b1bfb19c6fbb020d64003aa4be62b0140a/tasmota32.map.gz

Not sure if it is Tasmota-specific, or more general for Berry, but since it depends on what ESP32 variant is used, I guess that it could be Tasmota-related.

(Please, remember to close the issue when the problem has been addressed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions