System frequently becomes completely unresponsive due to thrashing

Bug #1722778 reported by jeremy-list
52
This bug affects 10 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

To replicate:

Run firefox for a couple of hours.

Expected results:

All open applications should run normally: occasional slowdown for page faults are tolerable but the observed behaviour is not.

Actual results:

Several times per day my computer will become completely unresponsive apart from high hard disk activity. Once it enters this state: it will not recover without a hard reset regardless of any time waited or input given. On one occasion I have tested it by leaving it thrashing for 12 hours, at the end of which there was no evidence of progress.

This behaviour was not observed when running Ubuntu 16.04 on the same computer and swap settings.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: linux-image-4.13.0-12-generic 4.13.0-12.13
ProcVersionSignature: Ubuntu 4.13.0-12.13-generic 4.13.3
Uname: Linux 4.13.0-12-generic x86_64
ApportVersion: 2.20.7-0ubuntu2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/pcmC0D0p: jeremy 3367 F...m pulseaudio
 /dev/snd/controlC0: jeremy 3367 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
Date: Thu Oct 12 00:41:01 2017
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=6ef78518-5d77-4673-9917-36ed31b247d9
InstallationDate: Installed on 2017-08-15 (56 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
MachineType: LENOVO 80TV
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-4.13.0-12-generic root=UUID=f2087105-8407-42b8-af6c-f00fe6846c51 ro rootflags=subvol=@ quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.13.0-12-generic N/A
 linux-backports-modules-4.13.0-12-generic N/A
 linux-firmware 1.169
SourcePackage: linux
UpgradeStatus: Upgraded to artful on 2017-09-14 (27 days ago)
dmi.bios.date: 03/07/2017
dmi.bios.vendor: LENOVO
dmi.bios.version: 3JCN26WW
dmi.board.asset.tag: NO Asset Tag
dmi.board.name: VIUU4
dmi.board.vendor: LENOVO
dmi.board.version: SDK0K17763 WIN
dmi.chassis.asset.tag: NO Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo ideapad 310-15IKB
dmi.modalias: dmi:bvnLENOVO:bvr3JCN26WW:bd03/07/2017:svnLENOVO:pn80TV:pvrLenovoideapad310-15IKB:rvnLENOVO:rnVIUU4:rvrSDK0K17763WIN:cvnLENOVO:ct10:cvrLenovoideapad310-15IKB:
dmi.product.family: IDEAPAD
dmi.product.name: 80TV
dmi.product.version: Lenovo ideapad 310-15IKB
dmi.sys.vendor: LENOVO

Revision history for this message
jeremy-list (quick-dudley) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.14 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14-rc4

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
jeremy-list (quick-dudley) wrote :

My computer cannot boot the v4.14-rc4 kernel because the amd64 package is a failed build and my motherboard does not support 32 bit operating systems.
Running the v4.14rc3 mainline kernel I was unable to connect to the internet, (so could not get firefox to use enough memory to reproduce the bug), but the attached C++ program made my computer become completely unresponsive in under a second.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: kernel-bug-exists-upstream
Revision history for this message
jeremy-list (quick-dudley) wrote :

Any chance of progress being made on this bug? It's become quite rare for me to get a full day of system uptime!

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

How much ram does Firefox use when this happens?

Revision history for this message
jeremy-list (quick-dudley) wrote :

Once it has happened there is no way to check RAM usage because keyboard, mouse, and network devices all become completely unresponsive. I have 3.8 GiB of RAM installed. On the occasions when I have checked RAM usage shortly before it happened: total RAM usage was 3.8GiB. I have 19.1GiB of swap space enabled, but this problem will happen when swap usage is still around 10MiB.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

What's your swappiness value?

Revision history for this message
jeremy-list (quick-dudley) wrote :

I have tried a few different swappiness values.
60: The problem will happen about three times per day
10: The problem will happen about once per hour
90: The problem will happen about once per day.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote : Re: [Bug 1722778] Re: System frequently becomes completely unresponsive due to thrashing
Download full text (3.4 KiB)

> On 3 Nov 2017, at 12:40 PM, jeremy-list <email address hidden> wrote:
>
> I have tried a few different swappiness values.
> 60: The problem will happen about three times per day
> 10: The problem will happen about once per hour
> 90: The problem will happen about once per day.

4 GBs Ram is quite small in today’s standard.

I think higher swappiness value is your only choice other than actually adding ram to your laptop.

>
> --
> You received this bug notification because you are subscribed to linux
> in Ubuntu.
> https://bugs.launchpad.net/bugs/1722778
>
> Title:
> System frequently becomes completely unresponsive due to thrashing
>
> Status in linux package in Ubuntu:
> Confirmed
>
> Bug description:
> To replicate:
>
> Run firefox for a couple of hours.
>
> Expected results:
>
> All open applications should run normally: occasional slowdown for
> page faults are tolerable but the observed behaviour is not.
>
> Actual results:
>
> Several times per day my computer will become completely unresponsive
> apart from high hard disk activity. Once it enters this state: it will
> not recover without a hard reset regardless of any time waited or
> input given. On one occasion I have tested it by leaving it thrashing
> for 12 hours, at the end of which there was no evidence of progress.
>
> This behaviour was not observed when running Ubuntu 16.04 on the same
> computer and swap settings.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 17.10
> Package: linux-image-4.13.0-12-generic 4.13.0-12.13
> ProcVersionSignature: Ubuntu 4.13.0-12.13-generic 4.13.3
> Uname: Linux 4.13.0-12-generic x86_64
> ApportVersion: 2.20.7-0ubuntu2
> Architecture: amd64
> AudioDevicesInUse:
> USER PID ACCESS COMMAND
> /dev/snd/pcmC0D0p: jeremy 3367 F...m pulseaudio
> /dev/snd/controlC0: jeremy 3367 F.... pulseaudio
> CurrentDesktop: ubuntu:GNOME
> Date: Thu Oct 12 00:41:01 2017
> EcryptfsInUse: Yes
> HibernationDevice: RESUME=UUID=6ef78518-5d77-4673-9917-36ed31b247d9
> InstallationDate: Installed on 2017-08-15 (56 days ago)
> InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
> MachineType: LENOVO 80TV
> ProcFB: 0 inteldrmfb
> ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-4.13.0-12-generic root=UUID=f2087105-8407-42b8-af6c-f00fe6846c51 ro rootflags=subvol=@ quiet splash vt.handoff=7
> RelatedPackageVersions:
> linux-restricted-modules-4.13.0-12-generic N/A
> linux-backports-modules-4.13.0-12-generic N/A
> linux-firmware 1.169
> SourcePackage: linux
> UpgradeStatus: Upgraded to artful on 2017-09-14 (27 days ago)
> dmi.bios.date: 03/07/2017
> dmi.bios.vendor: LENOVO
> dmi.bios.version: 3JCN26WW
> dmi.board.asset.tag: NO Asset Tag
> dmi.board.name: VIUU4
> dmi.board.vendor: LENOVO
> dmi.board.version: SDK0K17763 WIN
> dmi.chassis.asset.tag: NO Asset Tag
> dmi.chassis.type: 10
> dmi.chassis.vendor: LENOVO
> dmi.chassis.version: Lenovo ideapad 310-15IKB
> dmi.modalias: dmi:bvnLENOVO:bvr3JCN26WW:bd03/07/2017:svnLENOVO:pn80TV:pvrLenovoideapad310-15IKB:rvnLENOVO:rnVIUU4:rvrSDK0K17763WIN:cvnLENOVO:ct10:cvrLenovoideapad310-15IKB:
> ...

Read more...

Revision history for this message
Luca Olivetti (olivluca) wrote :

Since this bug appeared when I upgraded from zesty to artful, I reverted to 4.10.0-37 (the last kernel I had in zesty) and it had been rock-solid (it becomes unresponsive from time to time but it recovers in a few seconds).
With each kernel upgrade I try the new one but the problem is still there (though I did not try 4.13.0-31, but I don't see anything in its changelog regarding this bug).
I also tried the BFQ scheduler, (as suggested to me here http://ubuntu.5.x6.nabble.com/Bad-memory-swap-management-in-17-10-td5160226.html) but it didn't resolve the issue.
Regarding the previous comment than "4 GBs ram is quite small", 4.10.0 manages quite well the same workload (I have 8Gb but four are eaten by virtualbox).

Revision history for this message
Luca Olivetti (olivluca) wrote :

I tried 4.15 rc9 from http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15-rc9/ but it still has the problem (I just waited 15 minutes before the magic sysrq sequence but I think that's enough ).

Revision history for this message
Dimitri Pappas (fragtion) wrote :

Seems to be related to https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1748408
Memory management issues since a commit on a kernel revision somewhere for 4.11 or 4.12. I'm sticking to 4.10.0-28 until resolved

Revision history for this message
Daen WWW (daenwww) wrote :

I am having the exact same problem Bionic 18.04 x64 system kernel 4.15.0-34-generic
.
I have just had too hard reboot the system to regain control after waiting a hour of thrashing. All input devices are locked.
As my system has too remain up all day this issue needs to be resolved to avoid HDD damage.

Revision history for this message
Daen WWW (daenwww) wrote :

Solved on my system:
On lower spec systems (4GB RAM) the default swap file in /dev/dm-1 of 1GB is insufficient.

Addition of new swap file has resolved the stated issues.

Filename Type Size Used Priority
/swapfile file 4194300 2828 -2
/dev/dm-1 partition 999420 0 -3

digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-18-04

Revision history for this message
Prasad (tprasadtp) wrote :

Just out of curiosity, who's is using btrfs. It doesn't matter whether you have /home or / on btrfs. I am not certain whether it plays any role, but it seems to be the common denominator in my tests.

Revision history for this message
jeremy-list (quick-dudley) wrote :

I am using btrfs for both / and /home. I was originally using it only for /home (and ext4 on /); but force-resetting due to this bug would occasionally render my system unbootable.

Revision history for this message
Joe Button (verybutton) wrote :

I have issue and my root partition is ext4. `mount` is full of other crap I don't understand but I don't think any of it's "real" drives.

Brad Figg (brad-figg)
tags: added: cscc
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.