glibc detected *** dpkg-query: free(): invalid pointer: 0x00007f75dc7dcc84 ***

Bug #1035512 reported by Alvaro Leal (Effenberg0x0)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

** I have not managed to use apport to report this (apport itself is crashing). I have attached the .crash and pasted the gdb backtrace below. **

KERNEL: 3.5.0-7-generic #7-Ubuntu SMP Tue Jul 31 07:22:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
RELEASE: 12.10 (Quantal)

The following is caused by invoking dpkg-query using double quotation marks (instead of single quotation marks) in the command syntax:

sudo dpkg-query -W -f="${provides}" apt
dpkg-query: error in show format: H�C0
*** glibc detected *** dpkg-query: free(): invalid pointer: 0x00007f75dc7dcc84 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7e506)[0x7f75dc7df506]
dpkg-query[0x4091a3]
dpkg-query[0x404473]
dpkg-query[0x402779]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f75dc78276d]
dpkg-query[0x4027ed]
======= Memory map: ========
00400000-0041f000 r-xp 00000000 08:01 2904021 /usr/bin/dpkg-query
0061e000-0061f000 r--p 0001e000 08:01 2904021 /usr/bin/dpkg-query
0061f000-00620000 rw-p 0001f000 08:01 2904021 /usr/bin/dpkg-query
00620000-00734000 rw-p 00000000 00:00 0
0180b000-0182c000 rw-p 00000000 00:00 0 [heap]
7f75dc280000-7f75dc295000 r-xp 00000000 08:01 524420 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f75dc295000-7f75dc494000 ---p 00015000 08:01 524420 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f75dc494000-7f75dc495000 r--p 00014000 08:01 524420 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f75dc495000-7f75dc496000 rw-p 00015000 08:01 524420 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f75dc496000-7f75dc761000 r--p 00000000 08:01 2889281 /usr/lib/locale/locale-archive
7f75dc761000-7f75dc913000 r-xp 00000000 08:01 525233 /lib/x86_64-linux-gnu/libc-2.15.so
7f75dc913000-7f75dcb13000 ---p 001b2000 08:01 525233 /lib/x86_64-linux-gnu/libc-2.15.so
7f75dcb13000-7f75dcb17000 r--p 001b2000 08:01 525233 /lib/x86_64-linux-gnu/libc-2.15.so
7f75dcb17000-7f75dcb19000 rw-p 001b6000 08:01 525233 /lib/x86_64-linux-gnu/libc-2.15.so
7f75dcb19000-7f75dcb1e000 rw-p 00000000 00:00 0
7f75dcb1e000-7f75dcb40000 r-xp 00000000 08:01 525223 /lib/x86_64-linux-gnu/ld-2.15.so
7f75dcd1d000-7f75dcd20000 rw-p 00000000 00:00 0
7f75dcd3d000-7f75dcd40000 rw-p 00000000 00:00 0
7f75dcd40000-7f75dcd41000 r--p 00022000 08:01 525223 /lib/x86_64-linux-gnu/ld-2.15.so
7f75dcd41000-7f75dcd43000 rw-p 00023000 08:01 525223 /lib/x86_64-linux-gnu/ld-2.15.so
7fff26009000-7fff2602a000 rw-p 00000000 00:00 0 [stack]
7fff26057000-7fff26058000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

