[Ovmsdev] for-v3.3: ota flash http crashes
Mark Webb-Johnson
mark at webb-johnson.net
Fri Sep 17 16:48:45 HKT 2021
I’ll have a look at it over the weekend.
Regards, Mark.
> On 17 Sep 2021, at 4:39 PM, Michael Balzer <dexter at expeedo.de> wrote:
>
> Signed PGP part
> There is another fatal issue with OvmsSyncHttpClient besides the issue with running in the mongoose context: OTA updates are no longer possible.
>
> When flashing via HTTP, the OvmsSyncHttpClient tries to allocate memory for a full firmware image, which of course fails:
>
> OVMS# ota flash http
> Current running partition is: factory
> Target partition is: ota_0
> Download firmware from ovms.dexters-web.de/firmware/ota/v3.1/edge/ovms3.bin to ota_0
> Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
> Core 1 register dump:
> PC : 0x4022438b PS : 0x00060a30 A0 : 0x802245cd A1 : 0x3ffe9c70
> A2 : 0x00000000 A3 : 0x3ffe6f5c A4 : 0x00000001 A5 : 0xffffffff
> A6 : 0x3fabad7c A7 : 0xff000000 A8 : 0x00000000 A9 : 0x3ffe9c50
> A10 : 0x00000000 A11 : 0x3ffe6f5c A12 : 0x00000001 A13 : 0x0000000a
> A14 : 0x00000037 A15 : 0x00000057 SAR : 0x00000018 EXCCAUSE: 0x0000001d
> EXCVADDR: 0x00000000 LBEG : 0x4008b179 LEND : 0x4008b19b LCOUNT : 0xffffffff
>
> ELF file SHA256: 94a8e191baae33a5
>
> Backtrace: 0x4022438b:0x3ffe9c70 0x402245ca:0x3ffe9c90 0x40132f93:0x3ffe9cc0 0x40132e51:0x3ffe9d10 0x40133609:0x3ffe9d40 0x402e7472:0x3ffe9d70 0x4010e229:0x3ffe9d90 0x4010fbd5:0x3ffe9dd0 0x40110015:0x3ffe9e00 0x401102de:0x3ffe9e70 0x4010c51a:0x3ffe9ed0 0x400f5a4f:0x3ffe9ef0 0x400f5afd:0x3ffe9f40
>
> Rebooting...
>
>
> 0x4022438b is in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned int) (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/bits/char_traits.h:243).
> 0x402245ca is in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int) (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/bits/basic_string.tcc:298).
> 0x40132f93 is in OvmsSyncHttpClient::ConnectionHeaders(mg_connection*) (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_http/src/ovms_http.cpp:381).
> 376 else
> 377 {
> 378 if (header.compare(0,15,"Content-Length:") == 0)
> 379 {
> 380 m_bodysize = atoi(header.substr(15).c_str());
> 381 m_body.reserve(m_bodysize+1);
> 382 }
> 383 else if (header.compare(0,5,"HTTP/") == 0)
> 384 {
> 385 size_t space = header.find(' ');
> 0x40132e51 is in OvmsSyncHttpClient::ConnectionData(mg_connection*, unsigned char*, unsigned int) (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_http/src/ovms_http.cpp:316).
> 311 data += len;
> 312 consumed += len;
> 313 len = 0;
> 314 }
> 315
> 316 ConnectionHeaders(nc);
> 317 }
> 318
> 319 if (! m_inheaders)
> 320 {
> 0x40133609 is in OvmsSyncHttpClient::MongooseCallback(mg_connection*, int, void*) (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_http/src/ovms_http.cpp:124).
> 119 m_mgconn = NULL;
> 120 }
> 121 break;
> 122
> 123 case MG_EV_RECV:
> 124 mbuf_remove(&nc->recv_mbuf, ConnectionData(nc,(uint8_t*)nc->recv_mbuf.buf, nc->recv_mbuf.len));
> 125 break;
> 126
> 127 default:
> 128 break;
>
>
> Can we switch back to using the old async client?
>
> Regards,
> Michael
>
> --
> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20210917/21248037/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20210917/21248037/attachment-0001.sig>
More information about the OvmsDev
mailing list