Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #67262

Bug#962545: Invalid serial console blocks system boot

Path csiph.com!news.samoylyk.net!aioe.org!bofh.it!news.nic.it!robomod
From "Guilherme G. Piccoli" <gpiccoli@canonical.com>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#962545: Invalid serial console blocks system boot
Date Tue, 09 Jun 2020 20:30:02 +0200
Message-ID <AfRay-4Mq-7@gated-at.bofh.it> (permalink)
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Tue Jun 9 18:21:09 2020
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -0.45
Reply-To "Guilherme G. Piccoli" <gpiccoli@canonical.com>, 962545@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc gpiccoli@canonical.com, Debian kernel team <debian-kernel@lists.debian.org>
X-Debian-Pr-Message report 962545
X-Debian-Pr-Package initramfs-tools
X-Debian-Pr-Source initramfs-tools
X-Spam-Bayes score:0.0000 Tokens: new, 22; hammy, 150; neutral, 106; spammy, 0. spammytokens: hammytokens:0.000-+--followupfor, 0.000-+--followup-for, 0.000-+--FollowupFor, 0.000-+--Followup-For, 0.000-+--H*M:reportbug
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:from:to :subject:message-id:date; bh=C8F3PhbWQrpDp8F39nqoKifSBFAchOqi3fG9PXG5uVY=; b=VL8SbK52tNfqgVh7TUNYchlWatYFWK2kYxhYcFIlzw+jEOU3t9cndVROh9YKswfdBa EoCM7Y86rjsiJ25LkM7PK/wJAUNQWV1SiNgkIh2YUXOtluh06xFbEqGsB6wKRkUmY4Zt J7ptenQjUDAXNVVRV++IdJztDURiqnfKjX9FFGrmAA0OVfSnoHSCDT7vrLIY/ORQVEKe 9B/7cNuSTaxAWZzEuFnwmOBrDpUaMojbE8GmjfzFEFdoBllRRF3jxHQlcocYkBzROquI OZ6TtnjFxFDhMdhSMjCC0lr+2SkuAyyAyXGHrLgH0Nrerxs50KilGEiENaI7ghk6jt4M S7QQ==
X-Gm-Message-State AOAM530gUrudY6TAcBeWKMcLIng1GChRgq1tNaftPN+T/zE9JH7mr1RD JA9KC7AZZvAHYaU7zhXVFIDhROVdhaA/ZFPLmqX0dDe/vh11nf9soL/23q4JGlEE/Ds/L26s3G4 kUxsk+aHic1jPg0jHcZ9AsU0jcN0rJ4P30Q==
X-Received by 2002:a0c:e588:: with SMTP id t8mr5449122qvm.182.1591726700118; Tue, 09 Jun 2020 11:18:20 -0700 (PDT)
X-Google-SMTP-Source ABdhPJyCywojl+25M5CKlWswpZANdsBb3TtfwnwWzyZIR36/Rk0CrqwnkgDtsonZGeS1VitsU5mpyA==
X-Received by 2002:a0c:e588:: with SMTP id t8mr5449084qvm.182.1591726699650; Tue, 09 Jun 2020 11:18:19 -0700 (PDT)
Content-Type text/plain; charset="us-ascii"
MIME-Version 1.0
Content-Transfer-Encoding 7bit
X-Mailer reportbug 6.6.6ubuntu1
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1607703
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 50
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Tue, 09 Jun 2020 15:14:59 -0300
X-Original-Message-ID <159172649988.17818.5408121612054684525.reportbug@songoku>
Xref csiph.com linux.debian.bugs.dist:1013279 linux.debian.kernel:67262

Cross-posted to 2 groups.

Show key headers only | View raw


Package: initramfs-tools
Version: 0.137
Followup-For: Bug #960355

Hi Ben and Jonas, I was reporting a similar bug and found this one, thanks
to reportbug!

So, I think this is indeed a bug. The problem was vastly debugged in a
recent Launchpad issue [0], I'll give a summary here.
Currently, _log_msg() is like a void-typed function, with no return. If the
parameter "quiet" is not provided, there's a printf and then the function
returns, which in shell language means the printf return is carried over
to the caller of _log_msg().

Problem is: checkfs() makes use of error log functions, which in the end
rely on _log_msg(). If "quiet" is not supplied, and the filesystem is not
set to fsck on boot (i.e., fsck is not included in the initrd), when the
bad console is provided, an error message on checkfs_once() will eventually
reach the printf on _log_msg(), causing checkfs_once() to "inherit" the bad
return from printf.
The big issue comes now: checkfs() runs a loop, and given in this corner
case checkfs_once() returns an error state, the loop goes on forever,
effectively preventing the boot.

I consider this a bug specially because we had reports of cases in which
the serial console was working...but after a (virtual) HW update the
serial port changed, hence introducing such boot loop.

I've proposed a really simple fix in the following merge request:
salsa.debian.org/kernel-team/initramfs-tools/-/merge_requests/30

One could argue the problem is on checkfs() and we could fix there.
I disagree, I think in no way an error log message should prevent boot or
induce such errors by carrying over a bad result due to invalid console.
Also, we could rethink printf returning error in case of bad console,
but this is/will be a long-term discussion, no quick fix will outcome
from there, so I'd rather have it fixed now if possible.

Cheers,


Guilherme


[0] bugs.launchpad.net/bugs/1573095


-- System Information:
Debian Release: stretch/sid
Architecture: amd64 (x86_64)

Back to linux.debian.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Bug#962545: Invalid serial console blocks system boot "Guilherme G. Piccoli" <gpiccoli@canonical.com> - 2020-06-09 20:30 +0200
  Bug#962545: marked as done (Invalid serial console blocks system  boot) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2020-09-11 22:40 +0200

csiph-web