The latest Ubuntu base image for armhf return random values for date/time

Bug #1896443 reported by Mirasoft GmbH & Co KG
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cloud-images
Invalid
Undecided
Unassigned
Ubuntu
Invalid
Undecided
Unassigned
docker.io (Ubuntu)
New
Undecided
Unassigned

Bug Description

My test system is a raspberry pi 4 running ubuntu server.

uname -a
Linux raspberrypi 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux

If I run a docker container with ubuntu:latest, date command returns random values:

$ docker run -it ubuntu bash
root@d62db7bdf9f5:/# date
Fri Feb 27 02:32:27 UTC 1970
root@d62db7bdf9f5:/# date
Sun Mar 1 03:27:55 UTC 1970
root@d62db7bdf9f5:/# date
Tue Feb 24 21:03:55 UTC 1970
root@d62db7bdf9f5:/# date
Thu Feb 26 07:11:55 UTC 1970

The issue is not reproducable with ubuntu:bionic. So this seems to be a critical bug in latest focal.

Image ID: sha256:dc61c77e6ee99239cd3a7d46101cb97b3e7757f7d78dba0fc48228f14944f578

Revision history for this message
Mirasoft GmbH & Co KG (mirasoft) wrote :

This (in my eyes) very critical bug is now "Unassigned" and "Undecided" for 14 days, although it can be reproduced within seconds.
For clarification: Ubuntu cannot be used on armhf processors

Revision history for this message
John Chittum (jchittum) wrote :

I was unable to reproduce with Ubuntu Focal 64 bit as the host. Could you provide the Host OS version. Focal is on a 5.4 kernel, and Bionic should have rolled to a 5.x kernel as well.

my guess at this time is your host is a 32bit (from the armv7l listing in the kernel). if you let me know the Host OS version (not just kernel) I can work on reproducing. I'm flashing a Bionic 18.0.4.5 32bit image now for testing

Joshua Powers (powersj)
Changed in cloud-images:
status: New → Incomplete
Revision history for this message
Mirasoft GmbH & Co KG (mirasoft) wrote :

Hello John,

Thanks for the investigating. My test system is a Raspberry Pi 4 running Raspbian (Buster). But I can reproduce this problem on all my systems with armhf cpu. For example I have an industrial PLC (WAGO PFC200) with ARMv7-CPU and docker support which has exactly the same problem. So I am pretty sure that it is the docker image and not the host system.

Revision history for this message
Mirasoft GmbH & Co KG (mirasoft) wrote :

Sorry, I had forgotten that: Yes my test systems are 32bit ARM systems. On 64bit systems the problem is not reproducible.

Revision history for this message
John Chittum (jchittum) wrote :

I tested with Ubuntu Bionic 32bit and was unable to reproduce. Also unable to reproduce with a Focal 32bit. Both of these are running the 5.4 kernel though, so it may just be affecting 4.X series kernels.

I'll flash a Raspbian Buster 32 bit and test on my Raspberry Pi 4

Revision history for this message
John Chittum (jchittum) wrote :

I've confirmed that running on kernel 4.19.97-v7l, available on the Raspbian image published on 2020-02-14 there are issues running `date`. it returns the Linux epoch date. the following containers are affected:

ubuntu/focal
ubuntu/groovy
debian/bullseye

there was not an issue with debian/buster, nor any of the other distros I tried.

Passing:

* alpine:latest
* opensuse:leap
* centos:7
* debian:buster

I then ran a dist-upgrade, which upgrade the kernel from 4.19 to 5.4.51.

I then ran `date` in the same containers.

* ubuntu:focal returned random date/times in the epoch year
* ubuntu:groovy returned epoch
* debian:bullseye return epoch

the previously passing containers all continued to work as expected.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Andreas Dirnberger (zetanova) wrote :

Bug is only at arm/v7
Tested on rpi3 with ubuntu 20.04 arm/v7 and arm64

Last working image is ubuntu:focal-20200115

Issue posted at:
https://github.com/boostorg/boost/issues/474

Can be related to the last commit:
http://changelogs.ubuntu.com/changelogs/pool/main/b/boost-defaults/boost-defaults_1.71.0.0ubuntu2/changelog

ubuntu 20.04 arm/v7 (rpi3)
$ docker run ubuntu:focal-20210119 date
Sun Feb 22 06:29:15 UTC 1970
$ docker run ubuntu:focal-20200115 date
Sat Jan 30 13:24:03 UTC 2021
$ date
Sat Jan 30 13:24:15 UTC 2021
ubuntu 20.04 arm64 (rpi3)
$ docker run ubuntu:focal-20210119 date
Sat Jan 30 13:27:28 UTC 2021
$ docker run ubuntu:focal-20200115 date
Sat Jan 30 13:28:26 UTC 2021
$ date
Sat Jan 30 13:28:38 UTC 2021

Revision history for this message
Amael (amael) wrote :

I can confirm on a pi4 :

Linux mediacenter 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux

Revision history for this message
Amael (amael) wrote :

Hello, this should be marked as critical for armv7 because it merely breaks the operating system. All HTTPS requests are impossible as the certicates are signed in the future.

Below example logs generated by an application running on this image - you feel like being in a TARDIS :)

Jul 01, 1971 16:44:24.-1261346 [0xaaffb430] ERROR - Error issuing curl_easy_perform(handle): 28
Mar 14, 1929 16:09:28.-1261346 [0xaaffb430] DEBUG - HTTP simulating 408 after curl timeout
Jan 01, 1970 01:00:45.-1261346 [0xaaffb430] DEBUG - [com.plexapp.system] HTTP reply status 408, with 0 bytes of content.
Jul 01, 1971 16:44:24.-1261346 [0xb2bfe430] ERROR - Error issuing curl_easy_perform(handle): 28
Jan 01, 1970 01:00:00.-1261346 [0xb2bfe430] DEBUG - HTTP simulating 408 after curl timeout
Jan 01, 1970 01:00:45.-1261346 [0xb2bfe430] ERROR - Error parsing content.
Aug 08, 1928 06:14:24.-1261346 [0xb2bfe430] ERROR - Error parsing XML: Error parsing file.
Dec 06, 1928 10:00:36.-1261346 [0xb2bfe430] DEBUG - Media Server: Tested all servers in 1296050206.7 seconds.
Sep 26, 1927 14:28:32.-1261346 [0xb07ff430] DEBUG - MyPlex: Updating device connections (from timer: 1)

Revision history for this message
Amael (amael) wrote :

Hello,

the linuxserver.io team has identified the problem : it's a libseccomp library problem on the host (debian) and not an ubuntu docker image problem. See here for more informations : https://docs.linuxserver.io/faq#libseccomp

Best regards

Revision history for this message
Joshua Powers (powersj) wrote :

Hi,

Thanks for the link about libseccomp. After reading that link and a couple of bugs on Github about this it seems the root cause is due to containers of newer releases (e.g. 20.04), which make syscalls that hosts with older software might not know about.

To resolve then, users need to:

1) Use Docker version 19.03.9 or newer
2) Ensure the host has libseccomp version of 2.4.2 or higher. libseccomp is already 2.4.3 in all supported versions of Ubuntu and appears to have the newer syscalls listed.

I am marking this as invalid for the "cloud-images" project as it is clear this is not an Ubuntu docker image issue.

Changed in cloud-images:
status: Incomplete → Invalid
Changed in ubuntu:
status: Confirmed → Invalid
Revision history for this message
Joshua Powers (powersj) wrote :

I am adding docker.io package to the affects, as the versions in bionic (19.03.6) and focal (19.03.8) are just behind the 19.03.9 version required with a fix.

Revision history for this message
Tord Van Delft (tordv) wrote :

I found the solution.

It solves many other problems as well.

do this, on your host system (rpi4 armv71 for me). Before building or starting containers...
```
curl http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb --output libseccomp2_2.5.1-1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
```

see https://askubuntu.com/questions/1263284/apt-update-throws-signature-error-in-ubuntu-20-04-container-on-arm
for more details

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.