-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esp_vfs_fat_register and httpd not working together without USE_ONLY_LWIP_SELECT (IDFGH-1259) #3554
Comments
Linking #3149 which is possibly related (was fixed in master only, hasn't been backported to v3.2). |
I have experienced the same issue, and the same USE_ONLY_LWIP_SELECT seems to work for me. |
Thank you @felixcollins for reporting the issue and giving a very useful use case to reproduce it. I found the root cause of the bug and we will push the fix ASAP to master and will be backported to older IDF versions as well. I'm sorry that it took us too long to fix it. |
Environment
Development Kit: Custom Board - see main.c line 20 for SD gpio assignment (this should be changed for your dev board)
Module or chip used: [ESP32-WROOM-32|
IDF version v3.2-103-g4aa1058e8
Build System: Make
Compiler version (run
xtensa-esp32-elf-gcc --version
to find it):xtensa-esp32-elf-gcc.exe (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a5) 5.2.0
Operating System: Windows 10
Power Supply: custom board - powered from USB port with linear reg on board (TC1301B)
Problem Description
esp_vfs_fat_register and httpd not working together without USE_ONLY_LWIP_SELECT
I have been having a problem where the httpd will not work after calling esp_vfs_fat_sdmmc_mount(). It seems the problem can be fixed by running menuconfig and choosing the "lwip select only" option. Component config / LWIP /USE_ONLY_LWIP_SELECT [=y].
It seems the problem is that (without the lwip select option) the select() call in the httpd returns data on the wrong file descriptor after esp_vfs_fat_sdmmc_mount() is called.
I've attached a zip file with a minimal repro. See comment at line 71 in main.c to break the example.
Expected Behavior
httpd and esp_vfs_fat_sdmmc_mount() do not interfere
Actual Behavior
httpd stops working after esp_vfs_fat_sdmmc_mount() is called
Steps to repropduce
Code to reproduce this issue
brokenwebserverexample.zip
Other items if possible
sdkconfig.zip
The text was updated successfully, but these errors were encountered: