On Wed, 18 Dec 2013 14:38:10 -0500
David Belius <david.bel...@cantab.net> wrote:

> Hi,
> 
> When working on a specific large document (about 50 pages as a PDF),
> LyX does a very annoying thing where it freezes for about 4-5 seconds
> about once a minute. 

Now *that's* a pain in the ass!

Luckily although this is technically an intermittent problem, the
frequency with which it occurs will aid you in troubleshooting.

> It seems to happen more often when I am editing
> equations. During the freeze the screen does not update when I type.
> When the freeze is over whatever I typed during the freeze appears all
> at once.
> 
> Here are the details of my setup:
> OS: CentOS Release 6.4  / Linux Kernel 2.6.32-358.18.1.el6.x86_64
> LyX version: 2.0.6
> 
> It is a powerful computer (12 Intel i7 cores and 16gb of ram), and
> other applications do not freeze. When working on the same document on
> my laptop (Thinkpad running Ubuntu) the freezes do not occur.
> 
> Does anyone have any idea of how to fix this problem, or at least how
> to debug it? I have downloaded the source code and tried to find the
> place where it gets stuck, but to no avail.

First test. Reboot the machine, run nothing else except X and LyX, and
see if it still happens. If not, it's an interaction with some other
program, so you'd need to find what (top would be a good resource). 

If it still happens after rebooting and running only LyX, just for fun
do disk tests (smartctl et. al.) to see if a disk is starting to fail.
I've seen failing disks do what you're talking about.

If the disk isn't implicated try repeatedly splitting the LyX file in
half to see if you can isolate a small section that causes the problem.

If you can't find a section causing the problem, reboot with a Ubuntu
live CD, install LyX 2.0.6 on the live distro, mount the partition on
which your LyX file resides, and edit it. If the problem still occurs,
that points a very accusing finger at hardware, because you've swapped
out every last bit of software. Redo your disk tests, do a memory
tester, ask your hardware-smart friends for more tests.

If it doesn't seem to be hardware and none of the preceding tests have
narrowed it down, it's time to do more time consuming tests. Make a
program log file that records the output of vmstat every second, along
with the time. Run LyX from an X terminal so you can see messages. Then
edit your program, writing down with pencil and paper the exact time
(have a clock on the screen) when freezes start and stop. Compare
freeze times to the log file. Maybe have a copy of top, or better yet
htop, running on the screen where you can see it (obviously you're going
to be doing your LyX editing in a small window).

If none of the preceding work, it's time for Hail Marys:
Prophylactically install a different LyX version and the like. Also, be
thinking of other diagnostic tests to narrow down the root cause scope.

Best of luck,

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance

Reply via email to