update-manager freezes due to defunct dpkg process

Bug #134858 reported by Martin Emrich
98
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
High
Michael Vogt
Gutsy
Fix Released
Undecided
Unassigned
Hardy
Fix Released
High
Michael Vogt

Bug Description

Binary package hint: update-manager

During automatic updates, the installation procedure often freezes due to a defunct dpkg process. Here is a snippet of 'ps auxef':

martin 8551 0.1 4.7 328804 98540 ? Sl 10:43 0:04 /usr/bin/python2.5 /usr/bin/update-manager GPG_AGENT_INFO=/tmp/gpg-LPvZhX/S.gpg-agent:5592:1 SHELL=/
martin 11337 0.0 0.2 120336 5976 ? S 11:09 0:00 \_ gksu --desktop /usr/share/applications/update-manager.desktop -- /usr/sbin/synaptic --hide-main-
root 11338 0.1 2.9 217392 60780 ? Ss 11:09 0:02 \_ /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 67108867 --progre
root 11340 0.0 0.0 17156 792 ? S 11:09 0:00 \_ gnome-pty-helper
root 11341 0.4 1.0 200292 21732 pts/5 Ss+ 11:09 0:06 \_ /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 67108867 --pr
root 11765 0.2 0.0 0 0 ? Zs 11:10 0:02 \_ [dpkg] <defunct>

The terminal widget that appears after clicking on "Details" is still responsive, but I cannot type inside it.

  ~$ sudo strace -p 11341
  Process 11341 attached - interrupt to quit
  read(36,
(just hangs there)

  $ sudo gdb /usr/sbin/synaptic 11341
(gdb) where
#0 0x00002b5620904ec0 in __read_nocancel () from /lib/libpthread.so.0
#1 0x00002b561bad626c in pkgDPkgPM::DoTerminalPty () from /usr/lib/libapt-pkg-libc6.6-6.so.4.5
#2 0x00002b561badb043 in pkgDPkgPM::Go () from /usr/lib/libapt-pkg-libc6.6-6.so.4.5
#3 0x000000000042d323 in ?? ()
#4 0x000000000046ac0f in ?? ()
#5 0x000000000043dfd8 in ?? ()
#6 0x0000000000415677 in ?? ()
#7 0x00002b562104ab44 in __libc_start_main () from /lib/libc.so.6
#8 0x0000000000413569 in ?? ()
#9 0x00007fff8f282e28 in ?? ()
#10 0x0000000000000000 in ?? ()

After "sudo killall -TERM synaptic" update-manager behaves just as if the installation process has finished (but I have to "apt-get -f install" manually to clean up).

This could be related to #103753, but here it does not freeze the whole computer.

---------
For the sru verfication, please run this (its a race condition in the code so it may
not possible to trigger easily depending the computer type).

TEST CASE:
0. install gutsy
1. run while true; do apt-get install -y 2vcard; apt-get install -y 2vcard-; done
2. wait for it to hang
3. install apt from gutsy-proposed
4. run the same test again, this time it should not stop

Related branches

Revision history for this message
Martin Emrich (emme) wrote :

I forgot: I'm running gutsy amd64

Ciao

Martin

Michael Vogt (mvo)
Changed in update-manager:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Can you always reproduce this behaviour? If you run update-manager on a terminal, is something printed there when this bug happens? Do you have /dev/pts mounted? What version of apt are you using?

I can not reproduce this behaviour here, but it looks like a serious regression so I would like to nail it down for tribe-6.

Thanks,
 Michael

Revision history for this message
Michael Vogt (mvo) wrote :

If you can reproduce this bug, could you please try the attached patch and let me know if it fixes the issue?

Thanks,
 Michael

Changed in update-manager:
status: Triaged → Incomplete
Revision history for this message
Martin Emrich (emme) wrote :

Hi!

Sorry for taking so long, had to prepare my seminar talk over the weekend...

I applied your patch: I got the apt sources with "apt-get source apt", applied the patch, built with "fakeroot dpkg-buildpackage -us -uc", and installed the resulting packages (except -doc and -dev).
Then, I clicked on the update-manager icon (I kept the updates back for this). And, luckily (at least from the debugging perspective), the bug still occured.

I saved again the output of ps auxef and the GDB session, and as far as I can see, nothing changed (I attached it).

As far as I can see, this bug could be in synaptic, not in update-manager. If there are some unofficial -dbg packages available to debug it further, I'd be happy to help.

Ciao

Martin

Revision history for this message
Martin Emrich (emme) wrote :

This morning, I started update-manager, but this time, I kept the ">Details" area closed, and the updates completed without problems.
Maybe it is related to the little terminal window. Is this widget only created when I click on "Details" ?

I'll investigate the relationship between "dpkg crashes" and "details terminal is shown" further over the coming days.

Ciao

Martin

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks a lot for testing my patch.

I can not reproduce this here unfortunately (with open or closed terminal widget), could you please give some more details:

Can you always reproduce this behaviour? If you run update-manager on a terminal, is something printed there when this bug happens? Do you have /dev/pts mounted? What version of apt are you using (and what architecture)?

thanks,
 Michael

P.S. There are currently no debug packages for apt/synaptic one option is to build it locally with:
export CXXFLAGS="-O0 -ggdb -g3

Revision history for this message
Martin Emrich (emme) wrote :

Hi!

I tried starting update-manager from a terminal. This is what it printed:

martin@garrett:~$ sudo strace -f -o update-manager-trace.txt update-manager
warning: could not initiate dbus
current dist not found in meta-release file
could not send the dbus Inhibit signal: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

As it went through the update without problems this time, I won't attach the strace (97MB uncompressed!).
devpts is mounted ("(evpts on /dev/pts type devpts (rw,gid=5,mode=620)").
My apt version is:

apt 0.7.6ubuntu7 for amd64 compiled on Aug 16 2007 18:44:41
Unterstützte Module:
*Ver: Standard .deb
*Pkg: Debian dpkg interface (Priority 30)
 S.L: 'deb' Standard Debian binary tree
 S.L: 'deb-src' Standard Debian source tree
 Idx: Debian Source Index
 Idx: Debian Package Index
 Idx: Debian Translation Index
 Idx: Debian dpkg status file

Ciao

Martin

Revision history for this message
Chris McCauley (chris-avondalepark) wrote :

I have the same issue running aptitude from the command line. It has recently (within two weeks) started to hang on every "aptitude full-upgrade". See the (partial) ps listing below

root 6724 0.0 0.0 4156 1772 pts/0 S 09:17 0:00 bash
root 6770 0.5 0.9 33764 19480 pts/0 Sl+ 09:19 0:04 aptitude full-upgrade
root 7589 3.2 0.0 0 0 ? Zs 09:25 0:10 [dpkg] <defunct>

Revision history for this message
Martin Emrich (emme) wrote :

Hi!

I'm glad it's not another one of those bugs that only affect me :)

Do you use amd64, too? It does not happen on my laptop (gutsy, i386).
I'd say we can rule out update-manager and synaptic, too, as you did your update via aptitude.
In what terminal do you use it? gnome-terminal? konsole? xterm?

Ciao

Martin

Revision history for this message
Chris McCauley (chris-avondalepark) wrote : Re: [Bug 134858] Re: update-manager freezes due to defunct dpkg process

Hi Martin,

I'm using gutsy on a Dell Inspiron 8600 so it is happening not only on
amd64. My laptop has been upgraded continuously from early Feisty
versions so it isn't a clean installation at all. Having said that, this
problem is relatively new. I use gnome-terminal and the Bash shell for
most work.

Chris

Martin Emrich wrote:
> Hi!
>
> I'm glad it's not another one of those bugs that only affect me :)
>
> Do you use amd64, too? It does not happen on my laptop (gutsy, i386).
> I'd say we can rule out update-manager and synaptic, too, as you did your update via aptitude.
> In what terminal do you use it? gnome-terminal? konsole? xterm?
>
> Ciao
>
> Martin
>
>

Revision history for this message
Martin Emrich (emme) wrote :

My desktop is continously upgraded since feisty, too, while my laptop was freshly installed with gutsy tribe 2.
So when I come home tonight, I'll take a look at possible differences in the configuration files.

