Skip to contentSkip to conversation

Problem with dosemu

DISCUSSION jankomEarthlink 3 participants 18 messages Mar 26, 2014 – May 5, 2014 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Thank you both for your interest in helping me.

This is an old Fedora-3 installation that I have mangled up and use it as a sandbox to learn the inner workings of linux. I have managed to compile the programs I need and while doing so I learned a lot. Now the specifics:

2.6.20 kernel on i686, AMD machine with nvidia graphics.

When I did ./configure it went OK, no warnings or errors. Compiled also without problem. It is a challange for me to figure out, with some help, why it is not booting up into the virtual dos window.

By the way, "dos" is also and old thing, but I still have some favorite applications (not games) that I would like to use from within my linux.

I do have a modern installation as well, xubuntu 12.04, kept current. There I use dosbox installed the easy way, directly from distro.

This is my story...

#1 lore raw
Quoted 12 lines · jankomEarthlink

Thank you both for your interest in helping me.

This is an old Fedora-3 installation that I have mangled up and use it as a sandbox to learn the inner workings of linux. I have managed to compile the programs I need and while doing so I learned a lot. Now the specifics:

2.6.20 kernel on i686, AMD machine with nvidia graphics.

When I did ./configure it went OK, no warnings or errors. Compiled also without problem. It is a challange for me to figure out, with some help, why it is not booting up into the virtual dos window.

Quoted 7 lines

By the way, "dos" is also and old thing, but I still have some favorite applications (not games) that I would like to use from within my linux.

I do have a modern installation as well, xubuntu 12.04, kept current. There I use dosbox installed the easy way, directly from distro.

This is my story...

Hello Janos, I tried (after years :) run again my FC3/i386 distro and found there dosemu-1.2.2 RPM package, which I build at that time. You can download if at:
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.2.2-1.i386.rpm

Unfortunately I have no dosemu-1.2.2 source RPM.

I further tried to build under FC3 some newer dosemu version, and successfuly compile dosemu-1.3.2 (from ~ Fedora 5 times) and dosemu-1.4.0.1 (from ~ Fedora 11 times). Compiling newer versions fails on dosemu commands (in i86 assembler) build, and as I'm bad programmer, no know how solve this.
Both these versions You can download from my web at
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/
(along with their source RPMs)

HTH, Franta Hanzlík

--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi Frantisek,

Thanks for your help.

(1) I'm almost there. Your rpm 1.2.2-1 did install, and it did go through initial steps, got to a black screen, but no prompt and the CPU is system loaded 100%. I had to kill xterm to stop it. But this may be due to lingering dosemu installations from my compiled 1.4 version, so I'll do some cleanup later.

(2) Do I understand correctly that you say compiled 1.4 on i386 (or for that matter i586, i.e. any 32 bit PC processors) does not work? It did not work for me, as indicated in the original posting: compile OK, but dosemu command starts nothing. At least I could stop it with Ctr-C.

One step at the time...

Janos

Quoted 36 lines · Frantisek Hanzlik
Quoted 12 lines · jankomEarthlink

Thank you both for your interest in helping me.

This is an old Fedora-3 installation that I have mangled up and use it as a sandbox to learn the inner workings of linux. I have managed to compile the programs I need and while doing so I learned a lot. Now the specifics:

2.6.20 kernel on i686, AMD machine with nvidia graphics.

When I did ./configure it went OK, no warnings or errors. Compiled also without problem. It is a challange for me to figure out, with some help, why it is not booting up into the virtual dos window.

Quoted 7 lines

By the way, "dos" is also and old thing, but I still have some favorite applications (not games) that I would like to use from within my linux.

I do have a modern installation as well, xubuntu 12.04, kept current. There I use dosbox installed the easy way, directly from distro.

This is my story...

Hello Janos, I tried (after years :) run again my FC3/i386 distro and found there dosemu-1.2.2 RPM package, which I build at that time. You can download if at:
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.2.2-1.i386.rpm

Unfortunately I have no dosemu-1.2.2 source RPM.

I further tried to build under FC3 some newer dosemu version, and successfuly compile dosemu-1.3.2 (from ~ Fedora 5 times) and dosemu-1.4.0.1 (from ~ Fedora 11 times). Compiling newer versions fails on dosemu commands (in i86 assembler) build, and as I'm bad programmer, no know how solve this.
Both these versions You can download from my web at
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/
(along with their source RPMs)

Quoted 4 lines

HTH, Franta Hanzlík

--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 10 lines · jankomEarthlink

Hi Frantisek,

Thanks for your help.

(1) I'm almost there. Your rpm 1.2.2-1 did install, and it did go through initial steps, got to a black screen, but no prompt and the CPU is system loaded 100%. I had to kill xterm to stop it. But this may be due to lingering dosemu installations from my compiled 1.4 version, so I'll do some cleanup later.

Quoted 8 lines

(2) Do I understand correctly that you say compiled 1.4 on i386 (or for that matter i586, i.e. any 32 bit PC processors) does not work? It did not work for me, as indicated in the original posting: compile OK, but dosemu command starts nothing. At least I could stop it with Ctr-C.

One step at the time...

Janos

1) I tried 1.2.2 under both, X and console, and it seems working well, without any significant CPU load (perhaps only case when I saw 100% CPU load with dosemu was screensaver from some DOS program. In other cases CPU load was always less thas ~ 10-20% per core).

2) I was able compile and build dosemu-1.4.0.1 (well, as there was wery little official dosemu releases, I maybe made our own numbering ;) and this version work for me at Fedora 3, both in X and console. There is difference betveen dosemu 1.2.x and 1.4.x: 1.2 had disk C: etc. in ~/dosemu/, while 1.4 has all in ~/.dosemu/ (and disk C: is in ~/.dosemu/drive_c/ subdir). 1.4 further maps (via lredir) DOS binaries and dosemu commands to drive Z: (which is /usr/share/dosemu/drive_z/ ). Due to this difference, it is perhaps best start with deleted/renamed ~/.dosemu/ and ~/dosemu/ dirs, or with new user account.
If you want to use my 1.4.0.1 version, You maybe have to install svgalib package - it can be downloaded from my web too.

This dosemu-1.4.0.1 is from Fedora 11 era, thus it is cca 4 years old. And although there was not any official releases since this, dosemu was significantly evolved by Bart, Stas and others - but as I wrote, I was not able compile this actual development version (market as 1.4.0.8+, IMO) at Fedora 3 (although at Fedora 19 it compile fine
- perhaps it is because too different gcc versions - 3.4/FC3
vs. 4.8/FC19).

Quoted 37 lines · Frantisek Hanzlik
Quoted 36 lines
Quoted 12 lines · jankomEarthlink

Thank you both for your interest in helping me.

This is an old Fedora-3 installation that I have mangled up and use it as a sandbox to learn the inner workings of linux. I have managed to compile the programs I need and while doing so I learned a lot. Now the specifics:

2.6.20 kernel on i686, AMD machine with nvidia graphics.

When I did ./configure it went OK, no warnings or errors. Compiled also without problem. It is a challange for me to figure out, with some help, why it is not booting up into the virtual dos window.

Quoted 7 lines

By the way, "dos" is also and old thing, but I still have some favorite applications (not games) that I would like to use from within my linux.

I do have a modern installation as well, xubuntu 12.04, kept current. There I use dosbox installed the easy way, directly from distro.

This is my story...

Hello Janos, I tried (after years :) run again my FC3/i386 distro and found there dosemu-1.2.2 RPM package, which I build at that time. You can download if at:
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.2.2-1.i386.rpm

Unfortunately I have no dosemu-1.2.2 source RPM.

I further tried to build under FC3 some newer dosemu version, and successfuly compile dosemu-1.3.2 (from ~ Fedora 5 times) and dosemu-1.4.0.1 (from ~ Fedora 11 times). Compiling newer versions fails on dosemu commands (in i86 assembler) build, and as I'm bad programmer, no know how solve this.
Both these versions You can download from my web at
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/
(along with their source RPMs)

Quoted 1 line
Quoted 1 line

HTH, Franta Hanzlík

--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Hi Frantisek,

This is an update.

No progress. Dosemu is not working.

Your rpm loads, dosemu command produces a black screen with a white block cursor and no prompt. It is unresponsive.

Compiled 1.4 produces white screen and no prompt It is unresponsive, Ctr-C will stop it and brings me back to bash prompt.

No error messages in either case. Please note that I installed rpm to a clean system, i.e. no dosemu files or directories. Also, before compiling 1.4 I uninstalled rpm and cleaned out dosemu files and dierctories, so again, started with a clean system.

I saw nothing in log files, so I don't know how to proceed and find out what is going on. I checked processes running on the 1.4 installation: ps before and whiledosemu was running. See below:

[apu@Andraslinux ~]$ su -c "ps -e > psb4dosemu.txt" Password:
[apu@Andraslinux ~]$ dosemu &
[1] 27554
[apu@Andraslinux ~]$ su -c "ps -e > psWdosemu.txt" Password:
[apu@Andraslinux ~]$ kill 27554 [apu@Andraslinux ~]$ diff psb4dosemu.txt psWdosemu.txt 67,68d66
< 27410 ? 00:00:00 kio_http
< 27412 ? 00:00:00 kio_http
71,73c69,72

< 27532 pts/1    00:00:00 su
< 27537 pts/1    00:00:00 bash
< 27538 pts/1    00:00:00 ps

---

Quoted 4 lines
27554 pts/1    00:00:24 dosemu.bin
27577 pts/1    00:00:00 su
27584 pts/1    00:00:00 bash
27585 pts/1    00:00:00 ps

[1]+ Terminated dosemu
[apu@Andraslinux ~]$

Note: I can run dosbox through ssh from another linux installation. I would like to run dosemu from my own system.

Can you or anybody else help to debug the situation?

Thanks,

Janos

#5 lore raw
Quoted 42 lines · jankomEarthlink

Hi Frantisek,

This is an update.

No progress. Dosemu is not working.

Your rpm loads, dosemu command produces a black screen with a white block cursor and no prompt. It is unresponsive.

Compiled 1.4 produces white screen and no prompt It is unresponsive, Ctr-C will stop it and brings me back to bash prompt.

No error messages in either case. Please note that I installed rpm to a clean system, i.e. no dosemu files or directories. Also, before compiling 1.4 I uninstalled rpm and cleaned out dosemu files and dierctories, so again, started with a clean system.

I saw nothing in log files, so I don't know how to proceed and find out what is going on. I checked processes running on the 1.4 installation: ps before and whiledosemu was running. See below:

[apu@Andraslinux ~]$ su -c "ps -e > psb4dosemu.txt" Password:
[apu@Andraslinux ~]$ dosemu &
[1] 27554
[apu@Andraslinux ~]$ su -c "ps -e > psWdosemu.txt" Password:
[apu@Andraslinux ~]$ kill 27554 [apu@Andraslinux ~]$ diff psb4dosemu.txt psWdosemu.txt 67,68d66
< 27410 ? 00:00:00 kio_http
< 27412 ? 00:00:00 kio_http
71,73c69,72

< 27532 pts/1    00:00:00 su
< 27537 pts/1    00:00:00 bash
< 27538 pts/1    00:00:00 ps

---

Quoted 4 lines
27554 pts/1    00:00:24 dosemu.bin
27577 pts/1    00:00:00 su
27584 pts/1    00:00:00 bash
27585 pts/1    00:00:00 ps
Quoted 5 lines

[1]+ Terminated dosemu
[apu@Andraslinux ~]$

Note: I can run dosbox through ssh from another linux installation. I would like to run dosemu from my own system.

Hi Janos,

dosemu has log in user home directory, '~/.dosemu/boot.log' - is there anything? In '/etc/dosemu/dosemu.conf' You can raise debug level, symbols for particular sybsystems are (for 1.4.x, but for lower versions it will be similar):

'A' ASPI                    'i' i/o instructions (in/out) 'r' PIC request
'a' Set all levels          'I' IPC                       's' serial
'C' CDROM                   'j' joystick                  'S' SOUND
'c' configuration           'k' keyboard                  't' dpmi trace
'd' disk msgs               'M' DPMI                      'T' I/O trace
'D' dos int 21h             'm' mouse                     'v' video
'#' default int             'n' IPX network               'W' disk WRITE
'e' cpu-emu                 'P' Packet driver             'w' warnings
'E' EMS                     'p' printer                   'x' XMS
'g' general messages        'Q' Mapping driver            'X' X support
'h' hardware                'R' disk READ                 'Z' PCI

You are trying run dosemu under console, right? I not sure when is possible run dosemu in background, as You indicate above. At least first dosemu start should be run in foreground, because dosemu shell script (wrapper around 'dosemu.bin', emulator binary) will ask You about several things (freedos installation etc.).
You have completed this dialog?

Can You try run xdosemu under X Window? It should run fine too.

You write that you did clean install - did You remove stuff in user home directory as well ('~/.dosemu/*' and eventually '~/dosemu/*', including ~/.dosemu and ~/dosemu directories itself)?

You mean to tell that no one dosemu version (1.2.2 nor 1.4.0.1) works, and both have same behavior, as You described above?

What is your terminal screen resolution? You are using Linux Kernel Mode Setting (KMS) to set display mode? What is 'stty -a' output?

Did You install dosemu package with command 'rpm -U dosemu-x.y-z.rpm' or 'rpm -i dosemu-x.y-z.rpm'? Produce this command some error output? And did You install it as root?

Franta Hanzlik

#6 lore raw

Hi Franta,

Thanks for the quick reply.

See below my answers and comments:

Quoted 2 lines · Frantisek Hanzlik

Hi Janos, dosemu has log in user home directory, '~/.dosemu/boot.log'
- is there anything?

Thanks, this section may show something
...
CONF: reserving 64Kb at 0xE0000 for 'E' (EMS page frame)
ERROR: cpu exception in dosemu code outside of VM86()!
trapno: 0x0e errorcode: 0x00000004 cr2: 0x0419eab7
eip: 0x001135a0 esp: 0xbfdb8db4 eflags: 0x00210282
cs: 0x0073 ds: 0x007b es: 0x007b ss: 0x007b
ERROR: Fault handler re-entered! signal=11 _trapno=0xE leavedos(1|0x1) called - shutting down
leavedos() called from within a signal context!
ERROR: leavedos called recursively, forgetting the graceful exit!

I seem to remember that a few years back, the time when FC-3 was the new thing, I installed dosemu and it never worked. But I could be wrong.

Quoted 2 lines

You are trying run dosemu under console, right? I not sure when is
possible run dosemu in background, as You indicate above. At least first dosemu start should be run in foreground, because dosemu shell script (wrapper around 'dosemu.bin', emulator binary) will ask You about several things (freedos installation etc.). You have completed this dialog? Can You try run xdosemu under X Window? It should run fine too.

Actually, I did the install while in X environment, from xterm. Indeed, it ran through the initial install steps (creating directory, agreeing to license terms, etc. This happened both if I started dosemu from root or from my home directory. By the way, xdosemu is just a symlink to dosemu in my installation. I also tried it from console (Ctr_Alt_f1), but same thing happened, and I could even not get out of it, I had to open another tty to reboot. As far as foreground or background are concerned I initially ran it in foreground and did the dosemu & only to show you what was on my screen.

Quoted 1 line

You write that you did clean install - did You remove stuff in user home directory as well ('~/.dosemu/*' and eventually '~/dosemu/*', including ~/.dosemu and ~/dosemu directories itself)?

Yes, absolutely clean, even the man files were deleted. I first ran rpm -e ...., but it left some lingering files, empty directories. So I did a find (using kfind) to make sure nothing was left behind.

Quoted 1 line

You mean to tell that no one dosemu version (1.2.2 nor 1.4.0.1) works, and both have same behavior, as You described above?

Actually, the behavior is a little different. rpm 1.2 install does lead me through the install steps, and opens up the black screen, but I had to kill the process. Compiled 1.4 does not go through the script, it presents me with a blank xterm screen, and I can simply get back to command prompt with Ctr-c.

Quoted 1 line

What is your terminal screen resolution? You are using Linux Kernel Mode Setting (KMS) to set display mode? What is 'stty -a' output?

[apu@Andraslinux ~]$ stty -a
speed 38400 baud; rows 30; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

Quoted 1 line

Did You install dosemu package with command 'rpm -U dosemu-x.y-z.rpm' or 'rpm -i dosemu-x.y-z.rpm'? Produce this command some error output? And did You install it as root?

I used rpm -ivh command, but after your answer I cleaned it up again (rpm -e) and did the rpm -U. Installation was always quick and flawless. Yes, I did it from my home directory, xterm, but after issuing su command. So the installation was with root privileges.

I'll do now another clean up, the compile 1.2 source, see if it makes a difference, i.e. 1.2 from source instead of 1.4 from source.

We'll get to the bottom of this, I'm sure.

Janos

#7 lore raw
Quoted 21 lines · jankomEarthlink

Hi Franta,

Thanks for the quick reply.

See below my answers and comments:

Quoted 2 lines · Frantisek Hanzlik

Hi Janos, dosemu has log in user home directory, '~/.dosemu/boot.log' - is there anything?

Thanks, this section may show something
...
CONF: reserving 64Kb at 0xE0000 for 'E' (EMS page frame)
ERROR: cpu exception in dosemu code outside of VM86()!
trapno: 0x0e errorcode: 0x00000004 cr2: 0x0419eab7
eip: 0x001135a0 esp: 0xbfdb8db4 eflags: 0x00210282
cs: 0x0073 ds: 0x007b es: 0x007b ss: 0x007b
ERROR: Fault handler re-entered! signal=11 _trapno=0xE leavedos(1|0x1) called - shutting down
leavedos() called from within a signal context!
ERROR: leavedos called recursively, forgetting the graceful exit!

Quoted 3 lines

I seem to remember that a few years back, the time when FC-3 was the new thing, I installed dosemu and it never worked. But I could be wrong.
...

Hi Janos,

this reminded me of something similar that I have met cca three years ago. You can try to find my thread "same distro, svn1999 DOSEMU crashes on some PCs on SEGV, on others run fine" from 12/13/2010 in dosemu-users list - this was on Fedora 14, but this may be same problem which you see now on Fedora 3.

But something better - I managed to compile almost last dosemu devel version on Fedora 3 i686, and this work well at me machine, both in console and under X (also both in terminal mode 'dosemu -t' and with native X (xdosemu).
Because there was lots things corrected and improved, maybe it will run on Your system too. There is only one particularity:
after installing RPM and first dosemu run must be copied kernel.sys to C:\ drive:

cp /usr/share/dosemu/drive_z/kernel.sys ~/.dosemu/drives/c/

You can download RPM and SRPM package at:
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git621.g431face.3.dbgemu.fc3.i686.rpm
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git621.g431face.3.dbgemu.fc3.src.rpm

Good luck, Franta Hanzlik

#8 lore raw

Thank you, Franta, for getting back to this problem. In the meantime I ran strace and googled the issue and saw some bug reports on this segmentation fault. Here is the last part of the strace listing. (Btw., I'll try your rpm tomorrow, it is getting late here, and I have to clean up my system again before I install your rpm, and will let you know if it worked).

[apu@Andraslinux ~]$ strace dosemu
...
write(3, "PKT: Cannot open raw sockets: Pe"..., 48) = 48
statfs("/dev/shm/", {f_type=0x1021994, f_bsize=4096, f_blocks=129447, f_bfree=129447, f_bavail=129447, f_files=129447, f_ffree=129446, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0 futex(0xd79258, FUTEX_WAKE, 2147483647) = 0
open("/dev/shm/dosemu_3778", O_RDWR|O_CREAT|O_TRUNC|O_NOFOLLOW, 0600) = 4

fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
unlink("/dev/shm/dosemu_3778")          = 0
ftruncate64(4, 0)                       = 0
ftruncate64(4, 17891328)                = 0

mmap2(NULL, 17891328, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0xb6bbb000 mprotect(0xb6bbb000, 17891328, PROT_READ|PROT_WRITE|PROT_EXEC) = 0 mprotect(0xb6bbb000, 17891328, PROT_READ|PROT_WRITE) = 0 mprotect(0xb6bbb000, 1114112, PROT_READ|PROT_WRITE) = 0
mmap2(NULL, 1114112, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED|MAP_FIXED, 4, 0) = 0
mprotect(0, 655360, PROT_NONE) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

There is also an error just before the raw socket message about not finding libc.mo file for messages in locale, but I don't think it is important. Interestingly, there is such a file in my /user/share/locale/ directories in many languages, including en_GB, but not in plain en.

I think the problem is with the mmap, mprotect stuff.

I hope this helps the developers.

Janos

Quoted 1 line · Frantisek Hanzlik

Hi Janos, this reminded me of something similar that I have met cca three years ago. You can try to find my thread "same distro, svn1999 DOSEMU crashes on some PCs on SEGV, on others run fine" from 12/13/2010 in dosemu-users list - this was on Fedora 14, but this may be same problem which you see now on Fedora 3. But something better - I managed to compile almost last dosemu devel version on Fedora 3 i686, and this work well at me machine, both in console and under X (also both in terminal mode 'dosemu -t' and with native X (xdosemu). Because there was lots things corrected and improved, maybe it will run on Your system too. There is only one particularity: after installing RPM and first dosemu run must be copied kernel.sys to C:\ drive: cp /usr/share/dosemu/drive_z/kernel.sys ~/.dosemu/drives/c/ You can download RPM and SRPM package at: http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git621.g431face.3.dbgemu.fc3.i686.rpm http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git621.g431face.3.dbgemu.fc3.src.rpm Good luck, Franta Hanzlik

#9 lore raw

Sorry to be so slow/indecisive, but is this not the old problem with the memory fence pointer, which used to be fixable with the creation of a file in /etc/sysctl.d/, say

/etc/sysctl.d/90-low-memory-access.conf

which contains the command

vm.mmap_min_addr=0.

One also needed to
keep the kernel from randomizing virtual address space with

echo 0 > /proc/sys/kernel/randomize_va_space

but I think that went away with 1.4 (??). I am not sure about any of this with modern kernels because I run dosemu (1.4) on a 32-bit ubuntu 9.04 virtual machine under 64-bit Fedora 19 for various complicated reasons.

Hope this may help, and sorry if it is irrelevant.

--jim gunn

Quoted 41 lines · jankomEarthlink

Thank you, Franta, for getting back to this problem. In the meantime I ran strace and googled the issue and saw some bug reports on this segmentation fault. Here is the last part of the strace listing. (Btw., I'll try your rpm tomorrow, it is getting late here, and I have to clean up my system again before I install your rpm, and will let you know if it worked).

[apu@Andraslinux ~]$ strace dosemu
...
write(3, "PKT: Cannot open raw sockets: Pe"..., 48) = 48
statfs("/dev/shm/", {f_type=0x1021994, f_bsize=4096, f_blocks=129447, f_bfree=129447, f_bavail=129447, f_files=129447, f_ffree=129446, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0 futex(0xd79258, FUTEX_WAKE, 2147483647) = 0
open("/dev/shm/dosemu_3778", O_RDWR|O_CREAT|O_TRUNC|O_NOFOLLOW, 0600) = 4

fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
unlink("/dev/shm/dosemu_3778")          = 0
ftruncate64(4, 0)                       = 0
ftruncate64(4, 17891328)                = 0

mmap2(NULL, 17891328, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0xb6bbb000 mprotect(0xb6bbb000, 17891328, PROT_READ|PROT_WRITE|PROT_EXEC) = 0 mprotect(0xb6bbb000, 17891328, PROT_READ|PROT_WRITE) = 0 mprotect(0xb6bbb000, 1114112, PROT_READ|PROT_WRITE) = 0
mmap2(NULL, 1114112, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED|MAP_FIXED, 4, 0) = 0
mprotect(0, 655360, PROT_NONE) = 0

killed by SIGSEGV +++ renamed from SIGSEGV (Segmentation fault) @ 0 (0) --- +0 -0

There is also an error just before the raw socket message about not finding libc.mo file for messages in locale, but I don't think it is important. Interestingly, there is such a file in my /user/share/locale/ directories in many languages, including en_GB, but not in plain en.

I think the problem is with the mmap, mprotect stuff.

I hope this helps the developers.

Janos

Quoted 3 lines · Frantisek Hanzlik

Hi Janos, this reminded me of something similar that I have met cca three years ago. You can try to find my thread "same distro, svn1999 DOSEMU crashes on some PCs on SEGV, on others run fine" from 12/13/2010 in dosemu-users list - this was on Fedora 14, but this may be same problem which you see now on Fedora 3. But something better - I managed to compile almost last dosemu devel version on Fedora 3 i686, and this work well at me machine, both in console and under X (also both in terminal mode 'dosemu -t' and with native X (xdosemu). Because there was lots things corrected
and improved, maybe it will run on Your system too. There is only one particularity: after installing RPM and first dosemu run must be copied kernel.sys to C:\ drive: cp /usr/share/dosemu/drive_z/kernel.sys ~/.dosemu/drives/c/ You can download RPM and SRPM package at: http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git621.g431face.3.dbgemu.fc3.i686.rpm http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git621.g431face.3.dbgemu.fc3.src.rpm Good luck, Franta Hanzlik

--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

Thanks Jegunn for your interest in helping with this issue.

Quoted 3 lines · Jegunn

Sorry to be so slow/indecisive, but is this not the old problem with the memory fence pointer, which used to be fixable with the creation of a file in /etc/sysctl.d/, say

I have an old, and somewhat mangled Fedora-3 distro and it does not have sysctl.d/90-low-memory-access.conf

Quoted 1 line

vm.mmap_min_addr=0.

Consequently I don't know how to make the mmap adjustment.

Quoted 4 lines

One also needed to
keep the kernel from randomizing virtual address space with

echo 0 > /proc/sys/kernel/randomize_va_space

I tried that but segfault is still there.

Quoted 1 line

this with modern kernels because I run dosemu (1.4) on a 32-bit

My kernel is 2.6.20, configured and compiled by myself.

I just tried dosemu on the same box (32bit AMD) booted into xubuntu 12.04. I installed dosemu 1.4.0.1 from ubuntu's software center. It was flawless, fast, and worked immediately.

CONCLUSION: there is nothing wrong with dosemu. My difficulty is probably due to kernel configuration.

I still would like to be able to compile and run it on my FC-3 boot environment as well. It is such a learning experience for me to discover and understand the inner workings of Unix/Linux/C world.

Janos

#11 lore raw

No, you needed to create this file with the indicated content. Do you have the sysctl.d directory? Actually, if you compile your kernel, you can configure it so that it sets the fence pointer to the null pointer at startup, I think,

--jim

Quoted 29 lines · jankomEarthlink

Thanks Jegunn for your interest in helping with this issue.

Quoted 3 lines · Jegunn

Sorry to be so slow/indecisive, but is this not the old problem with the memory fence pointer, which used to be fixable with the creation of a file in /etc/sysctl.d/, say

I have an old, and somewhat mangled Fedora-3 distro and it does not have sysctl.d/90-low-memory-access.conf

Quoted 1 line

vm.mmap_min_addr=0.

Consequently I don't know how to make the mmap adjustment.

Quoted 4 lines

One also needed to
keep the kernel from randomizing virtual address space with

echo 0 > /proc/sys/kernel/randomize_va_space

I tried that but segfault is still there.

Quoted 1 line

this with modern kernels because I run dosemu (1.4) on a 32-bit

My kernel is 2.6.20, configured and compiled by myself.

I just tried dosemu on the same box (32bit AMD) booted into xubuntu 12.04. I installed dosemu 1.4.0.1 from ubuntu's software center. It was flawless, fast, and worked immediately.

CONCLUSION: there is nothing wrong with dosemu. My difficulty is probably due to kernel configuration.

I still would like to be able to compile and run it on my FC-3 boot environment as well. It is such a learning experience for me to discover and understand the inner workings of Unix/Linux/C world.

Janos

#12 lore raw
In reply to jankomEarthlink
Quoted 1 line · jankomEarthlink

...

Hello Janos,

good news - thanks to Stas Sergeev great work from yesterday are in dosemu repaired some issues and isn't now necessary copy kernel.sys to C:\, as I wrote yesterday.
New Fedora3 RPM packages are:
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686.rpm
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.src.rpm

I'll be glad when they will work on Your system.

Franta Hanzlik

A message that is not in the archive (sent off-list or not yet received): [email protected]

#14 lore raw
Quoted 16 lines · jankomEarthlink

Hi Franta,

Quoted 3 lines · Frantisek Hanzlik

good news - thanks to Stas Sergeev great work from yesterday are in dosemu repaired some issues and isn't now necessary copy kernel.sys to C:\, as I wrote yesterday. New Fedora3 RPM packages are: http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686.rpm
http://www.hanzlici.cz/packages/fedora/dosemu/fc3/dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.src.rpm

I tried the rpm but there were a bunch of dependency issues, see below - just F.Y.I.:
[root@Andraslinux apu]# rpm -ivh xfer_andraswd/src/dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686.rpm
error: Failed dependencies:

        SDL_gfx is needed by dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686
        SDL_ttf is needed by dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686
        alsa-lib is needed by dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686
        libsndfile is needed by dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686
        libvga.so.1 is needed by dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686
        svgalib is needed by dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686
Quoted 6 lines
Quoted 1 line

I'll be glad when they will work on Your system.

At any rate I suspect that, as in a related message, the problem is with my kernel or system configuration.

Thanks for your efforts, nevertheless.

Janos

Hi Janos,

You can download missing package alsa-lib from Fedora archive here:
http://archives.fedoraproject.org/pub/archive/fedora/linux/core/updates/3/i386/
http://archives.fedoraproject.org/pub/archive/fedora/linux/core/3/i386/os/Fedora/RPMS/

SDL_gfx, SDL_ttf and libsndfile You can download from Fedora-extras archive:
http://archives.fedoraproject.org/pub/archive/fedora/linux/extras/3/i386/

and svgalib package (it solves libvga.so.1 too) from my web:
http://www.hanzlici.cz/packages/fedora/svgalib/fc3/svgalib-1.9.25-2.i386.rpm
(not know why, this package is in Fedora 2 and Fedora 4, but not in Fedora 3, thus I must build own)

and then install them via 'rpm' utility:
rpm -Uv PKGNAME

Usual installation via yum in Your case isn't possible, because Fedora 3 is too old distro (IMO via yum is now possible install/update Fedora 7 and above)

hth, Franta Hanzlik

#15 lore raw

Hi Franta,

Not there yet... sorry.

Quoted 1 line · Frantisek Hanzlik

You can download missing

Thanks for the links, I satisfied missing dependencies, did rpm install, see below:

[root@Andraslinux apu]# rpm -ivh xfer_andraswd/Installedrpm-s/dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686.rpm

Preparing... ########################################### [100%]
1:dosemu ########################################### [100%]
"/usr/share/dosemu/Xfonts": error scanning [root@Andraslinux apu]# dosemu

This was all from root. After issuing dosemu command system hung as in many previous, earlier attempts. Ctr-c did not stop it. I ran again dosemu from another xterm window with strace and it is stuck at the segmentation fault.

So back to segmentation fault, where it probably started this entire thread.

(in parenthesis: "error scanning" is a strange message that I also get at boot when starting x session, but everything seems OK there)

See my new posting to jegunn's message in the subject of segmentation fault.

Janos

#16 lore raw
Quoted 22 lines · jankomEarthlink

Hi Franta,

Not there yet... sorry.

Quoted 1 line · Frantisek Hanzlik

You can download missing

Thanks for the links, I satisfied missing dependencies, did rpm install, see below:

[root@Andraslinux apu]# rpm -ivh xfer_andraswd/Installedrpm-s/dosemu-1.4.0.8-git633.g3492afd.3.dbgemu.fc3.i686.rpm

Preparing... ########################################### [100%]
1:dosemu ########################################### [100%]
"/usr/share/dosemu/Xfonts": error scanning [root@Andraslinux apu]# dosemu

This was all from root. After issuing dosemu command system hung as in many previous, earlier attempts. Ctr-c did not stop it. I ran again dosemu from another xterm window with strace and it is stuck at the segmentation fault.

Quoted 6 lines

So back to segmentation fault, where it probably started this entire thread.

(in parenthesis: "error scanning" is a strange message that I also get at boot when starting x session, but everything seems OK there)

See my new posting to jegunn's message in the subject of segmentation fault.

Hi Janos,
sorry for the late reply. I'm not sure, when Your SIGSEGV DOSEMU crash is caused by accessing to shm - Your strace seems normal. FYI, on my FC3/i686/1GB RAM my strace in Your place is this:

open("/usr/lib/gconv/ISO8859-2.so", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\4\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=9432, ...}) = 0
old_mmap(NULL, 12316, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb79a8000
old_mmap(0xb79aa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0xb79aa000
close(4) = 0
brk(0x9d22000) = 0x9d22000
write(3, "PKT: Cannot open tap%d: P\305\231\303\255stu"..., 44) = 44
statfs("/dev/shm/", {f_type=0x1021994, f_bsize=4096, f_blocks=129443, f_bfree=129443, f_bavail=129443, f_files=129443, f_ffree=129442, f_fsid={0, 0}, f_namel en=255, f_frsize=4096}) = 0
futex(0xdea258, FUTEX_WAKE, 2147483647) = 0
open("/dev/shm/dosemu_5029", O_RDWR|O_CREAT|O_TRUNC|O_NOFOLLOW, 0600) = 4

fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
unlink("/dev/shm/dosemu_5029")          = 0
ftruncate64(4, 0)                       = 0
ftruncate64(4, 17891328)                = 0

mmap2(NULL, 17891328, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0xb6898000 mprotect(0xb6898000, 17891328, PROT_READ|PROT_WRITE|PROT_EXEC) = 0 mprotect(0xb6898000, 17891328, PROT_READ|PROT_WRITE) = 0 mprotect(0xb6898000, 1114112, PROT_READ|PROT_WRITE) = 0
mmap2(NULL, 1114112, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED|MAP_FIXED, 4, 0) = 0

mprotect(0, 655360, PROT_NONE)          = 0
setreuid32(500, 500)                    = 0
setregid32(500, 500)                    = 0
munmap(0x100000, 65536)                 = 0

mmap2(0x100000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED|MAP_FIXED, 4, 0) = 0x100000 mmap2(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6098000 write(3, "CONF: reserving 8256Kb at 0x1000"..., 71) = 71 gettimeofday({1399198750, 192793}, NULL) = 0
open("/etc/localtime", O_RDONLY) = 5

fstat64(5, {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6097000

read(5, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0"..., 4096) = 806
close(5) = 0
munmap(0xb6097000, 4096) = 0
mprotect(0xb69a8000, 4198400, PROT_READ|PROT_WRITE) = 0
mmap2(0xffffffff, 4194304, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED, 4, 0x110) = 0xb5c98000 write(3, "Registering HWRAM, type=e base=0"..., 56) = 56
write(3, "CONF: reserving 4096Kb at 0xB5C9"..., 58) = 58
write(3, "CONF: reserving 12Kb at 0xC0000 "..., 60) = 60
write(3, "SERIAL $Id$\n", 12) = 12
stat64("/dev/fd0", {st_mode=S_IFBLK|0660, st_rdev=makedev(2, 0), ...}) = 0

open("/dev/null", O_RDWR|O_LARGEFILE)   = 5
open("/dev/null", O_RDWR|O_LARGEFILE)   = 6

open("/usr/bin/libplugin_sdl.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/bin/libplugin_alsa.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/dosemu/libplugin_alsa.so", O_RDONLY) = 7
read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\324\5\0"..., 512) = 512 fstat64(7, {st_mode=S_IFREG|0644, st_size=8027, ...}) = 0
old_mmap(NULL, 6760, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 0xb5c96000 old_mmap(0xb5c97000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0) = 0xb5c97000
close(7) = 0
open("/usr/bin/libplugin_sndfile.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/dosemu/libplugin_sndfile.so", O_RDONLY) = 7
read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\204\5\0"..., 512) = 512

and my shm kernel settings are:

# cat /proc/sys/kernel/{shmall,shmmax,shmmni}
2097152
33554432
4096

2) Your error message: '"/usr/share/dosemu/Xfonts": error scanning' is perhaps caused by fc-cache problem. What You obtain on command:
fc-cache -v -f /usr/share/dosemu/Xfonts
It should be successfull and in '/usr/share/dosemu/Xfonts' directory should be created (empty) file 'fonts.cache-1'.
You should also verify dosemu RPM package right installation by cmd:
rpm -V dosemu
On my PC it produce only one line (which is OK):
.......T. /usr/share/dosemu/Xfonts/fonts.dir

Also, are You using xfs - X font server?

Maybe You have somehow broken Your system - e.g. missing some files or directories, bad ownership or permissions on them etc. You can verify it by 'rpm -Va' command. This should not produce any serious problems (it is necessary assessed output individually).

3) Did You tried run dosemu in console and/or in Xterm in terminal mode ('dosemu -t')? What is result?

Franta Hanzlik

#17 lore raw

CASE CLOSED, DOSEMU WORKS NOW!

Thank you all for your help and inspiration. There was nothing wrong with dosemu, the problem was my corrupted FC3 system, and I can blame only myself for corrupting it. Learning curve...

I started to review my system which I corrupted by removing some rpm-s and compiling updated software in the past few years. Now I know a little more and am more careful how to do things. Repairing and cleaning my fc3 installation is a slow and painstaking process. This is why I did not give an update recently. Franta's message today made me try dosemu again, and this time it worked. Apparently the partial repair fixed it. I don't know what and how, but the main thing is that it works. Originally I planned to try dosemu after I finished my system repair.

Thank you all on this mailing list - Janos

Just to answer Franta's points:

Quoted 7 lines · Frantisek Hanzlik

Your strace seems normal. FYI, on my
and my shm kernel settings are:

# cat /proc/sys/kernel/{shmall,shmmax,shmmni}
2097152
33554432
4096

2097152
2147483647
4096

Quoted 3 lines

2) Your error message: '"/usr/share/dosemu/Xfonts": error scanning' is perhaps caused by fc-cache problem. What You obtain on command:
fc-cache -v -f /usr/share/dosemu/Xfonts

/usr/share/dosemu/Xfonts: caching, new cache contents: 2 fonts, 0 dirs /usr/local/var/cache/fontconfig: cleaning cache directory /root/.cache/fontconfig: not cleaning non-existent cache directory /root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded

Quoted 6 lines

It should be successfull and in '/usr/share/dosemu/Xfonts' directory should be created (empty) file 'fonts.cache-1'.
You should also verify dosemu RPM package right installation by cmd:
rpm -V dosemu
On my PC it produce only one line (which is OK):
.......T. /usr/share/dosemu/Xfonts/fonts.dir

My system produces no output.

Quoted 1 line

Also, are You using xfs - X font server?

Yes, see more below.

Quoted 5 lines

Maybe You have somehow broken Your system - e.g. missing some files or directories, bad ownership or permissions on them etc. You can verify it by 'rpm -Va' command. This should not produce any serious problems (it is necessary assessed output individually).

rpm -Va xfs produces no output, but I do have a problem with xfs. When I boot and xfs service starts I get an error message stating that "error scanning". But otherwise my system works, and apparently this is not related to dosemu. Hopefully, as I clean up my system this is going to be resolved as well.

Quoted 2 lines

3) Did You tried run dosemu in console and/or in Xterm in terminal mode ('dosemu -t')? What is result?

It works both from console (Ctr-Alt-f1) or from xterm

#18 lore raw
Quoted 1 line · jankomEarthlink

CASE CLOSED, DOSEMU WORKS NOW!

fine!

Quoted 8 lines
Quoted 3 lines

2) Your error message: '"/usr/share/dosemu/Xfonts": error scanning' is perhaps caused by fc-cache problem. What You obtain on command:
fc-cache -v -f /usr/share/dosemu/Xfonts

/usr/share/dosemu/Xfonts: caching, new cache contents: 2 fonts, 0 dirs /usr/local/var/cache/fontconfig: cleaning cache directory /root/.cache/fontconfig: not cleaning non-existent cache directory /root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded

You should still make 'fc-cache -v -f' (without trailing path) for make sure that the 'error scanning' error is gone.

Quoted 7 lines
Quoted 6 lines

It should be successfull and in '/usr/share/dosemu/Xfonts' directory should be created (empty) file 'fonts.cache-1'.
You should also verify dosemu RPM package right installation by cmd:
rpm -V dosemu
On my PC it produce only one line (which is OK):
.......T. /usr/share/dosemu/Xfonts/fonts.dir

My system produces no output.

Quoted 8 lines
Quoted 1 line

Also, are You using xfs - X font server?

Yes, see more below.

Quoted 5 lines

Maybe You have somehow broken Your system - e.g. missing some files or directories, bad ownership or permissions on them etc. You can verify it by 'rpm -Va' command. This should not produce any serious problems (it is necessary assessed output individually).

rpm -Va xfs produces no output,

'rpm -Va xfs' is bad command. You must use 'rpm -V xorg-x11-xfs' for to verify Xorg xfs font server package, or 'rpm -Va' to verify all packages in whole system. And usually there are some 'errors' printed, even if everything is in order - mostly are reported changed config files (changed size, timestamp, md5/sha1 checksum etc.)

Franta