Ticket #1657 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

libopkg extract file may crashes

Reported by: tick Owned by: tick
Priority: normal Milestone: Om2008.8
Component: opkg Version: current svn head
Severity: normal Keywords: opkg crash
Cc: opkg-devel@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

Running packagekitd with opkg backend, try to upgrade packages
after upgrades for some packages, opkg seems easy to crash.
libopkg 4545

it's seems the gz_open returns NULL in
unarchive.c:753

opkg-NOTICE: Upgrading angstrom-version on root from 1:P1-Snapshot-20080722-r1 to 1:P1-Snapshot-20080723-r1...
opkg-NOTICE: Downloading http://downloads.openmoko.org/openmoko-repository/ASU/om-gta02/angstrom-version_P1-Snapshot-20080723-r1_om-gta02.ipk
opkg: fork failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1104708752 (LWP 6393)]
0x402f8398 in fread () from /lib/libc.so.6
(gdb) bt
#0 0x402f8398 in fread () from /lib/libc.so.6
#1 0x40c15d00 in get_header_tar (tar_stream=0x0) at unarchive.c:558
#2 0x40c168f4 in unarchive (src_stream=0x0, out_stream=0x403bc6a0, get_headers=0x40c15c98 <get_header_tar>,

free_headers=0x40c15bc4 <free_header_tar>, extract_function=688,
prefix=0x247b6b8 "/tmp/opkg-qe7CHA/angstrom-version-rTf0wX/", extract_names=0x0) at unarchive.c:267

#3 0x40c16a94 in deb_extract (package_filename=<value optimized out>, out_stream=0x0, extract_function=688,

prefix=0x40c1b3ac "%s/%s-XXXXXX", filename=0x40c06ebc "") at unarchive.c:755

#4 0x40c0f778 in pkg_extract_control_files_to_dir_with_prefix () from /usr/lib/libopkg.so.0
#5 0x40c06ebc in opkg_install_pkg () from /usr/lib/libopkg.so.0
#6 0x40c08178 in opkg_upgrade_pkg () from /usr/lib/libopkg.so.0
#7 0x40c02498 in opkg_upgrade_package () from /usr/lib/libopkg.so.0
#8 0x40bef58c in backend_update_package_thread () from /usr/lib/packagekit-backend/libpk_backend_opkg.so
#9 0x4023cfc8 in ?? () from /usr/lib/libglib-2.0.so.0
(gdb)

Change History

comment:1 Changed 10 years ago by tick

  • Status changed from new to accepted

comment:2 Changed 10 years ago by tick

It's a memory leak issue.

comment:3 Changed 10 years ago by tick

  • Priority changed from highest to normal

comment:4 Changed 10 years ago by tick

  • Status changed from accepted to in_testing

fixed after 4558

I close it directly, for it very hard for QA team to test that

comment:5 Changed 10 years ago by tick

  • Status changed from in_testing to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.