Bug 8517 - memory leakage while installing or upgrading a package
Summary: memory leakage while installing or upgrading a package
Status: RESOLVED FIXED
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.3.0
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Alejandro del Castillo
QA Contact:
URL:
Whiteboard:
: 8518 8519 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-15 05:53 UTC by jatin jain
Modified: 2015-11-04 17:53 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jatin jain 2015-10-15 05:53:02 UTC
When ever we install any package that package is first downloaded into cache then it is installed. When the package is downloaded there is a leakage of number of bytes equal to size of file path.

If the package is already in cache then there is no leakage.

I checked the leakage using valgrind.
Comment 1 Alejandro del Castillo 2015-10-20 16:42:57 UTC
*** Bug 8518 has been marked as a duplicate of this bug. ***
Comment 2 Alejandro del Castillo 2015-10-20 16:43:16 UTC
*** Bug 8519 has been marked as a duplicate of this bug. ***
Comment 3 Alejandro del Castillo 2015-10-26 23:01:37 UTC
Indeed, opkg_download_pkg is leaking if a package is not on the cache:

==2528== 123 bytes in 1 blocks are definitely lost in loss record 3 of 6
==2528==    at 0x4C28F30: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2528==    by 0x4C2B2DF: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2528==    by 0x4E51248: xrealloc (xfuncs.c:45)
==2528==    by 0x4E50FB6: sprintf_alloc (sprintf_alloc.c:51)
==2528==    by 0x4E403E7: get_cache_location (opkg_download.c:145)
==2528==    by 0x4E4058B: opkg_download_pkg (opkg_download.c:264)
==2528==    by 0x4E41C57: opkg_install_pkg (opkg_install.c:1419)
==2528==    by 0x4E427E3: opkg_install_by_name (opkg_install.c:1299)
==2528==    by 0x4E3FD3F: opkg_install_cmd (opkg_cmd.c:423)
==2528==    by 0x401583: main (opkg.c:406)
Comment 4 Alejandro del Castillo 2015-11-04 17:53:35 UTC
Fixed on 7c3fc63f2393aa8960b60be87fbd6f5e799693e4