espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.66k stars 7.29k forks source link

Decode coredump problem (IDFGH-12613) #13611

Closed hitecSmartHome closed 5 months ago

hitecSmartHome commented 6 months ago

Answers checklist.

Environment

General issue report

I have a function which saves the coredump partition data to a file so i can download it.

void Sys::saveCoreDump(){
    size_t size = 0;
    size_t address = 0;
    char* coreDump;
    if( !alloc(coreDump, 640) ){ return; } // Check if allocation was successfull
    if (esp_core_dump_image_get(&address, &size) != ESP_OK) { free(coreDump); return; } // Try to get the bin image pointers
    const esp_partition_t* pt = NULL;
    pt = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_COREDUMP, "coredump");
    if (pt == NULL) { free(coreDump); return; } // Check if we found the partition or not.
    uint8_t bf[256];
    int16_t toRead;
    db.remove(CORE_DUMP_PATH); // Remove the previous file if any
    for (int16_t i = 0; i < (size / 256) + 1; i++) {
        strcpy(coreDump, "");
        toRead = (size - i * 256) > 256 ? 256 : (size - i * 256);
        esp_err_t er = esp_partition_read(pt, i * 256, bf, toRead);
        if (er != ESP_OK) {
            break;
        }
        for (int16_t j = 0; j < 256; j++) {
            char str_tmp[3];
            sprintf(str_tmp, "%02x", bf[j]);
            strcat(coreDump, str_tmp);
        }
        db.append(CORE_DUMP_PATH, coreDump); // Append the bin content
    }
    esp_core_dump_image_erase(); // Erase partition
    free(coreDump);
}
esp_err_t Sys::esp_core_dump_image_erase() {
    /* Find the partition that could potentially contain a (previous) core dump. */
    const esp_partition_t* core_part = esp_partition_find_first(ESP_PARTITION_TYPE_DATA,
        ESP_PARTITION_SUBTYPE_DATA_COREDUMP,
    "coredump");
    if (!core_part) {
        logger.write("No core dump partition found!|n");
        return ESP_ERR_NOT_FOUND;
    }
    if (core_part->size < sizeof(uint32_t)) {
        logger.write("Too small core dump partition!\n");
        return ESP_ERR_INVALID_SIZE;
    }

    esp_err_t err = ESP_OK;
    err = esp_partition_erase_range(core_part, 0, core_part->size);
    if (err != ESP_OK) {
        Serial.printf("Failed to erase core dump partition (%d)!\n", err);
        return err;
    }

    // on encrypted flash esp_partition_erase_range will leave encrypted
    // garbage instead of 0xFFFFFFFF so overwriting again to safely signalize
    // deleted coredumps
    const uint32_t invalid_size = 0xFFFFFFFF;
    err = esp_partition_write(core_part, 0, &invalid_size, sizeof(invalid_size));
    if (err != ESP_OK) {
        logger.write("Failed to write core dump partition size (%d)!\n", err);
    }

    return err;
}

Where db.append is just a wrapper for LittleFs append. I got the folllowing downloadable file:

