Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Linux: 100% CPU when using external-message-pump with Version 84+ #3002

Open
magreenblatt opened this issue Aug 19, 2020 · 7 comments
Open
Labels
bug Bug report Framework Related to framework code or APIs help wanted Issue resolution will likely require community contributions linux Linux platform

Comments

@magreenblatt
Copy link
Collaborator

Original report by Stephan Engelmann (Bitbucket: Stephan Engelmann).


This issue is related to Issue #2809. I already reported my findings there, but was unsure if it was the right place, as the ticket was already closed.

We tested the fix using the CEF Automated build cef_binary_84.4.1+gfdc7504+chromium-84.0.4147.105_linux64.tar.bz2.

After building the test applications and starting the cefclient application with the external message pump flag one core is always using 100% CPU.

./cefclient --external-message-loop


@magreenblatt
Copy link
Collaborator Author

Original changes by Stephan Engelmann (Bitbucket: Stephan Engelmann).


  • edited description

1 similar comment
@magreenblatt
Copy link
Collaborator Author

Original changes by Stephan Engelmann (Bitbucket: Stephan Engelmann).


  • edited description

@magreenblatt
Copy link
Collaborator Author

Original comment by Stephan Engelmann (Bitbucket: Stephan Engelmann).


I removed a lot of possibly not relevant information from the ticket.

@magreenblatt
Copy link
Collaborator Author

Original comment by Salvador Diaz Fau (Bitbucket: salvadordf, GitHub: salvadordf).


We also detected this issue using CEF4Delphi demos in Linux with CEF 88.1.6

@magreenblatt
Copy link
Collaborator Author

Original comment by Salvador Diaz Fau (Bitbucket: salvadordf, GitHub: salvadordf).


I just tested this issue with the latest cefclient again (CEF 88.2.8) and I can reproduce it only when I execute this command :

./cefclient --multi-threaded-message-loop

If I remove the multi-threaded-message-loop switch then cefclient works perfectly and no core is used at 100%

Edit: fixed the command that reproduces this issue.

@magreenblatt magreenblatt added the help wanted Issue resolution will likely require community contributions label Jul 8, 2024
@vadz
Copy link

vadz commented Aug 30, 2024

FWIW running ./cefclient --external-message-pump reproduces the problem even with the latest 128 beta. I've tried debugging this, but it's difficult without having debug information for Chromium code (is it possible to get binaries with it without building all of it oneself?), e.g. I can't see MessagePumpGlib internals at all. But from what I could see, the problem is that MessagePumpGlib::HandlePrepare() returns something different from -1 all the time, so glib main loop considers this source ready all the time.

IOW I don't think anything can be done about this without modifying MessagePumpGlib itself. Is it conceivable that it could be modified or does this mean (if true) that this bug just can't be fixed and external message pump under Linux will basically always remain unusable?

@vadz
Copy link

vadz commented Aug 30, 2024

P.S. I forgot to mention, but using ./cefclient --multi-threaded-message-loop also pegs a CPU core, so there is no way to embed CEF inside another GUI application (which has to have its own message loop) at all AFAICS.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Bug report Framework Related to framework code or APIs help wanted Issue resolution will likely require community contributions linux Linux platform
Projects
None yet
Development

No branches or pull requests

2 participants