Invalid 'Date' entry in Release file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_yakkety-proposed_InRelease

Bug #1593583 reported by dino99
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Yakkety
New
Undecided
Unassigned

Bug Description

Continuously get that warning when using synaptic to reload the sources. This happen with apt 1.3-exp2 only.

This seems a regression as per that old report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809329

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: apt 1.3~exp2
ProcVersionSignature: Ubuntu 4.6.0-7.8-generic 4.6.0
Uname: Linux 4.6.0-7-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu4
Architecture: amd64
CurrentDesktop: GNOME
Date: Fri Jun 17 08:19:22 2016
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

For the SRU:

[Impact]
Prevent adding this regression to 1.2.16
[Test case]
Parse (Release file with) date where hour is single digit
[Regression potential]
Should be very low, we are running this in yakkety too, and in Debian since quite some time.

Revision history for this message
dino99 (9d9) wrote :
description: updated
Revision history for this message
David Kalnischkies (donkult) wrote :

This is caused by the usage of relatively new c++11 features, namely std::get_time, as described in this libstdc++6 upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71556

The Release for yakkety-proposed currently reads: "Date: Fri, 17 Jun 2016 6:30:29 UTC". Note the "6" as hour.

Reverting commit 9febc2b238e1e322dce1f94ecbed46d595893b52, which introduced the usage of std::get_time has the disadvantage of opening the 'problem' it is supposed to fix again and the 'bonus' the commit mentions is removed, too, which seems small, but is a surprising gotcha in unsuspecting applications (which are either not fiddling with locale at all or are multithreaded).

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

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

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Iain Lane (laney) wrote :

David, Julian (et al) - I'm going to revert this for now, because it is causing builds to fail (the buildds are using apt from proposed). Let me know when exp3 is available and I'll gladly sync that over.

Revision history for this message
dino99 (9d9) wrote :

apt (1.3~exp2ubuntu1) yakkety; urgency=medium

  * Revert use of std::get_time, since a bug in libstdc++6 (upstream bug
    #71556) means that apt fails to parse some date fields correctly. (LP:
    #1593583)

 -- Iain Lane <email address hidden> Fri, 17 Jun 2016 11:38:06 +0100

upgrade to the above version, then reload the sources:

- no error with the ubuntu archives
- but still get it with some ppa

W: Invalid 'Date' entry in Release file /var/lib/apt/lists/partial/ppa.launchpad.net_ricotz_unstable_ubuntu_dists_yakkety_InRelease
W: Invalid 'Date' entry in Release file /var/lib/apt/lists/partial/ppa.launchpad.net_ubuntu-wine_ppa_ubuntu_dists_xenial_InRelease

Revision history for this message
David Kalnischkies (donkult) wrote :

@dino99: Are you sure you haven't (partially) upgraded just the 'apt' package? In that case this would be expected as the "fix" is in libapt-pkg5.0 build by the apt source package – the ubuntu repository was most-recently updated in a 2-digit hour, while both PPAs were last updated in single-digit hours…

Anyway, I wrote a patch upstream avoiding the use of std::get_time by doing the parsing of the timestamps more manually for the "time" being which accepts days/hours even if they are single-digit…

Revision history for this message
dino99 (9d9) wrote :

@David

confirm apt has been fully upgraded. To check again, i've re-enabled the ppas, and the warnings are seen again. (but its not a show stopper anyway)

Revision history for this message
Iain Lane (laney) wrote :

It works for me with those PPAs.

(yakkety-amd64)root@nightingale:/build# apt update
Hit:1 http://ppa.launchpad.net/ricotz/unstable/ubuntu yakkety InRelease
Hit:2 http://security.ubuntu.com/ubuntu yakkety-security InRelease
Get:3 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial InRelease [17.6 kB]
Get:4 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial/main amd64 Packages [2008 B]
Hit:5 https://swift.canonistack.canonical.com/v1/AUTH_e8074875467b46b7ab3c41ac60ccfbe7/yakkety yakkety InRelease
Get:6 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial/main Translation-en [966 B]
Hit:7 http://archive.ubuntu.com/ubuntu yakkety InRelease
Get:8 http://archive.ubuntu.com/ubuntu yakkety-updates InRelease [92.2 kB]
Hit:9 http://archive.ubuntu.com/ubuntu yakkety-proposed InRelease
Fetched 113 kB in 0s (191 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
(yakkety-amd64)root@nightingale:/build#
laney@nightingale> GET http://ppa.launchpad.net/ricotz/unstable/ubuntu/dists/yakkety/InRelease | grep Date
Date: Fri, 17 Jun 2016 7:35:25 UTC
laney@nightingale> GET http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/dists/xenial/InRelease | grep Date
Date: Wed, 30 Mar 2016 2:27:15 UTC

Revision history for this message
dino99 (9d9) wrote :

@laney

is that report can be closed now ? that error is gone since a while

Revision history for this message
Julian Andres Klode (juliank) wrote :

The 1.2.16 SRU also references this bug, but there's no actual test case for that: It just fixes a regression that would be introduced otherwise in the very same upload.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Marking as Fix released as per previous comment.

Changed in apt (Ubuntu):
status: Confirmed → Fix Released
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello dino99, or anyone else affected,

Accepted apt into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/1.2.18 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apt (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Julian Andres Klode (juliank) wrote :

We are testing this exact case in the test suite, and it ran successfully for 1.2.18, hence verification-done.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 1.2.18

---------------
apt (1.2.18) xenial; urgency=high

  * SECURITY UPDATE: gpgv: Check for errors when splitting files (CVE-2016-1252)
    Thanks to Jann Horn, Google Project Zero for reporting the issue
    (LP: #1647467)
  * gpgv: Flush the files before checking for errors

apt (1.2.17) xenial; urgency=medium

  [ David Kalnischkies ]
  * apt-key: warn instead of fail on unreadable keyrings (LP: #1642386)
  * show apt-key warnings in apt update (Closes: 834973)

  [ Julian Andres Klode ]
  * test-releasefile-verification: installaptold: Clean up before run

apt (1.2.16) xenial; urgency=medium

  [ David Kalnischkies ]
  * avoid changing the global LC_TIME for Release writing
  * use de-localed std::put_time instead rolling our own
  * accept only the expected UTC timezones in date parsing (Closes: 819697)
  * avoid std::get_time usage to sidestep libstdc++6 bug (LP: #1593583)
  * imbue datetime parsing with C.UTF-8 locale (Closes: 828011)
  * prevent C++ locale number formatting in text APIs (try 2) (Closes: 832044)
  * prevent C++ locale number formatting in text APIs (try 3) (LP: #1611010)
    (LP: #1592817)
  * imbue .diff/Index parsing with C.UTF-8 as well

  [ Julian Andres Klode ]
  * Use C locale instead of C.UTF-8 for protocol strings
  * Add shippable.yml for CI on Shippable
  * Revert "if the FileFd failed already following calls should fail, too"
    (LP: #1641905)

 -- Julian Andres Klode <email address hidden> Thu, 08 Dec 2016 15:28:08 +0100

Changed in apt (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for apt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.