646c0000000100000000000000000000000000007f454c4601010100000000000000000004005e00010000000000000034000000000000000000000034002000260028000000000004000000f40400000000000000000000c02a0000c02a0000060000000000000001000000b42f000058fbfd3f58fbfd3f640100006401000006000000000000000100000018310000a0f6fd3fa0f6fd3fb0040000b0040000060000000000000001000000c8350000d4ecfb3fd4ecfb3f64010000640100000600000000000000010000002c37000040ebfb3f40ebfb3f8001000080010000060000000000000001000000ac38000040f4fb3f40f4fb3f6401000064010000060000000000000001000000103a0000b0f2fb3fb0f2fb3f8001000080010000060000000000000001000000903b000018dffb3f18dffb3f6401000064010000060000000000000001000000f43c000070dbfc3f70dbfc3f8001000080010000060000000000000001000000743e000098a6fd3f98a6fd3f6401000064010000060000000000000001000000d83f000090a4fd3f90a4fd3f0002000000020000060000000000000001000000d84100006cb1fd3f6cb1fd3f64010000640100000600000000000000010000003c430000a0d4fe3fa0d4fe3f8001000080010000060000000000000001000000bc44000058acfc3f58acfc3f640100006401000006000000000000000100000020460000b0aafc3fb0aafc3fa0010000a0010000060000000000000001000000c0470000fcdcfc3ffcdcfc3f64010000640100000600000000000000010000002449000030effc3f30effc3fe0010000e0010000060000000000000001000000044b0000acfdfb3facfdfb3f6401000064010000060000000000000001000000684c000020fcfb3f20fcfb3f8001000080010000060000000000000001000000e84d0000b464fd3fb464fd3f64010000640100000600000000000000010000004c4f0000a061fd3fa061fd3f00030000000300000600000000000000010000004c52000064defc3f64defc3f6401000064010000060000000000000001000000b053000020f8fc3f20f8fc3ff0010000f0010000060000000000000001000000a0550000ccdffc3fccdffc3f6401000064010000060000000000000001000000045700007008fd3f7008fd3fb0010000b0010000060000000000000001000000b4580000f4fdfd3ff4fdfd3f6401000064010000060000000000000001000000185a0000003bfc3f003bfc3fd0010000d0010000060000000000000001000000e85b000054fafa3f54fafa3f64010000640100000600000000000000010000004c5d0000c0a5fb3fc0a5fb3fa0010000a0010000060000000000000001000000ec5e0000ccf7fa3fccf7fa3f64010000640100000600000000000000010000005060000020f6fa3f20f6fa3fa0010000a0010000060000000000000001000000f061000048d4fb3f48d4fb3f640100006401000006000000000000000100000054630000a0d2fb3fa0d2fb3fa0010000a0010000060000000000000001000000f4640000c012fd3fc012fd3f6401000064010000060000000000000001000000586600001011fd3f1011fd3fa0010000a0010000060000000000000001000000f867000004b0fd3f04b0fd3f64010000640100000600000000000000010000005c69000030aefd3f30aefd3fc0010000c00100000600000000000000040000001c6b0000000000000000000014010000140100000600000000000000080000004c02000001000000434f52450045535000000000000000000000000000000000000000000000000058fbfd3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000007c3108402303060049c300406bc30040000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c09a088060f7fd3fa0f7fd3fb1f7fd3f1000000090dffd3f09000000070000000000000001000000b1f7fd3fb1f7fd3f03000000f857fc3f98e87a00ffff3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f524500455350000000000000000000000000000000000000000000000000d4ecfb3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fe742640200d0600000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064b11c8000ecfb3f000000000100008025a2088040d2fb3f0300000023000600deac1c80d0ebfb3f00000000ffff3f007e1b3fe878f0f53f7cf0f53fffff3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f52450045535000000000000000000000000000000000000000000000000040f4fb3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fe74264020050600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064b11c8070f3fb3f000000000100000020a708803014fb3f0300000023000600deac1c8040f3fb3f000000000100000025a208801014fb3f030000002300060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f52450045535000000000000000000000000000000000000000000000000018dffb3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac260840200b0600cd340840d5340840270000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fedd268030dcfc3f000000003ec91d00f0c91d00230b0600200b060001000000ac26088010dcfc3fdc00f03f010000008801fb3f78f0f53fe8147b00ffff3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f52450045535000000000000000000000000000000000000000000000000098a6fd3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac26084020050600cd340840d5340840270000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fedd268050a5fd3f010000003ec91d003ec91d00230506002005060001000000ac26088030a5fd3fe000f03f010000008801fb3f00000000e8147b00ffff3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f5245004553500000000000000000000000000000000000000000000000006cb1fd3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac26084020050600e0c20040f6c20040000000001200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fedd268060d5fe3f010000003ec91d003ec91d00230506002005060001000000ac26088040d5fe3fe000f03f010000008801fb3fcb27fe3fe8147b00ffff3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f52450045535000000000000000000000000000000000000000000000000058acfc3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac26084020030600cd340840d5340840ffff3fb30a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fedd268070abfc3f30abfc3f0000000020c7813f30abfc3f10000000ecaafc3f01000000ffff3fb300000000000000008801fb3f0000000000007b00ffff3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f524500455350000000000000000000000000000000000000000000000000fcdcfc3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac26084020030600e0c20040f6c20040ffffffff1500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fea70880f0effc3f00000000ffffffffc465803f8065803f9465803f00000000ac260880d0effc3fdc00f03f010000008801fb3f23030600230306000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f524500455350000000000000000000000000000000000000000000000000acfdfb3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0bf004020000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025a20880e0fcfb3f0000000023000600200006007078fb3f8478fb3f0100000048a50880b0fcfb3f7875fb3f7875fb3f0000000023000600230006000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f524500455350000000000000000000000000000000000000000000000000b464fd3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac2608402003060014221d401e221d40000000000f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004ca908806062fd3f00000000ffffffffd0ac803f8cac803fa0ac803f00000000ac2608804062fd3fdc00f03f010000008801fb3f23030600230306000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f52450045535000000000000000000000000000000000000000000000000064defc3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac260840200c06006cc4004077c40040000000001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fea70880e0f8fc3f00000000ffffffffe467803fa067803fb467803f00000000ac260880c0f8fc3fdc00f03f010000008801fb3f230c0600230c06000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f524500455350000000000000000000000000000000000000000000000000ccdffc3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac26084020050600e0c20040f6c20040ffffffff0900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fea708803009fd3f01000000ffffffff0467803fc066803fd466803f00000000ac2608801009fd3fe000f03f010000008801fb3f23050600230506000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f524500455350000000000000000000000000000000000000000000000000f4fdfd3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac260840200a0600e0c20040f6c20040ffffffff1a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fea70880c03bfc3f00000000ffffffffa8d0813f64d0813f78d0813f00000000ac260880a03bfc3fdc00f03f010000008801fb3f230a0600230a06000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f52450045535000000000000000000000000000000000000000000000000054fafa3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac260840200f060000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004ca9088080a6fb3f01000000ffffffff48fafa3f04fafa3f18fafa3f00000000ac26088060a6fb3fe000f03f010000008801fb3f230f0600230f06000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f524500455350000000000000000000000000000000000000000000000000ccf7fa3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac2608402005060000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004ca90880e0f6fa3f00000000ffffffffbcf1fa3f78f1fa3f8cf1fa3f00000000ac260880c0f6fa3fdc00f03f010000008801fb3f23050600230506000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f52450045535000000000000000000000000000000000000000000000000048d4fb3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0bf004020090600cd340840d534084027000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025a2088060d3fb3f00000000230906002009060001000000e8147b00ffff3f000100000030d3fb3f7875fb3f7875fb3f0000000023090600230906000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f524500455350000000000000000000000000000000000000000000000000c012fd3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0bf0040200b0600e0c20040f6c20040ffffffff200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025a20880d011fd3f00000000230b0600200b060000000000e8147b00ffff3f0001000000a011fd3f7875fb3f7875fb3f00000000230b0600230b06000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000004c02000001000000434f52450045535000000000000000000000000000000000000000000000000004b0fd3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac26084020050600e0c20040f6c20040ffffffff0800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fea70880f0aefd3f01000000ffffffffb0df803f6cdf803f80df803f00000000ac260880d0aefd3fe000f03f010000008801fb3f23050600230506000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0f8fd3ff0fafd3fd2c91d00d076fb3fd076fb3f58fbfd3fc876fb3f140000000464803f0464803f58fbfd3f0000000005000000e4e3fd3f776562736f636b65745f7461736b0000ffffff7f50fbfd3f1200000000000000050000000100000090fdfd3f34be1e4011dc6d0077000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fefbeadde7c31084033030600c09a088060f7fd3fa0f7fd3fb1f7fd3f1000000090dffd3f09000000070000000000000001000000b1f7fd3fb1f7fd3f03000000f857fc3f98e87a00ffff3f00100000001d0000000000000049c300406bc300400000000003000000f857fc3f5b3808408c82fa3f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000000000000000000014221d401e221d4028e9088080f7fd3fa0f7fd3fb1f7fd3f0200000003000000000080917065803f99c90880a0f7fd3f100000000000000010000000bcf7fd3f200000000000000047d20880e0f7fd3fcc9dfb3f84fffd3f617373657274206661696c65643a203078343030386339393600000025a208800000000000000000200b0600010000003e40088000f8fd3fb89dfb3f84fffd3f020000007cb8fd3f0300000000000000f857088020f8fd3f84fffd3f35050000350500008cddfd3f17000000530000005d30208040f8fd3f84fffd3f0000000040000000b4b6fd3fe8147b0004000000629b1f8060f8fd3f84fffd3f040000000400000088fffd3f200000000000000061d01f8080f8fd3fb4dffd3f0000000020050600f857fc3f98e87a00ffff3f00c6d31f80a0f8fd3f9cdffd3f7c0000007c00000090dffd3f09000000070000003dd41f80c0f8fd3f9cdffd3f00000000000100005801000020000000cc000000251d2080e0f8fd3f14dffd3f00000000200f0600e445fc3f98e87a00ffff3f009819208000f9fd3f14dffd3f00000000080000007cb8fd3f0300000000000000550b218020f9fd3f60defd3f35050000350500008cddfd3f17000000530000004cb7208040f9fd3fa8b7fd3f94ddfd3f40000000b4b6fd3fe8147b0004000000e8c7208070f9fd3f20b7fd3fd40000000000000070f9fd3f74b6fd3f00000000010000001000000020000000cc000000fbca208090f9fd3fbcb6fd3f4d1100004d110000f857fc3f0300000014010000ac722580b0f9fd3f8897823f00000000e8e2fd3f10270000a4e2fd3fe8e2fd3fba722580d0f9fd3f8897823f889c823f000000005801000020000000cc0000008d6e2580f0f9fd3f8897823f0100000001000000ffffffff00000000000000000ec91e8010fafd3f8897823fffffffff8897823ffffeffff74e0fd3f34000000927f268030fafd3fffffffff34b8813f020000008897823f170000000100000064cf1e8050fafd3f2ce2fd3f70fafd3f02000000ec15fb3f74e0fd3f34000000927f268070fafd3fa4e2fd3f70fafd3f02000000102700002ce2fd3f34b8813f4a421b8090fafd3fa4e2fd3f78be813fffffffff1027000094e37d00ffff3f0079431b80b0fafd3f7408813f78be813fe8e2fd3f10270000a4e2fd3fe8e2fd3f00000000d0fafd3f7408813f010000000004000010270000102700000100008000000000f0fafd3f000000000000000001000000ffffffff0000000000000000000000000000000000000000000000000000000000000000fcfafd3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040ebfb3f60ecfb3fb4ac704848f4fb3f6c76fb3fd4ecfb3f6476fb3f19000000e7e7f20dcd5a2ee4d4ecfb3f0000000000000000d0e6fb3f49444c450023c4acb6d31c850502dd0000000000c0ecfb3f050000000000000000000000000000000000000000000000989ad66f00000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002003fc0380840fe742640300d060064b11c8000ecfb3f000000000100008025a2088040d2fb3f0300000023000600deac1c80d0ebfb3f00000000ffff3f007e1b3fe878f0f53f7cf0f53fffff3f0016000000ffff000000000000000000000000000000000000ca3a084078f0f53fea9a0840fc73f83f000000000000000000000000ffff3fb30000000000000000000000000000000000000000000000000000000000000000ca3a084000000000ea9a08407ad8268020ecfb3f1471fb3f08000000ffff3fb30000000000000000000000000000000040ecfb3f00000000f475fb3f010000000000000001000000010000800000000060ecfb3f0000000000000000000000000100000004000000000000000000000000000000000000000000000000000000000000006cecfb3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0f2fb3fd0f3fb3fa708f6276c76fb3fdcecfb3f40f4fb3f6476fb3f19000000c555ceca427fc0e040f4fb3f00000000000000003ceefb3f49444c4500ac8dcc24940f35ae5b4c000100000030f4fb3f06000000000000000000000000000000000000000000000007eaf15500000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002003fc0380840fe7426403005060064b11c8070f3fb3f000000000100000020a708803014fb3f0300000023000600deac1c8040f3fb3f000000000100000025a208801014fb3f030000002300060000000000ffff000000000000000000000000000000000000ca3a08401014fb3fea9a08406c7bf83f000000000000000000000000ffff3fb30000000000000000000000000000000000000000000000000000000000000000ca3a084000000000ea9a08407ad8268090f3fb3f3471fb3f08000000ffff3fb300000000000000000000000000000000b0f3fb3f00000000f475fb3f0100000000000000d4ecfb3f0100008000000000d0f3fb3f000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000dcf3fb3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070dbfc3f90dcfc3f3ec91d00a0a6fd3f5876fb3f18dffb3f5076fb3f0f0000000464803f0464803f18dffb3f000000000a000000f8b4fc3f53797374656d5461736b00004ca9080000000000f0dcfc3f0a000000000000000a000000000000005cfffd3f34be1e40dff7760300000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000d015fd3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac260840300b0600fedd268030dcfc3f000000003ec91d00f0c91d00230b0600200b060001000000ac26088010dcfc3fdc00f03f010000008801fb3f78f0f53fe8147b00ffff3f000a000000ffff000000000000cd340840d534084027000000ca3a084078f0f53fea9a08402c64f93f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000ffff3fb3ca3a08402bc91d0000000000fc5a188050dcfc3f01000000e814fb3fd2c91d00230b0600200b0600010000000000000070dcfc3f9041fb3f01000000140000000000000018dffb3f010000800000000090dcfc3f0000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000009cdcfc3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090a4fd3f30a6fd3f3ec91d0074b1fd3f20dffb3f98a6fd3f5076fb3f0a00000020de803f20de803f98a6fd3f000000000f0000003c8bfd3f4861726477617265436f6e66696754000100000090a6fd3f10000000000000000f0000000000000000000000000000004e32490400000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac26084030050600fedd268050a5fd3f010000003ec91d003ec91d00230506002005060001000000ac26088030a5fd3fe000f03f010000008801fb3f00000000e8147b00ffff3f000a000000ffff000000000000cd340840d534084027000000ca3a084000000000ea9a0840cc2dfa3f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000ffff3fb360a5fd3f7841fb3f110000005fb0158070a5fd3f01000000e814fb3f8fc7158090a5fd3f7841fb3f0b0000008cb0158090a5fd3f000000007841fb3f0d0000006aa5fd3f000000000002040099c71580b0a5fd3f7841fb3fecbc823f6300000066c91d000d00000070a5fd3faef81380d0a5fd3fa4bc823f0000000020000000000000002cbd823f0400000004f91380f0a5fd3fd03cfb3f000000007841fb3f2301060020010600010000000000000010a6fd3fd03cfb3f01000000140000000400000098a6fd3f010000800000000030a6fd3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ca6fd3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0d4fe3fc0d5fe3f3ec91d0060acfc3fa0a6fd3f6cb1fd3f5076fb3f1700000034f1fa3f34f1fa3f6cb1fd3f00000000020000001088fe3f436f6d706f6e656e74735461736b00000100000020d6fe3f140000000000000002000000000000000000000000000000fb937e0300000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac26084030050600fedd268060d5fe3f010000003ec91d003ec91d00230506002005060001000000ac26088040d5fe3fe000f03f010000008801fb3fcb27fe3fe8147b00ffff3f0012000000ffff000000000000e0c20040f6c2004000000000ca3a0840cb27fe3fea9a08405c5dfb3f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000ffff3fb3cb27fe3fe8147b00ffff3f0090cf0d8080d5fe3f01000000e814fb3f3cc91d0023050600200506000100000000000000a0d5fe3fc034fb3f0100000014000000040000006cb1fd3f0100008000000000c0d5fe3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccd5fe3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0aafc3ff0abfc3f3ec91d0004ddfc3f74b1fd3f58acfc3f5076fb3f1800000020de803f20de803f58acfc3f00000000010000005484fc3f6c6f6f705461736b00000000000000000100000050acfc3f080000000000000001000000000000007016fd3f34be1e402d0ab60e0b000000e4eafa3f4cebfa3fb4ebfa3f00000000000000000100000000000000000000000cb3fd3f481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac26084030030600fedd268070abfc3f30abfc3f0000000020c7813f30abfc3f10000000ecaafc3f01000000ffff3fb300000000000000008801fb3f0000000000007b00ffff3f000a000000ffff000000000000cd340840d5340840ffff3fb30800000030abfc3fa401803f1996168070abfc3f4c5ffb3f905ffb3f0000000000000000000000000000000000000000000000001000000000000000ffff3fb300000000e8147b00ffff3f000000000090abfc3fa445fb3fe814fb3fd0e1fc3f230306002003060001000000d06d1b80b0abfc3fd03cfb3fec44fb3f25a2088040d4fe3f030000002300060000000000d0abfc3ff46efb3f000000002436fb3f0400000058acfc3f0100008000000000f0abfc3f000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000fcabfc3f00000000800000001400a04100007042caf24971d4259d32d11f65c0d4259d329b038f2600c09d27b5c936390000000000000000000000000000000000000000000000000000000000000000000000000000000030effc3fb0f0fc3ff0c91d005876fb3f60acfc3ffcdcfc3f5076fb3f070000009c65803f9c65803ffcdcfc3f9465803f120000001ce5fc3f746954007375626e65744d6128ddfc00ffffff7f10f1fc3f0b0000000000000012000000000000000000000000000000dc01cf0000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac26084030030600fea70880f0effc3f00000000ffffffffc465803f8065803f9465803f00000000ac260880d0effc3fdc00f03f010000008801fb3f23030600230306000000000015000000ffff000000000000e0c20040f6c20040ffffffffca3a084023030600ea9a08404c78f93f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000cdcd000000000000b06a803f00000000e9321e8010f0fc3f7065803f80f0fc3f0000000000000000000000001100000052401d8050f0fc3f6065803f80f0fc3f000000003cc91d0070d8813f700e803fb400000060f0fc3ff4df813fb06a803fc465803f0000000000000000140000000000000080f0fc3fb0f7fd3f705d1e400000000080f0fc3fd4ed813f582e1e40b4000000ffff0000071000000000000000000000b0f0fc3f0000000000000000b0f7fd3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bcf0fc3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020fcfb3f40fdfb3fb57f09c5bc64fd3fe875fb3facfdfb3fe075fb3f180000008c78fb3f8c78fb3facfdfb3f8478fb3f01000000a8f5fb3f546d722053766300eed5639c88506e0000000000a0fdfb3f0700000000000000010000000000000000000000000000003a00000000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002003fc0380840f0bf00403000060025a20880e0fcfb3f0000000023000600200006007078fb3f8478fb3f0100000048a50880b0fcfb3f7875fb3f7875fb3f0000000023000600230006000100000000000000ffff000000000000000000000000000000000000ca3a084023000600ea9a0840dc84f83f000000000000000000000000ffff3fb30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbe92680f0fcfb3f7075fb3fffffffff0000000010fdfb3ff014fb3f5c79fb3f010000000000000020000600010000000000000040fdfb3f0000000000000000000000000000000000000000000000006c79fb3f6479fb3f01000000000000000000000000000000000000000000000000000000000000004cfdfb3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a061fd3f4064fd3f000000006cdefc3fb4fdfb3fb464fd3fe075fb3f14000000a8ac803fa8ac803fb464fd3fa0ac803f050000009016fd3f68747470640000000000000000000000ffffff7fa064fd3f0f000000000000000500000000000000ec66fd3f34be1e403e04000000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac260840300306004ca908806062fd3f00000000ffffffffd0ac803f8cac803fa0ac803f00000000ac2608804062fd3fdc00f03f010000008801fb3f2303060023030600000000000f000000ffff00000000000014221d401e221d4000000000ca3a084023030600ea9a0840dcebf93f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000cdcd000000000000ffff3f001e00000002321e808062fd3f00000000d0ac803f2de91e80e062fd3f320000001064fd3f743b1d80c062fd3f6cac803f0000000000000000dc0d00000000000000000000ffffffff2463fd3f01000000000000007cac803f7cac803fffffffff000003002de91e80e062fd3f320000001064fd3f000000000000000001000000320000003c601c808063fd3fc8a9803f6cac803f1c63fd3f3063fd3f00000000ffffffff00000000000000001064fd3f00000000000000000000000000000000000000006cac803f00000000000003000000000000000000000000000000000000000000000000006063fd3f5c371e40010000000000000000000000010000005c01803f000000008063fd3f320000006cac803f0000000000000000010000003200000000000000f063fd3fec84803f00000000c0380840c05f1c4030000500000000004064fd3f000000000000000000000000f0381d40000000001064fd3f000000002065fd3fec15fb3f32000000050000008216fb3f000000007f16fb3f010000003ca9803f050000002867fd3f00000000000000004064fd3f0000000000000000dcebf93f00000000000000000000000000000000000000000000000000000000000000000000030000000000300000001064fd3f3f00000000000000310000000000000000000000000000000000000000000000000000004c64fd3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020f8fc3fb0f9fc3f635f4574d4dffc3fbc64fd3f64defc3fe075fb3f05000000bc67803fbc67803f64defc3fb467803f1400000020f1fc3f7379735f65767400cc9dfb3fcc9dfb000000000010fafc3f0c00000000000000140000000000000000000000000000006102000000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac260840300c0600fea70880e0f8fc3f00000000ffffffffe467803fa067803fb467803f00000000ac260880c0f8fc3fdc00f03f010000008801fb3f230c0600230c06000000000019000000ffff0000000000006cc4004077c4004000000000ca3a0840230c0600ea9a08404c81f93f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000cdcd000000000000200206000100000078c2268000f9fc3f9067803f50f9fc3f00000000000000000467803fb066803ff3c3268040f9fc3f64e4fc3fffffffff00000000f61000002006060001000000ffffffff40f9fc3f64e4fc3f00000000e467803f0000000000000000010000000000000090f9fc3f64e4fc3fffffffff0101000098ab413f0400000094bafb3f00000000000000000000000000000000ffffffffad06000000000000000000000000000000000000ffffffff0000000000000000b0f9fc3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bcf9fc3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007008fd3fc009fd3ff0110000fcfdfd3f6cdefc3fccdffc3fe075fb3f06000000dc66803fdc66803fccdffc3fd466803f1300000024fafc3f61726475696e6f5f6576656e7473000001000000200afd3f0d000000000000001300000000000000b0fdfd3f34be1e4037a4030000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac26084030050600fea708803009fd3f01000000ffffffff0467803fc066803fd466803f00000000ac2608801009fd3fe000f03f010000008801fb3f23050600230506000000000009000000ffff000000000000e0c20040f6c20040ffffffffca3a084023050600ea9a08405c91f93f000000000000000001000000ffff3fb300000000000000000000000000000000000000000000000000000000abab0000200606000100000000000000bfcf19805009fd3fb066803f9009fd3f0467803fc066803fd466803f00000000000000009009fd3f7852fb3f0000000000000000021e0000d849264090391640ffffffff2800000016000000000000000467803f00000000000000000100008000000000c009fd3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000cc09fd3f00000000800000001400a04100007042caf24971d4259d32d11f65c0d4259d329b038f2600c09d27b5c9363900000000000000000000000000000000000000000000000000000000000000000000000000000000003bfc3f703cfc3f000000005cfafa3fd4dffc3ff4fdfd3fe075fb3f1800000080d0813f80d0813ff4fdfd3f78d0813f01000000dc2cfc3f6d646e7300fefd3f5cfafa3fd4dffc0000000000d03cfc3f1300000000000000010000000000000094fffd3f34be1e40f22f000000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac260840300a0600fea70880c03bfc3f00000000ffffffffa8d0813f64d0813f78d0813f00000000ac260880a03bfc3fdc00f03f010000008801fb3f230a0600230a0600000000001a000000ffff000000000000e0c20040f6c20040ffffffffca3a0840230a0600ea9a08400cc4f83f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000cdcd0000e91400000000000000000000222a1b80e03bfc3f54d0813f283cfc3f88ef813f70d8813f2a66fb3fdf01000000000000203cfc3f80c6813f4c6dfb3f0000000000270000d0b5fd3f48b6fd3fffffffff0000000070e3fc3f00000000a8d0813f0000000000000000b0d3813f00000000703cfc3f00000000000000000cc4f83f0000000070e3fc3f000000000000000078ef813f80c6813f00000000000000000000000000000000d0c6813f78ef813f0800000002000000203cfc3f0000000000000000000000000000000000000000000000007c3cfc3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0a5fb3f00a7fb3f7436be20d4f7fa3ffcfdfd3f54fafa3fe075fb3f0100000020fafa3f20fafa3f54fafa3f18fafa3f1800000068a1fb3f6970633100c21a1312592480c0b46f000100000060a7fb3f0200000000000000180000000000000000000000000000009d63050000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac260840300f06004ca9088080a6fb3f01000000ffffffff48fafa3f04fafa3f18fafa3f00000000ac26088060a6fb3fe000f03f010000008801fb3f230f0600230f06000000000004000000ffff000000000000000000000000000000000000ca3a0840230f0600ea9a08409c2ef83f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000abab000080a6fb3f7075fb3fc875fb3f57240880a0a6fb3f0000000048fafa3fe814fb3f18000000200f06000100000000000000e0a6fb3f040000002070fb3f000000009a670000c475fb3f01000000ffffffff00000000040000002070fb3ff4f9fa3ff4f9fa3fffffffff94f9fa3f0000000000a7fb3f0000000000000000000000003070fb3fd847084001000000b5310880607dfe3fc05d0000127adb0600000000000000000ca7fb3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020f6fa3f60f7fa3fdff7893850d4fb3f5cfafa3fccf7fa3fe075fb3f0100000094f1fa3f94f1fa3fccf7fa3f8cf1fa3f18000000c8f1fa3f697063300084379db123cfb3900ae70000000000c0f7fa3f010000000000000018000000000000000000000000000000c198080000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac260840300506004ca90880e0f6fa3f00000000ffffffffbcf1fa3f78f1fa3f8cf1fa3f00000000ac260880c0f6fa3fdc00f03f010000008801fb3f23050600230506000000000004000000ffff000000000000000000000000000000000000ca3a084023050600ea9a0840fc7ef73f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000cdcd00002305060023050600000000005724088000f7fa3f00000000bcf1fa3fbcf1fa3f78f1fa3f8cf1fa3f000000000000000040f7fa3f000000001c70fb3f00000000990c1000c475fb3f01000000ffffffff00000000000000001c70fb3f68f1fa3f68f1fa3fffffffff08f1fa3f0000000060f7fa3f0000000000000000000000002c70fb3fd84708400000000018d02680c03bfe3fd875fb3f0000000000000000000000006cf7fa3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0d2fb3fe0d3fb3f422a6fc5c812fd3fd4f7fa3f48d4fb3fe075fb3f030000001476fb3f1476fb3f48d4fb3f000000001600000044c6fb3f6573705f74696d657200a3fd2c93cf000000000040d4fb3f03000000000000001600000000000000000000000000000046b71d0000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100003fc0380840f0bf00403009060025a2088060d3fb3f00000000230906002009060001000000e8147b00ffff3f000100000030d3fb3f7875fb3f7875fb3f0000000023090600230906000100000015000000ffff000000000000cd340840d534084027000000ca3a084023090600ea9a08407c5bf83f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000ffff3fb3000000000000000000000000ccdb268070d3fb3f7075fb3fffffffff51bc1c8090d3fb3f48d5fb3f01000000eec81d0023090600200906000100000000000000b0d3fb3fd0fdfd3f6f895974ffffffff5878fb3fe814fb3f961fb6e800000000e0d3fb3f0000000000000000000000009ac54f740000000080841e0000000000000000000000000001000000000000000000000000000000000000000000000000000000ecd3fb3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001011fd3f5012fd3f000000000cb0fd3f50d4fb3fc012fd3fe075fb3f0a0000000464803f0464803fc012fd3f000000000f000000bc0afd3f656d61635f7278000000000000000000ffffff7fb012fd3f0e000000000000000f0000000000000000000000000000008857200000000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100003fc0380840f0bf0040300b060025a20880d011fd3f00000000230b0600200b060000000000e8147b00ffff3f0001000000a011fd3f7875fb3f7875fb3f00000000230b0600230b06000100000020000000ffff000000000000e0c20040f6c20040ffffffffca3a0840230b0600ea9a0840ec99f93f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000a83f1c80e011fd3f4814fd3f5ca0823fccdb2680e011fd3f7075fb3fffffffffe9471c800012fd3fc013fd3f010000003bc91d00230b0600200b060001000000000000002012fd3f386c803f00000000ffffffff5878fb3fe814fb3f01000080000000005012fd3f00000000000000003c000000000000000000000000000000f20500000000000000000000000000000000000000000000000000000000000000000000000000005c12fd3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030aefd3f90affd3f00000000e875fb3fc812fd3f04b0fd3fe075fb3f0100000088df803f88df803f04b0fd3f80df803f1800000000a8fd3f756172745f6576656e745f7461736b00ffffff7ff0affd3f110000000000000018000000000000000000000000000000ad09540700000000e4eafa3f4cebfa3fb4ebfa3f000000000000000001000000000000000000000000000000481d004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fc0380840ac26084030050600fea70880f0aefd3f01000000ffffffffb0df803f6cdf803f80df803f00000000ac260880d0aefd3fe000f03f010000008801fb3f23050600230506000000000008000000ffff000000000000e0c20040f6c20040ffffffffca3a084023050600ea9a08402c37fa3f000000000000000000000000ffff3fb300000000000000000000000000000000000000000000000000000000abab000010affd3f7841fb3f4c6efb3f20631b8010affd3f5cdf803f50affd3f000000000000000048de803ff4dd803f0000000050affd3f4c6efb3fffffffff000000003bc91d002007060001000000ffffffff50affd3f4c6efb3fffffffffb0df803f0000000000000000010000800000000090affd3f0000000000000000010000007014fb3f04000000010000005cdf803f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009caffd3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000480000004a2000004553505f434f52455f44554d505f494e464f00450001000031326364313732636165646163643066000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000094000000a502000045585452415f494e464f002a58fbfd3fe80000001d000000ee00000000000000c200000000000000c300000000000000c400000000000000c500000000000000c600000000000000b100000058d31c40b200000000000000b300000000000000b400000000000000b500000000000000b6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000598e2779000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000094000000a502000045585452415f494e464f002a58fbfd3fe80000001d000000ee00000000000000c200000000000000c300000000000000c400000000000000c500000000000000c600000000000000b100000058d31c40b200000000000000b3000000

I have tried to decode it with the following command:

idf.py coredump-info -c C:\Users\Pc\Desktop\coreDump\coreDump.bin

But i got the following error:

Executing action: coredump-info
Failed to load core dump: Core dump version "0x344d" is not supported!

Is there a way to decode this to a meaningfull output?

igrr commented 6 months ago

Probably you need to convert the file from hexadecimal representation back to binary first, before passing it into the coredump-info command. Or looking at it the other way around, is there any specific reason you are encoding the binary data to hexadecimal before writing it into the file?

hitecSmartHome commented 6 months ago

Oh, I tought the decoder will eat it anyway. So you say I should do something like this instead?

void Sys::saveCoreDumpBin() {
    size_t size = 0;
    size_t address = 0;
    uint8_t* coreDump; // Change char* to uint8_t*
    if (!alloc(coreDump, 640)) { return; }
    if (esp_core_dump_image_get(&address, &size) != ESP_OK) { free(coreDump); return; }
    const esp_partition_t* pt = NULL;
    pt = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_COREDUMP, "coredump");
    if (pt == NULL) { free(coreDump); return; }
    uint8_t bf[256];
    int16_t toRead;
    db.remove(CORE_DUMP_PATH);
    for (int16_t i = 0; i < (size / 256) + 1; i++) {
        toRead = (size - i * 256) > 256 ? 256 : (size - i * 256);
        esp_err_t er = esp_partition_read(pt, i * 256, bf, toRead);
        if (er != ESP_OK) {
            break;
        }
        memcpy(coreDump + i * 256, bf, toRead); // Copy directly into coreDump
    }
    db.appendBinary(CORE_DUMP_PATH, coreDump, size); // Append binary data
    esp_core_dump_image_erase();
    free(coreDump);
}
hitecSmartHome commented 6 months ago

I have converted it back to binary with this tool: https://www.rapidtables.com/convert/number/hex-to-binary.html

But I still get the following error:

Executing action: coredump-info
Failed to load core dump: Core dump version "0x345d" is not supported!
hitecSmartHome commented 6 months ago

coreDump.txt coreDumpBin.txt

hitecSmartHome commented 6 months ago

is there any specific reason you are encoding the binary data to hexadecimal before writing it into the file?

Actually no.

igrr commented 6 months ago

Unfortunately I don't know what the functions alloc(coreDump, 640) and db.appendBinary(CORE_DUMP_PATH, coreDump, size) do, so I can't say if the code is correct or not.

If coreDump array is so large that it can contain all the coredump binary, then I think you don't need the for loop, you can simply call esp_partition_read for the entire size.

Failed to load core dump: Core dump version "0x345d" is not supported!

Your coreDumpBin.txt contains literal "0" and "1" characters instead of data. I think the tool means "binary" in the mathematical sense ("0" and "1" symbols) while coredump expects "binary" in the sense of "raw data". So the first byte of your binary file has to have value 0x34. Right now this byte instead gets encoded as 32 bytes, each a "0" or "1" character...

igrr commented 6 months ago

By the way, if you have difficulty implementing coredump analysis for your application, you might consider using our managed service, ESP Insights: https://insights.espressif.com/.

