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
Ashnal
Posts: 104
Joined: 24 Jun 2008, 00:57

Re: Spring is running in SMP

Post by Ashnal »

What exactly needs to be fixed for compatibility zerver?
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

YHCIR wrote:I replaced spring.exe with the SMP version, and unitsync.dll.
I get the single player menu even when starting from an internet game with other players.
That's strange. I played it yesterday, and it worked fine.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Ashnal wrote:What exactly needs to be fixed for compatibility zerver?
Move all LUA OpenGL calls from Sim to Draw. The same applies for widgets.
YHCIR
Posts: 190
Joined: 12 Aug 2006, 23:06

Re: Spring is running in SMP

Post by YHCIR »

zerver wrote:
YHCIR wrote:I replaced spring.exe with the SMP version, and unitsync.dll.
I get the single player menu even when starting from an internet game with other players.
That's strange. I played it yesterday, and it worked fine.
I just tried it again and it works fine, really weird. :|
It runs quite well, only crashed when I destroyed a few thousand fighters in one go.
Ashnal
Posts: 104
Joined: 24 Jun 2008, 00:57

Re: Spring is running in SMP

Post by Ashnal »

It was a lobby bug YHCIR, it was fixed yesterday.
YHCIR
Posts: 190
Joined: 12 Aug 2006, 23:06

Re: Spring is running in SMP

Post by YHCIR »

Ashnal wrote:It was a lobby bug YHCIR, it was fixed yesterday.
Ah, that makes sense, thanks.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

YHCIR wrote:It runs quite well, only crashed when I destroyed a few thousand fighters in one go.
If you have crashes, post the infolog.txt

Thanks
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Spring is running in SMP

Post by Satirik »

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

Re: Spring is running in SMP

Post by zerver »

Satirik wrote:freeze in midgame
Thanks but you are using incompatible widgets.
I'm only interested in crashes or hangs without any "GML error" in the infolog.txt
andre
Posts: 58
Joined: 21 Jun 2008, 04:52

Re: Spring is running in SMP

Post by andre »

There i have one for you:
http://pastebin.com/m31bc8c9e
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Thanks, it is an old network bug that has come back.

This one one may work better:
http://planetspring.free.fr/spring/exec ... 009a68.zip
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Re: Spring is running in SMP

Post by MelTraX »

Got a crash: Translated stack
Attachments
local_20090125_124253_unnamed_0.78.2.7z
(32.72 KiB) Downloaded 18 times
infolog.txt
(20.3 KiB) Downloaded 116 times
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 123 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.
Post Reply

Return to “Engine”