[Ovmsdev] crash when calling 12 V history
Simon Ehlen
ovms at highteq.de
Wed May 3 01:38:28 HKT 2023
Hello,
since a few days my OVMS crashes as soon as I call the 12 V history monitor from the webinterface. The crash happens right after the click in the menu even before the history web page is loaded.
I have not made any changes to my firmware recently nor any changes to the 12 V history at all.
Yesterday I compiled the current version as a test, but the error occurs there as well.
Attached is the information from a2l with the backtrace.
Cheers,
Simon
-------------- next part --------------
Using elf file: /home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/build/ovms3.elf
0x4008ddd2 is in invoke_abort (E:/OVMS/home/Simon/esp-idf/components/esp32/panic.c:156).
151 #endif
152 while (1) {
153 if (esp_cpu_in_ocd_debug_mode()) {
154 __asm__ ("break 0,0");
155 }
156 *((int *) 0) = 0;
157 }
158 }
159
160 void abort()
0x4008e06d is in abort (E:/OVMS/home/Simon/esp-idf/components/esp32/panic.c:171).
166 * don't overwrite that.
167 */
168 if (esp_reset_reason_get_hint() == ESP_RST_UNKNOWN) {
169 esp_reset_reason_set_hint(ESP_RST_PANIC);
170 }
171 invoke_abort();
172 }
173
174
175 static const char *edesc[] = {
0x40135264 is in __assert_func (../../../.././newlib/libc/stdlib/assert.c:63).
0x402d932f is in fresult_to_errno (E:/OVMS/home/Simon/esp-idf/components/fatfs/src/vfs_fat.c:274).
269 case FR_NOT_ENOUGH_CORE: return ENOMEM;
270 case FR_TOO_MANY_OPEN_FILES: return ENFILE;
271 case FR_INVALID_PARAMETER: return EINVAL;
272 case FR_OK: return 0;
273 }
274 assert(0 && "unhandled FRESULT");
275 return ENOTSUP;
276 }
277
278 static void file_cleanup(vfs_fat_ctx_t* ctx, int fd)
0x402d9bc9 is in vfs_fat_lseek (E:/OVMS/home/Simon/esp-idf/components/fatfs/src/vfs_fat.c:427).
422 return -1;
423 }
424 FRESULT res = f_lseek(file, new_pos);
425 if (res != FR_OK) {
426 ESP_LOGD(TAG, "%s: fresult=%d", __func__, res);
427 errno = fresult_to_errno(res);
428 return -1;
429 }
430 return new_pos;
431 }
0x40230461 is in esp_vfs_lseek (E:/OVMS/home/Simon/esp-idf/components/vfs/vfs.c:433).
428 if (vfs == NULL || local_fd < 0) {
429 __errno_r(r) = EBADF;
430 return -1;
431 }
432 off_t ret;
433 CHECK_AND_CALL(ret, r, vfs, lseek, local_fd, size, mode);
434 return ret;
435 }
436
437 ssize_t esp_vfs_read(struct _reent *r, int fd, void * dst, size_t size)
0x4013ff22 is in lseek (../../../.././newlib/libc/syscalls/syslseek.c:12).
0x4025d009 is in std::__basic_file<char>::seekoff(long long, std::_Ios_Seekdir) (basic_file.cc:327).
0x4026767f is in std::basic_filebuf<char, std::char_traits<char> >::_M_seek(long long, std::_Ios_Seekdir, _mbstate_t) (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/bits/fstream.tcc:880).
0x4026791a is in std::basic_filebuf<char, std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode) (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/bits/fstream.tcc:836).
831 in /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/bits/fstream.tcc
0x402673c5 is in std::basic_filebuf<char, std::char_traits<char> >::open(char const*, std::_Ios_Openmode) (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/bits/fstream.tcc:201).
196 in /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/bits/fstream.tcc
0x402673e9 is in std::basic_filebuf<char, std::char_traits<char> >::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode) (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/fstream:308).
0x402673fe is in std::basic_ifstream<char, std::char_traits<char> >::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode) (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/fstream:617).
612 in /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/fstream
0x402674e3 is in std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode) (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/fstream:516).
511 in /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/fstream
0x40173119 is in PagePluginContent::LoadContent() (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_webserver/src/ovms_webserver.cpp:388).
383 }
384 else
385 {
386 path = "/store/plugin/" + m_path;
387 }
388 std::ifstream file(path, std::ios::in | std::ios::binary | std::ios::ate);
389
390 ESP_LOGD(TAG,"Plugin LoadContent: %s = %s",m_path.c_str(),path.c_str());
391
392 if (!file.is_open()) {
0x40173f02 is in OvmsWebServer::PluginHandler(PageEntry&, PageContext&) (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_webserver/src/ovms_webserver.h:263).
258 m_pluginstore = pluginstore;
259 }
260
261 extram::string& GetContent() {
262 if (m_content.empty())
263 LoadContent();
264 return m_content;
265 }
266
267 void LoadContent();
0x40172b22 is in PageEntry::Serve(PageContext&) (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_webserver/src/ovms_webserver.cpp:652).
647 }
648 }
649 #endif //MG_ENABLE_FILESYSTEM
650
651 // call page handler:
652 handler(*this, c);
653 }
654
655
656 /**
0x40172c12 is in OvmsWebServer::EventHandler(mg_connection*, int, void*) (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_webserver/src/ovms_webserver.cpp:557).
552 ESP_LOGI(TAG, "HTTP %s %s", c.method.c_str(), c.uri.c_str());
553
554 PageEntry* page = MyWebServer.FindPage(c.uri.c_str());
555 if (page) {
556 // serve by page handler:
557 page->Serve(c);
558 }
559 #if MG_ENABLE_FILESYSTEM
560 else if (MyWebServer.m_file_enable) {
561 // serve from file space:
0x401311b9 is in mg_call (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:2368).
2363 }
2364 #endif
2365 if (ev_handler != NULL) {
2366 unsigned long flags_before = nc->flags;
2367 size_t recv_mbuf_before = nc->recv_mbuf.len, recved;
2368 ev_handler(nc, ev, ev_data MG_UD_ARG(user_data));
2369 recved = (recv_mbuf_before - nc->recv_mbuf.len);
2370 /* Prevent user handler from fiddling with system flags. */
2371 if (ev_handler == nc->handler && nc->flags != flags_before) {
2372 nc->flags = (flags_before & ~_MG_CALLBACK_MODIFIABLE_FLAGS_MASK) |
0x4013186d is in mg_http_call_endpoint_handler (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:8605).
8600 #if MG_ENABLE_CALLBACK_USERDATA
8601 user_data = ep->user_data;
8602 #endif
8603 }
8604 }
8605 mg_call(nc, pd->endpoint_handler ? pd->endpoint_handler : nc->handler,
8606 user_data, ev, hm);
8607 }
8608
8609 void mg_register_http_endpoint(struct mg_connection *nc, const char *uri_path,
0x401329e2 is in mg_http_handler2 (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:6424).
6419 MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT);
6420 DBG(("%p %s %.*s %.*s", nc, addr, (int) hm->method.len, hm->method.p,
6421 (int) hm->uri.len, hm->uri.p));
6422 deliver_chunk(nc, hm, req_len);
6423 /* Whole HTTP message is fully buffered, call event handler */
6424 mg_http_call_endpoint_handler(nc, trigger_ev, hm);
6425 mbuf_remove(io, hm->message.len);
6426 pd->rcvd = 0;
6427 }
6428 }
0x40132a06 is in mg_http_handler (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:6254).
6249 struct http_message *hm) __attribute__((noinline));
6250
6251 void mg_http_handler(struct mg_connection *nc, int ev,
6252 void *ev_data MG_UD_ARG(void *user_data)) {
6253 struct http_message hm;
6254 mg_http_handler2(nc, ev, ev_data MG_UD_ARG(user_data), &hm);
6255 }
6256
6257 static void mg_http_handler2(struct mg_connection *nc, int ev,
6258 void *ev_data MG_UD_ARG(void *user_data),
0x401311b9 is in mg_call (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:2368).
2363 }
2364 #endif
2365 if (ev_handler != NULL) {
2366 unsigned long flags_before = nc->flags;
2367 size_t recv_mbuf_before = nc->recv_mbuf.len, recved;
2368 ev_handler(nc, ev, ev_data MG_UD_ARG(user_data));
2369 recved = (recv_mbuf_before - nc->recv_mbuf.len);
2370 /* Prevent user handler from fiddling with system flags. */
2371 if (ev_handler == nc->handler && nc->flags != flags_before) {
2372 nc->flags = (flags_before & ~_MG_CALLBACK_MODIFIABLE_FLAGS_MASK) |
0x40132b49 is in mg_recv_common (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:2857).
2852 nc->recv_mbuf.size = nc->recv_mbuf.len = len;
2853 } else {
2854 mbuf_append(&nc->recv_mbuf, buf, len);
2855 MG_FREE(buf);
2856 }
2857 mg_call(nc, NULL, nc->user_data, MG_EV_RECV, &len);
2858 }
2859
2860 void mg_if_recv_tcp_cb(struct mg_connection *nc, void *buf, int len, int own) {
2861 mg_recv_common(nc, buf, len, own);
0x40132f71 is in mg_mgr_handle_conn (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:2861).
2856 }
2857 mg_call(nc, NULL, nc->user_data, MG_EV_RECV, &len);
2858 }
2859
2860 void mg_if_recv_tcp_cb(struct mg_connection *nc, void *buf, int len, int own) {
2861 mg_recv_common(nc, buf, len, own);
2862 }
2863
2864 void mg_if_recv_udp_cb(struct mg_connection *nc, void *buf, int len,
2865 union socket_address *sa, size_t sa_len) {
0x40133236 is in mg_socket_if_poll (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:4042).
4037 fd_flags |= _MG_F_FD_CAN_WRITE;
4038 }
4039 #endif
4040 }
4041 tmp = nc->next;
4042 mg_mgr_handle_conn(nc, fd_flags, now);
4043 }
4044
4045 for (nc = mgr->active_connections; nc != NULL; nc = tmp) {
4046 tmp = nc->next;
0x4012f402 is in mg_mgr_poll (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:2538).
2533 LOG(LL_ERROR, ("cannot poll: no interfaces"));
2534 return 0;
2535 }
2536
2537 for (i = 0; i < m->num_ifaces; i++) {
2538 now = m->ifaces[i]->vtable->poll(m->ifaces[i], timeout_ms);
2539 }
2540 return now;
2541 }
2542
0x401227f3 is in OvmsNetManager::MongooseTask() (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_netmanager.cpp:921).
916
917 // Main event loop
918 while (m_mongoose_running)
919 {
920 // poll interfaces:
921 if (mg_mgr_poll(&m_mongoose_mgr, 250) == 0)
922 {
923 ESP_LOGD(TAG, "MongooseTask: no interfaces available => exit");
924 break;
925 }
0x401228a1 is in MongooseRawTask(void*) (E:/OVMS/home/Simon/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_netmanager.cpp:903).
898 #ifdef CONFIG_OVMS_SC_GPL_MONGOOSE
899
900 static void MongooseRawTask(void *pvParameters)
901 {
902 OvmsNetManager* me = (OvmsNetManager*)pvParameters;
903 me->MongooseTask();
904 }
905
906 void OvmsNetManager::MongooseTask()
907 {
More information about the OvmsDev
mailing list