Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Memory management issues?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
RayDude
Veteran
Veteran


Joined: 29 May 2004
Posts: 1581
Location: San Jose, CA

PostPosted: Tue Apr 21, 2020 2:51 pm    Post subject: Memory management issues? Reply with quote

My work laptop has 32 GB of RAM. I love it.

Recently I found out about running shm mounted to /var/tmp/portage to speed up emerge and spare my SSD.

I setup a 16 GB shm which, should only partially fill while I'm emerging @world.

The little CPU / Memory usage bar in my KDE Panel indicates that half the memory has been used, but apps seem to run fine until I start VirtualBox.

When VirtualBox is running (I'm giving it 10 GB or RAM because Windows is thirsty), then some of the programs I use to excess (Firefox, Chrome) start randomly crashing. Firefox is really bad. If I browse digikey.com and scroll through their component tables, firefox will die randomly a lot. Chrome crashes too, but not as much.

Today I used Microsoft Teams (my second time using it) and it crashed at least a dozen times, "There was a glitch, restarting..."

Finally I decided that perhaps there was a memory allocation issue and closed VirtualBox, freeing up gigs of memory.

A minute or two later MS teams started working and I was able to attend my meeting for work.

I think there's a memory issue. But I have no idea how to debug such a thing and produce data for the kernel or GUI guys.

The other thing I need to try is to disable the 16GB shm and see if the firefox crashes stop. Because it's possible that it's an actual firefox bug.

The only message I'm getting in /var/log/message are these:

Code:
Apr 21 06:39:51 fire pluto[30134]: "036e057c-bc24-41f2-b70d-1cd698f60777" #88: initiating Main Mode to replace #87
Apr 21 06:39:52 fire pluto[30134]: "036e057c-bc24-41f2-b70d-1cd698f60777" #88: STATE_MAIN_I2: sent MI2, expecting
MR2
Apr 21 06:39:52 fire pluto[30134]: "036e057c-bc24-41f2-b70d-1cd698f60777" #88: STATE_MAIN_I2: retransmission; will
 wait 0.5 seconds for response
Apr 21 06:39:53 fire pluto[30134]: "036e057c-bc24-41f2-b70d-1cd698f60777" #88: STATE_MAIN_I3: sent MI3, expecting
MR3
Apr 21 06:39:53 fire pluto[30134]: "036e057c-bc24-41f2-b70d-1cd698f60777" #88: Peer ID is ID_IPV4_ADDR: '96.68.159
.213'
Apr 21 06:39:53 fire pluto[30134]: "036e057c-bc24-41f2-b70d-1cd698f60777" #88: STATE_MAIN_I4: ISAKMP SA establishe
d {auth=PRESHARED_KEY cipher=AES_CBC_256 integ=HMAC_SHA1 group=MODP2048}
Apr 21 06:43:30 fire root[14742]: ACPI event unhandled: jack/lineout LINEOUT plug
Apr 21 06:43:30 fire root[14746]: ACPI event unhandled: jack/videoout VIDEOOUT plug
Apr 21 13:43:30 fire rtkit-daemon[2876]: Supervising 4 threads of 2 processes of 1 users.
Apr 21 13:43:30 fire rtkit-daemon[2876]: Successfully made thread 14747 of process 2873 (/usr/bin/pulseaudio) owned by '1001' RT at priority 5.
Apr 21 13:43:30 fire rtkit-daemon[2876]: Supervising 5 threads of 2 processes of 1 users.
Apr 21 06:48:11 fire kernel: usb 1-4: reset high-speed USB device number 5 using xhci_hcd
Apr 21 06:48:11 fire kernel: uvcvideo: Found UVC 1.00 device HP Wide Vision HD (05c8:038e)
Apr 21 06:48:11 fire kernel: uvcvideo 1-4:1.0: Entity type for entity Extension 4 was not initialized!
Apr 21 06:48:11 fire kernel: uvcvideo 1-4:1.0: Entity type for entity Processing 2 was not initialized!
Apr 21 06:48:11 fire kernel: uvcvideo 1-4:1.0: Entity type for entity Camera 1 was not initialized!
Apr 21 06:48:11 fire kernel: input: HP Wide Vision HD: HP Wide Visi as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/input/input37
Apr 21 06:50:54 fire pluto[30134]: "036e057c-bc24-41f2-b70d-1cd698f60777" #87: deleting state (STATE_MAIN_I4) aged 3601.071s and sending notification
Apr 21 06:53:04 fire kernel: traps: CompositorTileW[17080] trap int3 ip:55d6660f48a4 sp:7f36f95f8fd0 error:0


dmesg has something similar:

Code:
[288904.716454] traps: CompositorTileW[17080] trap int3 ip:55d6660f48a4 sp:7f36f95f8fd0 error:0


Any advice would be appreciated.
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6491

PostPosted: Tue Apr 21, 2020 8:57 pm    Post subject: Reply with quote

By "shm" do you mean a tmpfs?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15324

PostPosted: Wed Apr 22, 2020 2:03 am    Post subject: Reply with quote

Modern browsers try to be operating systems unto themselves, so you should expect them to be insanely memory thirsty. Most hypervisors preallocate and pin all the host side RAM that they offer to the guest, so 10G dedicated to a virtual machine makes that memory unavailable to the host, even if the virtual machine has not found a use for it.

Crashing is always a bug. Good luck getting a browser vendor interested in a crash related to memory exhaustion, though. You might get their attention if the exhaustion were due to a browser bug causing it to consume an unreasonable amount of memory relative to the document it was rendering, but I doubt they will care about a crash when the operating system simply refuses to provide enough memory.
Back to top
View user's profile Send private message
RayDude
Veteran
Veteran


Joined: 29 May 2004
Posts: 1581
Location: San Jose, CA

PostPosted: Wed Apr 22, 2020 3:25 pm    Post subject: Reply with quote

Ant P. wrote:
By "shm" do you mean a tmpfs?


Yeah. Did I botch my terminology?
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
RayDude
Veteran
Veteran


Joined: 29 May 2004
Posts: 1581
Location: San Jose, CA

PostPosted: Wed Apr 22, 2020 3:31 pm    Post subject: Reply with quote

Hu wrote:
Modern browsers try to be operating systems unto themselves, so you should expect them to be insanely memory thirsty. Most hypervisors preallocate and pin all the host side RAM that they offer to the guest, so 10G dedicated to a virtual machine makes that memory unavailable to the host, even if the virtual machine has not found a use for it.

Crashing is always a bug. Good luck getting a browser vendor interested in a crash related to memory exhaustion, though. You might get their attention if the exhaustion were due to a browser bug causing it to consume an unreasonable amount of memory relative to the document it was rendering, but I doubt they will care about a crash when the operating system simply refuses to provide enough memory.


I hear you.

I haven't had the problem since I made the post. Go figure.

One other thing I forgot to mention is: okular has some bizarre behavior when all this is happening. I have a bunch (literally a dozen or more) okulars running with pdfs of the various component specifications. They are often hundreds of kilobytes to megabytes big. When the shite hits the fan, many of the okulars stop functioning. They show no graphics but otherwise appear to be alive. I have to kill them and restart them to look at the documents.

I helped things by lowering Windows 10 VM memory from 14GB to 10GB. I'm thinking about lowering it again... The VM is already painfully slow and clunky...

Tell me, which free VM do you think is the best. Do you run any VMs? I used VMPLayer back in the day it was really good, but they stripped its power ridiculously so I changed to VirtualBox which has, to say the least, some stuttering and graphics glitching issues.

That's for taking the time to reply Hu. I really appreciate it.
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15324

PostPosted: Thu Apr 23, 2020 1:42 am    Post subject: Reply with quote

I use qemu, with hardware assistance via the Linux KVM support. You may need to accept that your Windows VM is too hungry to let you run it and much else at the same time.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6491

PostPosted: Thu Apr 23, 2020 4:38 am    Post subject: Reply with quote

RayDude wrote:
Ant P. wrote:
By "shm" do you mean a tmpfs?


Yeah. Did I botch my terminology?

/dev/shm is one specific instance of a tmpfs mount. If your shm filesystem runs low on space, including the space that may be eaten up by other tmpfs mounts, browsers usually start to misbehave. It needs at least 512M for Firefox, probably more.
Back to top
View user's profile Send private message
RayDude
Veteran
Veteran


Joined: 29 May 2004
Posts: 1581
Location: San Jose, CA

PostPosted: Thu Apr 23, 2020 5:58 am    Post subject: Reply with quote

Ant P. wrote:
RayDude wrote:
Ant P. wrote:
By "shm" do you mean a tmpfs?


Yeah. Did I botch my terminology?

/dev/shm is one specific instance of a tmpfs mount. If your shm filesystem runs low on space, including the space that may be eaten up by other tmpfs mounts, browsers usually start to misbehave. It needs at least 512M for Firefox, probably more.


According to the resource monitor there's still a gig or more left when everything is running...

For now I shut off the chroot gentoo32 I was running and the 16GB tmpfs partition. Hopefully things will get better...
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum