From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frantisek Hanzlik Subject: same distro, svn1999 DOSEMU crashes on some PCs on SEGV, on others run fine Date: Mon, 13 Dec 2010 22:28:16 +0100 Message-ID: <4D068FF0.1040009@hanzlici.cz> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-msdos-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="macroman" To: DOSEMU/FreeDOS Hello all DOSEMU gurus, I encounter weird problem with DOSEMU when trying run it on Fedora 14 i= 386 - althougt machines are roughly same (HW: P4+/2-4GB RAM/max 3 years old, = SW: =46edora 14 i686 up-to-date), on some (6 of these i tried) PCs dosemu s= eems work fine, on others (i found 5 pieces) dosemu crashes on SIGSEGV shortly af= ter 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 d= osemu run in vm86 mode ($_cpu_emu =3D "off", and vm.mmap_min_addr =3D 0). I tried built dosemu both with dynamically loaded plugins and without t= hem, dosemu behavior not changed. After i add some debug messages to several= dosemu modules, dosemu on those five machines crashes in slightly different po= int, 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 i= ts 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 o= utput (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 This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copyi= ng" and "show warranty" for details. This GDB was configured as "i686-redhat-linux-gnu". =46or bug reporting instructions, please see: ... 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 =3D 136 minor =3D 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=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. Detaching after fork from child process 17740. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. Detaching after fork from child process 17742. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. Detaching after fork from child process 17744. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. 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=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. CONF: mapping driver =3D 'auto' debug flags: +9a CONF: Disabling use of pentium timer CONF: dosbanner on CONF: timer freq=3D18, update=3D54925 CONF: CPU set to 586 CONF: 2048k bytes EMS memory CONF: EMS-frame =3D 0xe400 CONF: DPMI-Server on (0x5000) CONF: DPMI base addr =3D 0xffffffff CONF: PM DOS API Translator on CONF: No DJGPP NULL deref checks: off CONF: dosemu running on _xterm CONF: time mode =3D 'bios' SER: directory /var/lock namestub LCK.. binary No MOUSE: no device specified, type 0 using internaldriver: yes, emulate3b= uttons: no baudrate: 0 CONF: Keyboard-layout keyb-user Detaching after fork from child process 17748. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. CONF: **** Warning: floppy /dev/fd0 not accessable, disabled CONF: fastfloppy =3D 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=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. Detaching after fork from child process 17752. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. Detaching after fork from child process 17754. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. Detaching after fork from child process 17756. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. device: /home/hanzlik/.dosemu/drives/c type 4 h: -1 s: -1 t: -1 driv= e C: Detaching after fork from child process 17758. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. Detaching after fork from child process 17760. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. Detaching after fork from child process 17762. priv.c: priv.drop: uid=3D500, gid=3D500. priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. device: /home/hanzlik/.dosemu/drives/d type 4 h: -1 s: -1 t: -1 driv= e 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=3D500 (cached 500) gid=3D500 (cached = 500) U: charset->unicode charset:cp437 00 -> symbol:0020...1 U: charset->unicode charset:cp437 7f -> symbol:2302...1 video_mem_charset=3Dcp437 keyb_config_charset=3Dterminal_cp437 output_charset=3Ddefault keyb_charset=3Ddefault dos_charset=3Dcp437 dumping the current runtime configuration: Version: dosemu-1.4.0.1 versioncode =3D 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#9A9C9D9E9I9M9P9Q9R9S9T9W9X9Z9a9c9d9g9h9i9j9k9m9n9p9q9r9s= 9u9v9w9x" keytable not setup yet pre_stroke "" irqpassing=3D 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 =46ri 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]=3D 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=3D-1 INT21: rv_all: 1 + 0 =3D 1 PORT: registered "8254 Timer0" handle 0x07 [0x0040-0x0040] fd=3D-1 PORT: registered "8254 Timer1" handle 0x08 [0x0041-0x0041] fd=3D-1 PORT: registered "8254 Timer2" handle 0x09 [0x0042-0x0042] fd=3D-1 PORT: registered "8254 Ctrl02" handle 0x0a [0x0043-0x0043] fd=3D-1 PIC: 0 -1 00000000 0000fff8 00000000 Requested irq lvl 01 successful= ly PIC: 0 -1 00000000 0000fff8 00000002 Zeroing vm86, DPMI from 00, k0 VID: Video set to Video_term VID: config.dualmon=3D0 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=3D= -1 PORT: registered "8042 Keyboard command" handle 0x0c [0x0064-0x0064] fd= =3D-1 PORT: registered "Keyboard controller port B" handle 0x0d [0x0061-0x006= 1] fd=3D-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=3D INIT_LOWRAM, source=3D0 MAPPING: alloc, cap=3D INIT_LOWRAM, mapsize=3D110000 mapping.c:mprotect_mapping: cap=3D512, addr=3D0xb75d3000, size=3D110000= , protect=3D0x3. mapping.c:mprotect_mapping:po mprotect: ij=3D0. mapping.c: alloc_mapping: LOWRAM_INIT, cap=3D INIT_LOWRAM, base=3D0xb75= d3000 mapping.c: alias_mapping, cap=3D INIT_LOWRAM, target=3D(nil), size=3D11= 0000, protect=3D7, source=3D0xb75d3000 mapfile.c: alias_mapping_file target=3D(nil), mapsize=3D110000, protect= =3D0x7, fixed=3D0x10, fd=3D8, offs=3D0. mapfile.c: alias_mapping_file pred return, fileoffs 0 to (nil) size 110= 000, result (nil) init.c:low_mem_init: po alloc_mapping result=3D(nil). init.c:low_mem_init: pred mprotect_mapping: result=3D(nil), config.mem_= size=3D280. mapping.c:mprotect_mapping: cap=3D131072, addr=3D(nil), size=3Da0000, p= rotect=3D0x0. mapping.c:mprotect_mapping:po mprotect: ij=3D0. init.c:low_mem_init: po mprotect_mapping+return : result=3D(nil), config.mem_size=3D280. emu.c: pred priv_drop: priv.c: priv.drop: uid=3D500, gid=3D500. Program received signal SIGSEGV, Segmentation fault. _dl_lookup_symbol_x (undef_name=3D0x804abb3 "setreuid", undef_map=3D0x1= 23900, ref=3D0xbffef4d0, symbol_scope=3D0x123ab8, version=3D0xb7fe5438, type_c= lass=3D1, flags=3D1, skip_map=3D0x0) at dl-lookup.c:713 713 { (gdb) bt #0 _dl_lookup_symbol_x (undef_name=3D0x804abb3 "setreuid", undef_map=3D= 0x123900, ref=3D0xbffef4d0, symbol_scope=3D0x123ab8, version=3D0xb7fe5438, type_c= lass=3D1, flags=3D1, skip_map=3D0x0) at dl-lookup.c:713 #1 0x00110c98 in _dl_fixup (l=3D, reloc_arg=3D) at dl-runtime.c:118 #2 0x001174f0 in _dl_runtime_resolve () at ../sysdeps/i386/dl-trampoli= ne.S:37 #3 0x080886f7 in priv_drop () at priv.c:187 #4 0x0804e616 in main (argc=3D4, argv=3D0xbffff5f4) at emu.c:404 (gdb) On PC where dosemu works, debug output continues as: priv.c: priv.drop return: skip_priv_setting=3D1, can_do_root_stuff=3D0. emu.c: pred map_hardware_ram: Mapping VBIOS =3D 0 Entering HMA_MAP with HMA=3D0 MAPPING: unmap, cap=3D HMA, addr=3D0x100000, size=3D10000 HMA: detached at 0x100000 mapping.c:mmap_mapping: map, cap=3D HMA, target=3D0x100000, mapsize=3D1= 0000, protect=3D7, source=3D0 mapfile.c: alias_mapping_file target=3D0x100000, mapsize=3D10000, prote= ct=3D0x7, fixed=3D0x10, fd=3D8, offs=3D0. =2E.. DOSEMU was configured as: ./configure --build=3Di686-pc-linux-gnu --host=3Di686-pc-linux-gnu --p= rogram prefix=3D --disable-dependency-tracking --prefix=3D/usr --exec-prefix=3D= /usr --bindir=3D/usr/bin --sbindir=3D/usr/sbin --sysconfdir=3D/etc/dosemu --datadir=3D/usr/share --includedir=3D/usr/include --libdir=3D/usr/lib --libexecdir=3D/usr/libexec --localstatedir=3D/var --sharedstatedir=3D= /var/lib --mandir=3D/usr/share/man --infodir=3D/usr/share/info --with-fdtarball=3D/home/hanzlik/src/rpm/SOURCES/dosemu-freedos-1.0-bi= n.tgz --disable-dlplugins --with-svgalib --target=3Di686 --with-gpm --enable-debug --with-alsa --with-sndfile --with-x --with-slang --with-target-cpu=3Di686 --disable-cpuemu --disable-aspi Has someone any idea? What should I tried here? Thanks in advance, =46ranta Hanzl=C3=ADk -- To unsubscribe from this list: send the line "unsubscribe linux-msdos" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html