when running apt-get upgrade my computer reboots

If none of the more specific forums is the right place to ask

when running apt-get upgrade my computer reboots

Postby alma359 » 2019-10-21 22:09

Hello,
I have a small mini pc running Debian and a Webserver. Every time I try to run the command
Code: Select all
apt-get upgrade
my pc is immediately rebooting. I get the following messages in terminal:
Code: Select all
root@miniServer:/var/www# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-image-amd64
The following packages will be upgraded:
  libicu57 libmagickcore-6.q16-3-extra libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip
  libnginx-mod-http-image-filter libnginx-mod-http-subs-filter libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail
  libnginx-mod-stream libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libx11-xcb1 libxslt1.1 linux-libc-dev nginx nginx-common nginx-full
  patch policykit-1 postfix postfix-sqlite postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6 rsync sudo unzip usbutils
32 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0 B/21.3 MB of archives.
After this operation, 31.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),
   LC_ALL = (unset),
   LC_CTYPE = "UTF-8",
   LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Extracting templates from packages: 100%
Preconfiguring packages ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),
   LC_ALL = (unset),
   LC_CTYPE = "UTF-8",
   LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
dpkg: warning: files list file for package 'python3' missing; assuming package has no files currently installed
(Reading database ... 46833 files and directories currently installed.)
Preparing to unpack .../00-libicu57_57.1-6+deb9u3_amd64.deb ...
Unpacking libicu57:amd64 (57.1-6+deb9u3) over (57.1-6+deb9u3) ...

After this i get
Code: Select all
packet_write_wait: Connection to 192.168.1.100 port 22: Broken pipe
alma359
 
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

Postby reinob » 2019-10-22 05:42

alma359 wrote:I have a small mini pc running Debian and a Webserver. Every time I try to run the command
Code: Select all
apt-get upgrade
my pc is immediately rebooting.


What do the logs of the server show?
If the reboot is somehow software-generated then one would expect that the journal/syslog show the process in detail.

If it's the hardware rebooting (overheating? bad memory?) then you will probably have nothing in the logs, but then you know what's hitting you, and what you need to check.
reinob
 
Posts: 742
Joined: 2014-06-30 11:42

Re: when running apt-get upgrade my computer reboots

Postby alma359 » 2019-10-22 09:57

I found out the problem comes from the package libicu57. I downloaded the .deb package for libicu57 and then tried to install it with dpkg and my pc again rebooted. After the reboot i run apt-get upgrade again and get this: E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
If i try to remove libicu57 with apt-get remove libicu57 i see that many packages i need (nginx, bind9, php) will get removed too.
Is there are way to remove libicu57 manually and then install it again or do i need to reinstall Debian? Will a OS-Update help? I am still running Debian Stretch right now.
alma359
 
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

Postby reinob » 2019-10-22 10:11

alma359 wrote:I found out the problem comes from the package libicu57. I downloaded the .deb package for libicu57 and then tried to install it with dpkg and my pc again rebooted. After the reboot i run apt-get upgrade again and get this: E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
If i try to remove libicu57 with apt-get remove libicu57 i see that many packages i need (nginx, bind9, php) will get removed too.
Is there are way to remove libicu57 manually and then install it again or do i need to reinstall Debian? Will a OS-Update help? I am still running Debian Stretch right now.


But is it a hard reboot, without leaving any traces in the syslog?
Seems very weird.

In case you didn't check, could you log in to that computer and inspect /var/log/syslog to see if it shows any hints?

