On 22 January 2016 at 09:59, Julian Andres Klode <j...@debian.org> wrote: > On 22 January 2016 at 00:31, Sven Hartge <s...@svenhartge.de> wrote: >> Package: apt >> Version: 1.2 >> Severity: important >> >> Hi! >> >> This is Debian Sid on a Cubietruck. >> >> Today, suddenly, apt, apt-get and aptitude all segfault after the recent >> update to the package lists. >> >> "apt update" works but segfaults at the end during "Reading package lists >> ..." >> >> "apt-get update" the same (unsurprising) >> >> "aptitude update" segfaults immediately (after running a bit, but >> before downloading anything) >> >> "gdb aptitude update" on the other hand segfaults after downloading >> something. (Weird. Heisebug?) >> >> I am attaching backtraces for both apt and aptitude. >> >> (If you need the contents of /var/lib/apt* and /var/lib/dpkg/status I >> can make those available via seperate download. >> > > Thanks. It seems that your cache is being remapped, and the version > stringview we generated by passing Ver.VerStr() to NewProvides() > becomes invalid in that call. Previously, this was a string, copying > the memory instead. > > There are potentially two ways to solve this: Allow the cache > generator to remap string views where needed or revert affected parts > back to strings. Obviously, strings have some performance overhead, > especially on arm, which is why I replaced them with views in the > first place. >
The branch https://github.com/julian-klode/apt bugfix/remap-stringview should fix the issue. Comparison to 1.2 is at: https://github.com/julian-klode/apt/compare/master...julian-klode:bugfix/remap-stringview I cannot reproduce the issue locally though, so I might have missed something. If you still can, it would be great if you could build libapt-pkg5.0 from that and see if you can reproduce it or if it works now. -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.