packagekit crashes when installing clicks on read-only image

Bug #1217462 reported by Loïc Minier
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
lxc-android-config (Ubuntu)
Fix Released
Undecided
Loïc Minier

Bug Description

Hi,

(I've been getting this since Friday, but couldn't get a backtrace til today)

When installing Clicks under the new read-only images, packagekit crashes and the click scope halts. Symptom is that the app downloads 100%, and then UI doesn't update. Then the app home scope doesn't work at all anymore until device is rebooted.

Launching packagit -v -v -v by hand didn't show anything:
15:12:19 PackageKit adding 100 at 44 (ms)
15:12:19 PackageKit averaged 1 points
15:12:19 PackageKit not enough samples for accurate time: 1
15:12:19 PackageKit this will now take ~0 seconds
15:12:19 PackageKit emitting changed
15:12:19 PackageKit duplicate set of 100
15:12:19 PackageKit emitting changed
15:12:19 PackageKit percentage cannot go down!
15:12:19 PackageKit averaged 1 points
15:12:19 PackageKit not enough samples for accurate time: 1
15:12:19 PackageKit this will now take ~0 seconds
15:12:19 PackageKit emitting changed
15:12:19 PackageKit duplicate set of 0
15:12:19 PackageKit emitting changed
15:12:19 PackageKit percentage cannot go down!
15:12:19 PackageKit averaged 1 points
15:12:19 PackageKit not enough samples for accurate time: 1
15:12:19 PackageKit this will now take ~0 seconds
15:12:19 PackageKit emitting changed
15:12:19 PackageKit duplicate set of 50
15:12:19 PackageKit ignoring message (turn on DeveloperMode): percentage value is going down to 0 from 50
15:12:19 PackageKit ignoring message (turn on DeveloperMode): percentage value is going down to 0 from 50
15:12:19 PackageKit emitting changed
15:12:19 PackageKit adding 100 at 613 (ms)
15:12:19 PackageKit ignoring gradient: 0.000000
15:12:19 PackageKit averaged 1 points
15:12:19 PackageKit not enough samples for accurate time: 1
15:12:19 PackageKit this will now take ~0 seconds
15:12:19 PackageKit emitting changed
15:12:20 PackageKit duplicate set of 100

outside of some warnings and backtrace was corrupt without debug symbols.

After installing packagekit-dbg, I got more debug logs:
17:09:57 PackageKit idle is 80
17:10:02 PackageKit idle is 85
17:10:07 PackageKit idle is 90
17:10:08 PackageKit GetTid method called
17:10:08 PackageKit job count now 8
17:10:08 PackageKit deferring low priority write until idle
17:10:08 PackageKit trying to open database '/var/lib/PackageKit/transactions.db'
17:10:08 PackageKit job count is now at 7
17:10:08 PackageKit transaction now new
17:10:08 PackageKit setting sender to :1.46
[New Thread 0x419ff3f0 (LWP 1931)]
17:10:08 PackageKit uid=32011, count=0
17:10:08 PackageKit adding transaction 0x17ce188, item 0x17b7388
17:10:08 PackageKit sending tid: '/8_daccccee_data'
17:10:08 PackageKit doing deferred write syncronous

(packagekitd:1706): PackageKit-ERROR **: failed to set job id: attempt to write a readonly database

Program received signal SIGTRAP, Trace/breakpoint trap.
0x40097fe6 in __libc_do_syscall ()
   from /lib/arm-linux-gnueabihf/libpthread.so.0

(gdb) thread apply all bt

Thread 5 (Thread 0x419ff3f0 (LWP 1931)):
#0 0x40097fe6 in __libc_do_syscall ()
   from /lib/arm-linux-gnueabihf/libpthread.so.0
#1 0x40094000 in pthread_cond_timedwait@@GLIBC_2.4 ()
   from /lib/arm-linux-gnueabihf/libpthread.so.0
#2 0x40329f5c in g_cond_wait_until ()
   from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#3 0x402de6a4 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#4 0x402de6a4 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 0x423ff3f0 (LWP 1711)):
#0 0x4040fde4 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
#1 0x402fcdf6 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#2 0x402fcdf6 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0x410053f0 (LWP 1709)):
#0 0x4040fde4 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
#1 0x402fcdf6 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#2 0x402fcdf6 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x4073f220 (LWP 1706)):
#0 0x40097fe6 in __libc_do_syscall ()
   from /lib/arm-linux-gnueabihf/libpthread.so.0
#1 0x400972de in raise () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2 0x40301aae in g_logv () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#3 0x40301b68 in g_log () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#4 0x00029a90 in pk_transaction_db_defer_write_job_count_cb (tdb=0x42503b70)
    at pk-transaction-db.c:528
#5 0x402fcbd2 in g_main_context_dispatch ()
   from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#6 0x402fce32 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#7 0x402fce32 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

So it seems packagekit tries writing to some read-only file which is consistent with the fact that remount / as rw works around part of the issue.

Cheers,

Revision history for this message
Loïc Minier (lool) wrote :

Just need to make /var/lib/PackageKit persistent; transactions.db could be temporary, but desktop-files.db probably not.

affects: packagekit (Ubuntu) → lxc-android-config (Ubuntu)
Changed in lxc-android-config (Ubuntu):
assignee: nobody → Loïc Minier (lool)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc-android-config - 0.82

---------------
lxc-android-config (0.82) saucy; urgency=low

  * Mark /var/lib/PackageKit as writable and persistent; LP: #1217462.
 -- Loic Minier <email address hidden> Tue, 27 Aug 2013 19:33:38 +0200

Changed in lxc-android-config (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.