(I assume you are using rsyslog which I believe is the default in debian. If you only use the systemd journal then make sure it's not set to be "volatile", try the apt update && apt upgrade dance again, and post the contents of "journalctl --since-today" or such)
reinob
 
Posts: 742
Joined: 2014-06-30 11:42

Re: when running apt-get upgrade my computer reboots

Postby reinob » 2019-10-22 10:14

... and just to make sure you are really running stretch, kindly post the output of running "apt policy".
reinob
 
Posts: 742
Joined: 2014-06-30 11:42

Re: when running apt-get upgrade my computer reboots

Postby alma359 » 2019-10-22 12:40

Yes it is hard reboot. I inspected the syslog file after running apt-get update && apt-get upgrade 2 times and there are no errors. Only the boot-up process is documented. Here is pastebin https://pastebin.com/raw/ywc2Rp0n (it's too big for upload here)

and this is apt policy
Code: Select all
root@miniServer:/var/www# apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://ftp.uni-sofia.bg/debian stretch-updates/main amd64 Packages
     release o=Debian,a=oldstable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
     origin ftp.uni-sofia.bg
 500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
     release v=9,o=Debian,a=oldstable,n=stretch,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://ftp.uni-sofia.bg/debian stretch/main amd64 Packages
     release v=9.11,o=Debian,a=oldstable,n=stretch,l=Debian,c=main,b=amd64
     origin ftp.uni-sofia.bg
Pinned packages:
alma359
 
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

Postby reinob » 2019-10-22 14:11

I see nothing special in the syslog.

Could you try doing "apt-mark hold libicu57" to prevent upgrading that package? and then "apt upgrade"

If that works, then there's indeed something fishy about libicu57, but I can't imagine that package being the problem.

To me it looks more like power loss, hardware watchdog, overheating, or corrupted/damaged RAM (do you use swap?, I think I saw something about zram in your log).

If you don't run apt upgrade do you have any such spontaneous reboots?
reinob
 
Posts: 742
Joined: 2014-06-30 11:42

Re: when running apt-get upgrade my computer reboots

Postby alma359 » 2019-10-22 15:59

reinob wrote:I see nothing special in the syslog.

Could you try doing "apt-mark hold libicu57" to prevent upgrading that package? and then "apt upgrade"

If that works, then there's indeed something fishy about libicu57, but I can't imagine that package being the problem.

To me it looks more like power loss, hardware watchdog, overheating, or corrupted/damaged RAM (do you use swap?, I think I saw something about zram in your log).

If you don't run apt upgrade do you have any such spontaneous reboots?


I tried apt-mark hold libicu57 and then apt-upgrade, now it's not rebooting anymore but i get this error
Code: Select all
root@miniServer:/var/www# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
E: Can't find a source to download version '57.1-6+deb9u3' of 'libicu57:amd64'


I did a stress test now with Sysbench cpu and memory and the pc is stable, no reboots.
this is swap usage
Code: Select all
root@miniServer:/var/www# swapon -s
Filename            Type      Size   Used   Priority
/dev/sda3                                 partition   4028412   0   -1
root@miniServer:/var/www# free
              total        used        free      shared  buff/cache   available
Mem:        3887664      143712     3526156       19028      217796     3506524
Swap:       4028412           0     4028412
root@miniServer:/var/www#
alma359
 
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

Postby reinob » 2019-10-22 17:51

alma359 wrote:I tried apt-mark hold libicu57 and then apt-upgrade, now it's not rebooting anymore but i get this error
Code: Select all
root@miniServer:/var/www# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
E: Can't find a source to download version '57.1-6+deb9u3' of 'libicu57:amd64'



did the apt-mark work OK? (check with "apt-mark showhold").
then make sure you do "apt update" before "apt upgrade".

(note that until you fix your locale settings -- which you should -- you can use "LANG=C apt update" and then "LANG=C apt upgrade" to avoid getting the warnings shown in your first post..)
reinob
 
Posts: 742
Joined: 2014-06-30 11:42

Re: when running apt-get upgrade my computer reboots

Postby alma359 » 2019-10-22 19:17

Yes it did work i tried the commands
Code: Select all
root@miniServer:/var/www# apt-mark showhold
libicu57
root@miniServer:/var/www# LANG=C apt update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://ftp.uni-sofia.bg/debian stretch InRelease
Hit:3 http://ftp.uni-sofia.bg/debian stretch-updates InRelease
Hit:4 http://ftp.uni-sofia.bg/debian stretch Release
Reading package lists... Done                     
Building dependency tree       
Reading state information... Done
33 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@miniServer:/var/www# LANG=C apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
E: Can't find a source to download version '57.1-6+deb9u3' of 'libicu57:amd64'
root@miniServer:/var/www#


I found that my installed version of libicu57 is already the current version. https://packages.debian.org/stretch/libicu57 Maybe this is the problem?
alma359
 
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

Postby L_V » 2019-10-22 20:53

Is your network correctly working ?
try this
Code: Select all
apt-mark unhold libicu57
cd /tmp
wget http://ftp.uni-sofia.bg/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb
dpkg -i libicu57*.deb
apt install -f
dpkg -l | grep libicu57 | awk '{print $1,$2}'
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Re: when running apt-get upgrade my computer reboots

Postby alma359 » 2019-10-23 09:43

L_V wrote:Is your network correctly working ?
try this
Code: Select all
apt-mark unhold libicu57
cd /tmp
wget http://ftp.uni-sofia.bg/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb
dpkg -i libicu57*.deb
apt install -f
dpkg -l | grep libicu57 | awk '{print $1,$2}'


Yes network is working fine
I can download the file successfully but get a reboot again when unpacking.
Code: Select all
root@miniServer:/var/www# apt-mark unhold libicu57
Canceled hold on libicu57.
root@miniServer:/var/www# cd /tmp
root@miniServer:/tmp# wget http://ftp.uni-sofia.bg/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb
--2019-10-23 05:59:08--  http://ftp.uni-sofia.bg/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb
Resolving ftp.uni-sofia.bg (ftp.uni-sofia.bg)... 62.44.96.11, 2001:67c:20d0::1414
Connecting to ftp.uni-sofia.bg (ftp.uni-sofia.bg)|62.44.96.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7705466 (7.3M) [application/octet-stream]
Saving to: 'libicu57_57.1-6+deb9u3_amd64.deb'

libicu57_57.1-6+deb9u3_amd64.deb       100%[============================================================================>]   7.35M  10.7MB/s    in 0.7s   

2019-10-23 05:59:09 (10.7 MB/s) - 'libicu57_57.1-6+deb9u3_amd64.deb' saved [7705466/7705466]

root@miniServer:/tmp# dpkg -i libicu57*.deb
dpkg: warning: files list file for package 'python3' missing; assuming package has no files currently installed
(Reading database ... 46833 files and directories currently installed.)
Preparing to unpack libicu57_57.1-6+deb9u3_amd64.deb ...
Unpacking libicu57:amd64 (57.1-6+deb9u3) over (57.1-6+deb9u3) ...
packet_write_wait: Connection to 192.168.1.100 port 22: Broken pipe
alma359
 
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

Postby L_V » 2019-10-23 10:14

+
Code: Select all
dpkg -l |grep python3| awk '{print $1,$2}'
apt-cache policy python3
apt install python3

....wonder if your package database is not broken.
+
Code: Select all
find /var/lib/apt/lists -type f -name '*Packages'
dpkg-query -l | egrep -v '^(ii|un|rc)' | sed '1,5d' | awk '{print $1,$2,$3}'
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Re: when running apt-get upgrade my computer reboots

Postby alma359 » 2019-10-23 12:13

L_V wrote:+
Code: Select all
dpkg -l |grep python3| awk '{print $1,$2}'
apt-cache policy python3
apt install python3

....wonder if your package database is not broken.
+
Code: Select all
find /var/lib/apt/lists -type f -name '*Packages'
dpkg-query -l | egrep -v '^(ii|un|rc)' | sed '1,5d' | awk '{print $1,$2,$3}'


Code: Select all
root@miniServer:/var/www# dpkg -l |grep python3| awk '{print $1,$2}'
ii libpython3-stdlib:amd64
ii libpython3.5-minimal:amd64
ii libpython3.5-stdlib:amd64
ii python3
ii python3-dbus
ii python3-gi
ii python3-minimal
ii python3-pexpect
ii python3-pil:amd64
ii python3-ptyprocess
ii python3-renderpm:amd64
ii python3-reportlab
ii python3-reportlab-accel:amd64
ii python3.5
ii python3.5-minimal
root@miniServer:/var/www# apt-cache policy python3
python3:
  Installed: 3.5.3-1
  Candidate: 3.5.3-1
  Version table:
 *** 3.5.3-1 500
        500 http://ftp.uni-sofia.bg/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status
root@miniServer:/var/www# apt install python3
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

after running 'dpkg --configure -a ...again reboot
Code: Select all
root@miniServer:/var/www# dpkg --configure -a
Processing triggers for libc-bin (2.24-11+deb9u4) ...
root@miniServer:/var/www# apt install python3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3 is already the newest version (3.5.3-1).
The following packages will be upgraded:
  libicu57
1 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
1 not fully installed or removed.
Need to get 7705 kB of archives.
After this operation, 30.8 MB of additional disk space will be used.
Get:1 http://ftp.uni-sofia.bg/debian stretch/main amd64 libicu57 amd64 57.1-6+deb9u3 [7705 kB]
Fetched 7705 kB in 1s (6777 kB/s)   
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),
   LC_ALL = (unset),
   LC_CTYPE = "UTF-8",
   LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: warning: files list file for package 'python3' missing; assuming package has no files currently installed
