You have been subscribed to a public bug:

Hi all,
This one is similar to #1805816 and #1678184 (one was fixed, other closed).

Symptoms:
  During regular use, system starts failing after 10m - 1hr after start.
  Icons start disappearing, writing to disk fails.
  In-memory operations still work for a while (switching windows, streaming 
video calls, typing).
  After some time the entire system crashes, with a Black Screen Of Death 
constantly looping:
    ---------------------------
    EXT4-fs error (device nvme0n1p5) ext4_find_entry:1455: inode #4594258: comm 
gmain: reading directory lblock 0
    [... same repeats for 8 times on average]
    systemd-journald[439]: Failed to write entry (9 items, 270 bytes), 
ignoring: Read-only file system
    [... repeats for 10 times on average]
    ---------------------------

Probable causes:
  Updated both kernel and BIOS 2 days ago. Unable to determine, which one 
caused the change.
  Don't know how to determine which kernel and bios I was running before the 
update.
  Looks like APST issue, based on info from web and previous bug reports.

Verification:
  Created a rudimentary bash script, writing to a file in a loop, incrementing 
timeout between two consecutive writes each time.
  Ran script using:
   - different nvme_core.default_ps_max_latency_us settings
     in GRUB_CMDLINE_LINUX_DEFAULT="quiet splash 
nvme_core.default_ps_max_latency_us=[0|200|5500]"
   - regular boot mode
   - logged in to account
   - on battery power
  With default_ps_max_latency_us NOT SET:
     writing FAILS between 57 and 70 seconds timeout between writes
  With default_ps_max_latency_us=5500:
     no write failure during 1hrs run
  With default_ps_max_latency_us=200:
     no write failure during 30m run
  With latency 0:
     no write failure during 10m run

This suggests an APST issue.

Machine:
  Lenovo Thinkpad T570
Disk:
  SAMSUNG MZVLB512HAJQ-000L7
  512 GB (512110190592 bytes)
  Firmware: 3L2QEXA7
  Serial#: S3TNNE0K119126
System:
  OS 1: Ubuntu 18.04.5 LTS
        Kernel: 4.15.0-122-generic #124-Ubuntu SMP Thu Oct 15 13:03:05 UTC 2020 
x86_64
  OS 2: Windows 7 (on a separate partition on same disk, dualbooted with grub).

Actions taken:
  Successfully checked the partitions for errors by running "Check partition" 
and "Repair partition" in Disks utility in Ubuntu, running from a bootable USB.
  Starting in "recovery mode" yields an error (among other suspicious behavior):
     --------------------
     sd 0:0:0:0: Attached scsi generic sg0 type 0
     sd 0:0:0:0: [sda] Attached SCSI removable Disk
      input: TPPS/2 IBM TrackPoint as 
/devices/platform/18042/serio1/serio2/input/input ....
     nvme nvme0: controller is down; will reset: CSTS=0xffffffff, 
PCI_STATUS=0x10
     nvme 0000:40:00.0: enabling device (0000 -> 0002)
     nvme nvme0: Removing after probe failure status: -19
     nvme0n1: detected capacity change from 512110190592 to 0
     print_req_error: I/O error, dev nvme0n1, sector 1000215040
     nvme nvme0: failed to set APST feature (-19)
     Waiting for suspend/resume device ... Begin: Running /scripts/local-block
     No devices listed in conf file were found.
     No devices listed in conf file were found.
     [repeats]
     --------------------
  Without nvme_core.default_ps_max_latency_us set: writing fails between cca. 
57 - 70, on battery.
  With nvme_core.default_ps_max_latency_us=5500: FIXES THE PROBLEM.
  With nvme_core.default_ps_max_latency_us=200: FIXES THE PROBLEM.
  With nvme_core.default_ps_max_latency_us=0: FIXES THE PROBLEM.

Previous behavior on same machine:
 Same OS, with a previous Kernel has been running perfectly fine for the last 
year, "on high revs" (it's a development machine).
 Often running on battery alone.
 sleep and wakeup without issues.
 It is running Windows 7 (dual booted) without issues.

Misc info:
To test different settings, did 'sudo nano /etc/default/grub' with each of 
these settings:
  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
  # GRUB_CMDLINE_LINUX_DEFAULT="quiet splash 
nvme_core.default_ps_max_latency_us=5500"
  # GRUB_CMDLINE_LINUX_DEFAULT="quiet splash 
nvme_core.default_ps_max_latency_us=200"
  # GRUB_CMDLINE_LINUX_DEFAULT="quiet splash 
nvme_core.default_ps_max_latency_us=0"
followed by 'sudo update-grub' and reboot.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apst nvme samsung
-- 
Failure to write to NVMe disk soon after boot (APST-related)
https://bugs.launchpad.net/bugs/1903388
You received this bug notification because you are a member of Kernel Packages, 
which is subscribed to linux in Ubuntu.

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to