dosbox crashed with SIGSEGV

Bug #700912 reported by Daniel Richard G.
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dosbox (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: dosbox

Trying the install for 3D Studio R3, which has heavy-duty video driver code. Segfault occurred just as a driver's high-res mode was tested.

ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: dosbox 0.74-1
Uname: Linux 2.6.37-020637rc3-generic x86_64
NonfreeKernelModules: nls_iso8859_1 nls_cp437 btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs exportfs reiserfs pcspkr binfmt_misc vboxnetadp vboxnetflt vboxdrv snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul snd_emu10k1 snd_via82xx snd_via82xx_modem snd_ac97_codec snd_util_mem ac97_bus snd_pcm snd_mpu401_uart snd_hwdep radeon snd_seq_midi snd_rawmidi ttm snd_seq_midi_event psmouse amd64_edac_mod snd_seq drm_kms_helper edac_core snd_timer emu10k1_gp w83627hf edac_mce_amd snd_seq_device serio_raw gameport drm hwmon_vid i2c_algo_bit lp parport shpchp snd i2c_viapro snd_page_alloc soundcore k8temp firewire_ohci pata_via firewire_core sata_via crc_itu_t skge floppy
Architecture: amd64
Date: Mon Jan 10 01:12:28 2011
ExecutablePath: /usr/bin/dosbox
ProcCmdline: dosbox
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LC_COLLATE=C
 LANG=en_US.UTF-8
SegvAnalysis:
 Segfault happened at: 0x4c441e: movzwl (%rax,%rdi,2),%eax
 PC (0x004c441e) ok
 source "(%rax,%rdi,2)" (0x7f61f4227dd6) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: dosbox
StacktraceTop:
 ?? ()
 ?? ()
 ?? ()
 ?? ()
 ?? ()
Title: dosbox crashed with SIGSEGV
UserGroups: adm audio cdrom dialout floppy plugdev video

Revision history for this message
Daniel Richard G. (skunk) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 XGA_GetPoint (x=<value optimized out>,
 XGA_DrawLineBresenham (val=<value optimized out>)
 PageHandler::writew_checked (this=0x80000ee3,
 ?? ()
 ?? ()

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in dosbox (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
visibility: private → public
Revision history for this message
shankao (shankao) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software at their bugtracker (http://sourceforge.net/tracker/?group_id=52551&atid=467232) by following the instructions at http://vogons.zetafleet.com/viewtopic.php?t=2949. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in dosbox (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel Richard G. (skunk) wrote :

I've dug a bit into the issue, and put together a patch for the upstream:

    https://sourceforge.net/tracker/?func=detail&aid=3154782&group_id=52551&atid=467234

Changed in dosbox (Ubuntu):
status: Incomplete → New
Revision history for this message
shankao (shankao) wrote :

@Daniel: that link gives me back an "Error 403: access required" message. Is it a private report?

Revision history for this message
Daniel Richard G. (skunk) wrote :

No, I get the same error too. Looks like SourceForge lossage---I've seen the same issue with some other projects recently.

(Now I wish I'd also posted the patch here...)

Revision history for this message
Daniel Richard G. (skunk) wrote :

FWIW, it seems like SourceForge updated their bug/patch tracker functionality, and forgot to support old URLs.

The current patch tracker for DOSBox is here:

    https://sourceforge.net/p/dosbox/patches/

I don't see my patch in there, however, even though there are a few from about the same time. No idea what happened.

Revision history for this message
Torbjörn Rathsman (milasudril) wrote :

It seems like DOSBox has issues on 64-bit systems. I compiled it from svn and got several warnings related to data type size assumptions. When I run DOSBox in Windows or Wine, there is no problem.

$ file /home/bin-win32/DOSBox-0.74/DOSBox.exe
/home/bin-win32/DOSBox-0.74/DOSBox.exe: PE32 executable (GUI) Intel 80386 (stripped to external PDB), for MS Windows

The build I made on ubuntu for debugging purpose

Program received signal SIGSEGV, Segmentation fault.
0x00000000004c876b in XGA_GetPoint (x=x@entry=18446744071562068601, y=y@entry=203) at vga_xga.cpp:179
179 return ((Bit32u*)(vga.mem.linear))[memaddr];
(gdb)
(gdb) backtrace
#0 0x00000000004c876b in XGA_GetPoint (x=x@entry=18446744071562068601, y=y@entry=203) at vga_xga.cpp:179
#1 0x00000000004c8b2b in XGA_DrawLineBresenham (val=<error reading variable: Cannot access memory at address 0x7fffffffa0a8>) at vga_xga.cpp:419
(gdb) q

Suggestion is to REMOVE the 64-bit DOSBox and replace it by a 32-bit version.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dosbox (Ubuntu):
status: New → Confirmed
Revision history for this message
Torbjörn Rathsman (milasudril) wrote :

I can now confirm that DOSBox works on 32-bit Ubuntu 14.04

Revision history for this message
shankao (shankao) wrote :

@milasudril, are you talking about the same bug reported here? I.e. same segfault, happening when running 3D Studio R3. If not, please fill up a different bug report.

Then, if you're having trouble compiling dosbox from svn, that's an upstream bug and should be reported at the dosbox bugtracker (http://sourceforge.net/tracker/?group_id=52551&atid=467232) by following the instructions at http://vogons.zetafleet.com/viewtopic.php?t=2949.

Revision history for this message
Torbjörn Rathsman (milasudril) wrote :

@shankao: At least we are both stuck in XGA_DrawLineBresenham. Have you tried to run 3D Studio R3 on 32-bit system? I get the crash from within Windows 3.1, when it is issuing a LineTo GDI call (I draw this conclusion from the fact that it affect clock.exe (draws the handles) and a game called Stars (Draw line between two planets)). It does only happen on a 64-bit build of DOSBox. Since your trouble occurs on 64-bit, it might be a pointer size issue. I have seen really bad things in libxml2, that brakes down on x86-64 Windows. For example, there might be assumptions that

sizeof(unsigned int)==sizeof(void*)

I conclude that this is not a Ubuntu bug, but a DOSBox bug. The thing Ubuntu can do in the meantime is to provide a 32-bit binary package for DOSBox.I should tryout Windows 3.1 without the S3 driver. It would also be good to setup the same thing in Qemu+FreeDOS, if that supports emulation of the same graphics device. This will help to localize the bug.

Revision history for this message
Torbjörn Rathsman (milasudril) wrote :

If I run pure VGA, it does not crash. DOSBox S3 emulation is broken on a 64-bit build.

Revision history for this message
shankao (shankao) wrote :

In the case of upstream bugs, the policy is to report it upstream (to the dosbox developers) and try to fix it there, not just for Ubuntu, but for the rest of people that uses dosbox. This is, unless it's a security bug or it's of high(er) importance. Please indicate us if you have already reported it there and a link to their bugtracker.

Then, for your request of the 32-bit package, Ubuntu supports to have 32 and 64 bit versions of packages installed side by side (multiarch). You can i.e. see this answer: http://askubuntu.com/questions/29665/how-do-i-apt-get-a-32-bit-package-on-a-64-bit-installation

Revision history for this message
Thomas (tombl) wrote :

Unbelievable that this is still an issue. I posted a patch: https://sourceforge.net/p/dosbox/patches/269/

Revision history for this message
shankao (shankao) wrote :

@w3seek: that's nice, could you talk with the dosbox developers to get it merged there?

Revision history for this message
Thomas (tombl) wrote :

Looks like my patch was finally accepted last week.

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

Other bug subscribers

Remote bug watches

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