Re: Bug#468075: this bug/#468075 - sudo: system freeze
On Wed, Mar 19, 2008 at 12:55:19PM -0400, Justin Pryzby <justinpryzby@users.sourceforge.net> was heard to say:
> Hi Apt team, do you know anything about what can cause this ?
>
> Benoît, what kernel version?
>
> sudo aptitude safe-upgrade causes X11 to freeze for 5-10 seconds.
> This seems to happen when the most recent upgrade attempt was
> forcibly-aborted (by a signal). It never used to happen for me with
> dist-upgrade, but after aborting a safe-upgrade, dist-upgrade is now
> also affected.
>
> It seems to be due to the lockfiles /var/lock/aptitude and
> /var/lib/dpkg/lock. Unfortunately the problem doesn't occur under
> strace.
If your entire X11 desktop is freezing, you probably have a kernel
issue, possibly compounded by X. When an apt frontend starts, it
places a lot of load on the system (in terms of hitting the disks, using
the IO bus, allocating and accessing a lot of memory, etc), and perhaps
the kernel isn't scheduling this very well. Certainly apt isn't, e.g.,
sending SIGSTOP to X. ;-) I would guess that it doesn't show up in
strace because strace imposes extra latency on the process and changes
scheduling (the strace process and possibly its output terminal are also
active, which might give apt's competitor for I/O more chances to
squeeze in). It would be interesting, but not crucial, to know whether
it shows up when you use -o to send strace's output to a file.
Most likely some critical part of your X session wanted to access the
disk, and it was blocked out by apt. I'm not sure how to confirm this;
on Windows there are ways of monitoring file accesses across the system
(so you could see which programs were contending with apt for the disk
and how long they got blocked), but I don't know of any equivalent for
Linux.
Disclaimer: IANAKHBASOTI (I am not a kernel hacker by any stretch of
the imagination).
Daniel
Reply to: