Bug 18327

Summary: gpk-update-icon: DBus call to InstallPackageNames produces a crash
Product: PackageKit Reporter: Debarshi Ray <rishi.is>
Component: GeneralAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Test case to reproduce the bug

Description Debarshi Ray 2008-10-31 14:20:17 UTC
Created attachment 19979 [details]
Test case to reproduce the bug

Looks like a possible memory error in InstallPackageNames in the Git snapshot of 30th October.

----

If a set of package names are fed to InstallPackageNames through a DBus call, gpk-update-icon crashes with the following message when the "close" button is clicked on the dialog that informs the user that no such package(s) was found.

*** glibc detected *** gpk-update-icon: double free or corruption (out): 0x0000000002123b20 ***

----

It also crashes if the user refused to install the packages and clicked "close" on the initial dialog.

*** glibc detected *** gpk-update-icon: munmap_chunk(): invalid pointer: 0x0000000000ec1620 ***

** (process:3501): WARNING **: failed: Method failed: did not agree to search
[rishi@freebook anjuta]$ ======= Backtrace: =========
/lib64/libc.so.6[0x314fc78228]
/lib64/libglib-2.0.so.0(g_strfreev+0x25)[0x39760571e5]
/lib64/libgobject-2.0.so.0[0x3976408d25]
/lib64/libgobject-2.0.so.0(g_value_unset+0x23)[0x397642ca13]
/lib64/libgobject-2.0.so.0(g_value_array_free+0x3d)[0x397642db2d]
/usr/lib64/libdbus-glib-1.so.2[0x386a60cbc4]
/lib64/libdbus-1.so.3[0x386a21c541]
/lib64/libdbus-1.so.3(dbus_connection_dispatch+0x396)[0x386a20efd6]
/usr/lib64/libdbus-glib-1.so.2[0x386a609715]
/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x23b)[0x397603742b]
/lib64/libglib-2.0.so.0[0x397603ac0d]
/lib64/libglib-2.0.so.0(g_main_loop_run+0x1cd)[0x397603b13d]
/usr/lib64/libgtk-x11-2.0.so.0(gtk_main+0xdc)[0x3978183db0]
gpk-update-icon[0x409b34]
/lib64/libc.so.6(__libc_start_main+0xfa)[0x314fc1e32a]
gpk-update-icon[0x409589]
======= Memory map: ========
00110000-0011b000 r-xp 00000000 08:07 942107                             /lib64/libnss_files-2.8.so
0011b000-0031a000 ---p 0000b000 08:07 942107                             /lib64/libnss_files-2.8.so
0031a000-0031b000 r--p 0000a000 08:07 942107                             /lib64/libnss_files-2.8.so
0031b000-0031c000 rw-p 0000b000 08:07 942107                             /lib64/libnss_files-2.8.so
00400000-00435000 r-xp 00000000 08:07 216675                             /usr/bin/gpk-update-icon
00634000-00639000 rw-p 00034000 08:07 216675                             /usr/bin/gpk-update-icon
00639000-0063b000 r-xp 00000000 08:07 912501                             /usr/lib64/gtk-2.0/modules/libgnomebreakpad.so
0063b000-0083a000 ---p 00002000 08:07 912501                             /usr/lib64/gtk-2.0/modules/libgnomebreakpad.so
0083a000-0083b000 rw-p 00001000 08:07 912501                             /usr/lib64/gtk-2.0/modules/libgnomebreakpad.so
0083b000-0084e000 r-xp 00000000 08:07 911176                             /usr/lib64/gtk-2.0/2.10.0/engines/libnodoka.so
0084e000-00a4d000 ---p 00013000 08:07 911176                             /usr/lib64/gtk-2.0/2.10.0/engines/libnodoka.so
00a4d000-00a4e000 rw-p 00012000 08:07 911176                             /usr/lib64/gtk-2.0/2.10.0/engines/libnodoka.so
00a4e000-00a50000 r-xp 00000000 08:07 912390                             /usr/lib64/gtk-2.0/2.10.0/loaders/svg_loader.so
00a50000-00c4f000 ---p 00002000 08:07 912390                             /usr/lib64/gtk-2.0/2.10.0/loaders/svg_loader.so
00c4f000-00c50000 rw-p 00001000 08:07 912390                             /usr/lib64/gtk-2.0/2.10.0/loaders/svg_loader.so
00d92000-01279000 rw-p 00d92000 00:00 0                                  [heap]
314ea00000-314ea1d000 r-xp 00000000 08:07 945494                         /lib64/ld-2.8.so
314ec1c000-314ec1d000 r--p 0001c000 08:07 945494                         /lib64/ld-2.8.so
314ec1d000-314ec1e000 rw-p 0001d000 08:07 945494                         /lib64/ld-2.8.so
314ee00000-314ee07000 r-xp 00000000 08:07 945502                         /lib64/librt-2.8.so
314ee07000-314f007000 ---p 00007000 08:07 945502                         /lib64/librt-2.8.so
314f007000-314f008000 r--p 00007000 08:07 945502                         /lib64/librt-2.8.so
314f008000-314f009000 rw-p 00008000 08:07 945502                         /lib64/librt-2.8.so
314f600000-314f603000 r-xp 00000000 08:07 945509                         /lib64/libcap.so.2.06
314f603000-314f803000 ---p 00003000 08:07 945509                         /lib64/libcap.so.2.06
314f803000-314f804000 rw-p 00003000 08:07 945509                         /lib64/libcap.so.2.06
314fc00000-314fd62000 r-xp 00000000 08:07 945495                         /lib64/libc-2.8.so
314fd62000-314ff62000 ---p 00162000 08:07 945495                         /lib64/libc-2.8.so
314ff62000-314ff66000 r--p 00162000 08:07 945495                         /lib64/libc-2.8.so
314ff66000-314ff67000 rw-p 00166000 08:07 945495                         /lib64/libc-2.8.so
314ff67000-314ff6c000 rw-p 314ff67000 00:00 0 
3150000000-3150084000 r-xp 00000000 08:07 945496                         /lib64/libm-2.8.so
3150084000-3150283000 ---p 00084000 08:07 945496                         /lib64/libm-2.8.so
3150283000-3150284000 r--p 00083000 08:07 945496                         /lib64/libm-2.8.so
3150284000-3150285000 rw-p 00084000 08:07 945496                         /lib64/libm-2.8.so
3150400000-3150402000 r-xp 00000000 08:07 945497                         /lib64/libdl-2.8.so
3150402000-3150602000 ---p 00002000 08:07 945497                         /lib64/libdl-2.8.so
3150602000-3150603000 r--p 00002000 08:07 945497                         /lib64/libdl-2.8.so
3150603000-3150604000 rw-p 00003000 08:07 945497                         /lib64/libdl-2.8.so
3150800000-3150816000 r-xp 00000000 08:07 945501                         /lib64/libpthread-2.8.so
3150816000-3150a15000 ---p 00016000 08:07 945501                         /lib64/libpthread-2.8.so
3150a15000-3150a16000 r--p 00015000 08:07 945501                         /lib64/libpthread-2.8.so
3150a16000-3150a17000 rw-p 00016000 08:07 945501                         /lib64/libpthread-2.8.so
3150a17000-3150a1b000 rw-p 3150a17000 00:00 0 
3151000000-3151015000 r-xp 00000000 08:07 945505                         /lib64/libz.so.1.2.3
3151015000-3151214000 ---p 00015000 08:07 945505                         /lib64/libz.so.1.2.3
3151214000-3151215000 rw-p 00014000 08:07 945505                         /lib64/libz.so.1.2.3
3151c00000-3151c02000 r-xp 00000000 08:07 278767                         /usr/lib64/libXau.so.6.0.0
3151c02000-3151e01000 ---p 00002000 08:07 278767                         /usr/lib64/libXau.so.6.0.0
3151e01000-3151e02000 rw-p 00001000 08:07 278767                         /usr/lib64/libXau.so.6.0.0
3152000000-3152001000 r-xp 00000000 08:07 278770                         /usr/lib64/libxcb-xlib.so.0.0.0
3152001000-3152200000 ---p 00001000 08:07 278770                         /usr/lib64/libxcb-xlib.so.0.0.0
3152200000-3152201000 rw-p 00000000 08:07 278770                         /usr/lib64/libxcb-xlib.so.0.0.0
3152400000-3152405000 r-xp 00000000 08:07 278768                         /usr/lib64/libXdmcp.so.6.0.0
3152405000-3152604000 ---p 00005000 08:07 278768                         /usr/lib64/libXdmcp.so.6.0.0
3152604000-3152605000 rw-p 00004000 08:07 278768                         /usr/lib64/libXdmcp.so.6.0.0
3152800000-315281a000 r-xp 00000000 08:07 278769                         /usr/lib64/libxcb.so.1.0.0
315281a000-3152a1a000 ---p 0001a000 08:07 278769                         /usr/lib64/libxcb.so.1.0.0
3152a1a000-3152a1b000 rw-p 0001a000 08:07 278769                         /usr/lib64/libxcb.so.1.0.0
3152c00000-3152d06000 r-xp 00000000 08:07 278771                         /usr/lib64/libX11.so.6.2.0
3152d06000-3152f05000 ---p 00106000 08:07 278771                         /usr/lib64/libX11.so.6.2.0
3152f05000-3152f0b000 rw-p 00105000 08:07 278771                         /usr/lib64/libX11.so.6.2.0
3153000000-3153027000 r-xp 00000000 08:07 945506                         /lib64/libexpat.so.1.5.2
3153027000-3153226000 ---p 00027000 08:07 945506                         /lib64/libexpat.so.1.5.2
3153226000-3153229000 rw-p 00026000 08:07 945506                         /lib64/libexpat.so.1.5.2
3153800000-3153810000 r-xp 00000000 08:07 278777                         /usr/lib64/libXext.so.6.4.0
3153810000-3153a10000 ---p 00010000 08:07 278777                         /usr/lib64/libXext.so.6.4.0
3153a10000-3153a11000 rw-p 00010000 08:07 278777                         /usr/lib64/libXext.so.6.4.0
3154800000-3154805000 r-xp 00000000 08:07 278781                         /usr/lib64/libXfixes.so.3.1.0
3154805000-3154a04000 ---p 00005000 08:07 278781                         /usr/lib64/libXfixes.so.3.1.0
3154a04000-3154a05000 rw-p 00004000 08:07 278781                         /usr/lib64/libXfixes.so.3.1.0
3154c00000-3154c09000 r-xp 00000000 08:07 278782                         /usr/lib64/libXcursor.so.1.0.2
3154c09000-3154e09000 ---p 00009000 08:07 278782                         /usr/lib64/libXcursor.so.1.0.2
3154e09000-3154e0a000 rw-p 00009000 08:07 278782                         /usr/lib64/libXcursor.so.1.0.2
3155000000-3155007000 r-xp 00000000 08:07 278780                         /usr/lib64/libXrandr.so.2.1.0
3155007000-3155206000 ---p 00007000 08:07 278780                         /usr/lib64/libXrandr.so.2.1.0
3155206000-3155207000 rw-p 00006000 08:07 278780                         /usr/lib64/libXrandr.so.2.1.0
3155400000-3155408000 r-xp 00000000 08:07 278779                         /usr/lib64/libXi.so.6.0.0
3155408000-3155608000 ---p 00008000 08:07 278779                         /usr/lib64/libXi.so.6.0.0
3155608000-3155609000 rw-p 00008000 08:07 278779                         /usr/lib64/libXi.so.6.0.0
3155800000-3155809000 r-xp 00000000 08:07 278772                         /usr/lib64/libXrender.so.1.3.0
3155809000-3155a08000 ---p 00009000 08:07 278772                         /usr/lib64/libXrender.so.1.3.0
3155a08000-3155a09000 rw-p 00008000

----

NB: InstallPackageName does not suffer from this problem.
Comment 1 Richard Hughes 2008-11-01 02:37:56 UTC
Fixed in git, can you try another snapshot please?
Comment 2 Debarshi Ray 2008-11-01 10:12:13 UTC
Yes, 1st November's snapshot is fine. Thanks for the quick fix.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.