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

Enable or disable logging #1133

Closed
wants to merge 1 commit into from
Closed

Enable or disable logging #1133

wants to merge 1 commit into from

Conversation

eerimoq
Copy link

@eerimoq eerimoq commented Jun 18, 2023

The current log callback sometimes deadlocks when I use aiortc with this line commented out, which uses this package. I couldn't figure out how to properly fix it, so I implemented a workaround that allows the user to totally enable and disable FFmpeg logging.

The current log callback sometimes deadlocks when I use aiortc, which
uses this package. I couldn't figure out how to properly fix it, so
I implemented a workaround that allows the user to totally enable
and disable FFmpeg logging.
@jlaine
Copy link
Member

jlaine commented Oct 27, 2023

I'm not sure this is an actual fix, it adds more complexity to the logging situation with yet another flag. Have you considered any alternatives?

@eerimoq
Copy link
Author

eerimoq commented Oct 27, 2023

I don't think I did. Feel free to just close this PR as it was mostly meant to pitch the idea.

@jlaine
Copy link
Member

jlaine commented Oct 28, 2023

To be clear, as mentioned in #1186 I think we absolutely do need to revisit the logging framework. Unless someone finds a way to fix the deadlocks introduced by logging calling back into Python I'd be in favour of ripping it out, or at least having it off by default.

.. so let's keep the PR Alive as a starting point!

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Nov 3, 2023

It seems to be deadlocking due to the GIL.

are you in a heavy multi-threading environment?

Could you provide some reproducing code that deadlocks even 10% of the time?

I would like to explore solutions where a C++ queue is made, and flused upon request maybe....

@eerimoq
Copy link
Author

eerimoq commented Nov 4, 2023

Sorry, this was such a long time ago I barely remember what I did.

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Nov 4, 2023

understood. lets leave this open as an acknowledgement of the issue.

For future contributors, to start taking action on this front, it would be great to have some code that could reproduce even 10% of the time.

When submitting the reproducer, try too include information about the processor used in the system and the number of threads it supports.

@WyattBlue WyattBlue linked an issue Nov 11, 2023 that may be closed by this pull request
@WyattBlue
Copy link
Member

Superseded by #1383

@WyattBlue WyattBlue closed this Apr 24, 2024
@WyattBlue WyattBlue removed a link to an issue Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants