Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AT+BLEINIT=0 causes a reboot (CORRUPT HEAP) #887

Open
3 tasks done
JHedgesBartec opened this issue Dec 24, 2024 · 2 comments
Open
3 tasks done

AT+BLEINIT=0 causes a reboot (CORRUPT HEAP) #887

JHedgesBartec opened this issue Dec 24, 2024 · 2 comments

Comments

@JHedgesBartec
Copy link

Answers checklist

  • I have read the documentation ESP-AT Programming Guide and the issue is not addressed there.
  • I have used the latest released firmware or have updated my ESP-AT branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

AT+GMR

AT+GMR
AT version:3.5.0.0-dev(752008f - ESP32C6 - Dec 12 2024 12:47:58)
SDK version:v5.1.5-196-g64849cb703-dirty
compile time(24070dc):Dec 24 2024 09:27:20
Bin version:v4.1.0.0-dev(ESP32C6-4MB)

OK

ESP-AT Firmware Source

Built from Master 24/12/2024

Hardware Information

ESP32-C6

Power Supply used

USB

What is the expected behavior?

BLE deinits without rebooting and affecting other initialised radio (WiFi)

What is the actual behavior?

Reboots when AT+BLEINIT=0 is sent, log shows CORRUPT_HEAP and call stack before reboot.

Probability of recurrence

100%

AT+SYSRAM?

AT+SYSRAM?
+SYSRAM:186724,186260
OK

Steps to reproduce

  1. Initialise BLE (as Client)
  2. Deinit BLE

AT command port output

ATE0
ATE0

OK
AT+GMR
AT version:3.5.0.0-dev(752008f - ESP32C6 - Dec 12 2024 12:47:58)
SDK version:v5.1.5-196-g64849cb703-dirty
compile time(24070dcd):Dec 24 2024 09:27:20
Bin version:v4.1.0.0-dev(ESP32C6-4MB)

OK
AT+BLEINIT=1

OK
AT+BLEINIT=0

ready

AT log port output

