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

Memory leak with awesomeWM when window shape is enabled #761

Closed
Holi0317 opened this issue Jan 14, 2019 · 1 comment
Closed

Memory leak with awesomeWM when window shape is enabled #761

Holi0317 opened this issue Jan 14, 2019 · 1 comment

Comments

@Holi0317
Copy link

Related issue: alacritty/alacritty#2004

winit version: 0.18.1

Under X11 with awesomeWM 4.2. Winit would cause awesomeWM to memory leak when client shape decoration is enabled in awesome's end.

Minimal awesome configuration

When a winit screen is launched and screen is turned off by xset dpms force off, memory consumption of awesomeWM starts to rise unusually and eventually cause Linux OOM killer to kill awesomeWM. This issue exist even if the winit client is not rendered on screen.

This issue is resolved when window shape decoration code is commented out (line 561 to line 567 in the config).

Memory usage could be reduced by forcing Lua to do a GC. I thought winit was causing unnecessary manage signal emitted but that was not the case. The signal was not emitted when screen is off.

I was launching an example winit window by the following example code:

use winit;

fn main() {
    let mut events_loop = winit::EventsLoop::new();
    let window = winit::Window::new(&events_loop).unwrap();

    events_loop.run_forever(|event| {
        match event {
            winit::Event::WindowEvent {
              event: winit::WindowEvent::CloseRequested,
              ..
            } => winit::ControlFlow::Break,
            _ => winit::ControlFlow::Continue,
        }
    });
}
@Holi0317
Copy link
Author

After updating AwesomeWM to 4.3 or after updating winit, the issue is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant