same distro, svn1999 DOSEMU crashes on some PCs on SEGV, on others run fine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all DOSEMU gurus,

I encounter weird problem with DOSEMU when trying run it on Fedora 14 i386 -
althougt machines are roughly same (HW: P4+/2-4GB RAM/max 3 years old, SW:
Fedora 14 i686 up-to-date), on some (6 of these i tried) PCs dosemu seems work
fine, on others (i found 5 pieces) dosemu crashes on SIGSEGV shortly after
start, in its initialization phase.

All PCs are installed from same RPM package, which I compile on one of this
PCs, then dosemu/freedos part is at all PCs same too. On all machines dosemu
run in vm86 mode ($_cpu_emu = "off", and vm.mmap_min_addr = 0).
I tried built dosemu both with dynamically loaded plugins and without them,
dosemu behavior not changed. After i add some debug messages to several dosemu
modules, dosemu on those five machines crashes in slightly different point,
and on six remaining machines work still fine.

Unfortunately I'm not C programmer and have no idea how debug and solve this
problem. For me this appear as dosemu somewhere before overwrite part its
memory. Or maybe want some illegal access to pages which was previously locked
by mprotect(). But I not know which is right way for solving this issue, know
it anyone?

When I run dosemu under gdb, on PCs where it crashes i'm getting this output
(sorry for it's length):


$ gdb dosemu.bin
GNU gdb (GDB) Fedora (7.2-26.fc14)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/dosemu.bin...Reading symbols from
/usr/lib/debug/usr/bin/dosemu.bin.debug...done.
done.
(gdb) run -D +9a -O
Starting program: /usr/bin/dosemu.bin -D +9a -O
[Thread debugging using libthread_db enabled]
using stderr for debug-output
major = 136 minor = 8
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.
Detaching after fork from child process 17738.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
Detaching after fork from child process 17740.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
Detaching after fork from child process 17742.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
Detaching after fork from child process 17744.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
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
Detaching after fork from child process 17746.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
CONF: mapping driver = 'auto'
debug flags: +9a
CONF: Disabling use of pentium timer
CONF: dosbanner on
CONF: timer freq=18, update=54925
CONF: CPU set to 586
CONF: 2048k bytes EMS memory
CONF: EMS-frame = 0xe400
CONF: DPMI-Server on (0x5000)
CONF: DPMI base addr = 0xffffffff
CONF: PM DOS API Translator on
CONF: No DJGPP NULL deref checks: off
CONF: dosemu running on _xterm
CONF: time mode = 'bios'
SER: directory /var/lock namestub LCK.. binary No
MOUSE: no device specified, type 0 using internaldriver: yes, emulate3buttons:
no baudrate: 0
CONF: Keyboard-layout keyb-user
Detaching after fork from child process 17748.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
CONF: **** Warning: floppy /dev/fd0 not accessable, disabled
CONF: fastfloppy = 1
CONF: IPX support off
CONF(LPT0) f: (null)   c: lpr -l  t: 20  port: 0
CONF(LPT1) f: (null)   c: lpr -l -P lpt2  t: 20  port: 0
CONF: not allowing speaker port access
CONF: Packet Driver enabled.
Detaching after fork from child process 17750.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
Detaching after fork from child process 17752.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
Detaching after fork from child process 17754.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
Detaching after fork from child process 17756.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
device: /home/hanzlik/.dosemu/drives/c type 4 h: -1  s: -1   t: -1 drive C:
Detaching after fork from child process 17758.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
Detaching after fork from child process 17760.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
Detaching after fork from child process 17762.
priv.c: priv.drop: uid=500, gid=500.
priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
device: /home/hanzlik/.dosemu/drives/d type 4 h: -1  s: -1   t: -1 drive D:
CONF: cdrom MSCD0001 on /dev/cdrom
CONF: config variable c_system unset
debug flags: +9a
Linux kernel 2.6.35; CPU speed is 800000000 Hz
CONF: mostly running as USER: uid=500 (cached 500) gid=500 (cached 500)
U: charset->unicode charset:cp437 00 -> symbol:0020...1
U: charset->unicode charset:cp437 7f -> symbol:2302...1
video_mem_charset=cp437
keyb_config_charset=terminal_cp437
output_charset=default
keyb_charset=default
dos_charset=cp437
dumping the current runtime configuration:
Version: dosemu-1.4.0.1 versioncode = 0x01040001

Running Kernel Version: linux-2.6.35
cpu 586
realcpu 586
CPUclock 800 MHz
cpu_spd 0x51eb85
cpu_tick_spd 0x61bed7
pci 0
rdtsc 0
mathco 1
smp 0
cpuspeed 800
mappingdriver auto
hdiskboot 1
mem_size 640
ext_mem 8192
ems_size 0x800
ems_frame 0xe400
xms_size 0x0
max_umb 0x0
dpmi 0x5000
dpmi_base 0xffffffff
pm_dos_api 1
ignore_djgpp_null_derefs 0
mapped_bios 0
vbios_file
vbios_copy 0
vbios_seg 0xc000
vbios_size 0x10000
console_keyb 0
console_video 0
kbd_tty 0
exitearly 0
fdisks 0
hdisks 2
bootdisk 0
term_esc_char 0x1e
term_color 1
term_updatefreq 4
X_updatelines 0
X_updatefreq 0
xterm_title
X_display ""
X_title "(null)"
X_icon_name "(null)"
X_title_show_appname 0
X_blinkrate 0
X_sharecmap 0
X_mitshm 0
X_fixed_aspect 0
X_aspect_43 0
X_lin_filt 0
X_bilin_filt 0
X_mode13fact 0
X_winsize_x 0
X_winsize_y 0
X_gamma 0
X_fullscreen 0
vgaemu_memsize 0x0
vesamode_list (nil)
X_lfb 0
X_pm_interface 0
X_keycode 0
X_font "(null)"
X_mgrab_key "(null)"
X_background_pause 0
config.X 0
hogthreshold 1
chipset "plainvga"
cardtype "VGA"
pci_video 1
fullrestore 0
gfxmemsize 256
vga 0
dualmon 0
force_vt_switch 0
speaker "emulated"
update 54925
freq 18
tty_lockdir "/var/lock"
tty_lockfile "LCK.."
config.tty_lockbinary 0
num_ser 0
num_lpt 2
fastfloppy 1
full_file_locks 0
emusys ""
emuini ""
dosbanner 1
vbios_post 0
detach 0
debugout ""
debug_flags "9#9A9C9D9E9I9M9P9Q9R9S9T9W9X9Z9a9c9d9g9h9i9j9k9m9n9p9q9r9s9u9v9w9x"
keytable not setup yet
pre_stroke ""
irqpassing= none
hardware_ram: no
ipxsup 0
vnet 2
pktflags 0x0
LPT1 command "lpr -l"  timeout 20  device ""  baseport 0x378
LPT2 command "lpr -l -P lpt2"  timeout 20  device ""  baseport 0x278
feature_0 0
feature_1 0
feature_2 0
feature_3 0
feature_4 0
feature_5 0
feature_6 0
feature_7 0
feature_8 0
feature_9 0
feature_10 0
feature_11 0
feature_12 0
feature_13 0
feature_14 0
feature_15 0

SOUND:
engine 1
sb_base 0x220
sb_dma 1
sb_hdma 5
sb_irq 5
mpu401_base 0x330
sb_dsp "/dev/dsp"
sb_mixer ""
sound_driver "oss"

SOUND_OSS:
oss_min_frags 0x4
oss_max_frags 0x20
oss_stalled_frags 0x2
oss_do_post 0
oss_min_extra_frags 0x2
oss_dac_freq 6000

cli_timeout 10

pic_watchdog 50

JOYSTICK:
joy_device0 "/dev/js0"
joy_device1 "/dev/js1"
joy_dos_min 1
joy_dos_max 150
joy_granularity 1
joy_latency 1
TIMER: using new gettimeofday with microsecond resolution
DBG_FD already set
DOSEMU-1.4.0.1 is coming up on Linux version 2.6.35.9-64.fc14.i686.PAE #1 SMP
Fri Dec 3 12:28:00 UTC 2010 i686
Compiled with GCC version 4.5.1 -m32
CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K))
CONF: reserving 48Kb at 0xF4000 for 'r' (Dosemu reserved area)
PIC: cnt lvl pic_isr  pic_imr  pic_irr (column headers)
PIC:   0 --1 00000000 0000fff8 00000000 pic_itime[1]= 00
PIC:   0  -1 00000000 0000fff8 00000000 pic_sys_time set to 107
PIC:   0  -1 00000000 0000fff8 00000000 Activate ++ dos time to 107
PIC:   0  -1 00000000 0000fff8 00000000 pic_sys_time is 107
PORT: registered "Math Coprocessor" handle 0x06 [0x00f0-0x00ff] fd=-1
INT21: rv_all: 1 + 0 = 1
PORT: registered "8254 Timer0" handle 0x07 [0x0040-0x0040] fd=-1
PORT: registered "8254 Timer1" handle 0x08 [0x0041-0x0041] fd=-1
PORT: registered "8254 Timer2" handle 0x09 [0x0042-0x0042] fd=-1
PORT: registered "8254 Ctrl02" handle 0x0a [0x0043-0x0043] fd=-1
PIC:   0  -1 00000000 0000fff8 00000000 Requested irq lvl 01 successfully
PIC:   0  -1 00000000 0000fff8 00000002 Zeroing vm86, DPMI from 00, k0
VID: Video set to Video_term
VID: config.dualmon=0
SCREEN saves at: 0x8637b00 of 65280 size
CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory)
PORT: registered "8042 Keyboard data" handle 0x0b [0x0060-0x0060] fd=-1
PORT: registered "8042 Keyboard command" handle 0x0c [0x0064-0x0064] fd=-1
PORT: registered "Keyboard controller port B" handle 0x0d [0x0061-0x0061] fd=-1
mapfile.c:open_mapping_f  mpool (min 4160K) is 8256 Kbytes at
0xb75d3000-0xb7de2fff
MAPPING: using the Posix SHM mapping driver
DOS+HMA memory area being mapped in
MAPPING: alloc, cap= INIT_LOWRAM, source=0
MAPPING: alloc, cap= INIT_LOWRAM, mapsize=110000
mapping.c:mprotect_mapping: cap=512, addr=0xb75d3000, size=110000, protect=0x3.
mapping.c:mprotect_mapping:po mprotect: ij=0.
mapping.c: alloc_mapping: LOWRAM_INIT, cap= INIT_LOWRAM, base=0xb75d3000
mapping.c: alias_mapping, cap= INIT_LOWRAM, target=(nil), size=110000,
protect=7, source=0xb75d3000
mapfile.c: alias_mapping_file target=(nil), mapsize=110000, protect=0x7,
fixed=0x10, fd=8, offs=0.
mapfile.c: alias_mapping_file pred return, fileoffs 0 to (nil) size 110000,
result (nil)
init.c:low_mem_init: po alloc_mapping result=(nil).
init.c:low_mem_init: pred mprotect_mapping: result=(nil), config.mem_size=280.
mapping.c:mprotect_mapping: cap=131072, addr=(nil), size=a0000, protect=0x0.
mapping.c:mprotect_mapping:po mprotect: ij=0.
init.c:low_mem_init: po mprotect_mapping+return : result=(nil),
config.mem_size=280.
emu.c: pred priv_drop:
priv.c: priv.drop: uid=500, gid=500.

Program received signal SIGSEGV, Segmentation fault.
_dl_lookup_symbol_x (undef_name=0x804abb3 "setreuid", undef_map=0x123900,
ref=0xbffef4d0, symbol_scope=0x123ab8, version=0xb7fe5438, type_class=1, flags=1,
    skip_map=0x0) at dl-lookup.c:713
713	{
(gdb) bt
#0  _dl_lookup_symbol_x (undef_name=0x804abb3 "setreuid", undef_map=0x123900,
ref=0xbffef4d0, symbol_scope=0x123ab8, version=0xb7fe5438, type_class=1,
    flags=1, skip_map=0x0) at dl-lookup.c:713
#1  0x00110c98 in _dl_fixup (l=<value optimized out>, reloc_arg=<value
optimized out>) at dl-runtime.c:118
#2  0x001174f0 in _dl_runtime_resolve () at ../sysdeps/i386/dl-trampoline.S:37
#3  0x080886f7 in priv_drop () at priv.c:187
#4  0x0804e616 in main (argc=4, argv=0xbffff5f4) at emu.c:404
(gdb)



On PC where dosemu works, debug output continues as:

priv.c: priv.drop return: skip_priv_setting=1, can_do_root_stuff=0.
emu.c: pred map_hardware_ram:
Mapping VBIOS = 0
Entering HMA_MAP with HMA=0
MAPPING: unmap, cap= HMA, addr=0x100000, size=10000
HMA: detached at 0x100000
mapping.c:mmap_mapping: map, cap= HMA, target=0x100000, mapsize=10000,
protect=7, source=0
mapfile.c: alias_mapping_file target=0x100000, mapsize=10000, protect=0x7,
fixed=0x10, fd=8, offs=0.
...

DOSEMU was configured as:
 ./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --program
prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc/dosemu
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib
 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib
--mandir=/usr/share/man --infodir=/usr/share/info
 --with-fdtarball=/home/hanzlik/src/rpm/SOURCES/dosemu-freedos-1.0-bin.tgz
--disable-dlplugins --with-svgalib --target=i686 --with-gpm
 --enable-debug --with-alsa --with-sndfile --with-x --with-slang
--with-target-cpu=i686 --disable-cpuemu --disable-aspi



Has someone any idea?
What should I tried here?

Thanks in advance,
Franta HanzlÃk
--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux