System freezes due to ALSA error and recovers after significant time

Bug #1687353 reported by Leonardo Müller
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
alsa-lib (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello

I have a Lenovo Ideapad 310. I was having issues with power management, and was using upstream kernels. I noticed they had frequent freezes, so I decided to use the standard from Ubuntu 16.04 (today, 4.4.0-75). But now it has this freezes too, so something which was bugged on the newer kernel was inserted on 4.4.0-75, as previous version (4.4.0-72) hadn't this issue.

What is happening is: the system freezes. The sound that was being played loops endlessly. Everything freezes, Ctrl+Alt+Fnumber don't work. The system completely stops. Normally, I would just power the computer off keeping the power button pressed. But this time I tried to recover it, as the syslog ended always corrupted. I needed to gets the logs at least once. So I started to disconnect hardware parts: battery charger, external USB HDD (it was not being accessed), USB mouse, USB keyboard. When I disconnected the sound jack, I noticed the mouse moved, so it was recoverable.

I waited for 100 seconds until the system recovered. When it recovered, looked like nothing had happened, and now I'm writing this report from the computer, without restarting.

Steps to reproduce:
1) open Audacious or VLC;
2) play a music/video on Audacious or VLC;
3) open another program with sound (Steam, a browser (I use Opera), etc);
4) use the computer until a freeze happens.

Observations:

-Audacious + Steam + Starbound is nearly 100% chance of triggering it (SDL?).
-VLC + Opera + Firefox (on start page) was enough for trigger it once, even with the only program with media opened being VLC.

The freeze I was able to recover had: Opera Developer (YouTube video playing) + Audacious (playing) + Steam with audio streams opened on pavucontrol. Additionally, Thunderbird and Evince were opened, and intel-gpu-overlay was opened inside a Xnest window.

The syslog says to report to alsa, so I'm writing the report here. However, it should be noted that there is a i915 error too, maybe it was a consequence, maybe it was the cause.

$ lsb_release -rd
Description: Ubuntu 16.04.2 LTS
Release: 16.04

$ uname -a
Linux usuario-Lenovo-ideapad-310-14ISK 4.4.0-75-generic #96-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Thank you.

Edit: one thing I noticed with indicator-multiload, the internal HDD activity completely stopped while this problem was happening and soon after it started to function. It was like the computer was recovering with the internal HDD turned off. The HDD usage ramped up and the system returned to normal. May this be related with the power management issues?

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libasound2 1.1.0-0ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-75.96-generic 4.4.59
Uname: Linux 4.4.0-75-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun Apr 30 23:43:29 2017
Dependencies:
 gcc-6-base 6.0.1-0ubuntu1
 libasound2-data 1.1.0-0ubuntu1
 libc6 2.23-0ubuntu7
 libgcc1 1:6.0.1-0ubuntu1
InstallationDate: Installed on 2016-12-31 (121 days ago)
InstallationMedia: Xubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: alsa-lib
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-lib (Ubuntu):
status: New → Confirmed
Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

The easiest way to reproduce it was in the game Starbound. Teleporting, quickly the computer would freeze. I could freeze the computer in seconds doing this.

While the 4.10 kernel available to install with linux-generic-hwe-16.04-edge has this bug, I believe this problem is corrected in the 4.11 kernel I downloaded at http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11/

I was able to play for many hours without the problem since I installed the kernel version 4.11. There are change notes regarding ALSA on kernel.org, I believe they are related with the problem I was having.

Or I am being absurdly lucky or the bug was corrected on upstream.

tags: added: kernel-fixed-upstream
Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

Hello

With the kernel from linux-generic-hwe-16.04-edge, I was able to obtain in one crash the part of a log file which I was unable before, but corrupted the content after this. This new part refers to a file called swapops.h.

I have attached the syslog file with the new information. As in the other times, this is the valid data, as the rest of the syslog ended corrupted (it appears ################# on LibreOffice and \00\00\00\00\00\00\00\00\ on gedit). At 16:17, cron run and the system is fine. At 16:39, the system locked and I waited some time, until I turned the computer off.

I am not a developer, but from what I understood, the swap operation is the cause of this, and the ALSA error is a consequence of the swap error. This is happening with Starbound when teleporting so frequently because while it loads the map, it could start to use swap memory, and then this crash happens.

Also, this explains why the computer recovers itself rarely. The operations which triggered it had ended, so the system was able to recover. With the game opened, the operations are always happening, so it would never recover.

I hope this interpretation is correct.

Thank you.

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

I think this is the same bug I am having: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1674838

But this is happening with 4.4.0-75 too.

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

This was corrected and is no longer happening to me.

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.