Bug#912695: apt-show-versions: breaks "apt-get update" and uninstallable after Perl 5.28 upgrade
On Mon, Nov 12, 2018 at 09:29:14AM +0100, Christoph Martin wrote: > Version 0.22.9 introduced a setting of recursion_limit_hast to 65536, > but I still get reports of user, who need a higher value. Yeah, I guess it depends on the number of apt sources. Why don't you just disable the checks with the value of -1 ? AIUI they are there to detect circular data structures, and apt-show-versions doesn't have any. > If this needs a longer standing solution, I could introduce a config > file for this setting. I don't think that should be necessary. Disabling the checks seems better. > The default values for Storage.pm are different on all platforms and > apparently depends on the build environment: > So this might also be an issue with reproducible builds. Sure, I think the current Storable behaviour could and should be better and needs to be discussed upstream. Just haven't got around to starting that discussion yet, sorry. -- Niko
Bug#912695: apt-show-versions: breaks "apt-get update" and uninstallable after Perl 5.28 upgrade
Hi Niko, Version 0.22.9 introduced a setting of recursion_limit_hast to 65536, but I still get reports of user, who need a higher value. If this needs a longer standing solution, I could introduce a config file for this setting. The default values for Storage.pm are different on all platforms and apparently depends on the build environment: > /tmp/usr/lib/aarch64-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 7236 > /tmp/usr/lib/arm-linux-gnueabi/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 13458 > /tmp/usr/lib/arm-linux-gnueabihf/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 12991 > /tmp/usr/lib/i386-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 10466 > /tmp/usr/lib/i386-kfreebsd-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 10464 > /tmp/usr/lib/i386-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 10462 > /tmp/usr/lib/mips-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 8756 > /tmp/usr/lib/mips64el-linux-gnuabi64/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 6718 > /tmp/usr/lib/mipsel-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 8750 > /tmp/usr/lib/powerpc64le-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 5061 > /tmp/usr/lib/s390x-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 4039 > /tmp/usr/lib/x86_64-kfreebsd-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 8557 > /tmp/usr/lib/x86_64-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 8552 So this might also be an issue with reproducible builds. Christoph Am 04.11.18 um 20:43 schrieb Niko Tyni: > On Sun, Nov 04, 2018 at 06:09:36PM +0100, Salvatore Bonaccorso wrote: > >> This is likely due to the perl upstream change around/with >> https://perl5.git.perl.org/perl.git/commitdiff/c0e3b4b51cabf15ed8fc5f564dfeea31c25f5239 >> . >> >> It can be workarounded by either setting higher limits for >> recursion_limit/recursion_limit_hash or disable it with -1 >> >> $Storable::recursion_limit=-1; >> $Storable::recursion_limit_hash=-1; >> >> but I'm not sure this will be the right solution. > > Thanks. I've filed #912900 about this on the Perl side. Christoph: > please use these workarounds at least for now. Apologies for the trouble. > > Also, please let us know at p...@packages.debian.org when a workaround > is in Debian. We can then add dependency metadata on the perl side to > make sure apt-show-versions gets always upgraded before perl. > > Longer term, I'm not sure Storable is the best tool for this (a cache > of apt list contents.) AFAICS you're reading the whole data structure > in memory even when you need just one entry? You might want to look at > the various Cache / CHI modules, or even just plain GDBM_File. > -- Christoph Martin, Leiter Unix-Systeme Zentrum für Datenverarbeitung, Uni-Mainz, Germany Anselm Franz von Bentzel-Weg 12, 55128 Mainz Telefon: +49(6131)3926337 Instant-Messaging: Jabber/XMPP: mar...@jabber.uni-mainz.de signature.asc Description: OpenPGP digital signature
Bug#912695: apt-show-versions: breaks "apt-get update" and uninstallable after Perl 5.28 upgrade
Am 04.11.18 um 20:43 schrieb Niko Tyni: > On Sun, Nov 04, 2018 at 06:09:36PM +0100, Salvatore Bonaccorso wrote: > >> This is likely due to the perl upstream change around/with >> https://perl5.git.perl.org/perl.git/commitdiff/c0e3b4b51cabf15ed8fc5f564dfeea31c25f5239 >> . >> >> It can be workarounded by either setting higher limits for >> recursion_limit/recursion_limit_hash or disable it with -1 >> >> $Storable::recursion_limit=-1; >> $Storable::recursion_limit_hash=-1; >> >> but I'm not sure this will be the right solution. > > Thanks. I've filed #912900 about this on the Perl side. Christoph: > please use these workarounds at least for now. Apologies for the trouble. > > Also, please let us know at p...@packages.debian.org when a workaround > is in Debian. We can then add dependency metadata on the perl side to > make sure apt-show-versions gets always upgraded before perl. I had a look into the Storable/Limit.pm files in the different Debian architectures: > /tmp/usr/lib/aarch64-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 7236 > /tmp/usr/lib/arm-linux-gnueabi/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 13458 > /tmp/usr/lib/arm-linux-gnueabihf/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 12991 > /tmp/usr/lib/i386-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 10466 > /tmp/usr/lib/i386-kfreebsd-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 10464 > /tmp/usr/lib/i386-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 10462 > /tmp/usr/lib/mips-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 8756 > /tmp/usr/lib/mips64el-linux-gnuabi64/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 6718 > /tmp/usr/lib/mipsel-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 8750 > /tmp/usr/lib/powerpc64le-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 5061 > /tmp/usr/lib/s390x-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 4039 > /tmp/usr/lib/x86_64-kfreebsd-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 8557 > /tmp/usr/lib/x86_64-linux-gnu/perl/5.28.0/Storable/Limit.pm:$Storable::recursion_limit_hash > = 8552 The limits were calculated on build time. So they are different on each architecture. I don't think this is the correct approach. For apt-show-version I experimented with different values of and succeded with the following: $Storable::recursion_limit_hash = 65536; > Longer term, I'm not sure Storable is the best tool for this (a cache > of apt list contents.) AFAICS you're reading the whole data structure > in memory even when you need just one entry? You might want to look at > the various Cache / CHI modules, or even just plain GDBM_File. apt-show-versions needs more optimizations and enhancements. Patches are welcome. Christoph -- Christoph Martin, Leiter Unix-Systeme Zentrum für Datenverarbeitung, Uni-Mainz, Germany Anselm Franz von Bentzel-Weg 12, 55128 Mainz Telefon: +49(6131)3926337 Instant-Messaging: Jabber/XMPP: mar...@jabber.uni-mainz.de signature.asc Description: OpenPGP digital signature
Bug#912695: apt-show-versions: breaks "apt-get update" and uninstallable after Perl 5.28 upgrade
On Sun, Nov 04, 2018 at 06:09:36PM +0100, Salvatore Bonaccorso wrote: > This is likely due to the perl upstream change around/with > https://perl5.git.perl.org/perl.git/commitdiff/c0e3b4b51cabf15ed8fc5f564dfeea31c25f5239 > . > > It can be workarounded by either setting higher limits for > recursion_limit/recursion_limit_hash or disable it with -1 > > $Storable::recursion_limit=-1; > $Storable::recursion_limit_hash=-1; > > but I'm not sure this will be the right solution. Thanks. I've filed #912900 about this on the Perl side. Christoph: please use these workarounds at least for now. Apologies for the trouble. Also, please let us know at p...@packages.debian.org when a workaround is in Debian. We can then add dependency metadata on the perl side to make sure apt-show-versions gets always upgraded before perl. Longer term, I'm not sure Storable is the best tool for this (a cache of apt list contents.) AFAICS you're reading the whole data structure in memory even when you need just one entry? You might want to look at the various Cache / CHI modules, or even just plain GDBM_File. -- Niko Tyni nt...@debian.org
Bug#912695: apt-show-versions: breaks "apt-get update" and uninstallable after Perl 5.28 upgrade
Hi This is likely due to the perl upstream change around/with https://perl5.git.perl.org/perl.git/commitdiff/c0e3b4b51cabf15ed8fc5f564dfeea31c25f5239 . It can be workarounded by either setting higher limits for recursion_limit/recursion_limit_hash or disable it with -1 $Storable::recursion_limit=-1; $Storable::recursion_limit_hash=-1; but I'm not sure this will be the right solution. Regards, Salvatore
Bug#912695: apt-show-versions: breaks "apt-get update" and uninstallable after Perl 5.28 upgrade
Package: apt-show-versions Version: apt-show-versions Severity: critical Justification: breaks unrelated software Dear Maintainer, after the Perl 5.28 upgrade, if apt-show-versions (0.22.8) is installed, "apt- get update" fails with: # apt-get update Hit:1 https://repo.skype.com/deb stable InRelease Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease Hit:3 http://ftp.debian.org/debian sid InRelease Hit:4 http://dl.google.com/linux/chrome/deb stable Release Max. recursion depth with nested structures exceeded at /usr/lib/x86_64-linux- gnu/perl/5.28/Storable.pm line 278, at /usr/bin/apt-show-versions line 271. Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i' E: Sub-process returned an error code The error can be reproduced by running: # apt-show-versions -i Max. recursion depth with nested structures exceeded at /usr/lib/x86_64-linux- gnu/perl/5.28/Storable.pm line 278, at /usr/bin/apt-show-versions line 271. Workaround is to uninstall apt-show-versions with: apt-get purge apt-show-versions Following this removal, "apt-get update" works normally. Attempting to reinstall apt-show-versions fails with: # apt-get install apt-show-versions Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: apt-show-versions 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 32.1 kB of archives. After this operation, 93.2 kB of additional disk space will be used. Get:1 http://ftp.debian.org/debian sid/main amd64 apt-show-versions all 0.22.8 [32.1 kB] Fetched 32.1 kB in 3s (10.2 kB/s) Retrieving bug reports... Done Parsing Found/Fixed information... Done Selecting previously unselected package apt-show-versions. (Reading database ... 257503 files and directories currently installed.) Preparing to unpack .../apt-show-versions_0.22.8_all.deb ... Unpacking apt-show-versions (0.22.8) ... Setting up apt-show-versions (0.22.8) ... ** initializing cache. This may take a while ** Max. recursion depth with nested structures exceeded at /usr/lib/x86_64-linux- gnu/perl/5.28/Storable.pm line 278, at /usr/bin/apt-show-versions line 271. dpkg: error processing package apt-show-versions (--configure): installed apt-show-versions package post-installation script subprocess returned error exit status 25 Processing triggers for man-db (2.8.4-2+b1) ... Errors were encountered while processing: apt-show-versions E: Sub-process /usr/bin/dpkg returned an error code (1) Clean up with: apt-get purge apt-show-versions Kind regards, Ben. -- System Information: Debian Release: buster/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.18.0-2-amd64 (SMP w/8 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages apt-show-versions depends on: ii apt 1.7.0 ii libapt-pkg-perl 0.1.34+b1 ii perl [libstorable-perl] 5.28.0-3 apt-show-versions recommends no packages.