Spring is running in SMP - Page 22

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 behe.

It may not fix these crashes, but the latest one is here:
http://springfiles.com/show_file.php?id=2237

Strangely, I don't have any crash problems at all, but ~5% of games seem to desync.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Spring is running in SMP

Post by Beherith »

Ok, but 6 of 6 replays crashed with that my previous MT exe, ill try with this new one.

Edit: crash with new exe: http://buildbot.eat-peet.net/spring/sta ... 12810.html

Another: http://buildbot.eat-peet.net/spring/sta ... 13048.html

9/9 so far, all crashes were at 2 places.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

1. fixable
2. does stringstream use some global non thread safe "locale" object or what? anyone knows how to fix this???
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Spring is running in SMP

Post by imbaczek »

it should be thread-safe iff std::allocator is thread-safe, as all the variables are local... maybe change stream initialization to the ctor form, instead of <<? (i.e. stringstream stream(dstring))
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Spring is running in SMP

Post by Auswaschbar »

imbaczek wrote:it should be thread-safe iff std::allocator is thread-safe, as all the variables are local... maybe change stream initialization to the ctor form, instead of <<? (i.e. stringstream stream(dstring))
std::stringstream with std::allocator is threadsafe on all recent compilers, as long as each std::stringstream is only used from 1 thread ofc.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

I did some googling and it seems that in the past there have been many bugs that caused stringstream to fail in heavily multithreaded situations, even if each object was only used in a single thread. I'm strongly suspecting this is something similar. Cannot see any other reason for this crash. Memory corruption is unlikely - I have two different versions crashing on the same code line with nearly identical traces.

Will do some testing...
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Spring is running in SMP

Post by Auswaschbar »

That was in 2002, thought.
Attachments
main.cpp
Testapp, runs fine with 4 threads.
(528 Bytes) Downloaded 28 times
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Okay, but was your testapp compiled on buildserv?

Edit: And if the problem is related to concurrency in std::locale, maybe it is an interaction between the stringstream and something else. Therefore I will add my testing code to spring.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Spring is running in SMP

Post by imbaczek »

a little bit of googling shows that std::locale should be thread-safe since 2002... worth confirming, though.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5475
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Behe, plz tell if the MT 0.80.4.1-5 (link on the dl page) is working any better.
Griffith
Posts: 67
Joined: 14 Jul 2009, 19:27

Re: Spring is running in SMP

Post by Griffith »

Crash :cry:
Attachments
infolog.txt
(48.76 KiB) Downloaded 21 times
Griffith
Posts: 67
Joined: 14 Jul 2009, 19:27

Re: Spring is running in SMP

Post by Griffith »

1 crash and 1 freeze on 5 games speccing
User avatar
Jonny5isalivetm
Posts: 186
Joined: 04 Jul 2006, 02:43

Re: Spring is running in SMP

Post by Jonny5isalivetm »

Hi Guys

Latest Build seems solid now :D

HORRAY

Widgets I have running :-

Attack AOE
Auto First Build Facing
Autoquit
Commander Name Tags
Defense Range
Health Bars
Old BA Layout
ReclaimInfo
Select n Center!
Immobile Builder
MetalMakers
RelativeMinimap
Smart Nanos
Stockpiler

Thanks to Zerver, Excellent Work!!!!!!
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Spring is running in SMP

Post by Beherith »

So far 1 crash on loading replay out of 6 games, but the crash doesnt seem related:

http://buildbot.eat-peet.net/spring/sta ... 54930.html

Looking good!

I run a fuckton of widgets, too many to list here.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Griffith wrote:Crash :cry:
Thanks griffith, I will fix this one. In the meanwhile you can avoid it by using less widgets. These should definitely be safe:

Autoquit
Immobile Builder
MetalMakers
CoopInfo
Minimap Start boxes
Griffith
Posts: 67
Joined: 14 Jul 2009, 19:27

Re: Spring is running in SMP

Post by Griffith »

I use a lot of widgets but i don't know witch are causing the crash. I don't crash a lot with this new release (around like behe said 1 out of 6). It is much more stable thanks ! 8)
User avatar
Jonny5isalivetm
Posts: 186
Joined: 04 Jul 2006, 02:43

Re: Spring is running in SMP

Post by Jonny5isalivetm »

bah crashed again :((((
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: Spring is running in SMP

Post by ginekolog »

it did not crash for me, but again ugly freeze in first FFA game :cry: Freezes are much harder to debug.. gah back to orginial build (which does not freeze or do it very rarely).
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Spring is running in SMP

Post by Beherith »

Guys, if you crash, PLEASE upload the infolog.txt somewhere, its very simple for you and without it its nearly impossible to fix it.
Post Reply

Return to “Engine”