Spring is running in SMP - Page 14

Spring is running in SMP

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Thanks. Looks like concurrent access to drawCmdQueueUnits. Will fix asap.

At least three people also reported a hang. I'm having a hard time reproducing this on my computer. What I need to solve the deadlock is call stack dumps for all threads. I'm not sure about the simplest method to dump this data from the process. I first thought drwtsn32.exe might do it but it didn't work out. The method below can be used though. If someone has a better way, please post it...

Download and install this:
http://msdl.microsoft.com/download/symb ... .3.233.msi
Open a command prompt and change directory to the install folder

Code: Select all

cd "C:\Program Files\Debugging Tools for Windows (x86)"
If you have dual monitor put the command prompt on the secondary monitor, preferably together with a task manager.
If you do not have a dual monitor I recommend running spring in windowed mode so that the command prompt can be accessed also after a hang.
When spring hangs, read the Process Identifier (PID) of spring.exe in Task Manager. (View --> Select Columns may be needed)
In the command prompt type

Code: Select all

adplus.vbs -Hang -p PID
On the first run you may get a question about cscript.exe, click Yes.
A new folder named Hang_Mode_XXX will be created in the current directory. Inside is a .log file. Post the log file in this forum. Thanks.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Spring is running in SMP

Post by imbaczek »

process explorer can copy thread stack dumps, but only one frame at a time so that's a lot of clicking.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Spring is running in SMP

Post by lurker »

Hey zerver, right now updating sound, doing things such as updating the camera position, is done during sim, and has a mutex tied to it, so I thought I would ask your opinion about tying sound updates into rendered frames instead. How much work would this cause for you? 3 minutes, 2 hours?
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

If you are talking about CDxSound::Update() the sound classes are thread safe so you should be able to call it from anywhere.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Spring is running in SMP

Post by imbaczek »

dxsound has been ripped out today.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Spring is running in SMP

Post by lurker »

Was it called from both threads before? Just wondering why it already has a mutex, but thanks, should be a nice quick change then.
andre
Posts: 58
Joined: 21 Jun 2008, 04:52

Re: Spring is running in SMP

Post by andre »

Here again the freeze:

(happend two times in a row after a quite large ffa game after my last com died)

http://pastebin.com/m323d6b99

here the infolog:
Attachments
infolog.txt
(487.67 KiB) Downloaded 126 times
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

andre wrote:Here again the freeze:

(happend two times in a row after a quite large ffa game after my last com died)
Thanks, but I think you didn't get all the addresses. If the list is long, you must scroll to be able to copy it all.

Unfortunately it is usually the long traces that are important because these should be the Sim and Draw threads.

If you have another hang please post again. Sorry for the trouble.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

imbaczek wrote:dxsound has been ripped out today.
Oh no, there goes my thread safe class :mrgreen:
andre
Posts: 58
Joined: 21 Jun 2008, 04:52

Re: Spring is running in SMP

Post by andre »

http://pastebin.com/m1b574729
(not the freeze-thing..)
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Re: Spring is running in SMP

Post by MelTraX »

Got some new input for you about the freezes. Spring 1944 seems to cause some GML errors though so I got some data from a BA game aswell.

Both archives contain infolog, replay and the stack output from the linked Microsoft tool.
Attachments
BA68.7z
(107.99 KiB) Downloaded 23 times
Spring 1944.7z
(45.26 KiB) Downloaded 20 times
bishop155
Posts: 7
Joined: 19 Nov 2008, 22:11

Re: Spring is running in SMP

Post by bishop155 »

half way throug a game, using smp, i get dysinced in spring:1944. if you need any logs, or suchlike, let me know
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: Spring is running in SMP

Post by xyz »

Here is another log from a crash. There is another 440M file that i have not included in the zip file, but if you need it, let me know and i will uploaded it somewhere.
I have also used ollydbg to attach to the spring process while it hanged, but i don't yet now if i can save the execution point and send that also.

Hope this info helps.
Attachments
Hang_Mode__Date_02-19-2009__Time_20-35-3939.zip
(12.4 KiB) Downloaded 20 times
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

xyz, I'm note sure which version of spring you were running since you didn't provide the infolog. Please try to reproduce the error with this latest version if you can.
http://planetspring.free.fr/spring/exec ... aee489.zip
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: Spring is running in SMP

Post by xyz »

Ok, I'll try it tonight.

The build that i used is the one found here: http://planetspring.free.fr/spring/exec ... 009a68.zip

And by the way, do you have a list of the LUA widgets that are not thread safe?

Thanks.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

No, I don't have a list.

Also, I discovered a bug in this new version so don't use it. It tends to hang when you select AI...
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: Spring is running in SMP

Post by xyz »

Ok, when you have a version that needs to be tested let me know.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Feel free to try this one: http://zerver.net/spring.zip

Because of changes to the build server, I will not release any more fixed GML executables until the next official spring release. No infologs please :)
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: Spring is running in SMP

Post by xyz »

I've tested the build yesterday for a few hours (8 - 10 games) and the only odd thing that happened besides a Spring crash (witch i suspect it was not related to the MT) was a small freeze, but by the time I managed to opened the debug tools and get the PID, the game was closed completely with no error message.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Thanks for the feedback. Like I said, please don't post any error reports since I have halted development until the next official Spring release. But you could try disabling widgets.

Right now I'm using:
Startboxes
Immobilebuilder
and I have LuaShaders disabled.

I will also post here if I encounter any hangs.
Post Reply

Return to “Engine”