ERROR: cpu exception in dosemu code outside of VM86()!

Bug #52857 reported by Stéphane Marguet
66
Affects Status Importance Assigned to Milestone
DOSEMU
Fix Released
Undecided
Unassigned
Baltix
Incomplete
Medium
Mantas Kriaučiūnas
dosemu-freedos (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: dosemu

Dosemu don't work.

dosemu:
  Installé : 1.2.2-3build1
  Candidat : 1.2.2-3build1
  Table de version :
 *** 1.2.2-3build1 0
        500 http://fr.archive.ubuntu.com dapper/multiverse Packages
        100 /var/lib/dpkg/status

dosemu-freedos:
  Installé : b8p-4
  Candidat : b8p-4
  Table de version :
 *** b8p-4 0
        500 http://fr.archive.ubuntu.com dapper/multiverse Packages
        100 /var/lib/dpkg/status

linux-image-686:
  Installé : 2.6.15.24
  Candidat : 2.6.15.24
  Table de version :
 *** 2.6.15.24 0
        500 http://security.ubuntu.com dapper-security/main Packages
        100 /var/lib/dpkg/status
     2.6.15.22 0
        500 http://fr.archive.ubuntu.com dapper/main Packages

Here is the output :
ERROR: cpu exception in dosemu code outside of VM86()!
trapno: 0x0e errorcode: 0x00000004 cr2: 0x468a5b2d
eip: 0x468a5b2d esp: 0xbf89ffb5 eflags: 0x00210282
cs: 0x0073 ds: 0x007b es: 0x007b ss: 0x007b
Page fault: read instruction to linear address: 0x468a5b2d
CPU was in user mode
Exception was caused by non-available page
ERROR: Fault handler re-entered! signal=11 _trapno=0xE
ERROR: cpu exception in dosemu code outside of VM86()!
trapno: 0x0e errorcode: 0x00000004 cr2: 0x468a5b23
eip: 0x0805f160 esp: 0x083dd860 eflags: 0x00210202
cs: 0x0073 ds: 0x007b es: 0x007b ss: 0x007b
Page fault: read instruction to linear address: 0x468a5b23
CPU was in user mode
Exception was caused by non-available page

Revision history for this message
Jeff Buchbinder (rufustfirefly) wrote :

Also gives error:

ERROR: Unable to open console to evaluate the keyboard map.
Please specify your keyboard map explicitly via the $_layout option

This is still present in Dapper (6.06).

Changed in dosemu:
status: Unconfirmed → Confirmed
Revision history for this message
Stéphane Marguet (stemp) wrote :

this can be fixed by setting and uncommenting the $_layout option in the /etc/dosemu/dosemu.conf file to your keyboard layout :

# Keyboard layout: default: 'auto' (which tries to generate the table from
# the current Linux console settings)
# or one of: finnish(-latin1), de(-latin1), be, it, us, uk, dk(-latin1),
# keyb-no, no-latin1, dvorak, pl, po, sg(-latin1), fr(-latin1), sf(-latin1),
# es(-latin1), sw, hu(-latin2), hu-cwi, keyb-user, hr-cp852, hr-latin2,
# cz-qwerty, cz-qwertz, ru, tr.
# $_layout = "auto"

eg : $_layout = "fr"

Revision history for this message
Adrian R Goalby (argoalby) wrote :

The above fix helps (I used $_layout = "uk"), but I think dosemu should be able to get the keyboard layout automatically from somewhere.

This only relates to the additional problem reported by Jeff Buchbinder, which should have been a separate bug report.

The main "cpu exception" bug is not affected.

Revision history for this message
Adrian R Goalby (argoalby) wrote :

I also had the "cpu exception", I found the following mailing list archive that seems to describe the same problem.
http://www.gatago.com/linux/kernel/14721949.html

It included:-
> I had the same problem and found out that disabling
> address space randomization (echo 0 >
> /proc/sys/kernel/randomize_va_space) solves this

This command (executed AFTER "sudo -i" into root) prevented the cpu exception. Execution then continued until:-
ERROR: coopthreads: lowmem heap + stack are too big
see bug #53384

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

It seems bug is in dosemu-freedos package, not in dosemu - when I installed dosemu-freedos version 1:0.0.b9r5a-3 (from Debian testing) then this problem dissapears :)

AFAIK in mailing list, that you told us before (http://www.gatago.com/linux/kernel/14721949.html ) also is mentioned, that problem is in command.com from older freedos versions.

Revision history for this message
Adrian R Goalby (argoalby) wrote :

Tried later version of freedos package as suggested above by Mantas Kriaučiūnas.

Downloaded and installed package dosemu-freedos_0.0.b9r5a-3_i386.deb (from Debian unstable or testing).

More detailed instructions if anyone needs them:-
Browse to Debian mirror list for package http://packages.debian.org/cgi-bin/download.pl?arch=i386&file=pool%2Fcontrib%2Fd%2Fdosemu-freedos%2Fdosemu-freedos_0.0.b9r5a-3_i386.deb&md5sum=dbdb9b3d6d70d2713611969eb50a3f9c&arch=i386&type=main
Download package from one of the mirrors.
Uninstall dosemu-freedos version b8p-4, eg. using Synaptic Package Manager.
Install downloaded package, eg. right-click file and select 'Open with "GDebi Package Installer"'.
Remember to uninstall the Debian package when official Ubuntu version available.

Afterwards dosemu seems to work properly both in terminal window and after text mode login.

This seems to cure both this Bug #52857 and also Bug #53384

Suggestion to maintainer: please change Dapper to use the above version, there does not seem to be much reason to keep the current unusable version.

Revision history for this message
Adrian R Goalby (argoalby) wrote :

Dapper is Ubuntu 6.06 LTS (Long Term Support)

I think this implies that this problem should be corrected in Dapper. Edgy is not released yet, and even then support for Dapper will still be required.

This Bug #52857 and Bug #53384 together with Bug #53996 against dosemu all need to be fixed to get dosemu working properly on Ubuntu. None require upstream patches, they just require using the correct versions from upstream.

Dosemu has been around for a few years and I think most Linux users would expect all releases of Ubuntu to have a working version.

Would the maintainer please set the importance to "Medium".

Revision history for this message
psartini (piero-sartini) wrote :

same problem in edgy eft beta.

Revision history for this message
Charon (markus-lobedann) wrote :

Same problem here too.
And no, installing a debian-testing package is not an option ( i want to keep my system free from non-ubuntu packages )

Revision history for this message
Mark Jenkins (mark-parit) wrote :

There's a LKML thread on this.
http://lkml.org/lkml/2005/5/11/12

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) wrote :

Same problem on Hardy.

Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

dosemu seems to work on Intrepid; the dosemu-freedos has been rolled into it, and it pops up a DOS prompt without issue so far as I can tell if I execute "dosemu". (dosemu 1.4.0+svn.1828-2ubuntu1, kernel 2.6.27-7-generic.) What exactly are you doing on Hardy to trigger the problem? Is anyone still getting the "ERROR: cpu exception in dosemu code outside of VM86()!" error?

Changed in dosemu-freedos:
status: Confirmed → Incomplete
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

Is there still a reason for a Baltix task to be open on this bug?

Revision history for this message
Joseph A. Millikan (jamillikan) wrote :

There is no reason for this to be open IMO.

For Hardy: A simple sudo edit /etc/sysctl.conf in Hardy and changing vm.mmap_min_addr = 65536 to - 0 resolves the issue.

For Intrepid: A simple sudo edit /etc/sysctl.d/10-process-security.conf and changing 65536 to 0 resolves the issue.

Revision history for this message
dstar (dstar-pele) wrote :

Actually, I'm still getting this, after making the above change. It's possible that the cause is related to the unknown cpu type error (cpu family from /proc/cpuinfo is 17). Here's what I get:

dstar@ceridwen:~% dosemu
ERROR: Unknown CPU type!
CONF: emulated CPU forced down to real CPU: 386
Cannot execute CPUEMU without TSC counter
ERROR: cpu exception in dosemu code outside of VM86()!
trapno: 0x00 errorcode: 0x00000000 cr2: 0x00000000
eip: 0x08167830 esp: 0xbffef4a8 eflags: 0x00010246
cs: 0x0073 ds: 0x007b es: 0x007b ss: 0x007b
ERROR: Please report the contents of ~/.dosemu/boot.log at
http://sourceforge.net/tracker/?atid=457447&group_id=49784&func=browse
It would be even more helpful if would recompile DOSEMU and reproduce this
bug with "debug on" in compiletime-settings.
Division by zero
ERROR: leavedos called recursively, forgetting the graceful exit!
EMERGENCY JUMP 4!!!
zsh: killed dosemu

Revision history for this message
levien (levien) wrote :

I had the same problem on my AMD Phenom X4 (cpu family 16): dosemu crashes on boot, and the last time I tried it, it took the entire X-session with it (which I found a bit odd). Anyway, it seems that the "Division by zero" bug with new CPU-types has been fixed upstream, in SVN rev 1869:

http://sourceforge.net/tracker/?func=detail&aid=2760088&group_id=49784&atid=457447

The current Ubuntu source-package seems to be at SVN rev 1828, let's hope it gets updated soon...

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for posting this bug.

Does this issue occur in Maverick?

Revision history for this message
levien (levien) wrote :

The issue I experienced seems to have been fixed in the version of dosemu (dosemu-1.4.0.1) that is in the Lucid repositories. I haven't tested Maverick yet, but I suppose it should work there as well.

Changed in dosemu:
importance: Unknown → Undecided
status: Unknown → New
status: New → Fix Released
Changed in dosemu-freedos (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Yogesh (yogeshyj) wrote :

latest Ubuntu 18.04 (same bug found)
ERROR: MFS: couldn't find root path /media/CDROM
ERROR: Fault in dosemu code, in_dpmi=1
ERROR: cpu exception in dosemu code outside of DPMI client!
trapno: 0x0e errorcode: 0x00000004 cr2: 0x555ff8c5
eip: 0x5555555c6cad esp: 0x7ffffffdde60 eflags: 0x00010246
cs: 0x0033 ds: 0x0000 es: 0x0000 ss: 0x002b
ERROR: Please report the contents of ~/.dosemu/boot.log at
http://sourceforge.net/tracker/?atid=457447&group_id=49784&func=browse
It would be even more helpful if would recompile DOSEMU and reproduce this
bug with "debug on" in compiletime-settings.
Page fault: read instruction to linear address: 0x555ff8c5
CPU was in user mode
Exception was caused by non-available page

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.