-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Linux sets incorrect maximum thread count when memory hotplug is enabled #8960
Comments
Ouch. Can you provide a way to reproduce this with a completely fresh AppVM? |
I have the same issue, it stated happening recently maybe a week ago, I'm having multiple FF crashes daily.
It happens with a single tab open, when streaming video or using JS heavy sites, and it seems to happen randomly. |
@renehoj Are you using the Fedora Firefox package? I suspect this is a Fedora packaging bug. |
No, I'm using Debian 12 minimal with Firefox-ESR. I tried giving my browser qubes 6GB memory, it didn't stop the crashes. |
I updated the steps to reproduce section. |
I too noticed it at first with random crashes, then I recreated Firefox profiles, tried older versions, Flatpak's, suspected hardware failure, but what I finally ended up with was memory hotplug. Disabling the memory hotplug fixes the problem like a charm, and I can reproduce it on another laptop with R4.2 installed, which is why I'm reporting the problem. |
Could this be due to a memory allocation failure? |
@noskb Is disabling hotplug the same as memory balancing? Your test pass on my system with 8 GB initial memory, and balancing enabled, but fails with low values like 800 MB. |
@renehoj Does that mean that even with memory hotplug feature disabled, it still fails if the init memory value is low? |
No, disabling hotplug also solves the issue with low init memory settings, the system seems fully stable with the feature turned off. I just didn't know if memory hotplug and memory balancing were doing something similar, turning off memory balancing and/or increasing the init memory also seems to improve stability, when running your test. |
I'm still having crashes, even with During the weekend, I've had Firefox fully crash 3 times, not just a single tab. It doesn't leave any information in the logs except for
|
Even with memory balancing disabled and allocating memory statically to AppVM, does firefox still crash during normal use? If so, the most likely cause is a firefox problem or hardware failure. |
I only had memory-hotplug disabled, now I'm trying with memory balancing disabled as well. My guess is that it started after an update this month, I didn't use to have any issues with Firefox, and suddenly it becomes noticeably unstable. It is a problem specifically with Firefox, no other application is crashing, but it could have started after updates to the Linux kernel or Xen. |
Disabling both memory-hotplug and memory balancing didn't stop the crashes. I ended up downgrading the kernel in my browser qubes to 6.6.2-1, and now the crashes seem to have stopped. |
@renehoj Okay, so a kernel regression. Can you (in a test standalone VM) try doing a kernel bisection to see which upstream commit broke things? |
@DemiMarie I spoke too soon, I just had libxul.so crash again. Changing the kernel, just like disabling memory_hotplug, will allow the browser to pass noskb's test, but it doesn't stop the crashes. |
@renehoj Ouch. The usual advice for this kind of problem is “record an rr trace” but that:
|
The cause seems to be that domU detects initial memory instead of maxmem when memory hotplug is enabled. A domU with an initial memory of 800 and max memory of 8000: hotplug enabled
hotplug disabled
This made a difference in the kernel parameters with initial values calculated based on the amount of memory. Comparison of kernel parameters with hotplug enabled and disabled
It seems that the low value of |
Whoops, I initially blamed this on Mozilla, ended up migrating to a Chromium browser, was there an actual fix in the end? |
When VM is started with memory hotplug, the initial memory size is quite small. It is used for calculating default threads limit, and that in turns is used to calculate default process count limit per user. For a VM started with 400MB (the default) both limits are too low for some threads/processes-heavy applications like Firefox. Adjust the limits to a static higher value, based on defaults when memory hotplug is disabled (and rounded to a nice number). Fixes QubesOS/qubes-issues#8960 (cherry picked from commit cefe875)
Automated announcement from builder-github The package
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The package
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The package
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The package
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The component
|
How to file a helpful issue
Qubes OS release
r4.2
Brief summary
As title. In my case, it crashes when opening more than 30 tabs from a bookmark at once. If memory-hotplug is disabled, this will not occur.
The following message appears in dmesg:
Steps to reproduce
In r4.2 with the latest update, the memory hotplug feature is enabled by default, so additional configuration is not needed.
Create an appvm with sufficient RAM space by running the following in dom0 terminal:
qvm-create ff-crash -l red --prop memory=800 --prop maxmem=8000
then, run the following in ff-crash terminal:
firefox -- google.com facebook.com youtube.com baidu.com yahoo.com amazon.com wikipedia.org qq.com twitter.com slashdot.org google.co.in taobao.com live.com sina.com.cn yahoo.co.jp linkedin.com weibo.com ebay.com google.co.jp yandex.ru bing.com vk.com hao123.com google.de instagram.com t.co msn.com amazon.co.jp tmall.com google.co.uk pinterest.com ask.com reddit.com wordpress.com mail.ru google.fr blogspot.com paypal.com onclickads.net google.com.br
To disable memory-hotplug, run the following in dom0 then restart ff-crash:
qvm-features ff-crash memory-hotplug ''
Expected behavior
No segfaults occur.
Actual behavior
Firefox crashes
The text was updated successfully, but these errors were encountered: