Skip to content

[TW#18940] Debug fails / stops in taskENTER_CRITICAL / queue.c #27

@nkolban

Description

@nkolban

I am running a WROVER DevKit with the latest ESP-IDF master as of this date. When I run gdb against my ESP32, all works as desired ... for a period of time. As I step through the statements using n I am presented with the next statement as desired. However, after stepping over a varying number of statements, when I next execute n I do NOT wake up at the next statement, instead I wake up here:

108		ESP_LOGD(LOG_TAG, "Setting up callbacks for logging");
(gdb) n
Target halted. PRO_CPU: PC=0x4008256C (active)    APP_CPU: PC=0xF8001080 
Target halted. PRO_CPU: PC=0x4008774D (active)    APP_CPU: PC=0xF8001080 
Target halted. PRO_CPU: PC=0x4008774F (active)    APP_CPU: PC=0xF8001080 
Target halted. PRO_CPU: PC=0x40087752 (active)    APP_CPU: PC=0xF8001080 
Target halted. PRO_CPU: PC=0x40087755 (active)    APP_CPU: PC=0xF8001080 
Target halted. PRO_CPU: PC=0x40087758 (active)    APP_CPU: PC=0xF8001080 
Target halted. PRO_CPU: PC=0x4008775A (active)    APP_CPU: PC=0xF8001080 
Target halted. PRO_CPU: PC=0x4008775C (active)    APP_CPU: PC=0xF8001080 
Target halted. PRO_CPU: PC=0x40083E63 (active)    APP_CPU: PC=0xF8001080 

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 1073412716]
xQueueGenericReceive (xQueue=0x3ffaea14, pvBuffer=0x0, xTicksToWait=4294967295, xJustPeeking=0)
    at /home/kolban/particle/Phase2/esp-idf/components/freertos/./queue.c:1455
1455			taskENTER_CRITICAL(&pxQueue->mux);
(gdb) q

This log shows that at line 108 of my source code, I executed n and then wake up at line 1455 of freertos/queue.c:1455. I can not continue from here.

I can recreate this using either command line xtensa-esp32-elf-gdb or Eclipse debugging.

My gdbinit looks as follows:

set remotelogfile gdb_log.txt
target remote :3333
mon reset halt
thb app_main
x $a1=0
c

I can recreate at will using a variety of distinct applications. My platform is Ubuntu 17.10 running under Oracle Virtual Box.

I am attaching both:

  • gdb_log.txt
  • openocd.log

as requested in the reporting information. I am available to demonstrate live or provide additional documentation on request.

bug.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions