"David Milligan" wrote:
> Some of our (and others) programmes appear to either "crash" or "pause" if
> they are left running for around 30 minutes or more.
Is this with dosemu-1.0.2?
> This is especially apparent in our programmes which have a screen saver
> feature. The screen saver routine is pretty simple and does some screen
> writes, keyboard idle loop, and some Novell semaphore checking. It does also
Are you playing with timer's speed? Are you using timer-related delays?
> I haven't determined conclusively what happens but sometimes the programmes
> get "stack overflow" errors, sometimes just lock permanently, sometimes get
Seems like PIC problems again...
> Some more tidbits :-
> get out of screen saver or something else) the CPU util in TOP for that
> DOSEMU session goes up to >90%. Tracing system calls, it repeats a sequence
> of vm86() calls over and over.
This is "normal" behavior.
> While a fix for this behaviour would be good a "fudge" such as putting some
> kind of dumby key press in the dosemu keyboard source may get around this.
You can try to implement such a workaround but I doubt you will ever get it
into the official version (just IMHO).
> Can anyone point me in the direction of what to do here?
Well, in case you are really going to fix it, you should start with the
following:
- apply the attached patch. It will increase the log file limit up to 30Mb and
make it circular, else dosemu will just exit when log size reach 10Mb (patch
untested).
- make a log: dosemu -D9+grI -o /tmp/dosemu.log
- as the PIC implementation is very buggy, it would be a good idea to
make a separate log for PIC with -D9+r option. I beleave that the PIC is the
root of all evil for a *random* crashes and stack overflows.
Ok, making everything mentioned above should be a good starting point
for hunting such a bug. The logs should give you a clue such as what is failing.
--- src/base/misc/utilities.c Wed Oct 4 13:53:20 2000
+++ src/base/misc/utilities.c Sun Oct 29 19:52:16 2000
@@ -51,7 +51,7 @@
#define INITIAL_LOGBUFSIZE 0
#endif
#ifndef INITIAL_LOGBUFLIMIT
-#define INITIAL_LOGFILELIMIT (10*1024*1024)
+#define INITIAL_LOGFILELIMIT (30*1024*1024)
#endif
#ifdef CIRCULAR_LOGBUFFER
@@ -213,15 +213,16 @@
log_written += fsz;
if (log_written > logfile_limit) {
fflush(dbg_fd);
-#if 0
+#if 1
ftruncate(fileno(dbg_fd),0);
fseek(dbg_fd, 0, SEEK_SET);
log_written = 0;
-#endif
+#else
fclose(dbg_fd);
shut_debug = 1;
dbg_fd = 0; /* avoid recursion in leavedos() */
leavedos(0);
+#endif
}
}
}