BT:
Core was generated by `dpkg-query -W -f= apt'.
Program terminated with signal 6, Aborted.
#0 0x00007faec01e8405 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007faec01e8405 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007faec01ebb6b in __GI_abort () at abort.c:91
#2 0x00007faec0225d0e in __libc_message (do_abort=2,
    fmt=0x7faec032dfd0 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:201
#3 0x00007faec0230506 in malloc_printerr (action=3, str=0x7faec032af81 "free(): invalid pointer",
    ptr=<optimized out>) at malloc.c:5007
#4 0x00000000004091a3 in dpkg_error_destroy (err=err@entry=0x7fff3695e690) at ../../../lib/dpkg/error.c:91
#5 0x0000000000404473 in showpackages (argv=0x7fff3695e800) at ../../src/querycmd.c:521
#6 0x0000000000402779 in main (argc=<optimized out>, argv=0x7fff3695e800) at ../../src/querycmd.c:865

Regards,
Effenberg

Related branches

Revision history for this message
Alvaro Leal (Effenberg0x0) (effenberg0x0) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1035512/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Alvaro Leal (Effenberg0x0) (effenberg0x0) wrote :

I had selected dpkg...

Revision history for this message
Alvaro Leal (Effenberg0x0) (effenberg0x0) wrote :

Updated bug to re-include the target package.

affects: ubuntu → dpkg (Ubuntu)
Revision history for this message
Raphaël Hertzog (hertzog) wrote : Re: [Bug 1035512] Re: glibc detected *** dpkg-query: free(): invalid pointer: 0x00007f75dc7dcc84 ***

Hi,

On Sat, 11 Aug 2012, Alvaro Leal (Effenberg0x0) wrote:
> The following is caused by invoking dpkg-query using double quotation
> marks (instead of single quotation marks) in the command syntax:
>
> sudo dpkg-query -W -f="${provides}" apt

I have already fixed this in Debian (just yesterday) for dpkg 1.16.9 (next
version to be uploaded).

http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git;a=commitdiff;h=9a06920db68d117f7ed68372e89a91536f60943f

 status fixcommitted

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Do you like what I do? Support my free software work on Debian and Ubuntu:
http://raphaelhertzog.com/support-my-work/

Changed in dpkg (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (7.2 KiB)

This bug was fixed in the package dpkg - 1.16.9ubuntu1

---------------
dpkg (1.16.9ubuntu1) raring; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - Change the multiarch downgrade version checks in prerm/postrm
      from 1.16.2 to 1.16.0~ to reflect when multiarch landed in Ubuntu.
    - Migrate dpkg multiarch conffile (and other multi-arch-related
      conf settings) to the new DB with dpkg --add-architecture, but
      keep a copy of the old conffile if it was modified.
    - Out of paranoia, keep an option handler for foreign-architecture
      that informs people that they need to scrub their config files
      and upgrade, on the off chance that the above migration fails
      for some reason (this mitigates the chances of leaving users with
      a dpkg that fails to run due to a broken config).
    - Add DPKG_UNTRANSLATED_MESSAGES environment check so that higher-level
      tools can get untranslated dpkg terminal log messages while at the
      same time having translated debconf prompts. This is useful for tools
      that hide the dpkg terminal by default and use apport for bug
      reporting with the untranslated error message.
    - Build-depend on gettext:any for cross-building support.
    - Apply patch from Steve McIntyre to special-case armhf/armel ELF
      objects in Shlibs/Objdump.pm, so we don't get incorrect deps.
    - lib/dpkg/pkg-spec.c: map unqualified package names of multiarch-same
      packages to the native arch instead of throwing an error, so that we
      don't break on upgrade when there are unqualified names stored in
      dpkg's own trigger database.
    - Add logic to the postinst to `dpkg --add-architecture i386' on new
      installs on amd64, and to also do so on upgrades from pre-conffile
      Ubuntu versions, mimicking our previous behaviour with the conffile.
    - Apply a workaround from mvo to consider RC packages as multiarch,
      during the dpkg consistency checks. (see LP: 1015567 and 1057367).

dpkg (1.16.9) unstable; urgency=low

  [ Raphaël Hertzog ]
  * Fix dpkg-source regression in "3.0 (quilt)" source packages while
    unapplying patches that remove all files in a directory. Closes: #683547
  * Fix segfault in field format parsing on empty strings, affecting
    «dpkg-query -W -f ''» and «dpkg-deb -W --showformat=''». LP: #1035512
  * Fix dpkg's French usage string which was missing the final “s“ in
    --print-foreign-architectures. Closes: #685863

  [ Guillem Jover ]
  * Use “statoverrides” instead of “statusoverrides” in dpkg-statoverride.
    Closes: #686995
  * Comment out dpkg(1) documentation about disabled --command-fd option.
    Closes: #685677
  * Cleanup dpkg-divert unit-test environment to avoid build failures.
    Closes: #687656
  * Fix update-alternatives test suite to behave correctly on non-Debian
    binary paths. Known to be affecting at least Gentoo and Mac OS X.
  * Do not leak subcall command arguments in update-alternatives.
  * Fix segfault on update-alternatives when passing --slave without any
    action at all. LP: #1037431
  * Fix memory leak in dpkg filesavespackage().
  * Do not print garbage (or worse) on dpkg shared conffil...

Read more...

Changed in dpkg (Ubuntu):
status: Fix Committed → Fix Released
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.