Menu

#153 Microsoft LINK.EXE 5.31.009 causes segmentation fault

closed
None
5
2012-11-02
2004-04-04
Anonymous
No

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:


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:>dirVolume in drive
F is /herojr/dosDirectory of F:\

SRC

04-03-04 10:33p
TOOLS03-30-04 12:18p
VBDOS04-03-04 11:35p0
file(s)0 bytes3 dir(s) 2,147,418,112
bytes free

F:>cdvbdosF:>cd vbdosVBDOS>linkdirlink.exeF:\VBDOS>dir
link.exeVolume in drive F is
/herojr/dosDirectory of F:\VBDOS

LINKEXE202,912 08-19-92
11:59p1 file(s)202,912 bytes0
dir(s) 2,147,418,112 bytes
freelink

Discussion

  • Stas Sergeev

    Stas Sergeev - 2004-04-04

    Logged In: YES
    user_id=501371

    Please see the /var/log/messages if there is something
    suspicious, like an Oops message.

     
  • Nobody/Anonymous

    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.

     
  • Nobody/Anonymous

    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.

     
  • Stas Sergeev

    Stas Sergeev - 2004-04-05

    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.

     
  • Stas Sergeev

    Stas Sergeev - 2004-04-05

    Fixes console lockup under 2.6

     
  • Stas Sergeev

    Stas Sergeev - 2004-04-05

    Attempts to get link.exe working

     
  • Nobody/Anonymous

    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.

     
  • Stas Sergeev

    Stas Sergeev - 2004-04-06

    Logged In: YES
    user_id=501371

    With it lasting that long, I wonder if the bug is still
    present in the Pentium II, Pentium III, and Pentium IV.
    This bug will not be fixed because Intel doesn't care about
    a weird DOS apps under Linux. You can see their reply to
    the query about that, in the same section of
    EMUFailures.txt.

    problem. Microsoft may have explored a work-around for
    Windows NT/2000/XP.
    There are many possibilities. The bug gets triggered by
    some DOS apps in a conjunction with how the Linux performs
    the task-switching. Windows does the task-switching
    differently, so they may not ever trigger that bug.
    dosemu is really unlucky with its environment:)

     

Log in to post a comment.

MongoDB Logo MongoDB