Another thing (this is really farfetched, but I'll mention it anyways):
I had a (some time ago) a similar effect using VDR (the Digital TV application).
Started from gnome-terminal, it would occasionally freeze gnome-terminal, and when trying to print the next debug message to stdout/stderr, it would freeze because g-t would not print them. AFAIK, update-manager and synaptic use the same codebase for displaying the terminal as gnome-terminal does. So, I'll try to find out what happens when I upgrade from xterm rather than from gnome-terminal
This might be unrelated, but I have a strange gut feeling about this...

Ciao

Martin

Revision history for this message
Chris McCauley (chris-avondalepark) wrote :

Hi,

Perhaps a strange "gutsy" feeling? (Sorry poor joke). I'll start using
xterm and see if the problem repeats. Come to think of it, I have
noticed that some apparent hangs can be solved by hitting the enter key
after which an error about a closed socket appears. If the problem
reappears when using xterm then we can discount the idea. Just remember
though that this problem has only appeared for me in this last few weeks.

Chris

Martin Emrich wrote:
> My desktop is continously upgraded since feisty, too, while my laptop was freshly installed with gutsy tribe 2.
> So when I come home tonight, I'll take a look at possible differences in the configuration files.
>
> Another thing (this is really farfetched, but I'll mention it anyways):
> I had a (some time ago) a similar effect using VDR (the Digital TV application).
> Started from gnome-terminal, it would occasionally freeze gnome-terminal, and when trying to print the next debug message to stdout/stderr, it would freeze because g-t would not print them. AFAIK, update-manager and synaptic use the same codebase for displaying the terminal as gnome-terminal does. So, I'll try to find out what happens when I upgrade from xterm rather than from gnome-terminal
> This might be unrelated, but I have a strange gut feeling about this...
>
> Ciao
>
> Martin
>
>

Revision history for this message
Martin Emrich (emme) wrote :

News on my side:

I tried to install grub-info (in gnome-terminal), and while apt/dpkg read read its database, I resized the window, and then I saw this "Error in select()".
I quickly opened another terminal and hit "ps aux", dpkg still alive. Then came "272072 Dateien und Verzeichnisse sind derzeit installiert.", I hit "ps aux" again, and now dpkg is <defunct>.

martin@garrett:~$ sudo apt-get install grub-doc
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Reading state information... Fertig
Die folgenden NEUEN Pakete werden installiert:
  grub-doc
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 2 nicht aktualisiert.
Es müssen 278kB Archive geholt werden.
Nach dem Auspacken werden 971kB Plattenplatz zusätzlich benutzt.
Hole:1 http://de.archive.ubuntu.com gutsy/main grub-doc 0.97-29ubuntu3 [278kB]
Es wurden 278kB in 0s geholt (463kB/s)
Wähle vormals abgewähltes Paket grub-doc.
(Lese Datenbank ... Error in select()
                                     272072 Dateien und Verzeichnisse sind derzeit installiert.)

      1-2 minutes later, I hit some keys in the terminal, and suddenly it went on:

 fvRichte grub-doc ein (0.97-29ubuntu3) ...
ff

   So, from my side, I would rule out update-manager or synaptic as a source of the problem.
As nobody else posted a "me too" here, I'd say it is triggered either by a certain software configuration,
or by a certain X configuration. I have an nvidia card with "nvidia" driver, two displays with nvidia-Xinerama.

Ciao

Martin

Revision history for this message
Martin Emrich (emme) wrote :

I tried the game a few times, and I could reproduce it on all combinations:

- desktop (gutsy amd64), gnome-terminal
- laptop (gutsy i386), gnome-terminal
- desktop (gutsy i386), xterm

Could someone try it, too?

1. pick some "less important" package, I chose grub-doc.
2. prepare your command "sudo apt-get install grub-doc" in your terminal
3. get ready to resize the window
4. press enter, and which apt-get works, constantly resize your window. During "reading database...", there should appear the "Error in select()" message.
5. try again with "sudo apt-get remove grub-doc"

Ciao

Martin

Revision history for this message
Martin Emrich (emme) wrote :

Sorry, the third scenario should also be gutsy amd64. I also tried it on the laptop with xterm, and can reproduce it there, too.

I found the error message here:
apt-0.7.6ubuntu7/apt-pkg/deb/dpkgpm.cc:822: std::cerr << "Error in select()" << std::endl;

Revision history for this message
Chris McCauley (chris-avondalepark) wrote :

Hi,

Some news on my side too. For a few weeks now this bug has happened to
me _at least_ once a day. I often also get the "Error in select()"
message. Following your suggestion last week Martin, I have started
using xterm rather than gnome-terminal to do "aptitude full-upgrade".
Although not a scientific experiment, I have not had the problem for
some days though I am still doing two upgrades a day.

Yesterday I forgot and did an upgrade with gnome-terminal and got the
same error with an "Error in select()" message. It looks like there is
some interaction with gnome-terminal and dpkg which is different from
how xterm and dpkg interact.

So not scientific but interesting...

Chris

Martin Emrich wrote:
> News on my side:
>
> I tried to install grub-info (in gnome-terminal), and while apt/dpkg read read its database, I resized the window, and then I saw this "Error in select()".
> I quickly opened another terminal and hit "ps aux", dpkg still alive. Then came "272072 Dateien und Verzeichnisse sind derzeit installiert.", I hit "ps aux" again, and now dpkg is <defunct>.
>
> martin@garrett:~$ sudo apt-get install grub-doc
> Paketlisten werden gelesen... Fertig
> Abhängigkeitsbaum wird aufgebaut
> Reading state information... Fertig
> Die folgenden NEUEN Pakete werden installiert:
> grub-doc
> 0 aktualisiert, 1 neu installiert, 0 zu entfernen und 2 nicht aktualisiert.
> Es müssen 278kB Archive geholt werden.
> Nach dem Auspacken werden 971kB Plattenplatz zusätzlich benutzt.
> Hole:1 http://de.archive.ubuntu.com gutsy/main grub-doc 0.97-29ubuntu3 [278kB]
> Es wurden 278kB in 0s geholt (463kB/s)
> Wähle vormals abgewähltes Paket grub-doc.
> (Lese Datenbank ... Error in select()
> 272072 Dateien und Verzeichnisse sind derzeit installiert.)
>
> 1-2 minutes later, I hit some keys in the terminal, and suddenly
> it went on:
>
> fvRichte grub-doc ein (0.97-29ubuntu3) ...
> ff
>
> So, from my side, I would rule out update-manager or synaptic as a source of the problem.
> As nobody else posted a "me too" here, I'd say it is triggered either by a certain software configuration,
> or by a certain X configuration. I have an nvidia card with "nvidia" driver, two displays with nvidia-Xinerama.
>
> Ciao
>
> Martin
>
>

Changed in update-manager:
assignee: nobody → mvo
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks a lot for this detailed information! I'm finally able to reproduce this issue here now and I can pinpoint it now! I hope to be able to produce a fix tomorrow, the biggest help is that I'm now able to reproduce it myself.

Thanks Martin and Chris!

Michael Vogt (mvo)
Changed in update-manager:
status: Incomplete → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

This should now be fixed with the apt 0.7.6ubuntu8 upload. Please reopen if you still see issues.

Changed in update-manager:
status: In Progress → Fix Released
Revision history for this message
Martin Emrich (emme) wrote :

Yes, works fine now. Thanks!

Ciao

Martin

Revision history for this message
Chris McCauley (chris-avondalepark) wrote :

Hi Michael,

Just got a hang and I have the latest apt.

chris@cmccauley ~> ps aux | grep defunct
root 6794 3.7 0.0 0 0 ? Zs 09:34 0:12 [dpkg]
<defunct>
chris 7968 0.0 0.0 2984 760 pts/10 R+ 09:39 0:00 grep
defunct

root@cmccauley:~# apt-get --version
apt 0.7.6ubuntu8 for i386 compiled on Sep 5 2007 17:10:06

Will keep an eye on it before reopening the bug. Fingers crossed

Chris

Michael Vogt wrote:
> This should now be fixed with the apt 0.7.6ubuntu8 upload. Please reopen
> if you still see issues.
>
> ** Changed in: update-manager (Ubuntu)
> Status: In Progress => Fix Released
>
>

Revision history for this message
Martin Emrich (emme) wrote :

Hi!

Sorry for cheering too early, I tortured apt tonight, too, and I also had the hangs. Then I remembered that I had a similar problem some time ago with my dmplayer, wehere I got similar zombie children related to the select() call. Back then, I rewrote dmplayer to use pselect() instead of select(), and the problem went away. So I tried the same here with apt.
After that, I can resize my windows while installing like hell, and I had no problems.

Attached is a patch against the bzr branch of apt. I also filled in some missing Build-Depends regarding docs/manpages.

Ciao

Martin

Revision history for this message
Martin Emrich (emme) wrote :

Since apt was updated and overwrote my patched version, dpkg froze again today. I reinstalled my patched version now, but I am not yet convinced it is in fact a fix. But nevertheless, I would like to reopen the bug.

Ciao

Martin

Revision history for this message
Rob Taylor (robtaylor) wrote :

I also see zombie dpkg processes, causing apt-get to hang on my x86 box, generally when doing an upgrade, and seems to be always after the last of the unpack stage. I see them when using apt-get directly, so this is probably unrelated to update-manager.

Thanks,
Rob

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

I've also got this bug, it's ubuntu gutsy on AMD64 (but I've seen this on an i386 box too at my workplace, with the same version numbers), version of apt package is 0.7.6ubuntu12, version of dpkg is 1.14.5ubuntu16. From time to time using "apt-get" causes to "freeze", I can see process "dpkg" in defunct state with command ps. It seems it's just after unpacking packages, since killing apt-get than running "dpkg --configure -a" does the trick (eg furthet "apt-get dist-upgrade" does not find any more task to do).

Also (don't it's related or not) I've discovered that I can't stop apt-get with CTRL-Z even before the freeze however I've used this to stop installing packages for a while if I need more disk I/O bandwidth for an urgent task or such (I've got very slow disk ....).

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the additional comments!

I can not reproduce this here anymore. Do you have a way to make this reproducible? I will apply the pselelect() patch after hardy opens and if that fixes the issue get a fix for this into gutsy-updates.

Thanks,
 Michael

Changed in update-manager:
milestone: tribe-6 → gutsy-updates
status: Fix Released → Confirmed
Revision history for this message
Chris McCauley (chris-avondalepark) wrote :

Seems to be working fine for me Michael. I did however install a copy of
Tribe 4 to replace the very old installation which I had been using.

Chris

Michael Vogt wrote:
> Thanks for the additional comments!
>
> I can not reproduce this here anymore. Do you have a way to make this
> reproducible? I will apply the pselelect() patch after hardy opens and
> if that fixes the issue get a fix for this into gutsy-updates.
>
> Thanks,
> Michael
>
> ** Changed in: update-manager (Ubuntu)
> Status: Fix Released => Confirmed
> Target: tribe-6 => gutsy-updates
>
>

Revision history for this message
Martin Emrich (emme) wrote :

I had no problems for some time now, so I too assume that the bug is gone.

Ciao

Martin

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

I still have got this problem using apt-get (sometimes, but not always). The sympthoms are: apt-get stops after an "Unpacking replacement XYZ ..." message, and the terminal does not react, I mean, I can't use CTRL+C, CTRL-Z or eg pressing any character/enter will not echo anything in the terminal as usuall (even running a CLI command). From another terminal window:

lgb@oxygene:~$ ps aux | egrep 'dpkg|apt'
root 15607 0.6 1.5 32716 16228 pts/1 S+ 16:06 0:02 apt-get upgrade
root 16091 1.5 0.0 0 0 ? Zs 16:06 0:06 [dpkg] <defunct>

Only killing apt-get helps from another terminal with kill command.

Revision history for this message
Gregory Margo (gmargo) wrote :

I just did a network upgrade from Feisty to GutsyRC, and repeatedly ran into the same problem - dpkg dies and goes <defunct> and apt-get hangs forever. It kept happening on kmail and openoffice.org packages. Have to open a terminal and kill apt-get manually. This happened wtih the PC(x86) version. The bug is definitely still present.

What really surprised me is that nothing entered in the terminal works, as mentioned above, not even CTRL-Z or C or \.

gm

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the additional comments.

@LGB, Gregory Margo: what terminal do you use? I wonder if this is somehow releated to the environment, I do not see it here with gnome-terminal.

Revision history for this message
Gregory Margo (gmargo) wrote :

I was using xterm when I got the above results.

However, just a few minutes ago, I ran another upgrade (apt-get dist-upgrade) on the linux console, without any X running. And I experienced the problem once again. It occured on the final package being installed in this batch (xserver-xorg-video-intel), during the install phase, prior to the conf phase. I had to kill apt-get and run it again, and the upgrade completed. During the upgrade, and just a package or two prior to the last one, I hit a key on the console to see if it was hung up, and it echoed properly. This latest batch included an update to python-apt, but I don't know if that's relevant.

gm

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

I'm using gnome-terminal. But please note, that I've noticed this on plain text console as well (without even starting X/gdm). Because of this fact, I don't think that it's terminal emulation related question. Another question: I can't stop apt-get temporary with CTRL-Z (even before the "freeze") to continue with command 'fg' later. Dunno it's related or not, but I think it can be important to note here as well.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

Maybe I'm completly wrong, but can it be related to bug #148806? I tried to 'strace -p <pid-of-apt>' and it blocked on a read() syscall, however I don't know on which file ;-( Later I will try to strace all of my apt-get activities, or just take a look /proc/<pid>/fd/ to be able to assign a file to the file descriptor reported by strace.

Revision history for this message
Michael Vogt (mvo) wrote :

@LGB: it is the same problem, yes. apt 0.7.6ubuntu14 fixes the resource leak, that might or might not fix the hang as well. I was never able to reproduce the hang myself so I'm a bit in the dark here. If you have any hints what I can do, I would be grateful. It seems to happen only for some people so I would love to get feedback on anything special in your environment (shell, locale, terminal, etc).

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

Well, I'll check this, but it's problematic to test if this bug is fixed or not, because the freeze occures only sometimes, so I can't be sure that it's fixed or is not triggered yet. Anyway, nothing special here: I'm using bash as shell, terminal is gnome-terminal, but I've got this bug on text console as well, without X. I've got this freeze on both of i386 and AMD64. Locale is en_US.UTF-8. Anyway, I'll comment here if apt 0.7.6ubuntu14 (or later) won't fix the problem ie the freeze occures again. Thanks for the information!

Revision history for this message
Gregory Margo (gmargo) wrote :

Unfortunately I've experienced the hang using apt 0.7.6ubuntu14.

When the update with apt 0.7.6ubuntu14 came out, there were also some openoffice.org files that wanted to update. I intentionally installed apt and apt-utils 0.7.6ubuntu14 first. Then did apt-get update to pick up the openoffice.org files, and during that update, the apt-get tool hung twice. the first time was on:

    Preparing to replace openoffice.org-core 1:2.3.0-1ubuntu4 (using .../openoffice.org-core_1%3a2.3.0-1ubuntu5_i386.deb) ...
    Unpacking replacement openoffice.org-core ...

I don't recall where it hung the second time, apparently I only recorded the first one.

Was that before or after I fixed my locale problem? I don't know. What happened: when I ran k3b, it complained about a locale problem. I had LANG="en_US.UTF-8" set from /etc/environment, but I had LC_ALL="POSIX" set in my .bashrc. Now I have changed my .bashrc to set only LC_COLLATE="POSIX" and LC_TIME="POSIX", and k3b works again.

There's nothing to upgrade at the moment, but I will post my next experience, positive or negative.

Revision history for this message
Michael Vogt (mvo) wrote :

The trace: http://launchpadlibrarian.net/10056217/dpkgstrace indicates that its a race condition with the SIGCHLD.

I uploaded a new version with the fix from Martin Emrich to my ppa at:

deb http://ppa.launchpad.net/~mvo/ubuntu gutsy main restricted universe multiverse

I would appreciate testing, if it works well for you, I will upload it into gutsy-proposed soon.

Revision history for this message
Martin Emrich (emme) wrote :

Hi!

The problem did not appear here for some time now, but nevertheless I'll test the packages, too.
FYI: I had to remove the tilde ~ from the repository URL to make it work:

deb http://ppa.launchpad.net/mvo/ubuntu gutsy main restricted universe multiverse

Ciao

Martin

Revision history for this message
hackel (hackel) wrote :

When I was trying to reproduce this (running aptitude in gnome-terminal), it seemed to be triggered only when I switched into full-screen and back. I couldn't reproduce it if I just ran an upgrade/install with aptitude in a single tab without changing to full screen at all.

Revision history for this message
Troy C (troxor) wrote :

Using {apt,apt-utils}0.7.6ubuntu14.1~ppa1, the race condition is still present, when doing the kcontrol reinstall for loop mentioned in bug #148806

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Troy C for testing the ppa1 version. I just uploaded a pp2 version in my ppa that may fix the issue. I'm can't say for sure because I can not reproduce it :) Your kcontrol test script works for me. But I would appreciate if you could test and give feedback.

Thanks,
 Michael

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

@hackel: Hmm, you may be right: I've got this issue both on Linux text console and in gnome-terminal, but I'm using workspace switching (with X/gnome) and console switching (ALT-F1...) quite often while working.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

Well, sorry, I meant in my last comment that this bug is related somehow with terminal hangling? Eg both of resizing the terminal or other action which affect its visibility, however I don't now my comment has any sense or not just guessing here.

Revision history for this message
Troy C (troxor) wrote :

@Michael: iteration 592 and still going strong :) It looks like your ppa2 version had the magic that cured the problem (kcontrol, at least). However, monitoring the dpkg process status with a `watch -n .3 "ps aux | grep dpkg | grep -v grep"`, briefly shows a defunct dpkg process at the end of the apt operation. This doesn't remain as it did prior to ppa2, so perhaps it's nothing to worry about. Regardless, thanks for the fix, and I'll report back if the issue crops up with a different set of inputs.

Thanks,
-Troy

Revision history for this message
hackel (hackel) wrote :

I also have not been able to reproduce the issue with ppa2. :)

Revision history for this message
Gregory Margo (gmargo) wrote :

The ppa2 version looks good to me too.
I did the first official upgrade (tzdata) and did 100 install/remove repetitions of the openoffice.org-calc package that had given me trouble before. It was in an xterm, and I really messed with the screen, resizing, iconifying, obscuring, switching desktops.
No problems occurred.

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

Accepted into gutsy-proposed, please test.

Changed in apt:
status: New → Fix Committed
milestone: none → gutsy-updates
milestone: gutsy-updates → none
status: Confirmed → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :
Download full text (7.0 KiB)

apt (0.7.9ubuntu1) hardy; urgency=low

  * merged from http://bzr.debian.org/apt/apt/debian-sid/, remaining
    changes:
    - mirror download method (pending merge with debian)
    - no pdiff download by default (unsuitable for ubuntu)
    - no recommends-by-default yet
    - add "Original-Maintainer" field to tagfile
    - show warning on apt-get source if the package is maintained
      in a VCS (pedinging merge with debian)
    - use ubuntu-archive keyring instead of debians one
    - support metapackages section for autoremoval
    - debian maintainer field change
    - send ubuntu string in user-agent

  * Changes from the debian-sid bzr branch (but not uploaded to debian
    yet):

  [ Otavio Salvador ]
  * Applied patch from Mike O'Connor <email address hidden> to add a manpage to
    apt-mark, closes: #430207.
  * Applied patch from Andrei Popescu <email address hidden> to add a
    note about some frontends in apt.8 manpage, closes: #438545.
  * Applied patch from Aurelien Jarno <email address hidden> to avoid CPU
    getting crazy when /dev/null is redirected to stdin (which breaks
    buildds), closes: #452858.
  * Applied patch from Aurelien Jarno <email address hidden> to fix building
    with newest dpkg-shlibdeps changing the packaging building order,
    closes: #452862.

  [ Program translations ]
    - Basque updated. Closes: #453088

  [ Michael Vogt ]
  * debian/rules
    - fix https install location
  * methods/gpgv.cc:
    - remove cruft code that caused timestamp/I-M-S issues
  * ftparchive/contents.cc:
    - fix error output
  * methods/mirror.{cc,h}:
    - only update mirror list on IndexFile updates
  * apt-pkg/acquire-item.{cc,h}:
    - make the authentication download code more robust against
      servers/proxies with broken If-Range implementations

  [ Chris Cheney ]
  * ftparchive/contents.cc:
    - support lzma data members
  * ftparchive/multicompress.cc:
    - support lzma output

apt (0.7.9) unstable; urgency=low

  [ Christian Perrier ]
  * Add several languages to LINGUAS and, therefore, really ship the relevant
    translation:
    Arabic, Dzongkha, Khmer, Marathi, Nepali, Thai
    Thanks to Theppitak Karoonboonyanan for checking this out. Closes: #448321

  [ Program translations ]
    - Korean updated. Closes: #448430
    - Galician updated. Closes: #448497
    - Swedish updated.

  [ Otavio Salvador ]
  * Fix configure script to check for CURL library and headers presense.
  * Applied patch from Brian M. Carlson <email address hidden>
    to add backward support for arches that lacks pselect support,
    closes: #448406.
  * Umount CD-ROM when calling apt-cdrom ident, except when called with
    -m, closes: #448521.

apt (0.7.8) unstable; urgency=low

  * Applied patch from Daniel Leidert <email address hidden> to fix
    APT::Acquire::Translation "none" support, closes: #437523.
  * Applied patch from Daniel Burrows <email address hidden> to add support
    for the Homepage field (ABI break), closes: #447970.
  * Applied patch from Frans Pop <email address hidden> to fix a trailing
    space after cd label, closes: #448187.

apt (0.7.7) unstable; urgency=low

  [ Michael Vogt ]
  * apt-inst/contr...

