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

Resizing X11 applications leaks Xwayland memory #3551

Open
Saviq opened this issue Aug 14, 2024 · 5 comments
Open

Resizing X11 applications leaks Xwayland memory #3551

Saviq opened this issue Aug 14, 2024 · 5 comments
Assignees
Labels
bug triaged Triage into JIRA to plan it in XWayland

Comments

@Saviq
Copy link
Collaborator

Saviq commented Aug 14, 2024

Steps to reproduce:

  1. Open any system monitor application, take note of the baseline ram usage.
  2. Run miral-shell with x11: WAYLAND_DISPLAY=wayland-99 ./build/bin/miral-shell --enable-x11 true
  3. Run any x11 app. For example xmore
  4. Repeatedly resize the application
  5. Watch as Xwayland's memory usage skyrockets

Even after you stop resizing the application, the memory usage will remain high. Closing the application also doesn’t free the memory. Looking at processes hogging the most memory, it looks like Xwayland is responsible for this. The version which this bug occurs on is 23.2.6.

I was able to reproduce this bug on 2.17 and main.

@Saviq
Copy link
Collaborator Author

Saviq commented Aug 14, 2024

Can confirm that gnome-shell does not show this with the same Xwayland.

@Saviq Saviq added the triaged Triage into JIRA to plan it in label Aug 26, 2024
@Saviq
Copy link
Collaborator Author

Saviq commented Aug 26, 2024

xtrace, xrestop are possible utils that could help here.

@tarek-y-ismail tarek-y-ismail self-assigned this Aug 27, 2024
@tarek-y-ismail
Copy link
Contributor

Seems to affect 2.16, but not 2.13

@Saviq
Copy link
Collaborator Author

Saviq commented Aug 27, 2024

Seems to affect 2.16, but not 2.13

That's starting to sound to me like fallout from #2962. That won't help pinpointing the issue, as this was a huge rework that you can't really bisect through.

@tarek-y-ismail
Copy link
Contributor

Seems to affect 2.16, but not 2.13

Testing again, it seems to occur as far back as 2.5.0. So either it's not consistent, explaining why it didn't happen on 2.13 when I first tried it, or it depends on something other than Mir?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triaged Triage into JIRA to plan it in XWayland
Projects
None yet
Development

No branches or pull requests

2 participants