Received: by 10.223.185.116 with SMTP id b49csp292237wrg; Fri, 2 Mar 2018 19:26:39 -0800 (PST) X-Google-Smtp-Source: AG47ELs0VPJ192eRo4395dQDCHWF09lGuc9ghUOhune0kKZASBERqB0uqUNUFVQfaASwQnQ0W576 X-Received: by 10.99.113.90 with SMTP id b26mr6170165pgn.10.1520047599504; Fri, 02 Mar 2018 19:26:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520047599; cv=none; d=google.com; s=arc-20160816; b=msHN/sJu4x51WZ1oslBbH6M59d3EtPy4cUr3sXyYfmZJ4IP/bMkYWwKVnEvQOA1VKC /Q6RYvKMdEhvieykLaW1T37JAsCliRRlx9wUo9AfLwlWujo5Df8jO1cYZiNK0GMTgRtL h7+0EMwQ7sLt03KHTHYesujlYLCBsE7ocCroRntPrVhNa/QrUdfj8flX4BXC7jMZmwDy /qvLfAee18+InnUhOa78vkWxdSB3bAp0g+4J07JmY2/zN8oU4Xoe4h5dFCZ9EQzgy7G/ EEemX9wPLNF1dbBlTVdV/NsoWQorJl6+2hVV7ir5fneRcZIBgRDXfcYmgdlwAYJw9mcw FMkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:arc-authentication-results; bh=mTqv+S5kseSKq3PgOBAwhB3yHpXmTTZ9cM/wP4mgCY0=; b=Y3mkZrtC5WbskSXkgDkZ7qyX+WeCHQ7XK7+flG6FV486qpf1MPJTxwWLC51JxOMSHh Ve8N/N6dYrOuRqQWS9cR3h1l2C5O0sqkW5oCBMS2jjBS4/cmlnHao5M6l+aMFr+P9msf KFG2dZprSFi1MZ/n5R/woMq8eGIL+/t/ELWAu4tDDQIq4dkyX5+y85VGb4JL888G9nfh NJ0gLd/yobNNIXJgq6FZ0njaaovMHm1ZqwH5BSemynMBVeeDLU0ul6Nw0Ii/gboG0unQ WIKO91OMtsTjlWPcHBcjaHpGoTeOmrBdGuJux2F/1Wv74vE7VA5CJEaXYbOkO0QPZOk7 Hp/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f185si4938761pgc.202.2018.03.02.19.26.24; Fri, 02 Mar 2018 19:26:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752728AbeCBTdn (ORCPT + 99 others); Fri, 2 Mar 2018 14:33:43 -0500 Received: from magic.merlins.org ([209.81.13.136]:33851 "EHLO mail1.merlins.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751799AbeCBTdc (ORCPT ); Fri, 2 Mar 2018 14:33:32 -0500 X-Greylist: delayed 947 seconds by postgrey-1.27 at vger.kernel.org; Fri, 02 Mar 2018 14:33:32 EST Received: from merlin by mail1.merlins.org with local (Exim 4.87 #1) id 1erqQp-0004Nf-Vb by authid ; Fri, 02 Mar 2018 11:33:28 -0800 Date: Fri, 2 Mar 2018 11:33:27 -0800 From: Marc MERLIN To: tony.luck@intel.com, Matthew Garrett , Theodore Ts'o , vstavrinov@gmail.com, LKML , linux-efi@vger.kernel.org Subject: Re: Deleting pstore data causes immediate hang of 4.15.5 on Lenovo P70 with upgraded bios Message-ID: <20180302193327.GA14014@merlins.org> References: <20180302062239.GA17688@merlins.org> <20180302191739.GA5613@merlins.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180302191739.GA5613@merlins.org> X-Sysadmin: BOFH X-URL: http://marc.merlins.org/ User-Agent: Mutt/1.5.13 (2006-08-11) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: marc@merlins.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sigh, and now I was just able to do this: saruman:/sys/fs/pstore# \rm * saruman:/sys/fs/pstore# l total 0 drwxr-x--- 2 root root 0 Mar 2 11:28 ./ drwxr-xr-x 10 root root 0 Mar 2 10:20 ../ Ok, so forget linux, I think it's just a stupid EFI bios. If I were to venture a guess: 1) I went in setup, reset to default, that deleted my efibootmgr entries 2) some EFI space got freed as a result 3) truncating pstore files worked, because of #1 or not 4) now that the storage fronted by pstore, wasn't full anymore, deleting files just worked. 5) I had to recreate my efibootmgr entries, and now that there is space, that worked fine. I'm going to guess that the EFI bios needs some space to delete files and without any, it just hangs. Oh well, sorry for the noise, and if maybe someone hits this problem in the future, they'll be able to find this post with the solution. On Fri, Mar 02, 2018 at 11:17:39AM -0800, Marc MERLIN wrote: > [+linux-efi and fixed Matthew's Email] > > As an update, I got my NVME drive to boot once at least, it seem that I need > to wait about 2mn for the bios to do whatever, hang, recover and then > finally continue booting. > If I take over and force a boot on the M2 Sata drive instead, then it boots > near instantly. > > After 2H on the phone with lenovo an finally getting someone with a clue, > apparently removing the CMOS battery may clear that pstore storage and help > with my issue. > Obviously it will also kill my efiboomgr entries and all my settings, > although I could recover from that if needed. > Before I go through all that trouble though, it'd be great to figure out why > linux is causing hangs when deleting pstore data, and if it's only a bios > bug we can do nothing about, or maybe an issue on the linux side. > > Is there any other way to delete from /sys/fs/pstore/ besides rm which > causes an instant hang? > Well, how about that, truncating the files seems to work, and now efibootmgr > is able to make a new entry with the space I just freed. > pstore is still full of files, but they're not 0 sized, so I'm likely only > wasting the space for the filenames now. > > Now, I probably have to also find what is writing to pstore and > kill that job given that deleting from pstore seems not possible on my > machine, and filling it up causes the bios to get upset. > > Marc > > On Thu, Mar 01, 2018 at 10:22:39PM -0800, Marc MERLIN wrote: > > Howdy, > > > > I have a thinkpad P70 which started to fail resuming from S3 sleep after any > > kernel past 4.12 (sometimes it would work, sometimes the HD led would come > > on when trying to resume, but nothing else). > > After much debugging trying to figure what was causing it and coming short, > > I decided to upgrade the very old firmware/bios on that laptop, since it likely > > had many bugs. > > > > The firmware update from a boot CD was weird, long, and worrisome. It looks > > like after 1h or so (very long procedure), I got the latest firmware now, > > but it won't boot my NVME M2 drive anymore, it shows in the boot menu, but > > just hangs if I use it to boot. > > However, I can get it to boot my M2 SATA drive. The nvme drive shows up fine > > and works once linux has booted. > > > > So, I figured I'd try a new bootmgr entry > > saruman:~# efibootmgr -v -c -d /dev/nvme0n1 -p 1 -L "GrubNVME" -l '\EFI\debian\grubx64.efi' > > Could not prepare Boot variable: No space left on device <<< > > > > Ok, this brought me to > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845023 > > and > > https://mjg59.dreamwidth.org/23554.html > > > > Sure enough, > > saruman:~# df /sys/fs/pstore/ > > Filesystem 1K-blocks Used Available Use% Mounted on > > pstore 0 0 0 - /sys/fs/pstore > > it's full of files, and I'm assuming the variable storage is full of crap > > (see below) > > > > The problem is trying to delete any file in there causes an immediate hange of the kernel. > > > > Any idea how to get around this problem? I realize it may be the bios > > that's crashing/hanging and not linux. > > At least filling up the space did not brick my machine like Matthew pointing out > > some firwmare crashes when it's full ( https://mjg59.dreamwidth.org/23554.html ) > > > > Is there any way to clear all this space, maybe from inside the bios by > > resetting everything to default, or some other way? > > > > saruman:~# l /sys/fs/pstore/ | wc -l > > 151 > > saruman:~# l /sys/fs/pstore/ | head > > total 0 > > drwxr-x--- 2 root root 0 Mar 1 22:00 ./ > > drwxr-xr-x 10 root root 0 Mar 1 22:02 ../ > > -r--r--r-- 1 root root 983 Feb 16 2016 dmesg-efi-145565830401001 > > -r--r--r-- 1 root root 1744 Feb 16 2016 dmesg-efi-145565830401002 > > -r--r--r-- 1 root root 952 Feb 16 2016 dmesg-efi-145565830402001 > > -r--r--r-- 1 root root 1636 Feb 16 2016 dmesg-efi-145565830402002 > > -r--r--r-- 1 root root 1014 Feb 16 2016 dmesg-efi-145565830403001 > > -r--r--r-- 1 root root 1781 Feb 16 2016 dmesg-efi-145565830403002 > > -r--r--r-- 1 root root 351 Feb 16 2016 dmesg-efi-145565830404001 > > saruman:~# cat /sys/fs/pstore/dmesg-efi-145565830401001 > > Oops#1 Part1 > > <4>[ 4508.389437] [] do_execveat_common.isra.26+0x450/0x5fd > > <4>[ 4508.389495] [] do_execve+0x23/0x25 > > <4>[ 4508.389541] [] SyS_execve+0x2a/0x2e > > <4>[ 4508.389582] [] stub_execve+0x5/0x5 > > <4>[ 4508.389624] [] ? entry_SYSCALL_64_fastpath+0x16/0x75 > > <4>[ 4508.389682] Code: 45 31 e4 48 8b 47 78 4c 8b 30 48 8d 58 f0 48 8d 47 78 48 89 45 d0 49 83 ee 10 48 8d 43 10 48 39 45 d0 74 6f 4c 8b 6b 08 4c 89 e7 <49> 8b 75 00 e8 3a f0 ff ff 49 8d 75 40 48 89 df 49 89 c4 e8 6b > > <1>[ 4508.390025] RIP [] unlink_anon_vmas+0x41/0x13e > > <4>[ 4508.390086] RSP > > <4>[ 4508.390119] CR2: 00000000000000fb > > <7>[ 4508.390339] pci_bus 0000:3b: busn_res: [bus 3b] is released > > <7>[ 4508.390468] pci_bus 0000:3c: busn_res: [bus 3c-6f] is released > > <7>[ 4508.390605] pci_bus 0000:06: busn_res: [bus 06-6f] is released > > <4>[ 4508.470221] ---[ end trace e21f39de184e5ef4 ]--- > > > > Yeah, there is another issue that I have something that kept writing here until > > it filled up, and nothing that ever emptied it. I guess my old bios didn't care and the new > > one is having issues with this. > > If I'm unlucky, this may even have caused the firmware upgrade to fail partially? > > > > Handle 0x000E, DMI type 0, 24 bytes > > BIOS Information > > Vendor: LENOVO > > Version: N1DET95W (2.21 ) > > Release Date: 12/13/2017 > > Runtime Size: 128 kB > > ROM Size: 16384 kB > > BIOS Revision: 2.21 > > Firmware Revision: 1.17 > > > > Thanks, > > Marc > > -- > > "A mouse is a device used to point at the xterm you want to type in" - A.S.R. > > Microsoft is to operating systems .... > > .... what McDonalds is to gourmet cooking > > Home page: http://marc.merlins.org/ > > -- > "A mouse is a device used to point at the xterm you want to type in" - A.S.R. > Microsoft is to operating systems .... > .... what McDonalds is to gourmet cooking > Home page: http://marc.merlins.org/ > -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Microsoft is to operating systems .... .... what McDonalds is to gourmet cooking Home page: http://marc.merlins.org/