Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

when running apt-get upgrade my computer reboots

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
alma359
Posts: 15
Joined: 2019-10-21 21:53

when running apt-get upgrade my computer reboots

#1 Post by alma359 »

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

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: when running apt-get upgrade my computer reboots

#2 Post by reinob »

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.

alma359
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

#3 Post by alma359 »

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.

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: when running apt-get upgrade my computer reboots

#4 Post by reinob »

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: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: when running apt-get upgrade my computer reboots

#5 Post by reinob »

... and just to make sure you are really running stretch, kindly post the output of running "apt policy".

alma359
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

#6 Post by alma359 »

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:

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: when running apt-get upgrade my computer reboots

#7 Post by reinob »

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?

alma359
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

#8 Post by alma359 »

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# 

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: when running apt-get upgrade my computer reboots

#9 Post by reinob »

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..)

alma359
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

#10 Post by alma359 »

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?

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: when running apt-get upgrade my computer reboots

#11 Post by L_V »

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}'

alma359
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

#12 Post by alma359 »

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

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: when running apt-get upgrade my computer reboots

#13 Post by L_V »

+

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}'

alma359
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

#14 Post by alma359 »

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

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: when running apt-get upgrade my computer reboots

#15 Post by L_V »

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

alma359
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

#16 Post by alma359 »

I fixed my locales but the error with libicu57 still exists.

I searched for libicu57 in /var/lib/dpkg/status and found this:

Code: Select all

Package: libicu57
Status: install reinstreq half-installed
Priority: optional
Section: libs
Architecture: amd64
Multi-Arch: same
Version: 57.1-6+deb9u3
Now i want to remove this package manually.
Is it safe do delete these files ? from here: https://packages.debian.org/stretch/amd ... 7/filelist

Code: Select all

/usr/lib/x86_64-linux-gnu/libicudata.so.57
/usr/lib/x86_64-linux-gnu/libicudata.so.57.1
/usr/lib/x86_64-linux-gnu/libicui18n.so.57
/usr/lib/x86_64-linux-gnu/libicui18n.so.57.1
/usr/lib/x86_64-linux-gnu/libicuio.so.57
/usr/lib/x86_64-linux-gnu/libicuio.so.57.1
/usr/lib/x86_64-linux-gnu/libicule.so.57
/usr/lib/x86_64-linux-gnu/libicule.so.57.1
/usr/lib/x86_64-linux-gnu/libiculx.so.57
/usr/lib/x86_64-linux-gnu/libiculx.so.57.1
/usr/lib/x86_64-linux-gnu/libicutest.so.57
/usr/lib/x86_64-linux-gnu/libicutest.so.57.1
/usr/lib/x86_64-linux-gnu/libicutu.so.57
/usr/lib/x86_64-linux-gnu/libicutu.so.57.1
/usr/lib/x86_64-linux-gnu/libicuuc.so.57
/usr/lib/x86_64-linux-gnu/libicuuc.so.57.1
/usr/share/doc/libicu57/NEWS.Debian.gz
/usr/share/doc/libicu57/changelog.Debian.gz
/usr/share/doc/libicu57/copyright
/usr/share/lintian/overrides/libicu57

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: when running apt-get upgrade my computer reboots

#17 Post by L_V »

alma359 wrote:error with libicu57 still exists.
I searched for libicu57 in /var/lib/dpkg/status and found this
Package: libicu57
Status: install reinstreq half-installed:
Already done. This is what I am trying to solve.....

Code: Select all

dpkg-query -l | egrep -v '^(ii|un|rc)' | sed '1,5d' | awk '{print $1,$2,$3}'
iHR libicu57:amd64 57.1-6+deb9u3
Do you mean my two previous commands return really nothing at all ? (bottom previous page)

+ If you are sure you don't need libicu57 in Stretch, of course, remove it.
Last edited by L_V on 2019-10-24 14:12, edited 3 times in total.

alma359
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

#18 Post by alma359 »

The first command

Code: Select all

ls /var/lib/dpkg/updates/
returns nothing and the second

Code: Select all

root@miniServer:/var/lib/dpkg# grep 'Package: python3' /var/lib/apt/lists/ftp.uni-sofia.bg_debian_dists_stretch_main_binary-amd64_Packages | head
Package: python3-abstract-rendering
Package: python3-actdiag
Package: python3-adios
Package: python3-aiocoap
Package: python3-aiodns
Package: python3-aiohttp-jinja2
Package: python3-aiohttp-mako
Package: python3-aiopg
Package: python3-aioredis
Package: python3-aioxmlrpc
I'm not sure if i need libicu57.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: when running apt-get upgrade my computer reboots

#19 Post by L_V »

To check if you need libicu57 in Stretch, you can simulate:

Code: Select all

apt remove -s libicu57

alma359
Posts: 15
Joined: 2019-10-21 21:53

Re: when running apt-get upgrade my computer reboots

#20 Post by alma359 »

L_V wrote:To check if you need libicu57 in Stretch, you can simulate:

Code: Select all

apt remove -s libicu57
Unfortunately i need it. php and nginx(which i need for my webserver) depend on it.

Post Reply