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

Luakit crashes 'Memory Pressure Relief' - Memory leak? #926

Open
gearhead opened this issue May 13, 2021 · 1 comment
Open

Luakit crashes 'Memory Pressure Relief' - Memory leak? #926

gearhead opened this issue May 13, 2021 · 1 comment

Comments

@gearhead
Copy link

gearhead commented May 13, 2021

Running luakit as a kiosk browser in weston. It launches and runs and displays my localhost php pages. I let it run for a few days then it quits and I get this in the log. If I restart it, it runs for a few days than does the same thing. I do not have a swap file (RPi 3B+) and when luakit is running, I do not seem to have a problem with memory.

# free -m
               total        used        free      shared  buff/cache   available
Mem:             729         242         186          16         301         456
Swap:              0           0           0

Crash log:
https://drive.google.com/file/d/1KEXG8TtUn3m-C89-CxUcca0dFEMp3g-L/view?usp=sharing

@gearhead gearhead changed the title Luakit crashes 'Memory Pressure Relief" Luakit crashes 'Memory Pressure Relief' - Memory leak? May 13, 2021
@taobert
Copy link
Contributor

taobert commented May 14, 2021

Well, having skimmed the log, and not done any furher research, it looks like webkit chews up all the memory.
When memory runs out, the system will kill the biggest process.
The accrual of memory over time could indicate a memory leak, or just extra data being stored (navigation history/etc).
If it's a memory leak, it's unlikely to be in (the bulk of) luakit, as LUA will garbage-collect (at some stage).
It could conceivably be in the C parts of Luakit, but based on number of lines of code,
i'd suggest that it'd be more likely to happen inside webkit (which no-one here is likely to fix).
While it's a dissatisfying suggestion, restarting the browser once a day is likely to be the fastest and easiest workaround for you.
Assuming there are a few minutes when the kiosk isn't in use, this could be cron-ed and shouldn't require much ongoing attention.

For completeness, i see something similar on a desktop machine.
However, in my case it seems that it's being killed internally by webkit when the memory footprint is larger than webkit feels is acceptable: "Unable to shrink memory footprint of process (6332 MB) below the kill thresold (6144 MB). Killed".
My workaround has been to have cron monitor WebKitWebProcess's memory usage, and restart it gracefully when it gets close to being killed.

As a point of order, it might be easier for people to follow discussions if long logs (etc.) get attached as files.

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

No branches or pull requests

2 participants