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

I2C Deadlock (IDFGH-14095) #14906

Closed
3 tasks done
RDobrinov opened this issue Nov 19, 2024 · 2 comments
Closed
3 tasks done

I2C Deadlock (IDFGH-14095) #14906

RDobrinov opened this issue Nov 19, 2024 · 2 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@RDobrinov
Copy link

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.3.1 & 5.4-dev ( master branch )

Espressif SoC revision.

ESP32-D0WD (revision v1.0)

Operating System used.

Linux

How did you build your project?

VS Code IDE

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

None

Development Kit.

ESP32-D0WD (revision v1.0)

Power Supply used.

USB

What is the expected behavior?

Do not enter into deadlock.

What is the actual behavior?

Deadlock occur when no free i2c device left

Steps to reproduce.

Just request execute i2c_new_master_bus() until no free busses left, and try to release one of them.

Debug Logs.

No response

More Information.

When no free buses left i2c_acquire_bus_handle() do not release s_i2c_platform.mutex.
ESP_RETURN_ON_FALSE is executed and lock never released

@RDobrinov RDobrinov added the Type: Bug bugs in IDF label Nov 19, 2024
@github-actions github-actions bot changed the title I2C Deadlock I2C Deadlock (IDFGH-14095) Nov 19, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 19, 2024
@atanisoft
Copy link

This might be (partially) covered by #14845.

@pback34
Copy link

pback34 commented Nov 20, 2024

This might be (partially) covered by #14845.

it looks like @mythbuster5 committed the same fix as I have for this issue on Nov 6, only hours before me (commit 0a098f4)! Is that correct @mythbuster5 ?

Could there still be deeper issues that remain even if this fixed the apparent issue?

Are there unit tests to check all handles when allocating and de-allocating peripheral buses/devices?

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new labels Nov 25, 2024
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