Bug#629272: sync errors during on-line play
Tobi Vollebregt
tobivollebregt at gmail.com
Sun Jun 5 11:58:16 UTC 2011
Oh and one more note, just FYI:
Sync errors are not related to timing. The patches should be 100% safe
to apply. What will cause sync errors is when the same code gives a
different result on one client as on another client. This can happen
for various reasons:
- Broken code (either in Spring itself or any library it uses)
overwrites random memory that happens to be used in "synced"
calculations
- Different compiler optimizations
- in particular ones that reduce / improve floating point accuracy
- or change from X87 math to SSE math or vice versa
Note though that with GCC 4.0 up to at least 4.4 the normal
optimization options (-O0..-O3) all synced perfectly.
- Miscompilations
- Our "known good" build flags are overridden by something unsafe.
- Different floating point accuracy selected in the processor. Spring
typically ensures the correct mode is selected, but some libraries
like to reset it...
- Bugs in Spring or any libs used for synced calculations that make
the results of those synced calculations depend on unsynced data.
I hope that was useful :-)
Regards,
Tobi
On 5 June 2011 13:45, Tobi Vollebregt <tobivollebregt at gmail.com> wrote:
> Hi,
>
> I've actually noticed a few days ago that on Fedora 15 I also desync
> with current release build. I am a developer but I am kind of inactive
> so I didn't play online since Fedora 13.
>
> So if new Debian packages also desync that suggests to me that
> something in the whole stack has been upgraded during this time which
> breaks sync.
>
> I already did some tests (although on Fedora of course, but it looks
> like this affects all distros):
>
> - self compiled spring with distro's gcc 4.6 : desync
> - packaged spring (compiled with gcc 4.6) : desync
> - self compiled spring using self compiled gcc 4.5 : desync
> - someone else on Ubuntu (unknown version), using a self-compiled gcc
> 4.6 : NO desync
> - yet someone else on latest Ubuntu, using packaged gcc 4.6 : desync
>
> So to me this suggests that probably some upgraded library is to
> blame, or gcc 4.6 contains some miscompile but only with certain
> compilation options, but the search space is huge :-/
>
> I'll keep you informed if I figure out more on why it happens / how to
> solve it on Fedora, as the solution would probably apply to Debian
> too.
>
> Regards,
>
> Tobi
>
>
> On 5 June 2011 12:11, Jan Dittberner <jandd at debian.org> wrote:
>> On Sun, Jun 05, 2011 at 10:16:39AM +0200, Piotr Majkrzak wrote:
>>> Package: spring
>>> Version: 0.82.7.1+dfsg1-3
>>> Severity: important
>>>
>>> Hi,
>>> I have problem when I'm trying to play on-line, because I have lot of "sync errors".
>>> http://springrts.com/wiki/Build_from_source says that it can be caused by wrong build.
>>> Yours sincerely
>>> Piotr Majkrzak
>>
>> I just checked a network game and got (few) sync errors too. Maybe this is
>> related to the patch [1] added recently to fix the GCC 4.6 build failures.
>> Upstream did not have objections to use this patch but maybe it introduces
>> some minor timing issues.
>>
>> [1] http://anonscm.debian.org/gitweb/?p=pkg-games/spring.git;a=history;f=debian/patches/ftbfs-fix-625097.patch
>>
>> Thanks for reporting the issue.
>>
>>
>> Jan Dittberner
>>
>>> -- System Information:
>>> Debian Release: wheezy/sid
>>> APT prefers unstable
>>> APT policy: (500, 'unstable')
>>> Architecture: amd64 (x86_64)
>>>
>>> Kernel: Linux 2.6.39-1-amd64 (SMP w/2 CPU cores)
>>> Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
>>> Shell: /bin/sh linked to /bin/dash
>>>
>>> Versions of packages spring depends on:
>>> ii libboost-program-option 1.46.1-5 program options library for C++
>>> ii libboost-regex1.46.1 1.46.1-5 regular expression library for C++
>>> ii libboost-signals1.46.1 1.46.1-5 managed signals and slots library
>>> ii libboost-system1.46.1 1.46.1-5 Operating system (e.g. diagnostics
>>> ii libboost-thread1.46.1 1.46.1-5 portable C++ multi-threading
>>> ii libc6 2.13-4 Embedded GNU C Library: Shared lib
>>> ii libdevil1c2 1.7.8-6+b1 Cross-platform image loading and m
>>> ii libfreetype6 2.4.4-1 FreeType 2 font engine, shared lib
>>> ii libgcc1 1:4.6.0-11 GCC support library
>>> ii libgl1-mesa-glx [libgl1 7.10.2-3 free implementation of the OpenGL
>>> ii libglew1.5 1.5.8-3 The OpenGL Extension Wrangler - ru
>>> ii libglu1-mesa [libglu1] 7.10.2-3 The OpenGL utility library (GLU)
>>> ii libogg0 1.2.2~dfsg-1 Ogg bitstream library
>>> ii libopenal1 1:1.13-2 Software implementation of the Ope
>>> ii libsdl1.2debian 1.2.14-6.4 Simple DirectMedia Layer
>>> ii libstdc++6 4.6.0-11 The GNU Standard C++ Library v3
>>> ii libvorbis0a 1.3.2-1 The Vorbis General Audio Compressi
>>> ii libvorbisfile3 1.3.2-1 The Vorbis General Audio Compressi
>>> ii libx11-6 2:1.4.3-1 X11 client-side library
>>> ii libxcursor1 1:1.1.11-1 X cursor management library
>>> ii otf-freefont 20100919-1 Freefont Serif, Sans and Mono Open
>>> ii spring-common 0.82.7.1+dfsg1-3 a modern full-3D RTS game engine (
>>> ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
>>>
>>> Versions of packages spring recommends:
>>> ii springlobby [spring-lobby] 0.130-1 single/multiplayer lobby for the S
>>>
>>> Versions of packages spring suggests:
>>> pn libtxc-dxtn0 <none> (no description available)
>>> pn spring-javaai <none> (no description available)
>>> pn spring-maps-deltasiege | spri <none> (no description available)
>>> pn spring-mods-kernelpanic | spr <none> (no description available)
>>>
>>> -- no debconf information
>>>
>>>
>>>
>>> _______________________________________________
>>> Pkg-games-devel mailing list
>>> Pkg-games-devel at lists.alioth.debian.org
>>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-devel
>>>
>>
>> --
>> Jan Dittberner - Debian Developer
>> GPG-key: 4096R/558FB8DD 2009-05-10
>> B2FF 1D95 CE8F 7A22 DF4C F09B A73E 0055 558F B8DD
>> http://ddportfolio.debian.net/ - http://people.debian.org/~jandd/
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (GNU/Linux)
>>
>> iQIcBAEBCAAGBQJN61ZGAAoJEKc+AFVVj7jd1IEP/jm1RLiVcsmoIU3zbWBjNToK
>> BSBwxzgeHo4geX8dkwmMZq5IILkIOv968HPLYp+RP01Hvd6oREAmu1bFeVZ5xEEB
>> lSTikarnlD53mJ2IvFDMZFPAH2Ak87mJisGJmmSS23+DNuoVVDVDyByysVovTkWk
>> vlg1w+nOE6OqW3l1v1tv5HAP5sEo9StU+wr/yhPQTr4rcCSSNbJ1qBfY4fLHnxC5
>> C+bOjX2fcWnBcrxJzshbeXuFAHAe15hcpA2O9dL7nKRVheBb0uZwklS7ehtH3n04
>> ol0xopD8ZUSnwIjOo/sfX4EBjSK2M8IEIDrWG4fOkpxSocvBIKdmXOYaxuq+R1m3
>> fD5keFCNIS3zDhxR81BuLHpOReO0ni1VJfm7TIF7qokLDwKGsx5HqY72+mdbtTsg
>> K+HGL3UNB87vEzX6bcsqKT1VwrDLGNi17YASXgcSD9itXcYgWYH/F0iV/sOOz+JL
>> olyIkS4tCfZA8t/Bqn+lJj5W+zLPcnIQ+RpJkdHo0ieokzBswM8N9CqHs//Hzlrh
>> aqDuinP55XTVjnfpmf4u3dlmo++ZOqTvNPekUCBZ/HCnCqKRRf2TLNMZNB4cddbQ
>> O6F/uNF3MCql9LaIVLCHD9HW+lX8uhnUIz79Lgomb0mMPQtWSzt7TdOb0PxXLTHr
>> 12Kz4Nr+CoBWOk8SaIeN
>> =AX/D
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> Pkg-games-devel mailing list
>> Pkg-games-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-devel
>>
>
More information about the Pkg-games-devel
mailing list