Hi folks,
I kind of liked having the log level default set to Info earlier, so
I can see more of what is going on without having to enable it
manually. Went into the menuconfig and changed it, only to find
that the module ended up in a reboot loop. Putting the logging back
to Warn "fixed" it.
Since this is a classic stack overflow / limited RAM issue, I wonder
is there is a recommended order of starting stuff that might work
around the problem? What I have is for a scenario where the ovms is
"driving" my SyncUp OBDII dongle, which provides a wifi hotspot that
the module in turn uses for its internet connection (instead of
using the internal modem). Then, I can use the hotspot for other
stuff in the car, too.
Here's my system.start event file:
OVMS > vfs cat
/store/events/system.start/mystartup
obdii ecu start can3
power ext12v on
wifi mode client gregnet3
# power simcom on
vehicle module TR
server v2 start
metric set v.b.soc 55
OVMS >
(Before you ask, the setting of the soc metric is so that I can see
the server is actually talking to the module, when the module's on
the bench.)
And here's the crash loop, for what it's worth...
Greg
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
configsip: 156795334, 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:0x3fff0018,len:4
load:0x3fff001c,len:4560
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:13176
entry 0x40078d38
I (628) cpu_start: Pro cpu up.
I (628) cpu_start: Starting app cpu, entry point is
0x400812b0
0x400812b0: call_start_cpu1 at
/home/greg/esp/esp-idf/components/esp32/./cpu_start.c:215
I (612) cpu_start: App cpu up.
I (631) heap_init: Initializing. RAM available for dynamic
allocation:
I (638) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (644) heap_init: At 3FFBB8F0 len 00024710 (145 KiB): DRAM
I (650) heap_init: At 3FFE0440 len 00003BC0 (14 KiB):
D/IRAM
I (656) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB):
D/IRAM
I (663) heap_init: At 40091648 len 0000E9B8 (58 KiB): IRAM
I (669) cpu_start: Pro cpu start user code
I (15) ovms_main: Set default logging level for * to INFO
I (16) command: Initialising COMMAND (1000)
I (16) events: Initialising EVENTS (1200)
I (21) config: Initialising CONFIG (1400)
I (26) script: Initialising SCRIPTS (1600)
I (30) script: Using DUKTAPE javascript engine
I (36) metrics: Initialising METRICS (1810)
I (40) metrics: OvmsMetric is 28 bytes
I (45) metrics: OvmsMetricBool is 32 bytes
I (50) metrics: Expanding DUKTAPE javascript engine
I (59) notify: Initialising NOTIFICATIONS (1820)
I (61) notify: Registered notification type info
I (66) notify: Registered notification type error
I (71) notify: Registered notification type alert
I (76) notify: Registered notification type data
I (82) location: Initialising LOCATIONS (1900)
I (88) location: Expanding DUKTAPE javascript engine
I (93) vehicle: Initialising VEHICLE Factory (2000)
I (99) pcp: Initialising POWER (4000)
I (103) max7317: Initialising MAX7317 EGPIO (4200)
I (108) sdcard: Initialising SD CARD (4400)
I (113) ota: Initialising OTA (4400)
I (117) can: Initialising CAN (4500)
I (122) simcom: Initialising SIMCOM (4600)
I (127) test: Initialising TEST (5000)
I (131) ovms-module: Initialising MODULE (5100)
I (136) vfs: Initialising VFS (5200)
I (140) ovms-server: Initialising OVMS Server (6000)
I (146) ovms-server-v2: Initialising OVMS V2 Server (6100)
I (152) ovms-server-v3: Initialising OVMS V3 Server (6200)
I (158) obd2ecu: Initialising OBD2ECU (7000)
I (163) canopen: Initialising CANopen (7000)
I (169) esp32wifi: Initialising ESP32WIFI (8000)
I (173) ovms-mdns: Initialising MDNS (8100)
I (178) webserver: Initialising WEBSERVER (8200)
I (184) telnet: Initialising Telnet (8300)
I (188) ssh: Initialising SSH (8300)
I (193) re: Initialising RE Tools (8800)
I (197) netmanager: Initialising NETMANAGER (8999)
I (203) v-track: Registering Vehicle: TRACK (9000)
I (208) v-teslaroadster: Registering Vehicle: Tesla
Roadster (9000)
I (215) v-obdii: Registering Vehicle: OBDII (9000)
I (220) v-none: Registering Vehicle: NONE (9000)
I (226) v-demo: Registering Vehicle: DEMO (9000)
I (231) version: Initialising Versioning (9900)
I (240) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (285) ovms_main: Executing on CPU core 0
I (285) ovms_main: Mounting CONFIG...
W (325) webserver: UpdateGlobalAuthFile: no password set
=> no auth for web console
I (325) ovms_main: Registering default configs...
I (325) ovms_main: Starting HOUSEKEEPING...
I (335) housekeeping: Initialising HOUSEKEEPING
Framework...
I (395) housekeeping: Executing on CPU core 1
I (395) housekeeping: Starting PERIPHERALS...
I (395) peripherals: Initialising OVMS Peripherals...
I (405) peripherals: TCP/IP Adaptor
I (405) peripherals: ESP32 system
I (405) peripherals: SPI bus
I (415) peripherals: MAX7317 I/O Expander
I (415) peripherals: ESP32 CAN
I (425) peripherals: ESP32 WIFI
I (425) peripherals: ESP32 BLUETOOTH
I (425) peripherals: ESP32 ADC
I (435) peripherals: MCP2515 CAN 1/2
I (445) peripherals: MCP2515 CAN 2/2
I (455) peripherals: SD CARD
I (455) peripherals: SIMCOM MODEM
I (455) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain:
0| Pullup: 1| Pulldown: 0| Intr:0
I (465) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain:
0| Pullup: 1| Pulldown: 0| Intr:0
I (475) uart: queue free spaces: 10
I (475) ext12v: Powering off external 12V devices
I (485) housekeeping: Starting USB console...
I (485) uart: queue free spaces: 30
I (495) version: Set version
Welcome to the Open Vehicle Monitoring System (OVMS) -
Async Console
I (505) script: Running script
/store/events/system.start/mystartup
I (715) ext12v: Powering on external 12V devices
I (715) wifi: wifi firmware version: ebd3e5d
I (715) wifi: config NVS flash: enabled
I (715) wifi: config nano formating: disabled
I (725) system_api: Base MAC address is not set, read
default base MAC address from BLK0 of EFUSE
I (725) system_api: Base MAC address is not set, read
default base MAC address from BLK0 of EFUSE
I (735) wifi: Init dynamic tx buffer num: 16
I (735) wifi: Init data frame dynamic rx buffer num: 16
I (735) wifi: Init management frame dynamic rx buffer num:
16
I (745) wifi: wifi driver task: 3ffe5370, prio:23,
stack:4096
I (745) wifi: Init static rx buffer num: 4
I (745) wifi: Init dynamic rx buffer num: 16
I (745) wifi: wifi power manager task: 0x3ffe7a0c prio: 21
stack: 2560I (815) phy: phy_version: 383.0, 79a622c, Jan 30 2018,
15:38:06, 0, 0
I (815) wifi: mode : sta (30:ae:a4:37:1b:64)
I (815) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0
vehicle module***ERROR*** A stack overflow in task Housekeeping
has been detected.
abort() was called at PC 0x4008f024 on core 1
0x4008f024: vApplicationStackOverflowHook at
/home/greg/esp/esp-idf/components/esp32/./panic.c:648
Backtrace: 0x4008ee34:0x3ffd6b00 0x4008f00b:0x3ffd6b20
0x4008f024:0x3ffd6b40 0x4008b52c:0x3ffd6b60 0x4008d534:0x3ffd6b80
0x4008d4ea:0x00000000
0x4008ee34: invoke_abort at
/home/greg/esp/esp-idf/components/esp32/./panic.c:648
0x4008f00b: abort at
/home/greg/esp/esp-idf/components/esp32/./panic.c:648
0x4008f024: vApplicationStackOverflowHook at
/home/greg/esp/esp-idf/components/esp32/./panic.c:648
0x4008b52c: vTaskSwitchContext at
/home/greg/esp/esp-idf/components/freertos/./tasks.c:4837
0x4008d534: _frxt_dispatch at
/home/greg/esp/esp-idf/components/freertos/./portasm.S:406
0x4008d4ea: _frxt_int_exit at
/home/greg/esp/esp-idf/components/freertos/./portasm.S:206
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
configsip: 156795334, 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:0x3fff0018,len:4
load:0x3fff001c,len:4560
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:13176
entry 0x40078d38
I (628) cpu_start: Pro cpu up.
I (628) cpu_start: Starting app cpu, entry point is
0x400812b0
0x400812b0: call_start_cpu1 at
/home/greg/esp/esp-idf/components/esp32/./cpu_start.c:215
I (612) cpu_start: App cpu up.
I (631) heap_init: Initializing. RAM available for dynamic
allocation:
I (638) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (644) heap_init: At 3FFBB8F0 len 00024710 (145 KiB): DRAM
I (650) heap_init: At 3FFE0440 len 00003BC0 (14 KiB):
D/IRAM
I (656) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB):
D/IRAM
I (663) heap_init: At 40091648 len 0000E9B8 (58 KiB): IRAM
I (669) cpu_start: Pro cpu start user code
I (15) ovms_main: Set default logging level for * to INFO
I (16) command: Initialising COMMAND (1000)
I (16) events: Initialising EVENTS (1200)
I (21) config: Initialising CONFIG (1400)
I (26) script: Initialising SCRIPTS (1600)
I (30) script: Using DUKTAPE javascript engine
I (36) metrics: Initialising METRICS (1810)
I (40) metrics: OvmsMetric is 28 bytes
I (45) metrics: OvmsMetricBool is 32 bytes
I (50) metrics: Expanding DUKTAPE javascript engine
I (59) notify: Initialising NOTIFICATIONS (1820)
I (61) notify: Registered notification type info
I (66) notify: Registered notification type error
I (71) notify: Registered notification type alert
I (77) notify: Registered notification type data
I (82) location: Initialising LOCATIONS (1900)
I (88) location: Expanding DUKTAPE javascript engine
I (93) vehicle: Initialising VEHICLE Factory (2000)
I (99) pcp: Initialising POWER (4000)
I (103) max7317: Initialising MAX7317 EGPIO (4200)
I (108) sdcard: Initialising SD CARD (4400)
I (113) ota: Initialising OTA (4400)
I (117) can: Initialising CAN (4500)
I (122) simcom: Initialising SIMCOM (4600)
I (127) test: Initialising TEST (5000)
I (131) ovms-module: Initialising MODULE (5100)
I (136) vfs: Initialising VFS (5200)
I (140) ovms-server: Initialising OVMS Server (6000)
I (146) ovms-server-v2: Initialising OVMS V2 Server (6100)
I (152) ovms-server-v3: Initialising OVMS V3 Server (6200)
I (158) obd2ecu: Initialising OBD2ECU (7000)
I (163) canopen: Initialising CANopen (7000)
I (169) esp32wifi: Initialising ESP32WIFI (8000)
I (173) ovms-mdns: Initialising MDNS (8100)
I (178) webserver: Initialising WEBSERVER (8200)
I (184) telnet: Initialising Telnet (8300)
I (188) ssh: Initialising SSH (8300)
I (193) re: Initialising RE Tools (8800)
I (197) netmanager: Initialising NETMANAGER (8999)
I (203) v-track: Registering Vehicle: TRACK (9000)
I (208) v-teslaroadster: Registering Vehicle: Tesla
Roadster (9000)
I (215) v-obdii: Registering Vehicle: OBDII (9000)
I (220) v-none: Registering Vehicle: NONE (9000)
I (226) v-demo: Registering Vehicle: DEMO (9000)
I (231) version: Initialising Versioning (9900)
I (240) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (285) ovms_main: Executing on CPU core 0
I (285) ovms_main: Mounting CONFIG...
W (325) webserver: UpdateGlobalAuthFile: no password set
=> no auth for web console
I (325) ovms_main: Registering default configs...
I (325) ovms_main: Starting HOUSEKEEPING...
I (335) housekeeping: Initialising HOUSEKEEPING
Framework...
I (395) housekeeping: Executing on CPU core 1
I (395) housekeeping: Starting PERIPHERALS...
I (395) peripherals: Initialising OVMS Peripherals...
I (405) peripherals: TCP/IP Adaptor
I (405) peripherals: ESP32 system
I (405) peripherals: SPI bus
I (415) peripherals: MAX7317 I/O Expander
I (415) peripherals: ESP32 CAN
I (425) peripherals: ESP32 WIFI
I (425) peripherals: ESP32 BLUETOOTH
I (425) peripherals: ESP32 ADC
I (435) peripherals: MCP2515 CAN 1/2
I (445) peripherals: MCP2515 CAN 2/2
I (455) peripherals: SD CARD
I (455) peripherals: SIMCOM MODEM
I (455) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain:
0| Pullup: 1| Pulldown: 0| Intr:0
I (465) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain:
0| Pullup: 1| Pulldown: 0| Intr:0
I (475) uart: queue free spaces: 10
I (475) ext12v: Powering off external 12V devices
I (485) housekeeping: Starting USB console...
I (485) uart: queue free spaces: 30
I (495) version: Set version
Welcome to the Open Vehicle Monitoring System (OVMS) -
Async Console
I (505) script: Running script
/store/events/system.start/mystartup
I (715) ext12v: Powering on external 12V devices
I (715) wifi: wifi firmware version: ebd3e5d
I (715) wifi: config NVS flash: enabled
I (715) wifi: config nano formating: disabled
I (725) system_api: Base MAC address is not set, read
default base MAC address from BLK0 of EFUSE
I (725) system_api: Base MAC address is not set, read
default base MAC address from BLK0 of EFUSE
I (735) wifi: Init dynamic tx buffer num: 16
I (735) wifi: Init data frame dynamic rx buffer num: 16
I (735) wifi: Init management frame dynamic rx buffer num:
16
I (745) wifi: wifi driver task: 3ffe5370, prio:23,
stack:4096
I (745) wifi: Init static rx buffer num: 4
I (745) wifi: Init dynamic rx buffer num: 16
I (745) wifi: wifi power manager task: 0x3ffe7a0c prio: 21
stack: 2560I (815) phy: phy_version: 383.0, 79a622c, Jan 30 2018,
15:38:06, 0, 0
I (815) wifi: mode : sta (30:ae:a4:37:1b:64)
I (815) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0
vehicle module***ERROR*** A stack overflow in task Housekeeping
has been detected.
abort() was called at PC 0x4008f024 on core 1
0x4008f024: vApplicationStackOverflowHook at
/home/greg/esp/esp-idf/components/esp32/./panic.c:648
Backtrace: 0x4008ee34:0x3ffd6b00 0x4008f00b:0x3ffd6b20
0x4008f024:0x3ffd6b40 0x4008b52c:0x3ffd6b60 0x4008d534:0x3ffd6b80
0x4008d4ea:0x00000000
0x4008ee34: invoke_abort at
/home/greg/esp/esp-idf/components/esp32/./panic.c:648
0x4008f00b: abort at
/home/greg/esp/esp-idf/components/esp32/./panic.c:648
0x4008f024: vApplicationStackOverflowHook at
/home/greg/esp/esp-idf/components/esp32/./panic.c:648
0x4008b52c: vTaskSwitchContext at
/home/greg/esp/esp-idf/components/freertos/./tasks.c:4837
0x4008d534: _frxt_dispatch at
/home/greg/esp/esp-idf/components/freertos/./portasm.S:406
0x4008d4ea: _frxt_int_exit at
/home/greg/esp/esp-idf/components/freertos/./portasm.S:206
Rebooting...