LINK.EXE included with MASM 6.11 and VBDOS 1.0 causes a
segmentation fault when executed under DOSEmu. The
behavior is the same when using both the FreeDOS and
MS-DOS 7.10 kernels. After the crash, Linux hangs.
DOSEmu version: 1.2.1.0 (2004/03/06)
LINK.EXE version: 5.31.009 Jul 13 1992
Kernel: Debian 2.6.3 custom compiled
Distribution: Debian Testing
Error message: /usr/bin/dosemu: line 218: 1017
Segmentation fault $SUDO $BINARY $XFLAG "$@"
Debug info:
CONF: config variable parser_version_3 set
CONF: config variable c_system set
CONF: Parsing built-in dosemu.conf file.
CONF: config variable version_3_style_used set
CONF: Parsing built-in global.conf file.
CONF: config variable version_3_style_used unset
CONF: config variable version_3_style_used set
CONF: opened include file /etc/dosemu/dosemu.conf
CONF: closed include file /etc/dosemu/dosemu.conf
debug flags: -a+cw
CONF: Disabling use of pentium timer
CONF: dosbanner on
CONF: timer freq=18, update=54925
CONF: CPU set to 586
CONF: 8192k bytes XMS memory
CONF: 2048k bytes EMS memory
CONF: EMS-frame = 0xe000
CONF: DPMI-Server on
CONF: dosemu running on console
SER: directory /var/lock namestub LCK.. binary No
MOUSE: /dev/psaux type 7 using internaldriver: yes,
emulate3buttons: no baudrate: 0
CONF: Keyboard-layout keyb-user
CONF: Keyboard-layout auto
device: /dev/fd0 type 2 h: 0 s: 0 t: 0 floppy A:
CONF: fastfloppy = 1
CONF: IPX support off
CONF(LPT0) f: (null) c: lpr o: -Plp t: 20 port: 0
CONF(LPT1) f: (null) c: lpr o: '' t: 20 port: 0
CONF: not allowing speaker port access
CONF: Packet Driver disabled.
CONF: range of I/O ports 0x03bc-0x03be
device: /var/lib/dosemu/msdos type 4 h: -1 s: -1 t:
-1 drive C:
CONF: config variable c_system unset
CONF: running exclusively as ROOT: uid=0 (cached 0)
gid=0 (cached 0)
DBG_FD already set
DOSEMU-1.2.1.0 is coming up on Linux version 2.6.3
CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS
memory (first 640K))
CONF: reserving 64Kb at 0xF0000 for 'r' (Dosemu
reserved area)
major = 4 minor = 2
CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory)
registering /dev/psaux for internal_mouse
SERIAL $Header:
/cvsroot/dosemu/dosemu/src/base/serial/ser_init.c,v
1.1.2.5 2004/02/10 00:36:26 bartoldeman Exp $
CONF: reserving 64Kb at 0xE0000 for 'E' (EMS page frame)
TIME: using 9154 usec for updating ALRM timer
Console log of session:
[1;24r[4l[0;10m[37m[40m[1;24r[H[J[1;1H
Linux DOS emulator 1.2.1.0 $Date: 2004/03/06$
Last configured at Mon Mar 8 21:09:15 EST 2004 on linux
This is work in progress.
Please test against a recent version before reporting
bugs and problems.
Submit Bug Reports, Patches & New Code to
linux-msdos@vger.kernel.org or via
the SourceForge tracking system at
http://www.sourceforge.net/projects/dosemu
DPMI-Server Version 0.9 installed
[dosemu EMS 4.0 driver installed]
D: = LINUX\FS/ROOT attrib = READ/WRITE
E: = LINUX\FS/TMP/DOSEMU.BNOXVG/TMP attrib = READ/WRITE
Welcome to dosemu 1.2.1.0!
F: = LINUX\FS\HEROJR\DOS attrib = READ/WRITE
DOSEMU built-in command.com version 1.0
C:>f:
F:>dir[2;24r[2;1H[10M[1;24r[15;2HVolume in drive
F is /herojr/dos[16;2HDirectory of F:\
SRC[18;16H
F:>cd[24;8Hvbdos[1;22r[1;1H[2M[1;24r[22;1HF:>cd vbdos[24;4HVBDOS>[Klink[K[K[K[Kdir[24;14Hlink.exe[2;22r[2;1H[9M[1;24r[1;1H[K[15;1HF:\VBDOS>dir
link.exe[17;2HVolume in drive F is
/herojr/dos[18;2HDirectory of F:\VBDOS
LINK[20;10HEXE[20;20H202,912 08-19-92
11:59p[21;10H1 file(s)[21;27H202,912 bytes[22;10H0
dir(s) 2,147,418,112 bytes
free[24;10H[Klink[1;24r[1;1H[1M[1;24r[24;1H
Logged In: YES
user_id=501371
Please see the /var/log/messages if there is something
suspicious, like an Oops message.
Logged In: NO
There is nothing suspicious in /var/log/messages. No Oops,
and the error message is not logged either. DOSEmu crashing
seems to be messing up something in the Linux kernel, as
after it crashes the keyboard is usually unresponsive, (no
virtual session switching, no caps lock, no response to
ctrl-alt-delete) however after some crashing, if I try to
switch virtual consoles enough times the screen gets messed up.
I also have a report from someone who came across the
problem. They didn't provide any details, although I know
they were not running Debian. They were using either RedHat
or SuSe.
Logged In: NO
btw: After the crash, Linux is still running though. When I
start the session of DOSEmu in a script that tells the
computer to shutdown afterwards, it goes through the normal
shutdown, and all of those messages are logged.
Logged In: YES
user_id=501371
OK, two patches here. One fixes the console lockup, another
one makes link.exe to work.
However, neither one is guaranteed to work properly in all
cases. Running dosemu as root under console was always
unsafe, unless you extend the startup script to do the
recovery sequence after dosemu is terminated (switch
keyboard to XLAT mode with kbd_mode, restore text mode
with textmode, reset terminal etc).
link.exe hits the CPU bug described in EMUFailures.txt
1.7.2. It cant be fixed reliably without a complete CPU
emulation, but link.exe seems to work with that patch
more or less.
Try them, see if it helps.
Fixes console lockup under 2.6
Attempts to get link.exe working
Logged In: NO
Thank you, I'll test out the patches.
It's certainly surprising that Intel was aware of the bug in
the days of the 386, yet the bug is still present two
generations of Intel CPUs later, in a Mobile Pentium MMX.
With it lasting that long, I wonder if the bug is still
present in the Pentium II, Pentium III, and Pentium IV.
Regarding, the possibility of a permanent fix to the
problem. Microsoft may have explored a work-around for
Windows NT/2000/XP.
Logged In: NO
The patches work. I've uploaded a Debian binary package
with them applied to:
http://fedtech.kicks-ass.net/dosemu/dosemu_1.2.1-1-patched_i386.deb
Logged In: YES
user_id=501371