(09:45:31.200) ble attribute[2] 16<CR>
(09:45:31.200) ble attribute[3] 2800<CR>
(09:45:31.200) ble attribute[7] A002<CR>
(09:45:31.233) ble attribute[2] 16<CR>
(09:45:31.233) ble attribute[3] 2803<CR>
(09:45:31.233) ble attribute[7] 02<CR>
(09:45:31.233) ble attribute[2] 16<CR>
(09:45:31.233) ble attribute[3] C300<CR>
(09:45:31.233) ble attribute[2] 16<CR>
(09:45:31.233) ble attribute[3] 2901<CR>
(09:45:31.233) ble attribute[4] 11<CR>
(09:45:31.233) ble attribute[2] 16<CR>
(09:45:31.233) ble attribute[3] 2803<CR>
(09:45:31.233) ble attribute[7] 02<CR>
(09:45:31.233) ble attribute[2] 16<CR>
(09:45:31.233) ble attribute[3] C301<CR>
(09:45:31.233) ble attribute[2] 16<CR>
(09:45:31.245) ble attribute[3] 2901<CR>
(09:45:31.245) ble attribute[4] 11<CR>
(09:45:31.245) ble attribute[2] 16<CR>
(09:45:31.245) ble attribute[3] 2803<CR>
(09:45:31.245) ble attribute[7] 08<CR>
(09:45:31.245) ble attribute[2] 16<CR>
(09:45:31.245) ble attribute[3] C302<CR>
(09:45:31.245) ble attribute[2] 16<CR>
(09:45:31.245) ble attribute[3] 2901<CR>
(09:45:31.256) ble attribute[4] 01<CR>
(09:45:31.256) ble attribute[2] 16<CR>
(09:45:31.256) ble attribute[3] 2803<CR>
(09:45:31.256) ble attribute[7] 04<CR>
(09:45:31.256) ble attribute[2] 16<CR>
(09:45:31.272) ble attribute[3] C303<CR>
(09:45:31.272) ble attribute[2] 16<CR>
(09:45:31.272) ble attribute[3] 2901<CR>
(09:45:31.272) ble attribute[4] 10<CR>
(09:45:31.272) ble attribute[2] 16<CR>
(09:45:31.272) ble attribute[3] 2803<CR>
(09:45:31.287) ble attribute[7] 08<CR>
(09:45:31.287) ble attribute[2] 16<CR>
(09:45:31.287) ble attribute[3] C304<CR>
(09:45:31.287) ble attribute[2] 16<CR>
(09:45:31.287) ble attribute[3] 2803<CR>
(09:45:31.287) ble attribute[7] 10<CR>
(09:45:31.287) ble attribute[2] 16<CR>
(09:45:31.287) ble attribute[3] C305<CR>
(09:45:31.308) ble attribute[2] 16<CR>
(09:45:31.308) ble attribute[3] 2902<CR>
(09:45:31.308) ble attribute[2] 16<CR>
(09:45:31.308) ble attribute[3] 2803<CR>
(09:45:31.308) ble attribute[7] 20<CR>
(09:45:31.308) ble attribute[2] 16<CR>
(09:45:31.308) ble attribute[3] C306<CR>
(09:45:31.308) ble attribute[2] 16<CR>
(09:45:31.308) ble attribute[3] 2902<CR>
(09:45:31.308) ble attribute[2] 16<CR>
(09:45:31.308) ble attribute[3] 2803<CR>
(09:45:31.308) ble attribute[7] 02<CR>
(09:45:31.331) ble attribute[2] 16<CR>
(09:45:31.331) ble attribute[3] C307<CR>
(09:45:31.331) ble attribute[2] 16<CR>
(09:45:31.331) ble attribute[3] 2901<CR>
(09:45:31.331) ble attribute[4] 11<CR>
(09:45:31.331) ble attribute[2] 16<CR>
(09:45:31.331) ble attribute[3] 2800<CR>
(09:45:31.331) ble attribute[7] A003<CR>
(09:45:31.331) ble attribute[2] 16<CR>
(09:45:31.331) ble attribute[3] 2803<CR>
(09:45:31.331) ble attribute[7] 02<CR>
(09:45:31.358) ble attribute[2] 16<CR>
(09:45:31.358) ble attribute[3] C400<CR>
(09:45:31.358) ble attribute[2] 16<CR>
(09:45:31.358) ble attribute[3] 2901<CR>
(09:45:31.358) ble attribute[4] 11<CR>
(09:45:31.358) ble attribute[2] 16<CR>
(09:45:31.358) ble attribute[3] 2803<CR>
(09:45:31.358) ble attribute[7] 02<CR>
(09:45:31.358) ble attribute[2] 16<CR>
(09:45:31.358) ble attribute[3] C401<CR>
(09:45:31.358) ble attribute[2] 16<CR>
(09:45:31.358) ble attribute[3] 2901<CR>
(09:45:31.358) ble attribute[4] 11<CR>
(09:45:31.358) registered service 0x1800 with handle=1
(09:45:31.385) registering characteristic 0x2a00 with def_handle=2 val_handle=3
(09:45:31.385) registering characteristic 0x2a01 with def_handle=4 val_handle=5
(09:45:31.385) registered service 0x1801 with handle=6
(09:45:31.385) registering characteristic 0x2a05 with def_handle=7 val_handle=8
(09:45:31.385) registering characteristic 0x2b3a with def_handle=10 val_handle=11
(09:45:31.412) registering characteristic 0x2b29 with def_handle=12 val_handle=13
(09:45:31.412) registered service 0xa002 with handle=14
(09:45:31.412) registering characteristic 0xc300 with def_handle=15 val_handle=16
(09:45:31.412) registering descriptor 0x2901 with handle=17
(09:45:31.412) registering characteristic 0xc301 with def_handle=18 val_handle=19
(09:45:31.412) registering descriptor 0x2901 with handle=20
(09:45:31.440) registering characteristic 0xc302 with def_handle=21 val_handle=22
(09:45:31.440) registering descriptor 0x2901 with handle=23
(09:45:31.440) registering characteristic 0xc303 with def_handle=24 val_handle=25
(09:45:31.440) registering descriptor 0x2901 with handle=26
(09:45:31.440) registering characteristic 0xc304 with def_handle=27 val_handle=28
(09:45:31.464) registering characteristic 0xc305 with def_handle=29 val_handle=30
(09:45:31.464) registering characteristic 0xc306 with def_handle=32 val_handle=33
(09:45:31.464) registering characteristic 0xc307 with def_handle=35 val_handle=36
(09:45:31.464) registering descriptor 0x2901 with handle=37
(09:45:31.485) registered service 0xa003 with handle=38
(09:45:31.485) registering characteristic 0xc400 with def_handle=39 val_handle=40
(09:45:31.485) registering descriptor 0x2901 with handle=41
(09:45:31.485) registering characteristic 0xc401 with def_handle=42 val_handle=43
(09:45:31.485) registering descriptor 0x2901 with handle=44
(09:45:31.517) reset reason=0
(09:45:44.485) CORRUPT HEAP: multi_heap.c:61 detected at 0x4082eb14
(09:45:44.485) 
(09:45:44.534) abort() was called at PC 0x400281b5 on core 0
(09:45:44.534) Core  0 register dump:
(09:45:44.557) MEPC    : 0x4080066a  RA      : 0x4080f9c8  SP      : 0x40844530  GP      : 0x4081dec4  
(09:45:44.557) TP      : 0x40819b50  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130  
(09:45:44.557) S0/FP   : 0x00000004  S1      : 0x40844594  A0      : 0x4084455c  A1      : 0x40844592  
(09:45:44.580) A2      : 0x00000000  A3      : 0x40844589  A4      : 0x00000001  A5      : 0x4082c000  
(09:45:44.580) A6      : 0x00000000  A7      : 0x76757473  S2      : 0x40850bb8  S3      : 0x40850c0c  
(09:45:44.580) S4      : 0x00000000  S5      : 0x00000000  S6      : 0x00000000  S7      : 0x00000000  
(09:45:44.603) S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
(09:45:44.603) T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938  
(09:45:44.603) MSTATUS : 0x00001881  MTVEC   : 0x40800001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000  
(09:45:44.626) MHARTID : 0x00000000  
(09:45:44.626) 
(09:45:44.626) Stack memory:
(09:45:44.626) 40844530: 0x408121c0 0x4002247c 0x40844590 0x40813dca 0x00000000 0x00000000 0x00000000 0x40820e34
(09:45:44.626) 40844550: 0x40844594 0x40820e50 0x40844590 0x726f6261 0x20292874 0x20736177 0x6c6c6163 0x61206465
(09:45:44.647) 40844570: 0x43502074 0x34783020 0x38323030 0x20356231 0x63206e6f 0x2065726f 0x00000030 0x40840000
(09:45:44.647) 40844590: 0x00000030 0x32303034 0x35623138 0x40022300 0x00000000 0x4082eb14 0x4082eb00 0x400281b8
(09:45:44.647) 408445b0: 0x40850bb8 0x4082eb14 0x4082eb00 0x400223c4 0x00000000 0x00000000 0x00000000 0x4082eb0c
(09:45:44.668) 408445d0: 0x40850bb8 0x4082eb14 0x4082eb00 0x40022590 0x40850bb8 0x4084f7c8 0x40850aa8 0x40800c50
(09:45:44.668) 408445f0: 0x00000000 0x00000000 0x4085099c 0x40813f66 0x00000000 0x00000003 0x00000000 0x42021fe0
(09:45:44.697) 40844610: 0x00000000 0x00000003 0x00000000 0x00000000 0x00000000 0x00000003 0x00000000 0x42026584
(09:45:44.697) 40844630: 0x00000000 0x00000000 0x00000000 0x42026bfe 0x00000000 0x00000000 0x00000001 0x42026c5c
(09:45:44.697) 40844650: 0x00000000 0x4082c000 0x00000000 0x00000000 0x00000000 0x00000000 0x40845a0e 0x420115b2
(09:45:44.697) 40844670: 0x00000000 0x00000000 0x00000000 0x4202b5d0 0x00000000 0x00000000 0x00000000 0x00000000
(09:45:44.719) 40844690: 0x00000000 0x014c0000 0x408459c4 0x000047cc 0x00000000 0x00000000 0x00000000 0x4080fd56
(09:45:44.719) 408446b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
(09:45:44.742) 408446d0: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x00000154 0x40844530
(09:45:44.742) 408446f0: 0x00004895 0x40821948 0x40821948 0x408446ec 0x40821940 0x00000015 0x40842dcc 0x40842dcc
(09:45:44.742) 40844710: 0x408446ec 0x00000000 0x00000004 0x40842ee8 0x705f7461 0x65636f72 0x745f7373 0x006b7361
(09:45:44.762) 40844730: 0x00000000 0x408446e0 0x00000004 0x00000000 0x00000000 0x00000000 0x00000000 0x4082f484
(09:45:44.762) 40844750: 0x4082f4ec 0x4082f554 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000
(09:45:44.782) 40844770: 0x4213f9d8 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
(09:45:44.782) 40844790: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
(09:45:44.805) 408447b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
(09:45:44.805) 408447d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
(09:45:44.805) 408447f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
(09:45:44.827) 40844810: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
(09:45:44.827) 40844830: 0x00000000 0x00000000 0x00000000 0x40000000 0x00000108 0x40844898 0x408448c8 0x4084494c
(09:45:44.854) 40844850: 0x408448bc 0x00000000 0x4084485c 0xffffffff 0x4084485c 0x4084485c 0x00000000 0x40844870
(09:45:44.854) 40844870: 0xffffffff 0x40844870 0x40844870 0x00000000 0x0000000f 0x0000000c 0xf000ffff 0x40844aa4
(09:45:44.854) 40844890: 0xb33fffff 0x00000000 0x00060005 0x00000000 0x00000e63 0x00080005 0x00000000 0x00000fcd
(09:45:44.854) 408448b0: 0x000e0005 0x00000000 0x0000149e 0x000e0005 0x00000000 0x000047cc 0xc0bf7a3d 0x227640c6
(09:45:44.876) 408448d0: 0x43e86a11 0xbb7af2fd 0x20008102 0x988bd6c2 0xf2da775b 0x07351b11 0x6f6ffe6b 0xb9168786
(09:45:44.876) 408448f0: 0x50559042 0x9f1c99c4 0x944960a9 0xfd76fdee 0xf6726e5a 0x59878111 0xa6d8cf3f 0xf4668c11
(09:45:44.896) 40844910: 0x3a015206 0xeaf7febc 0xa41a0690 0xddbb39db 0x3e33fb37 0x6a0209d2 0x6bbd80f5 0x6033b302
(09:45:44.896) 
(09:45:44.896) 
(09:45:44.896) 
(09:45:44.896) ELF file SHA256: 52549cdb77a2f3dd
(09:45:44.896) 
(09:45:44.896) Rebooting...
(09:45:44.896) ESP-ROM:esp32c6-20220919
(09:45:44.916) Build:Sep 19 2022
(09:45:44.916) rst:0xc (SW_CPU),boot:0xc (SPI_FAST_FLASH_BOOT)
(09:45:44.916) Saved PC:0x4001975a
(09:45:44.916) SPIWP:0xee
(09:45:44.916) mode:DIO, clock div:2
(09:45:44.916) load:0x4086c410,len:0xd70
(09:45:44.916) load:0x4086e610,len:0x2ea8
(09:45:44.939) load:0x40875728,len:0x17e8
(09:45:44.939) SHA-256 comparison failed:
(09:45:44.939) Calculated: 48bd2e107550a6f9135ddc96a68f2315cc2f98538890a74cd24fe9b2a5cd2522
(09:45:44.939) Expected: 00e4f7089576f3b4fda127249c8b642e7633622dd4ed23832b1a89768f5591ea
(09:45:44.939) Attempting to boot anyway...
(09:45:44.939) entry 0x4086c410
(09:45:44.939) <ESC>[0;32mI (45) boot: ESP-IDF v5.1.5-196-g64849cb703-dirty 2nd stage bootloader<ESC>[0m
(09:45:44.960) <ESC>[0;32mI (46) boot: compile time Dec 24 2024 09:27:01<ESC>[0m
(09:45:44.960) <ESC>[0;32mI (47) boot: chip revision: v0.0<ESC>[0m
(09:45:44.960) <ESC>[0;32mI (50) boot.esp32c6: SPI Speed      : 80MHz<ESC>[0m
(09:45:44.987) <ESC>[0;32mI (55) boot.esp32c6: SPI Mode       : DIO<ESC>[0m
(09:45:44.987) <ESC>[0;32mI (59) boot.esp32c6: SPI Flash Size : 8MB<ESC>[0m
(09:45:44.987) <ESC>[0;32mI (64) boot: Enabling RNG early entropy source...<ESC>[0m
(09:45:44.987) <ESC>[0;32mI (70) boot: Partition Table:<ESC>[0m
(09:45:44.987) <ESC>[0;32mI (73) boot: ## Label            Usage          Type ST Offset   Length<ESC>[0m
(09:45:44.987) <ESC>[0;32mI (80) boot:  0 otadata          OTA data         01 00 0000d000 00002000<ESC>[0m
(09:45:45.010) <ESC>[0;32mI (88) boot:  1 phy_init         RF data          01 01 0000f000 00001000<ESC>[0m
(09:45:45.010) <ESC>[0;32mI (95) boot:  2 nvs              WiFi data        01 02 00010000 0000e000<ESC>[0m
(09:45:45.010) <ESC>[0;32mI (103) boot:  3 at_customize     unknown          40 00 0001e000 00042000<ESC>[0m
(09:45:45.037) <ESC>[0;32mI (110) boot:  4 ota_0            OTA app          00 10 00060000 001d0000<ESC>[0m
(09:45:45.037) <ESC>[0;32mI (118) boot:  5 ota_1            OTA app          00 11 00230000 001d0000<ESC>[0m
(09:45:45.037) <ESC>[0;32mI (126) boot: End of partition table<ESC>[0m
(09:45:45.037) <ESC>[0;32mI (130) esp_image: segment 0: paddr=00060020 vaddr=42160020 size=2b3a8h (177064) map<ESC>[0m
(09:45:45.113) <ESC>[0;32mI (210) esp_image: segment 1: paddr=0008b3d0 vaddr=40800000 size=04c48h ( 19528) load<ESC>[0m
(09:45:45.113) <ESC>[0;32mI (220) esp_image: segment 2: paddr=00090020 vaddr=42000020 size=151cbch (1383612) map<ESC>[0m
(09:45:45.670) <ESC>[0;32mI (776) esp_image: segment 3: paddr=001e1ce4 vaddr=40804c48 size=18a6ch (100972) load<ESC>[0m
(09:45:45.717) <ESC>[0;32mI (823) esp_image: segment 4: paddr=001fa758 vaddr=4081d6c0 size=0402ch ( 16428) load<ESC>[0m
(09:45:45.742) <ESC>[0;32mI (832) esp_image: segment 5: paddr=001fe78c vaddr=50000000 size=00068h (   104) load<ESC>[0m
(09:45:45.742) <ESC>[0;32mI (846) boot: Loaded app from partition at offset 0x60000<ESC>[0m
(09:45:45.747) <ESC>[0;32mI (847) boot: Disabling RNG early entropy source...<ESC>[0m
(09:45:46.186) no external 32k oscillator, disable it now.<CR>
(09:45:46.222) at param mode: 1<CR>
(09:45:46.281) AT cmd port:uart1 tx:7 rx:6 cts:5 rts:4 baudrate:115200<CR>
(09:45:46.281) module_name: ESP32C6-4MB<CR>
(09:45:46.310) max tx power=78, ret=0<CR>
(09:45:46.310) v4.1.0.0-dev (unknown)<CR>

More Information.

No response

@JHedgesBartec
Copy link
Author

@ustccw @Luxin812 is it possible for this to be fixed ahead of the planned January/February release?

@ustccw
Copy link
Collaborator

ustccw commented Dec 25, 2024

yes. we are testing new version for esp32,esp32c2,esp32c3,esp32c6. it should get fixed in new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants