Skip to content
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

Build fails when enabling LWIP_TCPIP_CORE_LOCKING (IDFGH-9063) #10466

Closed
3 tasks done
wuyuanyi135 opened this issue Dec 30, 2022 · 7 comments
Closed
3 tasks done

Build fails when enabling LWIP_TCPIP_CORE_LOCKING (IDFGH-9063) #10466

wuyuanyi135 opened this issue Dec 30, 2022 · 7 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@wuyuanyi135
Copy link
Contributor

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.1-dev-2606-ga74ae7fba7

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

PowerShell

What is the expected behavior?

LWIP_TCPIP_CORE_LOCKING option should compile

What is the actual behavior?

Compilation failed due to

C:/Espressif/frameworks/esp-idf-master/components/lwip/lwip/src/core/init.c:241:2: error: #error "For LWIP_NETCONN_FULLDUPLEX to work, LWIP_NETCONN_SEM_PER_THREAD is required"
  241 | #error "For LWIP_NETCONN_FULLDUPLEX to work, LWIP_NETCONN_SEM_PER_THREAD is required"

https://github.com/espressif/esp-lwip/blob/705dd71d46779bf29653f1f1d7b1af5a09fb2aa7/src/core/init.c#L241

Note that LWIP_NETCONN_SEM_PER_THREAD is set to zero by this line while LWIP_NETCONN_FULLDUPLEX is hard coded to 1 by the option.

Steps to reproduce.

  1. menuconfig -> component -> lwip ->check Enable tcpip core locking

Build or installation Logs.

No response

More Information.

No response

@wuyuanyi135 wuyuanyi135 added the Type: Bug bugs in IDF label Dec 30, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 30, 2022
@github-actions github-actions bot changed the title Build fails when enabling LWIP_TCPIP_CORE_LOCKING Build fails when enabling LWIP_TCPIP_CORE_LOCKING (IDFGH-9063) Dec 30, 2022
@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Jan 6, 2023
@david-cermak
Copy link
Collaborator

@wuyuanyi135 Sorry for the inconvenience. This option is currently broken on master and v5.0. We have a fix in the pipeline, that should be merged in the following weeks. Linking one related issue: #9908

@wuyuanyi135
Copy link
Contributor Author

@david-cermak thanks for the heads up!

@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: In Progress Work is in progress Resolution: NA Issue resolution is unavailable labels Jan 18, 2023
@AxelLin
Copy link
Contributor

AxelLin commented Feb 7, 2023

@david-cermak

Would you backport the fix to stable branches (v5.0 and v4.4)?
I mainly care about the thread safety issues in non-core locking (which is the default setting) case.

@david-cermak
Copy link
Collaborator

Yes, will backport to both v5.0 (fully) and v4.4 (here we'll only patch the issues, rather than fixing core-locking config)

@AxelLin
Copy link
Contributor

AxelLin commented Feb 27, 2023

Yes, will backport to both v5.0 (fully) and v4.4 (here we'll only patch the issues, rather than fixing core-locking config)

Just remind I still cannot find the fix in v5.0 and v4.4.

@dine909
Copy link

dine909 commented Feb 27, 2023

Just remind I still cannot find the fix in v5.0 and v4.4.

or in the latest v5.0.1

@AxelLin
Copy link
Contributor

AxelLin commented Mar 16, 2023

Yes, will backport to both v5.0 (fully) and v4.4 (here we'll only patch the issues, rather than fixing core-locking config)

Any update? BTW, please also add the missing esp_sntp_enabled() to v5.0.

espressif-bot pushed a commit that referenced this issue Mar 23, 2023
* Fix thread safety issues in non-core locking
* Add option to verify thread safety issues in lwip (core-lock assertion)
* Make esp_sntp.h thread safe API
* Fix sntp example
(v4.4 - fixes minor merge issue that duplicated
DHCP_DEFINE_CUSTOM_TIMEOUTS and DHCP_REQUEST_TIMEOUT_SEQUENCE)

Closes #9908
Closes #10502
Closes #10466
espressif-bot pushed a commit that referenced this issue Mar 31, 2023
* Fix thread safety issues in non-core locking
* Add option to verify thread safety issues in lwip (core-lock assertion)
* Make esp_sntp.h thread safe API
* Fix sntp examples

Closes #9908
Closes #10502
Closes #10466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

5 participants