<?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>9146</bug_id>
          
          <creation_ts>2016-02-19 19:16:35 +0000</creation_ts>
          <short_desc>SIGSEGV in opkg_install_pkg() -&gt; strcmp() when using install with --force-reinstall and local package</short_desc>
          <delta_ts>2016-03-03 00:19:14 +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>1.0</version>
          <rep_platform>Other</rep_platform>
          <op_sys>mips</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="Ivan K">yocto</reporter>
          <assigned_to name="Alejandro del Castillo">alejandro.delcastillo</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59282</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan K">yocto</who>
    <bug_when>2016-02-19 19:16:35 +0000</bug_when>
    <thetext>Preconditions/Environment
-------------------------
OpenWRT mips_34kc_musl-1.1.12
opkg-9c97d5ecd795709c8584e972bfdf3aee3a5b846d


Triggering Action/Cause
-----------------------
Tried to re-install package from local file:
opkg install /tmp/my-package-name_package-version_ar71xx.ipk -V2 --force-reinstall


Expectation
-----------
Expected to have package re-installed with fresher version.


Actual Result
-------------
In GDB:
Program received signal SIGSEGV, Segmentation fault.
strcmp (l=0x2f757372 &lt;error: Cannot access memory at address 0x2f757372&gt;, r=0x4436c0 &quot;my-package-name&quot;) at src/string/strcmp.c:5

Stack trace:
(gdb) bt
#0  strcmp (l=0x2f757372 &lt;error: Cannot access memory at address 0x2f757372&gt;, r=0x4436c0 &quot;wc-agent&quot;) at src/string/strcmp.c:5
#1  0x00404a51 in opkg_install_pkg ()
#2  0x099fdc48 in ?? ()

Without GDB:
root@OpenWrt:~# opkg install /tmp/my-package-name_package-version_ar71xx.ipk --force-reinstall
No packages removed.
Installing my-package-name (package-version) to root...
Segmentation fault
root@OpenWrt:~#

Flag -V does not affect reproducibility.
The issue is not reproduced without --force-reinstall flag.


Reproducibility
---------------
10/10</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59654</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2016-03-03 00:19:14 +0000</bug_when>
    <thetext>Open WRT is using a very old version of opkg based on an arbitrary commit (9c97d5ecd795709c8584e972bfdf3aee3a5b846d). New versions (at least since 0.2.2) doesn&apos;t show this problem.

To fix this, Open WRT should upgrade to a newer version of opkg. I would be very happy to assist if there are concerns with an upgrade.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>