Comment 15 for bug 711225

Revision history for this message
Martin Pitt (pitti) wrote :

This only happens if jockey tries to update its repository index, i. e. when the machine has never been online. I got this to happen in both kvm and a real machine. You can reproduce this by starting a machine/VM without network, and then ensuring that apt doesn't know about dkms (which jockey uses as a litmus test whether external package sources are available):

  sudo rm /var/lib/apt/lists/*_main*_Packages /var/cache/apt/*.bin
  jockey-text -l

Note you can run the backend in a terminal with this:

  sudo killall jockey-backend
  sudo /usr/share/jockey/jockey-backend --debug

and then start jockey-gtk/jockey-text etc.

Some observations:

 - This only seems to happen when running those subprocess commands in the D-BUS backend. I can't get it to crash when I run it with --no-dbus. But as it also works when running the backend in a terminal, it's not due to the special environment that D-BUS uses for auto-activated backends (i. e. no $PATH, etc.)

 - I added some debugging print statements to _cleanup(), including a try/except. The exception really happens in the "for inst in _active[:]', it's not just being messed up by passing it through dbus.

 - printing _active, type(_active), len(_active) works and gives [], <type 'list'>, 0; i. e. there don't seem actual elements to iterate over

 - I've seen it to crash on a "print _active[:]" or "print list(_active)". At this point I don't think it makes much sense to continue to try searching for the error in the Python code; something in the interpreter seems to get royally confused here..