Comment 6 for bug 696686

Revision history for this message
Juliano Ravasi (jravasi) wrote :

I found and installed the debug symbols at http://ddebs.ubuntu.com/pool/main/p/packagekit/packagekit-backend-aptcc-dbgsym_0.6.8-0ubuntu3.2_amd64.ddeb .

Then I got this little better backtrace.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff38b4700 (LWP 6187)]
0x00007ffff3b09e38 in Section (this=0x7f4e80, pkg=..., ver=..., filters=4,
    state=PK_INFO_ENUM_AVAILABLE) at /usr/include/apt-pkg/cacheiterators.h:207
207 inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;};
(gdb) bt
#0 0x00007ffff3b09e38 in Section (this=0x7f4e80, pkg=..., ver=..., filters=4,
    state=PK_INFO_ENUM_AVAILABLE) at /usr/include/apt-pkg/cacheiterators.h:207
#1 aptcc::emit_package (this=0x7f4e80, pkg=..., ver=..., filters=4,
    state=PK_INFO_ENUM_AVAILABLE) at apt.cpp:265
#2 0x00007ffff3b0be2e in aptcc::emit_packages (this=0x7f4e80, output=..., filters=4,
    state=PK_INFO_ENUM_UNKNOWN) at apt.cpp:371
#3 0x00007ffff3b1c79c in backend_search_files_thread (backend=<value optimized out>)
    at pk-backend-aptcc.cpp:905
#4 0x00007ffff5e377e4 in ?? () from /lib/libglib-2.0.so.0
#5 0x00007ffff7284971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#6 0x00007ffff583392d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7 0x0000000000000000 in ?? ()
(gdb) print *this
value has been optimized out
(gdb) print S
value has been optimized out
(gdb) print S->Section
value has been optimized out
(gdb) print Owner
value has been optimized out
(gdb) print Owner->StrP
value has been optimized out

(gdb) up
#1 aptcc::emit_package (this=0x7f4e80, pkg=..., ver=..., filters=4,
    state=PK_INFO_ENUM_AVAILABLE) at apt.cpp:265
265 }
(gdb) l
260 if (state == PK_INFO_ENUM_UNKNOWN) {
261 if (pkg->CurrentState == pkgCache::State::Installed) {
262 state = PK_INFO_ENUM_INSTALLED;
263 } else {
264 state = PK_INFO_ENUM_AVAILABLE;
265 }
266 }
267
268 if (filters != 0) {
269 std::string str = ver.Section();

(gdb) print ver
$1 = (
    const pkgCache::VerIterator &) @0x800920: {<pkgCache::Iterator<pkgCache::Version, pkgCache::VerIterator>> = {<std::iterator<std::forward_iterator_tag, pkgCache::Version, long, pkgCache::Version*, pkgCache::Version&>> = {<No data fields>}, _vptr.Iterator = 0x7ffff5dc99d0,
    S = 0x8012c3387000, Owner = 0x7f96b0}, <No data fields>}
(gdb) print ver.S
$2 = (pkgCache::Version *) 0x8012c3387000
(gdb) print *ver.S
Cannot access memory at address 0x8012c3387000

Similar memory address. 0x8012c3387000 is outside any memory mapping in the packagekitd process. So, What is this "S" member inside pkgCache::Version, and how this strange pointer got into there? Now is up to someone who actually understands the aptcc code.