hitecSmartHome commented 6 months ago

I see. So it should be that easy?

void Sys::readCoreDumpAndSave(){
    size_t size = 0;
    size_t address = 0;
    // Get the pointer to the image
    if (esp_core_dump_image_get(&address, &size) != ESP_OK) {
        printf("[System] - Failed to get core dump info\n");
        return;
    }
    // Allocate an array for the image buffer with ps_malloc()
    uint8_t* coreDumpBuffer;
    if( !alloc(coreDumpBuffer, size) ) {
        printf("[System] - Failed to allocate core dump buffer\n");
        return;
    }
    const esp_partition_t* pt = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_COREDUMP, "coredump");
    if(!pt){
        printf("[System] - Failed to find coredump partition\n");
        free(coreDumpBuffer);
        return;
    }
    // Read the whole image at once
    esp_err_t er = esp_partition_read(pt, address, coreDumpBuffer, size);
    if (er != ESP_OK) {
        printf("[System] - Failed to read core dump\n");
        free(coreDumpBuffer);
        return;
    }
}

Unfortunately I don't know what the functions alloc(coreDump, 640) and db.appendBinary(CORE_DUMP_PATH, coreDump, size) do, so I can't say if the code is correct or not.

As i said the alloc is just a wrapper for ps_malloc() and the db method call is just a wrapper for LittleFS write operation.

boolean Sys::alloc(uint8_t *&ptr, int size) {
    ptr = (uint8_t *)ps_malloc(size * sizeof(uint8_t));
    if (!ptr || ptr == NULL) {
        return false;
    }
    return true;
}
hitecSmartHome commented 6 months ago

This could be my final function where

#define CORE_DUMP_PATH "/system/coreDump.bin"
void Sys::readCoreDumpAndSave(){
    size_t size = 0;
    size_t address = 0;
    // Get the pointer to the image
    if (esp_core_dump_image_get(&address, &size) != ESP_OK) {
        printf("[System] - Failed to get core dump info\n");
        return;
    }
    // Allocate an array for the image buffer with ps_malloc()
    uint8_t* coreDumpBuffer;
    if( !alloc(coreDumpBuffer, size) ) {
        printf("[System] - Failed to allocate core dump buffer\n");
        return;
    }
    const esp_partition_t* pt = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_COREDUMP, "coredump");
    if(!pt){
        printf("[System] - Failed to find coredump partition\n");
        free(coreDumpBuffer);
        return;
    }
    // Read the whole image at once
    esp_err_t er = esp_partition_read(pt, address, coreDumpBuffer, size);
    if (er != ESP_OK) {
        printf("[System] - Failed to read core dump\n");
        free(coreDumpBuffer);
        return;
    }
    db.remove(CORE_DUMP_PATH);
    File coreDumpFile = db.getFileObject(CORE_DUMP_PATH,FILE_WRITE);
    size_t written = coreDumpFile.write(coreDumpBuffer, size);
    free(coreDumpBuffer);
    if (written != size) {
        printf("[System] - Failed to write core dump\n");
        return;
    }
    printf("[System] - Successfully wrote core dump\n");
}
hitecSmartHome commented 6 months ago

With this modification I'm still unable to decode it

Failed to load core dump: Invalid application image for coredump: coredump SHA256(b7fbaab6626d2226) != app SHA256()

I have got a 27kb bin file now.

coreDump.txt

hitecSmartHome commented 6 months ago

By the way, if you have difficulty implementing coredump analysis for your application, you might consider using our managed service, ESP Insights: https://insights.espressif.com/.

Unfortunatelly I'm using Arduino as a component and can't move to more recent IDF releases so the Insight is unavailable for me.

erhankur commented 6 months ago

@hitecSmartHome Does you application elf file modified after coredump has been saved to flash?

hitecSmartHome commented 6 months ago

Nop. I'm doing a crash now intentionally and download the results after restart immidiatelly.

void crashMCU(){
    printf("Crashing...\n");
    while(true){
        int i = 0;
        int crash = 1/i;
        printf("Crash: %d\n", crash);
    }
}
erhankur commented 6 months ago

I can see from the saved coredump file (after trimming the 20bytes header), your application elf sha is b7fbaab6626d2226

xtensa-esp32-elf-readelf -n trimmed.dmp

Displaying notes found at file offset 0x000067fc with length 0x00000114:
  Owner                Data size    Description
  ESP_CORE_DUMP_INFO   0x00000048   Unknown note type: (0x0000204a)
   description data: 00 01 00 00 62 37 66 62 61 61 62 36 36 32 36 64 32 32 32 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

You can verify it using a tool like shasum -a 256 build/blink.elf

Results must be the same. And you can debug elf_write_core_dump_info function to see what is going on.

hitecSmartHome commented 6 months ago

So why does idf.py coredump-info -c C:\Users\Pc\Desktop\coreDump\coreDump.txt fails?

hitecSmartHome commented 6 months ago

Should i trim the 20 bytes header before i save it to file?

erhankur commented 6 months ago

No, you don't need to trim. I did it to see the note section in the elf file. idf.py coredump-info will take care of the headers for you.

Can you calculate and compare the elf sha256 outputs as I described above? Or you can ensure you save the coredump from scratch in every panic. If ESP_COREDUMP_FLASH_NO_OVERWRITE is selected maybe you have an old coredump file but a new application built. Please send us the console logs until the coredump finishes so that we can have a better understanding.

