<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8517</bug_id>
          
          <creation_ts>2015-10-15 05:53:02 +0000</creation_ts>
          <short_desc>memory leakage while installing or upgrading a package</short_desc>
          <delta_ts>2015-11-04 17:53:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.3.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="jatin jain">jatinvatsalya</reporter>
          <assigned_to name="Alejandro del Castillo">alejandro.delcastillo</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>55326</commentid>
    <comment_count>0</comment_count>
    <who name="jatin jain">jatinvatsalya</who>
    <bug_when>2015-10-15 05:53:02 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55528</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2015-10-20 16:42:57 +0000</bug_when>
    <thetext>*** Bug 8518 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55530</commentid>
    <comment_count>2</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2015-10-20 16:43:16 +0000</bug_when>
    <thetext>*** Bug 8519 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55791</commentid>
    <comment_count>3</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2015-10-26 23:01:37 +0000</bug_when>
    <thetext>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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56207</commentid>
    <comment_count>4</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2015-11-04 17:53:35 +0000</bug_when>
    <thetext>Fixed on 7c3fc63f2393aa8960b60be87fbd6f5e799693e4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>