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 <error: Cannot access memory at address 0x2f757372>, r=0x4436c0 "my-package-name") at src/string/strcmp.c:5 Stack trace: (gdb) bt #0 strcmp (l=0x2f757372 <error: Cannot access memory at address 0x2f757372>, r=0x4436c0 "wc-agent") 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
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'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.