Devuan bug report logs - #731
needrestart -b on AMD processors complains of perl uninitialized variable

version graph

Package: needrestart; Maintainer for needrestart is (unknown); Source for needrestart is src:needrestart.

Reported by: George Robbert <ghr@minazuki.org>

Date: Thu, 22 Dec 2022 21:28:01 UTC

Severity: normal

Tags: debian

Found in version 3.5-4+deb11u2

Fixed in version 3.6-1

Done: Mark Hindley <mark@hindley.org.uk>

Forwarded to https://bugs.debian.org/1026927

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.devuan.org
Subject: bug#731: needrestart -b on AMD processors complains of perl uninitialized variable
Reply-To: George Robbert <ghr@minazuki.org>, 731@bugs.devuan.org
Resent-From: George Robbert <ghr@minazuki.org>
Resent-To: devuan-bugs@lists.dyne.org
Resent-CC: devuan-dev@lists.dyne.org
X-Loop: owner@bugs.devuan.org
Resent-Date: Thu, 22 Dec 2022 21:28:01 +0000
Resent-Message-ID: <handler.731.B.167174442424378@bugs.devuan.org>
Resent-Sender: owner@bugs.devuan.org
X-Devuan-PR-Message: report 731
X-Devuan-PR-Package: needrestart
X-Devuan-PR-Keywords: 
Received: via spool by submit@bugs.devuan.org id=B.167174442424378
          (code B); Thu, 22 Dec 2022 21:28:01 +0000
Received: (at submit) by bugs.devuan.org; 22 Dec 2022 21:27:04 +0000
Delivered-To: bugs@devuan.org
Received: from email.devuan.org [2001:41d0:2:d06e::5c4:2612]
	by doc.devuan.org with IMAP (fetchmail-6.4.16)
	for <debbugs@localhost> (single-drop); Thu, 22 Dec 2022 21:27:04 +0000 (UTC)
Received: from email.devuan.org
	by email.devuan.org with LMTP
	id 1qcCIZTLpGPAFwAAmSBk0A
	(envelope-from <ghr@minazuki.org>)
	for <bugs@devuan.org>; Thu, 22 Dec 2022 21:26:44 +0000
Received: by email.devuan.org (Postfix, from userid 109)
	id 775C7121D; Thu, 22 Dec 2022 21:26:44 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on email.devuan.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
	DKIM_VALID_AU,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.200.24.137; helo=yuki.minazuki.org; envelope-from=ghr@minazuki.org; receiver=<UNKNOWN> 
Received: from yuki.minazuki.org (minazuki.org [104.200.24.137])
	by email.devuan.org (Postfix) with ESMTPS id DE02A226
	for <submit@bugs.devuan.org>; Thu, 22 Dec 2022 21:26:39 +0000 (UTC)
Received: from xecty.minazuki.org (localhost [IPv6:::1])
	by yuki.minazuki.org (Postfix) with ESMTP id 90CC4140D8
	for <submit@bugs.devuan.org>; Thu, 22 Dec 2022 14:26:34 -0700 (MST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=minazuki.org;
	s=dkim2048; t=1671744394;
	bh=fpLLTs0xlElVR9MuH1MnK37oAIM8j5QTpSHNkln08us=;
	h=From:To:Subject:Date:From;
	b=zZTgGlt4OrhfP0o981wF7SV5kfq30sOhqfU+r9ohbvCAhE70xIpXKV4e4coe4nIXD
	 oZrk8gkXRM3RPWS97v5jozdhub020v34dOftOi9qc3OQL/196RPRIs+l1z3hyMD9+P
	 Vva6Eu8gBpdcWCJZdfSB0AL40Wj+Dan/S1F93nmQqCAHAyM314A1uyXGMD1lvUFmRZ
	 EKZNWzPr1eElklMI8XwxDwdvfJ7tnpzAFT5qM/VVA6YPJ2TFo2ic10n6BF2lh5VI68
	 rJQHNlB6DXmOh2qaSAx4xtlRl/0YKF56+lTY7xvjVyDmGbbHOjyqamPb5X6nx5ddcr
	 Q1NDa4V0/kMXg==
Received: by xecty.minazuki.org (Postfix, from userid 1000)
	id 72D5720195; Thu, 22 Dec 2022 14:26:34 -0700 (MST)
Content-Type: multipart/mixed; boundary="===============6328687844274786659=="
MIME-Version: 1.0
From: George Robbert <ghr@minazuki.org>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Message-ID: <167174439441.9836.13629055203656959955.reportbug@xecty.minazuki.org>
X-Mailer: reportbug 7.10.3+devuan1
Date: Thu, 22 Dec 2022 14:26:34 -0700
[Message part 1 (text/plain, inline)]
Package: needrestart
Version: 3.5-4+deb11u2
Severity: normal

Dear Maintainer,

When running 'needrestart -b' on an AMD system, I get the following
uninitialized variable warning.  It also does not report the expected
microcode version (NEEDRESTART-UCEXP).  See output: section below for
example output of needrestart -b.

Use of uninitialized value $ucode_vars{"AVAIL"} in concatenation (.) or string at /usr/sbin/needrestart line 904.

This perl warning disappears when adding the -v option (needrestart -b -v),
and the correct value is reported for NEEDRESTART-UCEXP.


It looks to me like the problem is that line 182 of
/usr/share/perl5/NeedRestart/uCode/AMD.pm ends in a comma (,) instead
of a semicolon (;).  This means that assignment is subsumed into the
next line which is under if ($debug).

See the attached patch.  The debsum error reported below is due to my
applying this patch.

Thanks,
George Robbert



-- Package-specific info:
needrestart -b output:

NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 5.10.0-20-amd64
NEEDRESTART-KEXP: 5.10.0-20-amd64
NEEDRESTART-KSTA: 1
NEEDRESTART-UCSTA: 1
NEEDRESTART-UCCUR: 0x03000027
Use of uninitialized value $ucode_vars{"AVAIL"} in concatenation (.) or string at /usr/sbin/needrestart line 904.
NEEDRESTART-UCEXP: 



-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 4 (chimaera)
Release:	4
Codename:	chimaera
Architecture: x86_64

Kernel: Linux 5.10.0-20-amd64 (SMP w/2 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages needrestart depends on:
ii  binutils                   2.35.2-2
ii  dpkg                       1.20.12
ii  gettext-base               0.21-4
ii  libintl-perl               1.26-3+deb11u1
ii  libmodule-find-perl        0.15-1
ii  libmodule-scandeps-perl    1.30-1
ii  libproc-processtable-perl  0.59-2+b1
ii  libsort-naturally-perl     1.03-2
ii  libterm-readkey-perl       2.38-1+b2
ii  perl                       5.32.1-4+deb11u2
ii  xz-utils                   5.2.5-2.1~deb11u1

Versions of packages needrestart recommends:
ii  libpam-elogind [libpam-systemd]  246.10-2
ii  sysvinit-core                    2.96-7+devuan2

Versions of packages needrestart suggests:
pn  iucode-tool                          <none>
pn  needrestart-session | libnotify-bin  <none>

-- Configuration Files:
/etc/apt/apt.conf.d/99needrestart changed:
DPkg::Post-Invoke {"test -x /usr/lib/needrestart/apt-pinvoke && /usr/lib/needrestart/apt-pinvoke -b || true"; };

/etc/needrestart/hook.d/20-rpm [Errno 2] No such file or directory: '/etc/needrestart/hook.d/20-rpm'

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/perl5/NeedRestart/uCode/AMD.pm (from needrestart package)
[needrestart.patch (text/plain, attachment)]

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Sat Sep 28 23:22:17 2024;