Read more...

Changed in apt:
status: In Progress → Fix Released
Michael Vogt (mvo)
description: updated
Michael Vogt (mvo)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

I've been unable to recreate this bug using either a Gutsy amd64 chroot or a Gutsy i386 vmware image.

Revision history for this message
thor111 (thor111) wrote :

The problem went away after I upgraded to the latest version. I just thought you'd like to know that it hung for me. Sorry if I've wasted your time.

  -Mark

Brian Murray <email address hidden> wrote:
  I've been unable to recreate this bug using either a Gutsy amd64 chroot
or a Gutsy i386 vmware image.

--
update-manager freezes due to defunct dpkg process
https://bugs.launchpad.net/bugs/134858
You received this bug notification because you are a direct subscriber
of a duplicate bug.

---------------------------------
Never miss a thing. Make Yahoo your homepage.

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

This has been in gutsy-proposed for about half a year now. Can someone please test this? If it's tricky to recreate the original problem: it is actually more important that this version of apt still works as expected (installing packages, etc.), i. e. test for regressions instead of reproducing this bug. This is also holding back the fix for bug 131719 from gutsy-updates.

Revision history for this message
Martin Emrich (emme) wrote :

I am running hardy now, but for quite some time I had the ppa packages from ~mvo running without any problems.

Revision history for this message
Brian Murray (brian-murray) wrote :

In an Ubuntu 7.10 server install I tested installing and removing y2vcard as indicated in the test case without it hanging at all. I then installed apt from gutsy-proposed and performed a dist-upgrade to Hardy via 'apt-get dist-upgrade' after editing my sources.list file. This upgrade performed successfully. Attached is the term.log from the virtual machine after upgrading to Hardy.

Revision history for this message
Gregory Margo (gmargo) wrote :

Let me begin by saying that a few weeks ago I upgraded from gutsy
to hardy beta, using "do-release-upgrade". I had the "ppa2" apt version
installed and experienced no problems.

Yesterday I did a little testing by creating a Vmware Server virtual machine,
and installed gutsy from the server .iso image. Installed updates but
not the proposed apt.

The apt, dpkg, kernel versions are:
    apt 0.7.6ubuntu14
    apt-utils 0.7.6ubuntu14
    dpkg 1.14.5ubuntu16
    linux-image-2.6.22-14-server 2.6.22-14.52
    linux-image-2.6.22-14-generic 2.6.22-14.52

Using the -server kernel, the 2vcard test ran without hanging until
I stopped it after 3.5 hours and 2073 interations.

However, using the -generic kernel, the 2vcard test caused the hang
after 75 minutes and 612 iterations. Is it possible that the folks
who don't see this error are running the -server kernel?

Then I installed the apt from gutsy-proposed:
    apt 0.7.6ubuntu14.1
    apt-utils 0.7.6ubuntu14.1

Again using the -generic kernel, the 2vcard ran without hanging for over
14.5 hours and 7484 iterations before I stopped it.

Then I ran a do-release-upgrade and upgraded to hardy RC without any problem.

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

Copied to gutsy-updates, thanks!

Changed in apt:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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