hitecSmartHome commented 6 months ago

I see. Will check it. Will crash it again and compare the new log to the file sha.

Here is my core dump sdkconfig

#
# Core dump
#
CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y
# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set
# CONFIG_ESP_COREDUMP_ENABLE_TO_NONE is not set
# CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN is not set
CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y
CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y
# CONFIG_ESP_COREDUMP_CHECKSUM_SHA256 is not set
CONFIG_ESP_COREDUMP_CHECK_BOOT=y
CONFIG_ESP_COREDUMP_ENABLE=y
CONFIG_ESP_COREDUMP_LOGS=y
CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64
CONFIG_ESP_COREDUMP_STACK_SIZE=0
# end of Core dump

I can't find ESP_COREDUMP_FLASH_NO_OVERWRITE in the menuconfig

hitecSmartHome commented 6 months ago

I do save it in every panic. When my esp boots up I have the following logic

esp_reset_reason_t resetReason = esp_reset_reason();
if( resetReason != ESP_RST_SW && resetReason != ESP_RST_POWERON ){
    readCoreDumpAndSave();
}
void Sys::readCoreDumpAndSave(){
    size_t size = 0;
    size_t address = 0;
    // Get the pointer to the image
    if (esp_core_dump_image_get(&address, &size) != ESP_OK) {
        printf("[System] - Failed to get core dump info\n");
        return;
    }
    // Allocate an array for the image buffer with ps_malloc()
    uint8_t* coreDumpBuffer;
    if( !alloc(coreDumpBuffer, size) ) {
        printf("[System] - Failed to allocate core dump buffer\n");
        return;
    }
    const esp_partition_t* pt = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_COREDUMP, "coredump");
    if(!pt){
        printf("[System] - Failed to find coredump partition\n");
        free(coreDumpBuffer);
        return;
    }
    // Read the whole image at once
    esp_err_t er = esp_partition_read(pt, 0, coreDumpBuffer, size);
    if (er != ESP_OK) {
        printf(
            "[System] - Failed to read core dump. Error: %s\n",
            esp_err_to_name(er)
        );
        free(coreDumpBuffer);
        return;
    }
    File coreDumpFile = db.getFileObject(CORE_DUMP_PATH,FILE_WRITE);
    size_t written = coreDumpFile.write(coreDumpBuffer, size);
    free(coreDumpBuffer);
    if (written != size) {
        printf("[System] - Failed to write core dump\n");
        return;
    }
    printf("[System] - Successfully wrote core dump\n");
    esp_core_dump_image_erase();
}

esp_err_t Sys::esp_core_dump_image_erase() {
    /* Find the partition that could potentially contain a (previous) core dump. */
    const esp_partition_t* core_part = esp_partition_find_first(ESP_PARTITION_TYPE_DATA,
        ESP_PARTITION_SUBTYPE_DATA_COREDUMP,
    "coredump");
    if (!core_part) {
        logger.write("No core dump partition found!|n");
        return ESP_ERR_NOT_FOUND;
    }
    if (core_part->size < sizeof(uint32_t)) {
        logger.write("Too small core dump partition!\n");
        return ESP_ERR_INVALID_SIZE;
    }

    esp_err_t err = ESP_OK;
    err = esp_partition_erase_range(core_part, 0, core_part->size);
    if (err != ESP_OK) {
        Serial.printf("Failed to erase core dump partition (%d)!\n", err);
        return err;
    }

    // on encrypted flash esp_partition_erase_range will leave encrypted
    // garbage instead of 0xFFFFFFFF so overwriting again to safely signalize
    // deleted coredumps
    const uint32_t invalid_size = 0xFFFFFFFF;
    err = esp_partition_write(core_part, 0, &invalid_size, sizeof(invalid_size));
    if (err != ESP_OK) {
        logger.write("Failed to write core dump partition size (%d)!\n", err);
    }

    return err;
}
hitecSmartHome commented 6 months ago
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.

Core  0 register dump:
PC      : 0x3268e3a2  PS      : 0x00060830  A0      : 0x38b38c81  A1      : 0x3ffd13e0  
A2      : 0x3ffd1420  A3      : 0x3f81c66c  A4      : 0x00ba41c3  A5      : 0x00004240   
A6      : 0x00000003  A7      : 0x00060023  A8      : 0x8026f858  A9      : 0x00000000  
A10     : 0x3ffd1420  A11     : 0x3f81c66c  A12     : 0x1f2638c2  A13     : 0x3ff5f078   
A14     : 0x3ff5f07c  A15     : 0x00000001  SAR     : 0x00000001  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x40083715  LEND    : 0x4008371d  LCOUNT  : 0x00000027   

Backtrace: 0x3268e39f:0x3ffd13e0 |<-CORRUPTED

  #0  0x3268e39f:0x3ffd13e0 in ?? ??:0

ELF file SHA256: 93ed632490e2a93d

