Bug 83274 - XCom Enemy Unknown segfault at src/gallium/drivers/radeon/r600_texture.c:602
Summary: XCom Enemy Unknown segfault at src/gallium/drivers/radeon/r600_texture.c:602
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: 10.2
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-30 14:05 UTC by Jop
Modified: 2019-09-18 19:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
GDB backtrace (35.27 KB, text/plain)
2014-08-30 14:05 UTC, Jop
Details

Description Jop 2014-08-30 14:05:58 UTC
Created attachment 105468 [details]
GDB backtrace

XCOM: Enemy Unknown segfaults frequently during gameplay.
I have not been able to reliably reproduce a secenario, but playing 10-20 minutes usually ends in a crash to desktop, so if extra data is needed it is not that difficult for me to provide...

I've attached GDB backtraces (simple and full) which suggest the crash is located in src/gallium/drivers/radeon/r600_texture.c.

Running Debian Jessie 64 bit, with libgl1-mesa-dri 10.2.5 on an 512 MB ATI Mobility RADEON HD 4570 graphics card.
Comment 1 Michel Dänzer 2014-09-01 01:30:02 UTC
Looks like memory corruption. If it's not bug 80673 (which is supposed to be fixed in the latest game update), can you attach the output from running the game in valgrind?
Comment 2 nicolas 2015-04-14 20:31:33 UTC
(In reply to Michel Dänzer from comment #1)
> Looks like memory corruption. If it's not bug 80673 (which is supposed to be
> fixed in the latest game update), can you attach the output from running the
> game in valgrind?


Hie,
i h
Comment 3 nicolas 2015-04-14 20:36:53 UTC
hie,
i have the same bug since the release of the game with RV770.
Can you explain me what parameters i have to use with valgrind  ( i have installed it) so that it can makes a useful output for you?

I'm sorry for the comment before, that's a bad manip.
Also sorry for bad english
Comment 4 Michel Dänzer 2015-04-15 03:25:06 UTC
(In reply to nicolas from comment #3)
> Can you explain me what parameters i have to use with valgrind  ( i have
> installed it) so that it can makes a useful output for you?

For a start, just prepend valgrind to the final command line invoked for starting the game. I don't know offhand how to do that for XCOM, hopefully someone else can help you with that if needed.
Comment 5 nicolas 2015-04-15 17:33:19 UTC
I tried to modify the launch script xcom.sh like this :

if [ -e "$GAMESCRIPT" ]; then
		# Launch the game
		echo "XCOM - Launching"
		valgrind --log-file=valgrindxcom.log "$GAMESCRIPT" $@
	else

The game launch and valgrind makes the log file but i'm not sure that valgrind works during execution of the game.

here is the output of valgrind, that doesn't seems to help  :

==5476== Memcheck, a memory error detector
==5476== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==5476== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==5476== Command: /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/xcom.sh -arch=x86_64
==5476== Parent PID: 5470
==5476== 
==5477== 
==5477== HEAP SUMMARY:
==5477==     in use at exit: 736,194 bytes in 27 blocks
==5477==   total heap usage: 40 allocs, 13 frees, 998,962 bytes allocated
==5477== 
==5477== LEAK SUMMARY:
==5477==    definitely lost: 0 bytes in 0 blocks
==5477==    indirectly lost: 0 bytes in 0 blocks
==5477==      possibly lost: 0 bytes in 0 blocks
==5477==    still reachable: 736,194 bytes in 27 blocks
==5477==         suppressed: 0 bytes in 0 blocks
==5477== Rerun with --leak-check=full to see details of leaked memory
==5477== 
==5477== For counts of detected and suppressed errors, rerun with: -v
==5477== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==5476== 
==5476== HEAP SUMMARY:
==5476==     in use at exit: 32 bytes in 1 blocks
==5476==   total heap usage: 40 allocs, 39 frees, 998,962 bytes allocated
==5476== 
==5476== LEAK SUMMARY:
==5476==    definitely lost: 0 bytes in 0 blocks
==5476==    indirectly lost: 0 bytes in 0 blocks
==5476==      possibly lost: 0 bytes in 0 blocks
==5476==    still reachable: 32 bytes in 1 blocks
==5476==         suppressed: 0 bytes in 0 blocks
==5476== Rerun with --leak-check=full to see details of leaked memory
==5476== 
==5476== For counts of detected and suppressed errors, rerun with: -v
==5476== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Comment 6 Michel Dänzer 2015-04-16 01:29:53 UTC
(In reply to nicolas from comment #5)
> ==5476== Command:
> /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/
> linux/xcom.sh -arch=x86_64

Looks like valgrind was run with the xcom.sh script as its argument, so it probably only monitored execution of the shell interpreter. I think you need to hook it into the xcom.sh script itself so it monitors execution of the actual game executable.
Comment 7 Laurent carlier 2015-04-16 06:56:44 UTC
You can try to edit the xcom.sh file in:
Steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/

and add a line: DEBUGGER="valgrind --log-file=valgrindxcom.log" or export the variable before launching steam (export DEBUGGER="valgrind --log-file=valgrindxcom.log")
Comment 8 nicolas 2015-04-17 17:04:32 UTC
It just don't work.

exporting the variable and modifying tle script in the linux directory.
I have try differents things.

here is an output i have get, don't remember how cause i have try so many things.
I need help for this valgrind thing :s 



6476== Memcheck, a memory error detector
==6476== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6476== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==6476== Command: /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/../../binaries/linux/game.x86_64
==6476== Parent PID: 6474
==6476== 
==6476== Conditional jump or move depends on uninitialised value(s)
==6476==    at 0xE911A6: CXCOMGame::GetFileMappings(CFilePathMap&) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x2583107: CFeralGame::InitialiseToolbox() (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x258434C: CFeralGame::Run() (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE7F3AB: main (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476== 
==6476== Unsupported clone() flags: 0x800600
==6476== 
==6476== The only supported clone() uses are:
==6476==  - via a threads library (LinuxThreads or NPTL)
==6476==  - via the implementation of fork or vfork
==6476== 
==6476== Valgrind detected that your program requires
==6476== the following unimplemented functionality:
==6476==    Valgrind does not support general clone().
==6476== This may be because the functionality is hard to implement,
==6476== or because no reasonable program would behave this way,
==6476== or because nobody has yet needed it.  In any case, let us know at
==6476== www.valgrind.org and/or try to work around the problem, if you can.
==6476== 
==6476== Valgrind has to exit now.  Sorry.  Bye!
==6476== 

sched status:
  running_tid=4

Thread 1: status = VgTs_WaitSys
==6476==    at 0x505FB9D: ??? (syscall-template.S:81)
==6476==    by 0x847A198: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0)
==6476==    by 0x83FC60E: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0)
==6476==    by 0x2603037: CSDLEventLoop::BeginEventLoop() (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x256FF94: CHThread::RunWinMain(int (*)(MacDoze::HINSTANCE__*, MacDoze::HINSTANCE__*, char*, int), MacDoze::HINSTANCE__*, MacDoze::HINSTANCE__*, char*, int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x258431E: CFeralGame::Run() (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE7F3AB: main (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)

Thread 2: status = VgTs_WaitSys
==6476==    at 0x505E680: sem_wait (sem_wait.S:85)
==6476==    by 0x847652D: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0)
==6476==    by 0x8476674: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0)
==6476==    by 0x842BBA0: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0)
==6476==    by 0x842B73C: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0)
==6476==    by 0x8476278: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0)
==6476==    by 0x5058181: start_thread (pthread_create.c:312)
==6476==    by 0x96D947C: clone (clone.S:111)

Thread 3: status = VgTs_WaitSys
==6476==    at 0x505C414: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==6476==    by 0x12067B82: radeon_drm_cs_emit_ioctl (in /usr/lib/x86_64-linux-gnu/dri/r600_dri.so)
==6476==    by 0x120673C8: impl_thrd_routine (in /usr/lib/x86_64-linux-gnu/dri/r600_dri.so)
==6476==    by 0x5058181: start_thread (pthread_create.c:312)
==6476==    by 0x96D947C: clone (clone.S:111)

Thread 4: status = VgTs_Runnable
==6476==    at 0x2A4B521: google_breakpad::ExceptionHandler::GenerateDump(google_breakpad::ExceptionHandler::CrashContext*) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x2A4B8D9: ??? (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x2A4BAA1: google_breakpad::ExceptionHandler::SignalHandler(int, siginfo*, void*) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x506033F: ??? (in /lib/x86_64-linux-gnu/libpthread-2.19.so)
==6476==    by 0x9615CC8: raise (raise.c:56)
==6476==    by 0x96190D7: abort (abort.c:89)
==6476==    by 0xE9F98E: appRequestExit(unsigned int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xFB530D: appInit(char16_t const*, FOutputDevice*, FOutputDeviceConsole*, FOutputDeviceError*, FFeedbackContext*, FFileManager*, FCallbackEventObserver*, FCallbackQueryDevice*, FConfigCacheIni* (*)()) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x1084E8C: FEngineLoop::PreInit(char16_t const*) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x1087D39: GuardedMain(char16_t const*, MacDoze::HINSTANCE__*, MacDoze::HINSTANCE__*, int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x1087F5F: WinMain(MacDoze::HINSTANCE__*, MacDoze::HINSTANCE__*, char*, int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x256FCE6: CHThread::WinMainThreadEntry(void*) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x5058181: start_thread (pthread_create.c:312)
==6476==    by 0x96D947C: clone (clone.S:111)

Thread 5: status = VgTs_WaitSys
==6476==    at 0x505C414: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==6476==    by 0x2578AC9: CHEvent::Wait(unsigned int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x2561406: ??? (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE9D70C: FEventWin::Wait(unsigned int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE9EACD: FQueuedThreadWin::_ThreadProc(void*) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x256F072: CHThread::StaticRunThread(void*, bool&) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x25F9703: CPThread::Run() (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x5058181: start_thread (pthread_create.c:312)
==6476==    by 0x96D947C: clone (clone.S:111)

Thread 6: status = VgTs_WaitSys
==6476==    at 0x505C414: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==6476==    by 0x2578AC9: CHEvent::Wait(unsigned int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x2561406: ??? (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE9D70C: FEventWin::Wait(unsigned int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE9EACD: FQueuedThreadWin::_ThreadProc(void*) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x256F072: CHThread::StaticRunThread(void*, bool&) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x25F9703: CPThread::Run() (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x5058181: start_thread (pthread_create.c:312)
==6476==    by 0x96D947C: clone (clone.S:111)

Thread 7: status = VgTs_WaitSys
==6476==    at 0x505C414: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==6476==    by 0x2578AC9: CHEvent::Wait(unsigned int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x2561406: ??? (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE9D70C: FEventWin::Wait(unsigned int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE9EACD: FQueuedThreadWin::_ThreadProc(void*) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x256F072: CHThread::StaticRunThread(void*, bool&) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x25F9703: CPThread::Run() (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x5058181: start_thread (pthread_create.c:312)
==6476==    by 0x96D947C: clone (clone.S:111)

Thread 8: status = VgTs_WaitSys
==6476==    at 0x505C414: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==6476==    by 0x2578AC9: CHEvent::Wait(unsigned int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x2561406: ??? (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE9D70C: FEventWin::Wait(unsigned int) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0xE9EACD: FQueuedThreadWin::_ThreadProc(void*) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x256F072: CHThread::StaticRunThread(void*, bool&) (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x25F9703: CPThread::Run() (in /home/nicolas/.steam/steam/SteamApps/common/XCom-Enemy-Unknown/binaries/linux/game.x86_64)
==6476==    by 0x5058181: start_thread (pthread_create.c:312)
==6476==    by 0x96D947C: clone (clone.S:111)
Comment 9 GitLab Migration User 2019-09-18 19:17:06 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/523.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.