Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Warzone2100 on Sparc: threading problem?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
shimitar
Guru
Guru


Joined: 23 Nov 2003
Posts: 320
Location: Italy, Torino

PostPosted: Fri May 25, 2007 9:41 am    Post subject: Warzone2100 on Sparc: threading problem? Reply with quote

Hi!
on a Ultra5 with Gentoo 2007.0 i have unmasked and installed warzone2100 2.0.6 (which runs fine on x86). I get the following trace almost on startup:

Code:
ultra5 X11 # !cat
cat /tmp/warzone2100.gdmp
Program command: /usr/games/bin/warzone2100
Version: 2.0.6
Type: Release
Compiled on: May 25 2007

Operating system: Linux
Node name: ultra5
Release: 2.6.20-gentoo-r4
Version: #2 PREEMPT Tue May 15 17:32:19 Local time zone must be set--see
Machine: sparc64

Pointers: 32bit

Dump caused by signal: SIGSEGV: Invalid memory reference: Invalid permissions for mapped object

GLIBC raw backtrace:

GDB extended backtrace:
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-unknown-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
Attaching to program: /usr/games/bin/warzone2100, process 17016
Reading symbols from /usr/lib/libphysfs-1.0.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libphysfs-1.0.so.1
Reading symbols from /usr/lib/libpng12.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /usr/lib/libjpeg.so.62...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libm.so.6...
(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libSDL-1.2.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libSDL-1.2.so.0
Reading symbols from /lib/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread -134959088 (LWP 17016)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/libSDL_net-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL_net-1.2.so.0
Reading symbols from /usr/lib/opengl/xorg-x11/lib/libGL.so.1...done.
Loaded symbols for //usr//lib/opengl/xorg-x11/lib/libGL.so.1
Reading symbols from /usr/lib/libGLU.so.1...done.
Loaded symbols for /usr/lib/libGLU.so.1
Reading symbols from /usr/lib/libopenal.so.0...done.
Loaded symbols for /usr/lib/libopenal.so.0
Reading symbols from /usr/lib/libvorbisfile.so.3...done.
Loaded symbols for /usr/lib/libvorbisfile.so.3
Reading symbols from /usr/lib/libvorbis.so.0...done.
Loaded symbols for /usr/lib/libvorbis.so.0
Reading symbols from /usr/lib/libogg.so.0...done.
Loaded symbols for /usr/lib/libogg.so.0
Reading symbols from /usr/lib/libmad.so.0...done.
Loaded symbols for /usr/lib/libmad.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/lib/libX11.so.6...done.
Loaded symbols for /usr/lib/libX11.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libXext.so.6...done.
Loaded symbols for /usr/lib/libXext.so.6
Reading symbols from /usr/lib/libXxf86vm.so.1...done.
Loaded symbols for /usr/lib/libXxf86vm.so.1
Reading symbols from /usr/lib/libdrm.so.2...done.
Loaded symbols for /usr/lib/libdrm.so.2
Reading symbols from /usr/lib/gcc/sparc-unknown-linux-gnu/4.1.1/libstdc++.so.6...done.
Loaded symbols for /usr/lib/gcc/sparc-unknown-linux-gnu/4.1.1/libstdc++.so.6
Reading symbols from /usr/lib/gcc/sparc-unknown-linux-gnu/4.1.1/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/gcc/sparc-unknown-linux-gnu/4.1.1/libgcc_s.so.1
Reading symbols from /usr/lib/libXau.so.6...done.
Loaded symbols for /usr/lib/libXau.so.6
Reading symbols from /usr/lib/libXdmcp.so.6...done.
Loaded symbols for /usr/lib/libXdmcp.so.6
Reading symbols from /usr/lib/libXrender.so.1...done.
Loaded symbols for /usr/lib/libXrender.so.1
Reading symbols from /usr/lib/libXrandr.so.2...done.
Loaded symbols for /usr/lib/libXrandr.so.2
Reading symbols from /usr/lib/libXcursor.so.1...done.
Loaded symbols for /usr/lib/libXcursor.so.1
Reading symbols from /usr/lib/libXfixes.so.3...done.
Loaded symbols for /usr/lib/libXfixes.so.3
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Loaded symbols for /usr/lib/gconv/ISO8859-1.so

0xf7d3bd70 in __waitpid_nocancel () from /lib/libpthread.so.0
(gdb) #0  0xf7d3bd70 in __waitpid_nocancel () from /lib/libpthread.so.0
No symbol table info available.
#1  0x00140e18 in ?? ()
No symbol table info available.
#2  0x00140e18 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) The program is running.  Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /usr/games/bin/warzone2100, process 17016


Now, i am trying to recompile with the "splitdebug" feature to see if i get more detailed info... What could be the problem?

I see that ntpl is set by default, could this be the problem?

Its a brand new isntalaltion from the 2007.0 just downloaded last week.
_________________
Willy Gardiol
willy@gardiol.org
Back to top
View user's profile Send private message
Ferris
Retired Dev
Retired Dev


Joined: 13 Jan 2003
Posts: 426
Location: N. Virginia (USA)

PostPosted: Fri May 25, 2007 1:09 pm    Post subject: Reply with quote

Good news, sort of, is that it is not anything specific to your system. I tried it on an SB1000 with 2006.1 profile and see the same failure. My first reaction is that the failure looks like some sort of endian problem or data packing problem, but I don't have much evidence to support this. I'll play with it a bit, too.

For your information, if you set FEATURES='nostrip' and either build with USE=debug or make sure to add '-g' to your CFLAGS, you will get more information --- it seems to be having trouble loading some image file. I don't know if the .img files are 'endian' or if it is a data alignment problem, or what. If I come up with anything, I'll pass it on. If you figure it out, please post it here --- I have no interest in trying to chase down something you have already fixed. :wink:
Back to top
View user's profile Send private message
Ferris
Retired Dev
Retired Dev


Joined: 13 Jan 2003
Posts: 426
Location: N. Virginia (USA)

PostPosted: Fri May 25, 2007 2:04 pm    Post subject: Reply with quote

It's an endian problem. Add -D__BIG_ENDIAN__ to your CFLAGS and you will get into the game; e.g., on your system,
CFLAGS="-O2 -mcpu=ultrasparc -pipe -D__BIG_ENDIAN__"

Try that, and please post your results. (I tried it and when exiting, ran into a bus error, which means a misaligned address. (This is unfortunately not uncommon on sparc when building programs developed on non-sparc, and is symptomatic of sloppy coding practices (suspect casts).)
Back to top
View user's profile Send private message
shimitar
Guru
Guru


Joined: 23 Nov 2003
Posts: 320
Location: Italy, Torino

PostPosted: Mon May 28, 2007 7:14 am    Post subject: Reply with quote

The -D__BIG_ENDIAN__ solved the problem. Shuold i add it to my CFLAGS or keep it only for warzone? Is it safe?

Anyway, something else is broken. Now i get this (after a starting anew campaign!):

Code:

willy@ultra5 ~ $ warzone2100
open /dev/[sound/]dsp: No such file or directory
error:      OpenAL Vendor: (null)
OpenAL Version: (null)
OpenAL Renderer: (null)
OpenAL Extensions: (null)
error:      Couldn't open audio device.
error:      Attempt to free NULL pointer, called by:
File: seqdisp.c
Line: 320
error:      Assert in Warzone: mem.c:267 : memFree ((pMemToFree != NULL))
warzone2100: mem.c:267: memFree: Assertion `(pMemToFree != ((void *)0))' failed.
warzone2100: No such file or directory.
Saved dump file to '/tmp/warzone2100.gdmp'
Aborted


And the gdmp is:

Code:

Program command: warzone2100
Version: 2.0.6
Type: Debug
Compiled on: May 28 2007

Operating system: Linux
Node name: ultra5
Release: 2.6.20-gentoo-r4
Version: #2 PREEMPT Tue May 15 17:32:19 Local time zone must be set--see
Machine: sparc64

Pointers: 32bit

Dump caused by signal: SIGABRT: Process abort signal

GLIBC raw backtrace:

GDB extended backtrace:
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.

[... SNIP SOME USELESS OUTPUT ...]

Loaded symbols for /usr/lib/gconv/ISO8859-1.so
0xf7da7d70 in __waitpid_nocancel () from /lib/libpthread.so.0
(gdb) #0  0xf7da7d70 in __waitpid_nocancel () from /lib/libpthread.so.0
No symbol table info available.
#1  0x00234100 in posixExceptionHandler (signum=6, siginfo=0xffef8d28, sigcontext=0xffef8da8) at exceptionhandler.c:490
        btBuffer = {0x0 <repeats 20 times>}
        btSize = 0
        pid = 1059
        gdbPipe = {7, 8}
        dumpFile = 6
        allreadyRunning = 1
#2  <signal handler called>
No symbol table info available.
#3  0xf7a559ec in raise () from /lib/libc.so.6
No symbol table info available.
#4  0xf7a5729c in abort () from /lib/libc.so.6
No symbol table info available.
#5  0xf7a4d1fc in __assert_fail () from /lib/libc.so.6
No symbol table info available.
#6  0x0023b15c in memFree (pFileName=0x278890 "seqdisp.c", LineNumber=320, pMemToFree=0x0) at mem.c:266
        sNode = {key = 0, priority = 0, pObj = 0x0, psLeft = 0x0, psRight = 0x0, pFile = 0x251b10 "hci.c", line = 961,
  size = 4133663156}
        psDeleted = (MEM_NODE *) 0x0
        i = 0
        InvalidBottom = 0
        InvalidTop = -1076464
        pMemBase = (UBYTE *) 0x81360 "@\006ç-\001"
        psBlock = (BLOCK_HEAP *) 0xa50c88
        Size = 10816648
        __FUNCTION__ = "memFree"
        __PRETTY_FUNCTION__ = "memFree"
#7  0x001a6058 in seq_ReleaseVideoBuffers () at seqdisp.c:320
No locals.
#8  0x00081394 in intShutDown () at hci.c:968
No locals.
#9  0x00092cd8 in frontendShutdown () at init.c:1333
No locals.
#10 0x000b7648 in main (argc=1, argv=0xffef9584) at main.c:869
        frameRet = FRAME_OK
        quit = 0
        Restart = 1
        paused = 0
        bVidMem = 0
        dispBitDepth = 8
        introVideoControl = 3
        loopStatus = 0
        psPaletteBuffer = (iColour *) 0x0
        pSize = 768
#11 0xf7a3e63c in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#12 0x00014098 in _start ()
No symbol table info available.
(gdb) The program is running.  Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /usr/games/bin/warzone2100, process 1043


I have posted this on the developers forums, but they have never used a sparc or have any knowledge on it...[/code]
_________________
Willy Gardiol
willy@gardiol.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum