[Ovmsdev] Early Crash (v.006)

Michael Balzer dexter at expeedo.de
Wed May 23 03:06:27 HKT 2018


Greg,

the backtrace says the crash happened here:

0x4008f6de is in vTaskEnterCritical (/Users/mark/esp/esp-idf/components/freertos/include/freertos/portmacro.h:283).
278     * Warning: From the ISA docs: in some (unspecified) cases, the s32c1i instruction may return the
279     * *bitwise inverse* of the old mem if the mem wasn't written. This doesn't seem to happen on the
280     * ESP32 (portMUX assertions would fail).
281     */
282    static inline void uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set) {
283        __asm__ __volatile__ (
284            "WSR         %2,SCOMPARE1 \n"
285            "S32C1I     %0, %1, 0     \n"
286            :"=r"(*set)
287            :"r"(addr), "r"(compare), "0"(*set)
0x4008eb10 is in xQueueGenericReceive (/Users/mark/esp/esp-idf/components/freertos/./queue.c:1455).
1450        statements within the function itself.  This is done in the interest
1451        of execution time efficiency. */
1452   
1453        for( ;; )
1454        {
1455            taskENTER_CRITICAL(&pxQueue->mux);
1456            {
1457                /* Is there data in the queue now?  To be running the calling task
1458                must be    the highest priority task wanting to access the queue. */
1459                if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 )
*0x4011f3fd is in OBD2ECU_task(void*) (/Users/mark/Documents/ovms/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/obd2ecu/src/obd2ecu.cpp:155).*
150      obd2ecu *me = (obd2ecu*)pvParameters;
151   
152      CAN_frame_t frame;
153      while(1)
154        {
*155        if (xQueueReceive(me->m_rxqueue, &frame, (portTickType)portMAX_DELAY)==pdTRUE)*
156          {
157          // Only handle incoming frames on our CAN bus
158          if (frame.origin == me->m_can) me->IncomingFrame(&frame);
159          }


So I assume that's the same bug I already reported in issue #103:

https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/103

…and as it now happened to you, I assume it's not configuration related. Can you verify my assumption?

> Looks like an init race condition, i.e. m_rxqueue used in undefined state.

Regards,
Michael



Am 22.05.2018 um 19:24 schrieb Greg D.:
> Just noticed this on my production 3.1 module.  Was this an artifact of the 
> upgrade from .005 to .006?
>
> Last boot was 140983 second(s) ago
> Time at boot: 2018-05-20 19:05:59 PDT
> This is reset #17 since last power cycle
> Detected boot reason: EarlyCrash (12/12)
> Crash counters: 1 total, 1 early
> Last crash: StoreProhibited exception on core 1
> Registers:
> PC : 0x4008f6de PS : 0x00060033 A0 : 0x8008eb13 A1 : 0x3ffd6150
> A2 : 0xfefeff4e A3 : 0x0000abab A4 : 0xb33fffff A5 : 0x00000001
> A6 : 0x00060020 A7 : 0x0000cdcd A8 : 0x0000abab A9 : 0x3ffd6150
> A10 : 0x00000003 A11 : 0x00060023 A12 : 0x00060020 A13 : 0x3ffb4188
> A14 : 0x000001e8 A15 : 0x00001800 SAR : 0x00000000 EXCCAUSE: 0x0000001d
> EXCVADDR: 0xfefeff4e LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
> Backtrace:
> 0x4008f6de 0x4008eb10 0x4011f3fd 0x40174f95 0x400e73be 0x400e4699 0x40085149 
> 0x40128bc2 0x40128df7 0x401287b4 0x400ea22d 0x400eac7a 0x400ead09 0x400ead19 
> 0x402207d6 0x400e9ece 0x400e9f79 0x400e45f5 0x400e4604 0x400f5c09 0x400f035d
> Version: 3.1.006/ota_0/main (build idf v3.1-dev-455-gf4905cdf May 20 2018 20:08:31)
> --------------------------------------------------------------------------------
> Running partition: ota_0
> Boot partition: ota_0
> Firmware: 3.1.006/ota_0/main (build idf v3.1-dev-455-gf4905cdf May 20 2018 20:08:31)
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
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/20180522/58dd3255/attachment.htm>


More information about the OvmsDev mailing list