esp-idf/components
Angus Gratton f7b859ac84 freertos: Fix race condition using vTaskDelete() cross-core causing resource leak
Causes test added in parent commit to pass.

This race happens if the deleted task is running on the other CPU,
and is already spinning in a critical section waiting for xTaskQueueMutex
because it's about to be blocked for a resource.

The "deleted" task would end up blocked, possibly indefinitely, and
never actually deleted or its resources cleaned up by the idle tasks.

Details:

vTaskDelete() adds the target task to the xTasksWaitingTermination list,
expecting it to be yielded off CPU and then cleaned up later. However as soon as
vTaskDelete() releases xTaskQueueMutex, the target task runs and moves itself to the
xDelayedTaskList1. Because interrupts are already disabled on that CPU,
the "yield" to the other CPU sent by the vTaskDelete() comes afterward so
doesn't help.
2021-04-13 03:40:10 +00:00
..
app_trace
app_update
asio
bootloader secure_boot_v2: Adds support SB_V2 for ESP32-C3 ECO3 2021-04-07 19:52:44 +08:00
bootloader_support Merge branch 'bugfix/enable_gpio18_gpio19_esp32c3' into 'master' 2021-04-12 09:39:55 +00:00
bt docs: fix doxygen compile warnings for doxygen 1.9.1 2021-04-09 11:57:03 +08:00
cbor
cmock
coap
console
cxx
driver Merge branch 'refactor/no_dac_on_esp32s3' into 'master' 2021-04-12 10:52:33 +00:00
efuse
esp-tls esp-tls: Fix setsockopt for TCP_KEEPIDLE 2021-04-06 15:37:16 +08:00
esp32 gpio: Disable USB JTAG when setting pins 18 and 19 as GPIOs on ESP32C3 2021-04-08 14:01:18 +08:00
esp32c3 Merge branch 'feature/secure_bootv2_c3' into 'master' 2021-04-12 01:31:25 +00:00
esp32s2
esp32s3 gpio: Disable USB JTAG when setting pins 18 and 19 as GPIOs on ESP32C3 2021-04-08 14:01:18 +08:00
esp_adc_cal
esp_common
esp_eth Merge branch 'bugfix/eth_w5500_4byte_corruption' into 'master' 2021-04-12 14:26:30 +00:00
esp_event Revert "esp_event test: Disable linker relaxations in this component, to temporarily workaround a linker bug" 2021-04-08 13:33:28 +10:00
esp_gdbstub
esp_hid
esp_http_client esp_http_client: Make http_utils_get_string_between and http_utils_str_starts_with case insensitive 2021-04-09 06:03:02 +00:00
esp_http_server esp_http_server: Fix transport_ctx not getting freed 2021-04-07 05:25:39 +00:00
esp_https_ota Merge branch 'bugfix/ota_and_http_client' into 'master' 2021-04-09 07:40:59 +00:00
esp_https_server
esp_hw_support sleep: disable switch-case jump tables from being placed in flash 2021-04-09 14:16:27 +08:00
esp_ipc
esp_local_ctrl
esp_netif esp_netif: Add CONFIG_LWIP_SLIP_SUPPORT to sperate slip component 2021-04-01 17:10:50 +08:00
esp_pm esp_system: move sleep modes to esp_hw_support, power down light sleep to esp_pm 2021-04-07 17:53:37 +08:00
esp_ringbuf
esp_rom
esp_serial_slave_link
esp_system sleep: disable switch-case jump tables from being placed in flash 2021-04-09 14:16:27 +08:00
esp_timer
esp_websocket_client
esp_wifi Merge branch 'refactor/movements_from_target_components' into 'master' 2021-04-05 02:37:21 +00:00
espcoredump Merge branch 'bugfix/enable_gpio18_gpio19_esp32c3' into 'master' 2021-04-12 09:39:55 +00:00
esptool_py
expat
fatfs Merge branch 'bugfix/remove_HSPI_macro_on_c3' into 'master' 2021-04-08 09:33:18 +00:00
freemodbus
freertos freertos: Fix race condition using vTaskDelete() cross-core causing resource leak 2021-04-13 03:40:10 +00:00
hal Merge branch 'refactor/no_dac_on_esp32s3' into 'master' 2021-04-12 10:52:33 +00:00
heap
idf_test
jsmn
json
libsodium libsodium: Update library to v1.0.18 2021-04-06 11:23:50 +05:30
log
lwip lwip: Made LCP ECHO bool for better user experience 2021-04-09 06:53:30 +00:00
mbedtls
mdns
mqtt
newlib
nghttp
nvs_flash
openssl
openthread openthread: add radio api for Thread 1.2 to work 2021-04-08 17:49:16 +08:00
partition_table
perfmon
protobuf-c
protocomm Add secure connection for just works in provisioning app for bluedroid 2021-04-01 09:29:03 +00:00
pthread
riscv
sdmmc
soc dac: added DAC support macro 2021-04-12 12:04:46 +08:00
spi_flash Merge branch 'bugfix/fix_flash_ci' into 'master' 2021-04-13 03:23:02 +00:00
spiffs
tcp_transport tcp_transport: Add option to enable crt_bundle for SSL connection 2021-04-07 05:31:21 +00:00
tcpip_adapter
tinyusb
touch_element
ulp
unity
usb
vfs
wear_levelling
wifi_provisioning
wpa_supplicant
xtensa