Bug 203336 - TORCS segfaults when using OpenAL for the sound, not with Plib
TORCS segfaults when using OpenAL for the sound, not with Plib
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: openal (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Andreas Bierfert
Fedora Extras Quality Assurance
:
: 244281 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-21 07:26 EDT by Zoltan Boszormenyi
Modified: 2007-11-30 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version: 0.0.9-0.10.20060204cvs.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-25 19:27:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch working around the crash in mmx code on 64 bit (1.13 KB, patch)
2007-02-08 09:24 EST, Hans de Goede
no flags Details | Diff

  None (edit)
Description Zoltan Boszormenyi 2006-08-21 07:26:34 EDT
Description of problem:

When a Quick Race is started, TORCS segfaults in about one minute,
sometimes it needs a bit more.

Version-Release number of selected component (if applicable):

1.2.4-3

How reproducible:

10 out of 10 tries, although not at the same moment.

Steps to Reproduce:
1. Start a Quick Race
2. Play
3.
  
Actual results:

Segmentation fault

Expected results:

Lack of segmentation fault.

Additional info:

I modified two settings that made the segfault go away:
lowered the maximum texture size from 2048 to 1024 and
switched audio driver from OpenAL to PLIB. I suspect the
audio driver, I will test it further.
Comment 1 Zoltan Boszormenyi 2006-08-24 06:13:16 EDT
Switching the maximum texture size has no effect.
However, when I switched it back to using openal,
the game segfaulted in about 30 seconds. Switching
to plib audio makes it playable as long as I would like.
System is a current RawHide.

torcs-1.2.4-3.fc5
openal-0.0.9-0.7.20060204cvs.fc6
Comment 2 Matthias Saou 2006-11-10 08:35:55 EST
This is possibly an openal problem. If you could install all the needed
debuginfo packages and get a useful backtrace from the crash, it would be more
useful.

I'll be releasing 1.3.0 packages very soon, you might want to also try those in
case this problem was in torcs and got fixed.
Comment 3 Matthias Saou 2006-11-10 08:50:51 EST
Well, I can unfortunately confirm that this problem is still present with 1.3.0,
as it segfaulted at the first curve for me too... switching to use plib for the
sound in the options seems to have prevented the problem from appearing.
Comment 4 Jérôme Benoit 2006-11-14 09:57:27 EST
Well this is not a related problem, bug you seem to have released torcs 1.3.0
data in extras but not the torcs 1.3.0 main binary and robots (according to
repoview and my updates from french mirrors) ... Not a big deal but a little bit
disturbing for torcs 1.2.4 main binary  ;-) 

Are you waiting to fix this problem before releasing torcs 1.3.0 main binary and
robots ? (and thru fixing torcs version mixup) ?

Thanks.
Comment 5 Matthias Saou 2006-11-14 10:46:04 EST
(In reply to comment #4)

The data was hardlinked and already pushed to the mirrors. The 1.3.0 builds for
FC5 and FC6 are still waiting for the next push, which will probably be today.
Comment 6 Marc Dekker 2006-11-15 09:10:16 EST
I cannot get the bug to reproduce on my class room computer nor on the computer
of my friend next to me.
We drove quick race's for 3 to 4 minutes without anything happening.
Both computers run 
TORCS version 1.3.0.1-fc6
openaL version 0.0.9-09.20060204cvs.fc6
and its clear that we run on fedora core 6

Hope this helps.

Good luck
Comment 7 David W. Legg 2006-12-09 15:48:58 EST
I get the same problem on x86_64/FC5.

I have:
[daddy@arcturus ~]$ rpm -qa | grep torcs
torcs-1.3.0-1.fc5
torcs-data-cars-extra-1.3.0-1
torcs-data-1.3.0-1
torcs-data-tracks-road-1.3.0-1

and get:Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1084746048 (LWP 5745)]
0x00002aaaac24759c in alGetString () from /usr/lib64/libopenal.so.0

The program seemed to crash *whenever 2 cars crashed*. It happened like that 3
out of 3 times.

The strace looks like this (if it's any help):
...
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield( <unfinished ...>
[pid  5444] <... select resumed> )      = 1 (out [9], left {0, 798000})
[pid  5444] write(9,
"\270\25\356\f\231\26\257\rh\27m\r\214\26\266\f\323\22\34"..., 1024) = 1024
[pid  5444] select(0, NULL, NULL, NULL, {0, 1} <unfinished ...>
[pid  5438] <... sched_yield resumed> ) = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5438] sched_yield()               = 0
[pid  5444] <... select resumed> )      = 0 (Timeout)
[pid  5438] sched_yield( <unfinished ...>
[pid  5444] --- SIGSEGV (Segmentation fault) @ 0 (0) ---

If you want any more, I'll put it in a proper attachment.
Cheers.

Comment 8 Matthias Saou 2007-02-06 06:45:38 EST
Looks like this might be an x86_64 specific bug in openal. I'm CC'ing Hans since
he has very good C knowledge, and interest in games working as well as possible.
Hans : Do you think you could reproduce and track the problem down? From my
experience, it's pretty easy to reproduce...
Comment 9 Hans de Goede 2007-02-07 04:14:17 EST
I'm currently without internet at home (gasp). And I have no 64 bits machines at
work (isn't working in education great, la la la). Anyways I'll try to put the
necessary packages on my usb drive and see what I can come up with.
Comment 10 Hans de Goede 2007-02-08 09:22:29 EST
Ok I tried this yesterday on my 64 bits machine, running it under gdb yields a
segfault deep deep inside some openal mmx asm code. So I tried disabling the mmx
asm for x86_64, which indeed fixes this. A proper fix for this will need to be
done by openal upstream as my asm is about as good as my French :) In the mean
time this workaround does the trick.

I'll attach the patch for this shortly. Also changing the component to openal
and the assignee to the openal owner to match.
Comment 11 Hans de Goede 2007-02-08 09:24:32 EST
Created attachment 147654 [details]
Patch working around the crash in mmx code on 64 bit
Comment 12 Hans de Goede 2007-06-16 16:44:15 EDT
*** Bug 244281 has been marked as a duplicate of this bug. ***
Comment 13 Hans de Goede 2007-06-16 16:45:24 EDT
I just finished "debugging" bug 244281, which is actually a second report of
this long fixed bug. Why wasn't my patch fixing this applied to the openal
package long ago?
Comment 14 Andreas Bierfert 2007-06-17 03:59:07 EDT
Probably because you attached it during the time when my spamfilter used to eat
bugzilla mails and I totally missed that. I will see that it gets applied asap.
I am really sorry for the delay.
Comment 15 Fedora Update System 2007-06-18 12:38:18 EDT
openal-0.0.9-0.10.20060204cvs.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2007-06-25 19:27:03 EDT
openal-0.0.9-0.10.20060204cvs.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.