Bug#882080: debian-goodies: checkrestart from debian-goodies 0.77 finds no files to restart

2017-11-18 Thread Axel Beckert
Control: clone -1 -2
Control: retitle -2 debian-goodies: "checkrestart -n" throws TypeError: a 
bytes-like object is required, not 'str'
Control: severity -2 important
Control: submitter -2 RjY 

Hi RjY,

RjY wrote:
> Just wanted to add I am also seeing this. Also wanted to note using
> checkrestart with -n (I wondered if not using lsof might produce
> different results) instead gave a python exception/backtrace.

Indeed, thanks for reporting it. But it's (very likely) a separate
issue, hence I'm cloning this bug report into a second one with
appropriate title, severity and submitter.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug#882080: debian-goodies: checkrestart from debian-goodies 0.77 finds no files to restart

2017-11-18 Thread RjY
Just wanted to add I am also seeing this. Also wanted to note using
checkrestart with -n (I wondered if not using lsof might produce
different results) instead gave a python exception/backtrace.

--

% sudo lsof -n | grep -E 'DEL|deleted' | grep /lib/
mpv2765rjy  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
mpv2765rjy  DEL   REG8,2
 2883608 /lib/x86_64-linux-gnu/libsystemd.so.0.19.1
mpv/termi  2765  2769  rjy  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
mpv/termi  2765  2769  rjy  DEL   REG8,2
 2883608 /lib/x86_64-linux-gnu/libsystemd.so.0.19.1
mpv/lua2765  2770  rjy  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
mpv/lua2765  2770  rjy  DEL   REG8,2
 2883608 /lib/x86_64-linux-gnu/libsystemd.so.0.19.1
mpv/cache  2765  2774  rjy  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
mpv/cache  2765  2774  rjy  DEL   REG8,2
 2883608 /lib/x86_64-linux-gnu/libsystemd.so.0.19.1
mpv/demux  2765  2775  rjy  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
mpv/demux  2765  2775  rjy  DEL   REG8,2
 2883608 /lib/x86_64-linux-gnu/libsystemd.so.0.19.1
mpv/ao 2765  2778  rjy  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
mpv/ao 2765  2778  rjy  DEL   REG8,2
 2883608 /lib/x86_64-linux-gnu/libsystemd.so.0.19.1
inetd  3864   root  DEL   REG8,2
 2883608 /lib/x86_64-linux-gnu/libsystemd.so.0.19.1
sshd   3871   root  DEL   REG8,2
 2883608 /lib/x86_64-linux-gnu/libsystemd.so.0.19.1
login  4085   root  DEL   REG8,2
 3014687 /lib/x86_64-linux-gnu/security/pam_systemd.so
apt9909rjy  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
systemd   21060rjy  txt   REG8,2  
16657602886230 /lib/systemd/systemd (deleted)
systemd   21060rjy  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
systemd   21060rjy  DEL   REG8,2
 2883762 /lib/systemd/libsystemd-shared-235.so
(sd-pam   21061rjy  txt   REG8,2  
16657602886230 /lib/systemd/systemd (deleted)
(sd-pam   21061rjy  DEL   REG8,2
 3014687 /lib/x86_64-linux-gnu/security/pam_systemd.so
(sd-pam   21061rjy  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
(sd-pam   21061rjy  DEL   REG8,2
 2883762 /lib/systemd/libsystemd-shared-235.so
dbus-daem 29391 messagebus  DEL   REG8,2
 2883608 /lib/x86_64-linux-gnu/libsystemd.so.0.19.1
systemd-l 29392   root  txt   REG8,2   
2192722886245 /lib/systemd/systemd-logind (deleted)
systemd-l 29392   root  DEL   REG8,2
 2883672 /lib/x86_64-linux-gnu/libudev.so.1.6.7
systemd-l 29392   root  DEL   REG8,2
 2883762 /lib/systemd/libsystemd-shared-235.so

% sudo checkrestart
Found 0 processes using old versions of upgraded files

% sudo checkrestart -n
Traceback (most recent call last):
  File "/usr/sbin/checkrestart", line 798, in 
main()
  File "/usr/sbin/checkrestart", line 157, in main
toRestart = procfilescheck(blacklist = blacklist, excludepidlist = 
excludepidlist)
  File "/usr/sbin/checkrestart", line 435, in procfilescheck
data = re.split('\s+', output.strip('\n'), 3)
TypeError: a bytes-like object is required, not 'str'

-- 
https://rjy.org.uk/



Bug#882080: debian-goodies: checkrestart from debian-goodies 0.77 finds no files to restart

2017-11-18 Thread Axel Beckert
Hi,

according to git bisect, commit
8c3cad64d8b11f3acba4a856dcc915400d97380d is the culprit:

→ git bisect run sh -c "ssh root@localhost 
'~abe/debian-goodies/debian-goodies/checkrestart 2>&1' | egrep 'Found 
[^0][0-9]* processes using old versions of upgraded files'"
running sh -c ssh root@localhost 
'~abe/debian-goodies/debian-goodies/checkrestart 2>&1' | egrep 'Found 
[^0][0-9]* processes using old versions of upgraded files'
Bisecting: 5 revisions left to test after this (roughly 3 steps)
[aa0411a3db01a1d220b19e12dec128691b9377c9] Document --terse option and adjust 
example for --machine output to the real output shown
running sh -c ssh root@localhost 
'~abe/debian-goodies/debian-goodies/checkrestart 2>&1' | egrep 'Found 
[^0][0-9]* processes using old versions of upgraded files'
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[8c3cad64d8b11f3acba4a856dcc915400d97380d] Provide machine readable output 
based on patch provided by Simon Ruderich
running sh -c ssh root@localhost 
'~abe/debian-goodies/debian-goodies/checkrestart 2>&1' | egrep 'Found 
[^0][0-9]* processes using old versions of upgraded files'
Bisecting: 0 revisions left to test after this (roughly 1 step)
[bad5f00c933eae6a1c4d0048fa08e139e7de7ad8] debian/copyright: Switch one 
previously overseen URL to HTTPS
running sh -c ssh root@localhost 
'~abe/debian-goodies/debian-goodies/checkrestart 2>&1' | egrep 'Found 
[^0][0-9]* processes using old versions of upgraded files'
Found 201 processes using old versions of upgraded files
8c3cad64d8b11f3acba4a856dcc915400d97380d is the first bad commit
commit 8c3cad64d8b11f3acba4a856dcc915400d97380d
Author: Javier Fernandez-Sanguino 
Date:   Mon Nov 6 22:43:26 2017 +0100

Provide machine readable output based on patch provided by Simon Ruderich

:100755 100755 52dbc70e0a143c6fdaeb0b567c0ae6cad3f947c0 
ee28021dc740b409b059f7fa1f9baa5f669f9be0 M  checkrestart
bisect run success

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug#882080: debian-goodies: checkrestart from debian-goodies 0.77 finds no files to restart

2017-11-18 Thread Axel Beckert
Control: severity -1 serious

Hi Andreas,

Andreas Schmidt wrote:
> after updating debian-goodies to version 0.77, checkrestart does no longer 
> find
> anything to restart. I know it should find something, because I just updated
> many packages including libc6.

That's a very good indicator. Unfortunately we don't have a test suite
to catch such cases.

When I checked checkrestart before the upload it indeed showed nothing
for me, too. But then again, I do have needrestart installed and hence
checkrestart seldomly finds something needrestart hasn't found or
restarted. (But then again, needrestart usually doesn't restart dbus
or the display manager. And checkrestart doesn't have any display
manager in its blacklist, just dbus, systemd and screen. So it should
report at least my display manager.)

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug#882080: debian-goodies: checkrestart from debian-goodies 0.77 finds no files to restart

2017-11-18 Thread Andreas Schmidt
Package: debian-goodies
Version: 0.77
Severity: normal

Dear Maintainer,

after updating debian-goodies to version 0.77, checkrestart does no longer find
anything to restart. I know it should find something, because I just updated
many packages including libc6.

I have temporarily downgraded debian-goodies to the previous version, run
checkrestart to get a realistic list of restartable packages, then upgraded and
run checkrestart again. Here is the log:


# dpkg -l | grep debian-goodies
ii  debian-goodies   0.76
all  Small toolbox-style utilities for Debian systems
# checkrestart | head -5
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
  Output information may be incomplete.
Found 167 processes using old versions of upgraded files
(84 distinct programs)
(59 distinct packages)

Of these, 3 seem to contain systemd service definitions or init scripts which
can be used to restart them.
# apt-# apt-get install debian-goodies
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  debian-goodies
1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Need to get 0 B/75.6 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Reading changelogs... Done
(Reading database ... 534943 files and directories currently installed.)
Preparing to unpack .../debian-goodies_0.77_all.deb ...
Unpacking debian-goodies (0.77) over (0.76) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up debian-goodies (0.77) ...
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB

Total disk space freed by localepurge: 0 KiB

Scanning processes...
Scanning candidates...
Scanning linux images...
Restarting services...
Services being skipped:
 /etc/needrestart/restart.d/dbus.service
 systemctl restart lightdm.service
 systemctl restart systemd-journald.service
 systemctl restart systemd-logind.service
 systemctl restart wicd.service
No containers need to be restarted.
User sessions running outdated binaries:
 pc @ session #862: atrild[20463], at-spi-bus-laun[19106], at-
spi2-registr[19113],
bash[621,19378,19379,19383,19386,19389,19392,19404,19410,19431,22685],
  clock-applet[8927], dbus-daemon[19073,24563], dbus-launch[19072,24558],
dconf-service[19124,24566], dirmngr[4883], explorer.exe[22465], firefox-
esr[19240],
  gconfd-2[19217], geany[14718], gnome-keyring-d[19045], gpg-agent[4905], gvfs-
afc-volume[19308], gvfsd[19092], gvfsd-computer[32168], gvfsd-dnssd[7148],
  gvfsd-fuse[19097], gvfsd-http[30723], gvfsd-metadata[20930], gvfsd-
network[7120], gvfsd-trash[19338], gvfs-goa-volume[19269], gvfs-
gphoto2-vo[19323],
  gvfs-mtp-volume[19328], gvfs-udisks2-vo[19198], hamster-service[8968],
hamster-time-tr[2924], lightdm[19024], man[22770], mate-dictionary[8924], mate-
netspeed-a[8921],
  mate-panel[8799], mate-screensave[21535], mate-session[19048], mate-
terminal[19232], mc[619,19282,30639], mocp[32478], msd-locate-poin[19459],
notification-ar[8926],
  plugplay.exe[22434], pulseaudio[19205], redshift-gtk[9038],
services.exe[22418], sh[19176], su[638,22684,26459], tracker-store[7225],
WebKitNetworkPr[4656,20683,20686,20690,20691,20692,20693,20694,20695,20696,20697,20698,20699,20700,20701,20703],
winedevice.exe[22422], wineserver64[22412],
  wnck-applet[8915], zeitgeist-fts[21487]
 pc @ user manager service: systemd[19033]
# apt-get i# apt-get install debian-goodies
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  debian-goodies
1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Need to get 0 B/75.6 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Reading changelogs... Done
(Reading database ... 534943 files and directories currently installed.)
Preparing to unpack .../debian-goodies_0.77_all.deb ...
Unpacking debian-goodies (0.77) over (0.76) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up debian-goodies (0.77) ...
nstall debian-goodies
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  debian-goodies
1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Need to get 0 B/75.6 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Preparing to unpack .../debian-goodies_0.77_all.deb ...
Unpacking debian-goodies (0.77) over (0.76) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up debian-goodies (0.77) ...

Scanning processes...
Scanning candidates...
Scanning linux