(Reading database ... 46833 files and directories currently installed.)
Preparing to unpack .../libicu57_57.1-6+deb9u3_amd64.deb ...
Unpacking libicu57:amd64 (57.1-6+deb9u3) over (57.1-6+deb9u3) ...
packet_write_wait: Connection to 192.168.1.100 port 22: Broken pipe

Code: Select all
root@miniServer:/var/www# find /var/lib/apt/lists -type f -name '*Packages'
/var/lib/apt/lists/ftp.uni-sofia.bg_debian_dists_stretch-updates_main_binary-amd64_Packages
/var/lib/apt/lists/ftp.uni-sofia.bg_debian_dists_stretch_main_binary-amd64_Packages
/var/lib/apt/lists/security.debian.org_debian-security_dists_stretch_updates_main_binary-amd64_Packages
root@miniServer:/var/www# dpkg-query -l | egrep -v '^(ii|un|rc)' | sed '1,5d' | awk '{print $1,$2,$3}'
iHR libicu57:amd64 57.1-6+deb9u3
alma359
 
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

Postby L_V » 2019-10-23 12:31

You should reconfigure your locales to clean up a little bit.
Code: Select all
dpkg-reconfigure locales
+
Code: Select all
ls /var/lib/dpkg/updates/
grep 'Package: python3' /var/lib/apt/lists/ftp.uni-sofia.bg_debian_dists_stretch_main_binary-amd64_Packages | head
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable