Bug#919922: Does not start anymore, existing file /var/log/atop/atop_20190120 has incompatible header

2019-01-21 Thread Marc Haber
tags #919922 confirmed upstream
severity #919922 important
thanks

Hi Sven,

thanks for spotting this. Strangely, this didn't happen on my test
box, but I can confirm this behavior for my workstation.

I am downgrading this to important though, since I consider the
statistics writing an auxillary feature, and I suspect that the issue
will fix itself next midnight.

What do you think, would it be an acceptable workaround to move the
current day file away in postinst and document that fact?

Greetings
Marc


On Sun, Jan 20, 2019 at 07:17:54PM +0100, Sven Hartge wrote:
> From: Sven Hartge 
> Subject: Bug#919922: Does not start anymore, existing file
>  /var/log/atop/atop_20190120 has incompatible header
> To: Debian Bug Tracking System 
> Reply-To: Sven Hartge , 919...@bugs.debian.org
> Date: Sun, 20 Jan 2019 19:17:54 +0100
> X-Mailer: reportbug 7.5.1
> 
> Package: atop
> Version: 2.4.0-1
> Severity: grave
> 
> Hello!
> 
> After the update tpo 2.4.0-1 atop does not start anymore for me.
> TL;DR: 
> 
> existing file /var/log/atop/atop_20190120 has incompatible header
> (created by version 2.3 - current version 2.4)
> 
> Here the whole debugging session:
> 
> server:~# systemctl start atop; systemctl status atop; sleep 2; systemctl 
> status atop
> ● atop.service - Atop advanced performance monitor
>Loaded: loaded (/lib/systemd/system/atop.service; enabled; vendor preset: 
> enabled)
>Active: active (running) since Sun 2019-01-20 19:08:50 CET; 11ms ago
>  Docs: man:atop(1)
>  Main PID: 550488 (atop.daily)
> Tasks: 5 (limit: 4691)
>Memory: 1.5M
>CGroup: /system.slice/atop.service
>├─550488 /bin/bash /usr/share/atop/atop.daily
>├─550491 ps -p 547913
>└─550492 grep atop$
> ● atop.service - Atop advanced performance monitor
>Loaded: loaded (/lib/systemd/system/atop.service; enabled; vendor preset: 
> enabled)
>Active: failed (Result: exit-code) since Sun 2019-01-20 19:08:50 CET; 1s 
> ago
>  Docs: man:atop(1)
>   Process: 550488 ExecStart=/usr/share/atop/atop.daily (code=exited, status=7)
>  Main PID: 550488 (code=exited, status=7)
> 
> As one can see, the unit starts /usr/share/atop/atop.daily but no daemon
> remains at the end.
> 
> Even when running the shell script directly, nothing happens:
> 
> server:~# ps auwwwx | grep [a]top; rm /run/atop.pid; bash -x 
> /usr/share/atop/atop.daily; sleep 5; ps auwwwx | grep [a]top
> user  547330  0.2  0.8  51748 33624 pts/2S+   19:06   0:00 
> /usr/bin/python3 /usr/bin/reportbug atop
> user  549910  0.0  0.0   2512   508 pts/2S+   19:07   0:00 sh -c vim 
> -c :6 '/tmp/user/1000/reportbug-atop-20190120-547330-uof401oa'
> user  549911  0.1  0.1  12340  7324 pts/2S+   19:07   0:00 vim -c :6 
> /tmp/user/1000/reportbug-atop-20190120-547330-uof401oa
> + LOGOPTS=-R
> + LOGINTERVAL=600
> + LOGGENERATIONS=28
> + DEFAULTSFILE=/etc/default/atop
> + '[' -e /etc/default/atop ']'
> + . /etc/default/atop
> + case "$LOGGENERATIONS" in
> ++ date +%Y%m%d
> + CURDAY=20190120
> + LOGPATH=/var/log/atop
> + BINPATH=/usr/bin
> + PIDFILE=/run/atop.pid
> + '[' -e /run/atop.pid ']'
> + sleep 3
> + echo 555663
> + exec /usr/bin/atop -R -w /var/log/atop/atop_20190120 600
> + find /var/log/atop -name 'atop_*' -mtime +28 -exec rm '{}' ';'
> user  547330  0.2  0.8  51748 33624 pts/2S+   19:06   0:00 
> /usr/bin/python3 /usr/bin/reportbug atop
> user  549910  0.0  0.0   2512   508 pts/2S+   19:07   0:00 sh -c vim 
> -c :6 '/tmp/user/1000/reportbug-atop-20190120-547330-uof401oa'
> user  549911  0.1  0.1  12340  7324 pts/2S+   19:07   0:00 vim -c :6 
> /tmp/user/1000/reportbug-atop-20190120-547330-uof401oa
> 
> (You can see the open reportbug where I type this in right now.)
> 
> Running atop directly shows the problem:
> 
> server:~# /usr/bin/atop -R -w /var/log/atop/atop_20190120 600
> existing file /var/log/atop/atop_20190120 has incompatible header
> (created by version 2.3 - current version 2.4)
> 
> Deleting all files in /var/log/atop/ makes it work again.
> 
> Side not: the error message does *not* appear in the journal nor the syslog.
> 
> Grüße,
> Sven.
> 
> -- System Information:
> Debian Release: buster/sid
>   APT prefers unstable-debug
>   APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
> 'unstable'), (500, 'testing'), (200, 'experimental'), (1, 
> 'experimental-debug')
> Architecture: i386 (x86_64)
> Foreign Architectures: amd64
> 
> Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), 
> LANGUAGE=de_DE.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/d

Processed: Re: Bug#919922: Does not start anymore, existing file /var/log/atop/atop_20190120 has incompatible header

2019-01-21 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags #919922 confirmed upstream
Bug #919922 [atop] Does not start anymore, existing file 
/var/log/atop/atop_20190120 has incompatible header
Added tag(s) upstream and confirmed.
> severity #919922 important
Bug #919922 [atop] Does not start anymore, existing file 
/var/log/atop/atop_20190120 has incompatible header
Severity set to 'important' from 'grave'
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
919922: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919922
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#919922: Does not start anymore, existing file /var/log/atop/atop_20190120 has incompatible header

2019-01-20 Thread Sven Hartge
Package: atop
Version: 2.4.0-1
Severity: grave

Hello!

After the update tpo 2.4.0-1 atop does not start anymore for me.
TL;DR: 

existing file /var/log/atop/atop_20190120 has incompatible header
(created by version 2.3 - current version 2.4)

Here the whole debugging session:

server:~# systemctl start atop; systemctl status atop; sleep 2; systemctl 
status atop
● atop.service - Atop advanced performance monitor
   Loaded: loaded (/lib/systemd/system/atop.service; enabled; vendor preset: 
enabled)
   Active: active (running) since Sun 2019-01-20 19:08:50 CET; 11ms ago
 Docs: man:atop(1)
 Main PID: 550488 (atop.daily)
Tasks: 5 (limit: 4691)
   Memory: 1.5M
   CGroup: /system.slice/atop.service
   ├─550488 /bin/bash /usr/share/atop/atop.daily
   ├─550491 ps -p 547913
   └─550492 grep atop$
● atop.service - Atop advanced performance monitor
   Loaded: loaded (/lib/systemd/system/atop.service; enabled; vendor preset: 
enabled)
   Active: failed (Result: exit-code) since Sun 2019-01-20 19:08:50 CET; 1s ago
 Docs: man:atop(1)
  Process: 550488 ExecStart=/usr/share/atop/atop.daily (code=exited, status=7)
 Main PID: 550488 (code=exited, status=7)

As one can see, the unit starts /usr/share/atop/atop.daily but no daemon
remains at the end.

Even when running the shell script directly, nothing happens:

server:~# ps auwwwx | grep [a]top; rm /run/atop.pid; bash -x 
/usr/share/atop/atop.daily; sleep 5; ps auwwwx | grep [a]top
user  547330  0.2  0.8  51748 33624 pts/2S+   19:06   0:00 
/usr/bin/python3 /usr/bin/reportbug atop
user  549910  0.0  0.0   2512   508 pts/2S+   19:07   0:00 sh -c vim -c 
:6 '/tmp/user/1000/reportbug-atop-20190120-547330-uof401oa'
user  549911  0.1  0.1  12340  7324 pts/2S+   19:07   0:00 vim -c :6 
/tmp/user/1000/reportbug-atop-20190120-547330-uof401oa
+ LOGOPTS=-R
+ LOGINTERVAL=600
+ LOGGENERATIONS=28
+ DEFAULTSFILE=/etc/default/atop
+ '[' -e /etc/default/atop ']'
+ . /etc/default/atop
+ case "$LOGGENERATIONS" in
++ date +%Y%m%d
+ CURDAY=20190120
+ LOGPATH=/var/log/atop
+ BINPATH=/usr/bin
+ PIDFILE=/run/atop.pid
+ '[' -e /run/atop.pid ']'
+ sleep 3
+ echo 555663
+ exec /usr/bin/atop -R -w /var/log/atop/atop_20190120 600
+ find /var/log/atop -name 'atop_*' -mtime +28 -exec rm '{}' ';'
user  547330  0.2  0.8  51748 33624 pts/2S+   19:06   0:00 
/usr/bin/python3 /usr/bin/reportbug atop
user  549910  0.0  0.0   2512   508 pts/2S+   19:07   0:00 sh -c vim -c 
:6 '/tmp/user/1000/reportbug-atop-20190120-547330-uof401oa'
user  549911  0.1  0.1  12340  7324 pts/2S+   19:07   0:00 vim -c :6 
/tmp/user/1000/reportbug-atop-20190120-547330-uof401oa

(You can see the open reportbug where I type this in right now.)

Running atop directly shows the problem:

server:~# /usr/bin/atop -R -w /var/log/atop/atop_20190120 600
existing file /var/log/atop/atop_20190120 has incompatible header
(created by version 2.3 - current version 2.4)

Deleting all files in /var/log/atop/ makes it work again.

Side not: the error message does *not* appear in the journal nor the syslog.

Grüße,
Sven.

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'unstable'), (500, 'testing'), (200, 'experimental'), (1, 'experimental-debug')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), 
LANGUAGE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages atop depends on:
ii  libc62.28-5
ii  libncurses6  6.1+20181013-1
ii  libtinfo66.1+20181013-1
ii  lsb-base 10.2018112800
ii  zlib1g   1:1.2.11.dfsg-1

Versions of packages atop recommends:
ii  cron [cron-daemon]  3.0pl1-130

atop suggests no packages.

-- debconf-show failed