I (7513) esp_core_dump_flash: Save core dump to flash...
I (7520) esp_core_dump_flash: Erase flash 28672 bytes @ 0xfec000
[0;32mI (7747) esp_core_dump_flash: Write end offset 0x6c84, check sum length 4
I (7747) esp_core_dump_flash: Core dump has been saved to flash.
Rebooting...

This is the output to the console on crash.

Here is the console on boot

I (1387) esp_core_dump_flash: Init core dump to flash
I (1393) esp_core_dump_flash: Found partition 'coredump' @ fec000 65536 bytes
[0;32mI (1416) esp_core_dump_flash: Core dump data checksum is correct
I (1416) esp_core_dump_flash: Found core dump 27076 bytes in flash @ 0xfec000

My app reads and saves it

[System] - Successfully wrote core dump
hitecSmartHome commented 6 months ago

Where should i call shasum -a 256? It is unknown target when i call it with idf.py shasum -a 256 <path_to_built_elf>

hitecSmartHome commented 6 months ago

So i did it on windows CMD certutil -hashfile C:\Users\Pc\Desktop\coreDump\coreDump.bin and the sha of the coreDump.bin is 6506a9448fd3d9a30b3d70bc5b3cabfd6b0aa9c9 and the output of the coredump-info is Failed to load core dump: Invalid application image for coredump: coredump SHA256(93ed632490e2a93d) != app SHA256().. I'm sure that this is the latest coreDump.bin and I did not recompile the firmware

erhankur commented 6 months ago

OK. What do you see when you run the below command? It will read the coredump partition to a file and decode it.

idf.py coredump-info -s esp-coredump.txt -b 115200

Then you can compare esp-coredump.txt and your-coredump.txt

You should be able to decode your file like this.

espcoredump.py info_corefile -c your-coredump.txt -t raw <your_app_elf_file_path>

or 

idf.py coredump-info -c your-coredump.txt
hitecSmartHome commented 6 months ago
Executing action: coredump-info
Path to core dump file is not provided. Core dump can't be read from flash since this option is not enabled in menuconfig
hitecSmartHome commented 6 months ago

I can't see a menuconfig option like this

hitecSmartHome commented 6 months ago

I have tried this command

espcoredump.py info_corefile -c your-coredump.txt -t raw <your_app_elf_file_path>

I replaced your-coredump.txt with the path of the coredump and the elf file path with the elf file path

And i got

espcoredump.py : The term 'espcoredump.py' is not recognized as the name of a cmdlet, function, script file, or operable pro
gram. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ espcoredump.py info_corefile -c C:\Users\Pc\Desktop\coreDump\coreDump ...
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (espcoredump.py:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
hitecSmartHome commented 6 months ago

If i do it like this

idf.py info_corefile your-coredump.txt raw <your_app_elf_file_path> ( without -t and -c )

ninja: error: unknown target 'info_corefile'
[0/1] Re-running CMake...
ninja failed with exit code 1, output of the command is in the
hitecSmartHome commented 6 months ago

I must mention that I'm using Arduino as a component of IDF with PlatformIO. I have installed IDF separately, launching the ESP-IDF 5.2 PowerShell on windows, cd into my project dir ( which is in PlatformIO directory ) and executing commands there.

erhankur commented 6 months ago

Sorry, I don't have such a setup to test and see what is going on. As a last check on my side, if you can send your latest application elf file (here or by email) along with the latest coredump.txt file, I can have a look. Otherwise, I suggest you to consult PlatformIO community and come back here if something needs to be done on the IDF side.

hitecSmartHome commented 6 months ago

I see. Thank you for your help. I appreciate it. Will try with the PlatformIO guys.

hitecSmartHome commented 5 months ago

So the PIO guys said that it isn't their problem. It should be fixed IDF side. What should i do?

Please verify that my method to retrive and store the coredump data is correct and please make suggestions how to decode it.

Code for this


void Sys::readCoreDumpAndSave(){
    size_t size = 0;
    size_t address = 0;
    // Get the pointer to the image
    if (esp_core_dump_image_get(&address, &size) != ESP_OK) {
        printf("[System] - Failed to get core dump info\n");
        return;
    }
    // Allocate an array for the image buffer with ps_malloc()
    uint8_t* coreDumpBuffer;
    if( !alloc(coreDumpBuffer, size) ) {
        printf("[System] - Failed to allocate core dump buffer\n");
        return;
    }
    const esp_partition_t* pt = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_COREDUMP, "coredump");
    if(!pt){
        printf("[System] - Failed to find coredump partition\n");
        free(coreDumpBuffer);
        return;
    }
    // Read the whole image at once
    esp_err_t er = esp_partition_read(pt, 0, coreDumpBuffer, size);
    if (er != ESP_OK) {
        printf(
            "[System] - Failed to read core dump. Error: %s\n",
            esp_err_to_name(er)
        );
        free(coreDumpBuffer);
        return;
    }
    File coreDumpFile = db.getFileObject(CORE_DUMP_PATH,FILE_WRITE);
    size_t written = coreDumpFile.write(coreDumpBuffer, size);
    free(coreDumpBuffer);
    if (written != size) {
        printf("[System] - Failed to write core dump\n");
        return;
    }
    printf("[System] - Successfully wrote core dump\n");
    esp_core_dump_image_erase();
}

esp_err_t Sys::esp_core_dump_image_erase() {
    /* Find the partition that could potentially contain a (previous) core dump. */
    const esp_partition_t* core_part = esp_partition_find_first(ESP_PARTITION_TYPE_DATA,
        ESP_PARTITION_SUBTYPE_DATA_COREDUMP,
    "coredump");
    if (!core_part) {
        logger.write("No core dump partition found!|n");
        return ESP_ERR_NOT_FOUND;
    }
    if (core_part->size < sizeof(uint32_t)) {
        logger.write("Too small core dump partition!\n");
        return ESP_ERR_INVALID_SIZE;
    }

    esp_err_t err = ESP_OK;
    err = esp_partition_erase_range(core_part, 0, core_part->size);
    if (err != ESP_OK) {
        Serial.printf("Failed to erase core dump partition (%d)!\n", err);
        return err;
    }

    // on encrypted flash esp_partition_erase_range will leave encrypted
    // garbage instead of 0xFFFFFFFF so overwriting again to safely signalize
    // deleted coredumps
    const uint32_t invalid_size = 0xFFFFFFFF;
    err = esp_partition_write(core_part, 0, &invalid_size, sizeof(invalid_size));
    if (err != ESP_OK) {
        logger.write("Failed to write core dump partition size (%d)!\n", err);
    }

    return err;
}

void readRebootReason() {
    esp_reset_reason_t resetReason = esp_reset_reason();
    if( resetReason != ESP_RST_SW && resetReason != ESP_RST_POWERON ){
        readCoreDumpAndSave();
    }
}

void setup(){
    readRebootReason();
}

Maybe if we would have an option to save the crash log as a verbose txt I could save that directly to FS and don't have to decode at all. I have plenty of flash space, this would be no problem.

What I have tried so far

My problem is probably because of the PlatformIO approach of my project. I'm using Arduino as a component of IDF and I can't do idf commands from PIO CLI. I have installed the IDF separately on my system. PIO guys said that if I navigate to the PIO project folder with the IDF PowerShell it should work OK.

Errors I got on various commands

espcoredump.py : The term 'espcoredump.py' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ espcoredump.py
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (espcoredump.py:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
Executing action: coredump-debug
Failed to load core dump: Invalid application image for coredump: coredump SHA256(02fcd8c6a8f0ea07) != app SHA256()
Executing action: coredump-info
Failed to load core dump: Invalid application image for coredump: coredump SHA256(02fcd8c6a8f0ea07) != app SHA256()

Maybe it can not find my firmware.elf file thus app SHA256() is empty.

My elf and bin files are in ./projectDir/.pio/build/esp-wrover-kit/firmware.elf

erhankur commented 5 months ago

Now I have Windows environment to test. What I have done so far, 1 - Run ESP-IDF 5.2 Powershell 2 - pip list to see installed packages.

pip list
Package               Version
--------------------- ---------
bitarray              2.8.2
bitstring             4.1.2
CacheControl          0.13.1
certifi               2023.7.22
cffi                  1.16.0
charset-normalizer    3.3.1
click                 8.1.7
colorama              0.4.6
construct             2.10.69
contextlib2           21.6.0
cryptography          41.0.7
ecdsa                 0.18.0
esp-coredump          1.10.0

3 - I can see esp-coredump is installed. (If not run .\install.ps1 and .\export.ps1) 4 - Run espcoredump.py

esp-coredump.exe info_corefile -c coredump.txt -t raw dummy.elf

5 - Got error. It is OK since I don't have original elf file.

espcoredump.py v1.10.0
Failed to load core dump: Invalid application image for coredump: coredump SHA256(b7fbaab6626d2226) != app SHA256(8bdd9f3ae7de7911)

Please try the steps.

hitecSmartHome commented 5 months ago

Thank you for the suggestion. If i try with an incompatible elf file it produces the same output as yours. But if I crash the ESP like this:

printf("Crashing...\n");
while(true){
    int i = 0;
    int crash = 1/i;
    printf("Crash: %d\n", crash);
}

It errors out:

espcoredump.py v1.11.0
Failed to load core dump: Core dump version "0x3030" is not supported!

Maybe it is because of the header in the coreDump file?

I can't upload the elf file because github wont allow me.

image

hitecSmartHome commented 5 months ago

esp-coredump 1.11.0

hitecSmartHome commented 5 months ago

Here is a link to the core dump files ( I could not upload it to github )

https://drive.google.com/drive/folders/1oWlqmrAvXPMyer-4162RN21DQHfX8lVf?usp=sharing

erhankur commented 5 months ago

I can decode it.

Your header looks fine. Header version 0x100 meaning CRC - 20 byte header.

64 6F 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I added the gdb-timeout parameter since the app elf file is too big and gdb requires more time to parse.

esp-coredump.exe --gdb-timeout-sec 10 info_corefile -c .\coreDump.bin -t raw .\firmware.elf

===============================================================
==================== ESP32 CORE DUMP START ====================

Crashed task handle: 0x3ffd9bb0, name: 'httpd', GDB name: 'process 1073585072'

================== CURRENT THREAD REGISTERS ===================
exccause       0x41 (DebugException)
excvaddr       0x0
epc1           0x401da6d8
epc2           0x0
epc3           0x0
epc4           0x0
epc5           0x0
epc6           0x401754fc
eps2           0x0
eps3           0x0
eps4           0x0
eps5           0x0
eps6           0x60b20
pc             0x401754fc          0x401754fc <std::_Function_handler<int(PsychicRequest*), HsHServer::begin()::<lambda(PsychicRequest*)> >::_M_invoke(const std::_Any_data &, PsychicRequest *&&)+12>
lbeg           0x400014fd          1073747197
lend           0x4000150d          1073747213
lcount         0xfffffffd          4294967293
sar            0x1a                26
ps             0x60b26             396070
threadptr      <unavailable>
br             <unavailable>
scompare1      <unavailable>
acclo          <unavailable>
acchi          <unavailable>
m0             <unavailable>
m1             <unavailable>
m2             <unavailable>
m3             <unavailable>
expstate       <unavailable>
f64r_lo        <unavailable>
f64r_hi        <unavailable>
f64s           <unavailable>
fcr            <unavailable>
fsr            <unavailable>
a0             0x801ac5b6          -2145729098
a1             0x3ffd98c0          1073584320
a2             0x3f80abfc          1065397244
a3             0x3ffd98e0          1073584352
a4             0x3ffe2888          1073621128
a5             0x0                 0
a6             0x3ffd9940          1073584448
a7             0x3ffd98b0          1073584304
a8             0x801754fc          -2145954564
a9             0x3ffd98a0          1073584288
a10            0xa                 10
a11            0x3ffd98a0          1073584288
a12            0x89                137
a13            0x3ffd9958          1073584472
a14            0xe                 14
a15            0xff000000          -16777216

==================== CURRENT THREAD STACK =====================
#0  std::_Function_handler<int(PsychicRequest*), HsHServer::begin()::<lambda(PsychicRequest*)> >::_M_invoke(const std::_Any_data &, PsychicRequest *&&) (__functor=..., __args#0=@0x3ffd98e0: 0x3ffd9940) at src/Server/Server.cpp:82
#1  0x401ac5b6 in std::function<int (PsychicRequest*)>::operator()(PsychicRequest*) const (__args#0=<optimized out>, this=0x3f80abfc) at c:\\users\\pc\\.platformio\\packages\  oolchain-xtensa-esp32@8.4.0+2021r2-patch5\\xtensa-esp32-elf\\include\\c++\\8.4.0\\bits/std_function.h:687
#2  PsychicWebHandler::handleRequest (this=0x3f80ab94, request=<optimized out>) at lib/PsychicHttp/src/PsychicWebHandler.cpp:46
#3  0x401acd69 in PsychicEndpoint::requestCallback (req=<optimized out>) at lib/PsychicHttp/src/PsychicEndpoint.cpp:72
#4  0x401d4cf0 in httpd_uri (hd=0x3f808480) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_uri.c:329
#5  0x401d3c0b in httpd_parse_req (hd=0x3f808480) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_parse.c:659
#6  httpd_req_new (hd=0x3f808480, sd=<optimized out>) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_parse.c:787
#7  0x401d4379 in httpd_sess_process (hd=0x3f808480, session=0x3f809d18) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_sess.c:419
#8  0x401d32ef in httpd_process_session (context=0x3ffd9b08, session=0x3f809d18) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_main.c:178
#9  httpd_process_session (session=0x3f809d18, context=0x3ffd9b08) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_main.c:163
#10 0x40279835 in httpd_sess_enum (hd=<optimized out>, enum_function=0x401d32ac <httpd_process_session>, context=0x3ffd9b08) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_sess.c:50
#11 0x401d33e0 in httpd_server (hd=<optimized out>) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_main.c:228
#12 httpd_thread (arg=0x3f808480) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_main.c:250

======================== THREADS INFO =========================
  Id   Target Id          Frame
* 1    process 1073585072 std::_Function_handler<int(PsychicRequest*), HsHServer::begin()::<lambda(PsychicRequest*)> >::_M_invoke(const std::_Any_data &, PsychicRequest *&&) (__functor=..., __args#0=@0x3ffd98e0: 0x3ffd9940) at src/Server/Server.cpp:82
  2    process 1073504376 ws_poll_read (t=<error reading variable: Cannot access memory at address 0xfffffff4>, timeout_ms=1073503368) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\    cp_transport\   ransport_ws.c:527
  3    process 1073504016 0x400826a0 in esp_crosscore_int_send_yield (core_id=1) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  4    process 1073531308 0x400826a0 in esp_crosscore_int_send_yield (core_id=1) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  5    process 1073479060 0x40279aba in esp_pm_impl_waiti () at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_pm\\pm_impl.c:849
  6    process 1073477160 0x40279aba in esp_pm_impl_waiti () at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_pm\\pm_impl.c:849
  7    process 1073599404 0x400826a0 in esp_crosscore_int_send_yield (core_id=0) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  8    process 1073606768 0x400826a0 in esp_crosscore_int_send_yield (core_id=0) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  9    process 1073548268 0x400826a0 in esp_crosscore_int_send_yield (core_id=0) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  10   process 1073549916 0x400826a0 in esp_crosscore_int_send_yield (core_id=1) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  11   process 1073481472 0x400826a0 in esp_crosscore_int_send_yield (core_id=0) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  12   process 1073412692 0x400826a0 in esp_crosscore_int_send_yield (core_id=1) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  13   process 1073412044 0x400826a0 in esp_crosscore_int_send_yield (core_id=0) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  14   process 1073607500 0x400826a0 in esp_crosscore_int_send_yield (core_id=0) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  15   process 1073563796 0x4000bff0 in ?? ()
  16   process 1073609972 0x400826a0 in esp_crosscore_int_send_yield (core_id=0) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  17   process 1073470876 0x4000bff0 in ?? ()
  18   process 1073550276 0x400826a0 in esp_crosscore_int_send_yield (core_id=0) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145
  19   process 1073561384 0x400826a0 in esp_crosscore_int_send_yield (core_id=1) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_system\\crosscore_int.c:145

       TCB             NAME PRIO C/B  STACK USED/FREE
---------- ---------------- -------- ----------------
0x3ffd9bb0            httpd      5/5        912/19076
0x3ffc6078   websocket_task      5/5         384/5612
0x3ffc5f10   ComponentsTask      4/4        384/19604
0x3ffcc9ac         loopTask      1/1        416/14936
0x3ffbfd94             IDLE      0/0         384/1136
0x3ffbf628             IDLE      0/0         384/1148
0x3ffdd3ac          OTATask    15/15         384/3656
0x3ffdf070  HardwareConfigT    15/15         512/6476
0x3ffd0bec       SystemTask    10/10        384/15992
0x3ffd125c              tiT    18/18         480/2580
0x3ffc0700          Tmr Svc      1/1         368/1668
0x3ffafa54             ipc1    24/24         416/1104
0x3ffaf7cc             ipc0    24/24         416/1112
0x3ffdf34c             mdns      1/1         464/3616
0x3ffd4894          emac_rx    15/15         416/1616
0x3ffdfcf4  uart_event_task    24/24         480/1552
0x3ffbdd9c        esp_timer    22/22         416/3160
0x3ffd13c4          sys_evt    20/20         496/1792
0x3ffd3f28   arduino_events    19/19         432/3660

==================== THREAD 1 (TCB: 0x3ffd9bb0, name: 'httpd') =====================
#0  std::_Function_handler<int(PsychicRequest*), HsHServer::begin()::<lambda(PsychicRequest*)> >::_M_invoke(const std::_Any_data &, PsychicRequest *&&) (__functor=..., __args#0=@0x3ffd98e0: 0x3ffd9940) at src/Server/Server.cpp:82
#1  0x401ac5b6 in std::function<int (PsychicRequest*)>::operator()(PsychicRequest*) const (__args#0=<optimized out>, this=0x3f80abfc) at c:\\users\\pc\\.platformio\\packages\  oolchain-xtensa-esp32@8.4.0+2021r2-patch5\\xtensa-esp32-elf\\include\\c++\\8.4.0\\bits/std_function.h:687
#2  PsychicWebHandler::handleRequest (this=0x3f80ab94, request=<optimized out>) at lib/PsychicHttp/src/PsychicWebHandler.cpp:46
#3  0x401acd69 in PsychicEndpoint::requestCallback (req=<optimized out>) at lib/PsychicHttp/src/PsychicEndpoint.cpp:72
#4  0x401d4cf0 in httpd_uri (hd=0x3f808480) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_uri.c:329
#5  0x401d3c0b in httpd_parse_req (hd=0x3f808480) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_parse.c:659
#6  httpd_req_new (hd=0x3f808480, sd=<optimized out>) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_parse.c:787
#7  0x401d4379 in httpd_sess_process (hd=0x3f808480, session=0x3f809d18) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_sess.c:419
#8  0x401d32ef in httpd_process_session (context=0x3ffd9b08, session=0x3f809d18) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_main.c:178
#9  httpd_process_session (session=0x3f809d18, context=0x3ffd9b08) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_main.c:163
#10 0x40279835 in httpd_sess_enum (hd=<optimized out>, enum_function=0x401d32ac <httpd_process_session>, context=0x3ffd9b08) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_sess.c:50
#11 0x401d33e0 in httpd_server (hd=<optimized out>) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_main.c:228
#12 httpd_thread (arg=0x3f808480) at C:\\Users\\Pc\\.platformio\\packages\\framework-espidf@3.40406.240122\\components\\esp_http_server\\src\\httpd_main.c:250

....

I did nothing special. maybe gdb timeout will help you. 
hitecSmartHome commented 5 months ago

Well, I did it with exactly this command. What did you get as a result?

hitecSmartHome commented 5 months ago

What did i do wrong? I'm using ESP-IDF 5.2 PowerShell, navigated to the project root dir

hitecSmartHome commented 5 months ago

Oh okay, I copyed the files to my project dir and run the test again with gdb timeout 10 and i got a result finally!!

In the end i got this for some reason

===================== ESP32 CORE DUMP END =====================
===============================================================
Exception in thread Thread-1 (_readerthread):
Traceback (most recent call last):
  File "threading.py", line 1038, in _bootstrap_inner
Exception in thread Thread-2 (_readerthread):
Traceback (most recent call last):
  File "threading.py", line 1038, in _bootstrap_inner
  File "threading.py", line 975, in run
  File "threading.py", line 975, in run
  File "subprocess.py", line 1552, in _readerthread
  File "subprocess.py", line 1552, in _readerthread
OSError: [Errno 22] Invalid argument
OSError: [Errno 22] Invalid argument
Done!
hitecSmartHome commented 5 months ago

Anyway, this gave me a lot of usefull info! Thank you very much!

erhankur commented 5 months ago

We will look at that errors but you have finally decoded coredump. So I can close this issue.

hitecSmartHome commented 5 months ago

Thank you very much.