prboom exits with signal 8

Bug #375498 reported by Toni Spets
178
This bug affects 34 people
Affects Status Importance Assigned to Milestone
prboom (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Karmic by Christian Niemeyer
Nominated for Lucid by Jon Dowland

Bug Description

Binary package hint: prboom

When starting a new game or the intro demo starts the game just exists with signal 8.

Previous version of the same package from jaunty works fine. Platform is x86.

prboom:
  Installed: 2:2.5.0+dfsg1-2
  Candidate: 2:2.5.0+dfsg1-2
  Version table:
 *** 2:2.5.0+dfsg1-2 0
        500 http://se.archive.ubuntu.com karmic/universe Packages
        100 /var/lib/dpkg/status

Related branches

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :

I think this bug has nothing to do with sound problems in previous versions. Here's my commandline output:

$ prboom -nosound -noaccel

prboom v2.5.0 (http://prboom.sourceforge.net/)
I_SetAffinityMask: manual affinity mask is 1
M_LoadDefaults: Load system defaults.
 default file: /home/kringel/.prboom/prboom.cfg
 found /usr/share/games/doom/doom1.wad
IWAD found: /usr/share/games/doom/doom1.wad
PrBoom (built Jun 23 2009), playing: DOOM Shareware
PrBoom is released under the GNU General Public license v2.0.
You are welcome to redistribute it under certain conditions.
It comes with ABSOLUTELY NO WARRANTY. See the file COPYING for details.
V_Init: allocate screens.
 found /usr/share/games/doom/prboom.wad
D_InitNetGame: Checking for network game.
W_Init: Init WADfiles.
 adding /usr/share/games/doom/doom1.wad
 adding /usr/share/games/doom/prboom.wad
W_InitCache

M_Init: Init miscellaneous info.
R_Init: Init DOOM refresh daemon -
R_LoadTrigTables: Endianness...ok.
R_InitData: Textures Flats Sprites
R_Init: R_InitPlanes R_InitLightTables R_InitSkyMap R_InitTranslationsTables R_InitPatches
P_Init: Init Playloop state.
I_Init: Setting up machine state.
S_Init: Setting up sound.
HU_Init: Setting up heads up display.
I_InitGraphics: 1280x800
I_UpdateVideoMode: 1280x800 (nofullscreen)
V_InitMode: using 8 bit video mode
I_SetRes: Using resolution 1280x800
I_UpdateVideoMode: 0x60000000, SDL buffer, direct access
ST_Init: Init status bar.
P_GetNodesVersion: using normal BSP nodes
I_SignalHandler: Exiting on signal: signal 8

It happens after shorty when navigating in the menus or directly when enterin a level to play. Version from jaunty works perfectly though.

I also tried some options like -nosound -nojoy -noaccel -noblit
but they have no affect on preventing prboom from crashing. It crashes with the nvidia-glx-185 but also with vesa and nv video drivers.

PS: I have installed doom-wad-shareware as a level set.

Revision history for this message
Jon Dowland (jond) wrote :

Ok I can confirm this using karmic's prboom package on a Debian sid i386 machine. Using the latest version of the package in Debian (-5 rather than -4) is fine.

I suspect a bad build or something.

Someone who looks after this stuff in Ubuntu should either schedule a rebuild or pull in the more recent package from Debian.

Revision history for this message
yason (simo-melenius+launchpad) wrote :

Narrowed down: If I recompile the source .deb from Karmic with -O1 it works. When I turn -O2 back on it crashes.

Revision history for this message
yason (simo-melenius+launchpad) wrote :

Configuring with --disable-i386-asm seems to make it work, too.

Revision history for this message
Robert J Lee (ubuntu-rjlee) wrote :

I can confirm that running "apt-source prboom", editing debian/rules to add --disable-i386-asm to the ./configure line and running "dpkg-buildpackage -rfakeroot -uc -b" created a new deb file that seems quite playable to me.

Revision history for this message
ferrazrafael (ferrazrafael) wrote :

my build with the --disable-i386-asm option is here for download, so we could play while the bug isnt fixed

http://www.zumodrive.com/share/1WBuZTc3Mj

Changed in prboom (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :

Thanks. :)

I took the debian package until now. works also.
http://packages.debian.org/sid/prboom

Revision history for this message
Jon Dowland (jond) wrote :

Could someone who is experiencing this bug please provide a backtrace?

It looks like some of the assembler in prboom is not liked by the version of gcc being used by Ubuntu. I'm guessing this is a more recent version than Debian (or some feature or patch applied is missing on Debian) so the problem doesn't occur there.

--disable-i386-asm fixes the problem by disabling *ALL* of the assembler. A backtrace would help to pinpoint which bit of the assembler specifically is to blame.

Revision history for this message
Jon Dowland (jond) wrote :

Thanks to ferrazrafael for your efforts in providing a "fixed" package, but I don't think it's a good idea to advise people to install unsigned packages.

Revision history for this message
ferrazrafael (ferrazrafael) wrote :

yeah jon, use debian package is more secure, less chance that anyone put a malicious code in there.

I will take a look in the back trace, if I can find something I will post here..

thanks

Revision history for this message
Seán T Mac An Oghaim (shanet) wrote :

I am experiencing this bug. I have attached a backtrace.

Revision history for this message
Jon Dowland (jond) wrote :

Thanks. Unfortunately we need a backtrace with debugging symbols which means one from a rebuilt package (there is no seperate debugging symbols package for prboom at the moment)

I've passed this onto upstream who suggest just disabling all asm. I don't kNow who is responsible for the ubuntu package, but I'll submit myself to motu in the meantime.

I may make the change in the Debian package, as it's likely this will bite us too, depending on what change caused it.

Revision history for this message
Robert J Lee (ubuntu-rjlee) wrote :

@Jon: I would be happy to rebuild the package and provide a backtrace. But I'm not sure which options I need to specify to enable the appropriate debugging symbols; can you advise?

Revision history for this message
Greg T. Bzdell (gbzdell) wrote :

I grabbed the deb from:

http://packages.debian.org/sid/prboom

and it did solve the problem.

Revision history for this message
Jon Dowland (jond) wrote :

Greg,

Did you read the bug report? We already know that.

Revision history for this message
Jon Dowland (jond) wrote :

Robert J Lee, thanks for your offer. For info, in general, if you define the DEB_BUILD_OPTIONS environment variable to include "nostrip", then the package build process will not strip debugging symbols from binaries.

However, I passed this onto the upstream author, who suggested that there was no harm in simply disabling all the assembler. It's very unlikely to result in a noticeable performance hit for any users of the Ubuntu packages. So, I suggest that Ubuntu do just that.

I'm planning to submit myself to MOTU. If the package has not been updated by the time that is done, I will make the correction myself.

Hew (hew)
Changed in prboom (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Jon Dowland (jond)
summary: - prboom exits with signal 8 on karmic
+ prboom exits with signal 8
Revision history for this message
yason (simo-melenius+launchpad) wrote :

I bumped into this again when updating my system and having ditched my locally compiled version in the process. Is this fix still waiting in some queue or something? I guess all we need is ---disable-i386-asm for configure in debian/rules.

Further, I built a version with symbols and tracked it to fixed point division function that is called as soon as the first raycasted frame is rendered:

-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<
G_DoPlayDemo: playing demo with ultimate doom compatibility
P_GetNodesVersion: using normal BSP nodes

Program received signal SIGFPE, Arithmetic exception.
0x080cc3e9 in FixedDiv () at m_fixed.h:183
183 asm (
(gdb) bt
#0 0x080cc3e9 in FixedDiv () at m_fixed.h:183
#1 R_ExecuteSetViewSize () at r_main.c:423
#2 0x0806799d in D_Display () at d_main.c:252
#3 0x080d25fa in TryRunTics () at d_client.c:499
#4 0x0806a15b in D_DoomLoop () at d_main.c:362
#5 D_DoomMain () at d_main.c:1651
#6 0x080daa66 in main (argc=5, argv=0xbffff244) at i_main.c:407
(gdb) print $pc
$1 = (void (*)()) 0x80cc3e9 <R_ExecuteSetViewSize+889>
(gdb) disass $pc-0x8 $pc+0x8
Dump of assembler code from 0x80cc3e1 to 0x80cc3f1:
0x080cc3e1 <R_ExecuteSetViewSize+881>: add %al,(%eax)
0x080cc3e3 <R_ExecuteSetViewSize+883>: mov %ecx,%eax
0x080cc3e5 <R_ExecuteSetViewSize+885>: jmp 0x80cc400 <R_ExecuteSetViewSize+912>
0x080cc3e7 <R_ExecuteSetViewSize+887>: mov %edi,%eax
0x080cc3e9 <R_ExecuteSetViewSize+889>: idiv %ecx
0x080cc3eb <R_ExecuteSetViewSize+891>: mov %eax,0x81571c0(,%esi,4)
End of assembler dump.
(gdb)
-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<

FixedDiv() has different implementations, two with inline assembly dating back to 1998 and one in pure C. While the inline assembly might have theoretically given some performance boost ten years ago, I agree with the upstream author that it shouldn't matter to disable it. There's no reason to ever enable tweaks like these on modern cpus in a program considered as light-weight as Doom.

I'd like to get rid of my locally built-and-held prboom*.deb now, get the fix included directly from Ubuntu repos, have this bug closed, and go Berzerk-whacking some monsters — thanks :)

Revision history for this message
Stinger (e-mindahl) wrote :

Confirming bug, discovered on Karmic and still present on Lucid.
Using the package from sid solves the problem for me too.
Can this bug please be assigned to someone who can solve it.

Revision history for this message
Pevzi (pevzi) wrote :

Still actual for Lucid. After starting new game prboom crashes. Version from debian sid repos works fine.

Revision history for this message
Pevzi (pevzi) wrote :

Also, on 64-bit Ubuntu prboom also works correctly. This bug affects only x86-version package.

Revision history for this message
Jasper Frumau (jfrumau) wrote :

Just tried Freedom on Maverick Meerkat using prdoom (installed from synaptic package manager). Will try the other package.

Revision history for this message
Jasper Frumau (jfrumau) wrote :

Other mentioned .deb apackage works, only screen stays rather small. Any suggestions?

Revision history for this message
Jasper Frumau (jfrumau) wrote :

fixed the game window width by starting prboom -width 1200 -height 800. Update-manager mentioned there was an update for prboom. As I expect that to be the faulty version I will not update prboom for now. Not until there is more news here anyways.

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

This bug was fixed in the package prboom - 2:2.5.0+dfsg1-5ubuntu1

---------------
prboom (2:2.5.0+dfsg1-5ubuntu1) maverick; urgency=low

  * debian/rules: Add --disable-i386-asm to avoid crash on i386 (LP: #375498)
 -- Emmet Hikory <email address hidden> Mon, 30 Aug 2010 17:15:00 +0900

Changed in prboom (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Tony Flury (anthony-flury) wrote :

Not fixed - installed 2:2.5.0+dfsg1 from Lucid repository : application still fails :

uname -a

Linux laptop 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 09:00:03 UTC 2010 i686 GNU/Linux

prboom

prboom v2.5.0 (http://prboom.sourceforge.net/)
I_SetAffinityMask: manual affinity mask is 1
M_LoadDefaults: Load system defaults.
 default file: /home/tony/.prboom/prboom.cfg
 found /usr/share/games/doom/doom1.wad
IWAD found: /usr/share/games/doom/doom1.wad
PrBoom (built Nov 7 2009), playing: DOOM Shareware
PrBoom is released under the GNU General Public license v2.0.
You are welcome to redistribute it under certain conditions.
It comes with ABSOLUTELY NO WARRANTY. See the file COPYING for details.
V_Init: allocate screens.
 found /usr/share/games/doom/prboom.wad
D_InitNetGame: Checking for network game.
W_Init: Init WADfiles.
 adding /usr/share/games/doom/doom1.wad
 adding /usr/share/games/doom/prboom.wad
W_InitCache

M_Init: Init miscellaneous info.
R_Init: Init DOOM refresh daemon -
R_LoadTrigTables: Endianness...ok.
R_InitData: Textures Flats Sprites
R_Init: R_InitPlanes R_InitLightTables R_InitSkyMap R_InitTranslationsTables R_InitPatches
P_Init: Init Playloop state.
I_Init: Setting up machine state.
I_InitSound: configured audio device with 1024 samples/slice
I_InitSound: sound module ready
S_Init: Setting up sound.
S_Init: default sfx volume 8
HU_Init: Setting up heads up display.
I_InitGraphics: 640x480
I_UpdateVideoMode: 640x480 (nofullscreen)
V_InitMode: using 8 bit video mode
I_SetRes: Using resolution 640x480
I_UpdateVideoMode: 0x60000000, SDL buffer, direct access
ST_Init: Init status bar.
G_DoPlayDemo: playing demo with doom/doom2 v1.9 compatibility
P_GetNodesVersion: using normal BSP nodes
I_SignalHandler: Exiting on signal: signal 8
I_ShutdownMusic: removing /tmp/prboom-music-yPN7HD
I_ShutdownSound:

Revision history for this message
Jon Dowland (jond) wrote :

Tony, that's because that isn't the fixed package. As the last message said, the fixed package is 2:2.5.0+dfsg1-5ubuntu1, which is currently in maverick.

Revision history for this message
Tuomo Kohvakka (tuomo-kohvakka) wrote :

Lucid is supposed to be LTS release and still supported for a couple of years. It's a bit puzzling that lucid repositories still contain such a version that doesn't even start. The above fix from 2010 works but why it isn't simply included in the lucid repositories?

Revision history for this message
Hew (hew) wrote :

prboom is a community supported (universe) package which doesn't receive the same level of support as those officially supported (main) under LTS.

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

Bug attachments

Remote bug watches

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