[Bug 38980] New: World of Warships/Planes/Tanks client in torrent download mode crashes spuriously on high bandwidth load (i/o completion ports)

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Jul 27 15:18:12 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=38980

            Bug ID: 38980
           Summary: World of Warships/Planes/Tanks client in torrent
                    download mode crashes spuriously on high bandwidth
                    load (i/o completion ports)
           Product: Wine
           Version: 1.7.47
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: -unknown
          Assignee: wine-bugs at winehq.org
          Reporter: focht at gmx.net
      Distribution: ---

Hello folks,

while checking out some 'World of Warships/Planes/Tanks' issues, I've seen this
"turn off torrent downloader to avoid crash" note multiple times in WineHQ
appdb entries and also on various Internet sites.

Although this workaround solves the actual client download/updater problem, it
seems no one bothered to report this here for some years?

I could reproduce crashes with all 'World of WarXXX' clients using the torrent
download mode.
The crash is caught before any registered JIT debugger ('AeDebug') as the
client installs a top level exception filter.
Upon failure it simply displays a message box with the option to restart the
download client.

Client log file:

--- snip ---
...
26/07/2015 19:46:31          Loading localized resources...
26/07/2015 19:46:32          Loading configuration...
26/07/2015 19:46:32          Setup language: content_lang="en" 
26/07/2015 19:46:32          Start "WoWSLauncher.exe"
params="C:\Games\World_of_Warships\WoWSLauncher.exe"
26/07/2015 19:46:32          Session
id="a01bae86c620733b0ed98078ba6a9bbff72bfd12"
26/07/2015 19:46:32          Info for "WoWSLauncher.exe": Version: 0.3.13.242,
Comment: "Built: 20150622 142954, Revision: #586733 (stable_3.13.3)"
26/07/2015 19:46:32          Create update folder:
path="C:\Games\World_of_Warships\Updates"
26/07/2015 19:46:32          Try access patch folder:
path="C:\Games\World_of_Warships\Updates"
26/07/2015 19:46:32          Create temp folder:
path="C:\Games\World_of_Warships\UpdatesData\temp"
26/07/2015 19:46:32          Try access temp folder:
path="C:\Games\World_of_Warships\UpdatesData\temp"
26/07/2015 19:46:32          Save configuration:
path="C:\Games\World_of_Warships\WoWSLauncher.cfg"
26/07/2015 19:46:33          Start update process
26/07/2015 19:46:33          Clear old/temp files
26/07/2015 19:46:33          Obtain patch information. target: "launcher"...
26/07/2015 19:46:33          Create update work folder:
path="C:\Games\World_of_Warships\UpdatesData\launcher\"
26/07/2015 19:46:33          Try access patch work folder:
path="C:\Games\World_of_Warships\UpdatesData\launcher\"
26/07/2015 19:46:33          System update. Cleaning up system update folder.
26/07/2015 19:46:33          send http request. url:
"http://update.worldofwarships.eu?target=launcher&client_ver=unknown&launcher_ver=040.000242&protocol_ver=3&install_id=a01bae86c620733b0ed98078ba6a9bbff72bfd12&lang=en"
26/07/2015 19:46:33          http request complete.
26/07/2015 19:46:33          target is up to date
26/07/2015 19:46:33          Update complete: target=launcher
26/07/2015 19:46:33          Obtain patch information. target: "client"...
26/07/2015 19:46:33          Create update work folder:
path="C:\Games\World_of_Warships\UpdatesData\client\"
26/07/2015 19:46:33          Try access patch work folder:
path="C:\Games\World_of_Warships\UpdatesData\client\"
26/07/2015 19:46:33          patch is available. version_from: 0.unknown,
version_to: 40.105823
26/07/2015 19:46:33          patch file. name: "wows_40.103115_client.patch",
size: 3105783438
26/07/2015 19:46:33          patch file. name:
"wows_40.103116_40.103115_client.patch", size: 1487947994
26/07/2015 19:46:33          patch file. name:
"wows_40.103886_40.103116_client.patch", size: 37739650
26/07/2015 19:46:33          patch file. name:
"wows_40.103887_40.103886_client.patch", size: 2224
26/07/2015 19:46:33          patch file. name:
"wows_40.105234_40.103887_client.patch", size: 33520274
26/07/2015 19:46:33          patch file. name:
"wows_40.105823_40.105234_client.patch", size: 230571882
26/07/2015 19:46:33          send http request. url:
"http://update.worldofwarships.eu?target=client&client_ver=unknown&launcher_ver=040.000242&protocol_ver=3&install_id=a01bae86c620733b0ed98078ba6a9bbff72bfd12"
26/07/2015 19:46:34          http request complete.
26/07/2015 19:46:34          patch is available. version_from: 0.unknown,
version_to: 40.105823
26/07/2015 19:46:34          patch file. name: "wows_40.103115_client.patch",
size: 3105783438
26/07/2015 19:46:34          patch file. name:
"wows_40.103116_40.103115_client.patch", size: 1487947994
26/07/2015 19:46:34          patch file. name:
"wows_40.103886_40.103116_client.patch", size: 37739650
26/07/2015 19:46:34          patch file. name:
"wows_40.103887_40.103886_client.patch", size: 2224
26/07/2015 19:46:34          patch file. name:
"wows_40.105234_40.103887_client.patch", size: 33520274
26/07/2015 19:46:34          patch file. name:
"wows_40.105823_40.105234_client.patch", size: 230571882
26/07/2015 19:46:34          Getting torrent files via http...
26/07/2015 19:46:34          send http request(attempt: 1). url:
"http://wg.gcdn.co/wows_a/eu/patches/4.0_QRWpTV0q/wows_40.103115_client.patch.torrent"
26/07/2015 19:46:34          http request complete.
26/07/2015 19:46:34          torrent file created. name:
"wows_40.103115_client.patch.torrent"
26/07/2015 19:46:34          send http request(attempt: 1). url:
"http://wg.gcdn.co/wows_a/eu/patches/4.0_QRWpTV0q/wows_40.103116_40.103115_client.patch.torrent"
26/07/2015 19:46:34          http request complete.
26/07/2015 19:46:34          torrent file created. name:
"wows_40.103116_40.103115_client.patch.torrent"
26/07/2015 19:46:34          Getting patch files via ptp...
26/07/2015 19:46:34          Initializing P2P session, extensions=true
26/07/2015 19:47:55  ERROR:    Unexpected exception:
code=EXCEPTION_ACCESS_VIOLATION flags=0 addr=0
26/07/2015 19:48:06          restart launcher: cmd="-restart" 
--- snip ---

The client makes extensive use of I/O Completion Ports (IOCP) with a
considerable number of worker threads (thread pool) for servicing them.

Although the crash occurs kind of randomly, the crash site seems not.

--- snip ---
...
00556EAB  8B4D 00         MOV ECX,DWORD PTR SS:[EBP]
00556EAE  F7D9            NEG ECX
00556EB0  1BC9            SBB ECX,ECX
00556EB2  F7C1 70E64100   TEST ECX,41E670
00556EB8  0F84 9C000000   JE WoWSLaun.00556F5A
00556EBE  8D5424 34       LEA EDX,DWORD PTR SS:[ESP+34]
00556EC2  52              PUSH EDX
00556EC3  8D8E 4C020000   LEA ECX,DWORD PTR DS:[ESI+24C]
00556EC9  E8 92C5F4FF     CALL
WoWSLaun.?address at endpoint@detail at ip@asio at boost@@QB
00556ECE  837C24 34 01    CMP DWORD PTR SS:[ESP+34],1
00556ED3  0F94C0          SETE AL
00556ED6  0FB6C8          MOVZX ECX,AL
00556ED9  51              PUSH ECX
00556EDA  57              PUSH EDI
00556EDB  8D4E 48         LEA ECX,DWORD PTR DS:[ESI+48]
00556EDE  E8 6DBCFFFF     CALL WoWSLaun.00552B50
00556EE3  8B16            MOV EDX,DWORD PTR DS:[ESI]
00556EE5  8B42 70         MOV EAX,DWORD PTR DS:[EDX+70]
00556EE8  57              PUSH EDI
00556EE9  55              PUSH EBP
00556EEA  8BCE            MOV ECX,ESI
00556EEC  FFD0            CALL EAX             ; NULL -> *boom*
00556EEE  8B16            MOV EDX,DWORD PTR DS:[ESI]
00556EF0  8B42 1C         MOV EAX,DWORD PTR DS:[EDX+1C]
00556EF3  6A 00           PUSH 0
00556EF5  55              PUSH EBP
00556EF6  8BCE            MOV ECX,ESI
00556EF8  FFD0            CALL EAX
00556EFA  8A86 B4030000   MOV AL,BYTE PTR DS:[ESI+3B4]
...
--- snip ---

I partially reconstructed the call chain for the crash site:

--- snip ---
<crash site>
...
<5-7 unknown call frames in between>
...
WoWSLaun.private: unsigned int __thiscall
boost::asio::detail::win_iocp_io_service::do_one(BOOL,class
boost::system::error_code &)
...
WoWSLaun.public: unsigned int __thiscall
boost::asio::detail::win_iocp_io_service::run(class boost::system::error_code
&)
..
WoWSLaun.public: unsigned int __thiscall boost::asio::io_service::run(class
boost::system::error_code &)
...
WoWSLaun.unsigned int __stdcall boost::asio::detail::win_thread_function(void
*)
--- snip ---

I found some hints in the launcher about the Boost library version used:

--- snip ---
e:\work\5c6ecc6fb8b7976a\libraries\boost_1_54_0\boost/exception/detail/exception_ptr.hpp
class boost::exception_ptr __cdecl
boost::exception_detail::get_static_exception_object<struct
boost::exception_detail::bad_alloc_>(void)   -  
e:\work\5c6ecc6fb8b7976a\libraries\boost_1_54_0\boost/exception/detail/exception_ptr.hpp
...
--- snip ---

Which leads to:

http://www.boost.org/doc/libs/1_54_0/boost/asio/detail/impl/win_iocp_io_service.ipp

There is a number of internal calls in between the crash site and Boost IOCP
code ('op->complete()' -> 'win_iocp_operation' + function pointer call
hierarchy).

Debugging/relay tracing a problem which seems to occur at random times in a
multi-Gigabyte download, also requiring high download speeds is not really
funny :|

Anyway, it's now documented here for reference.

It would be interesting to know if this torrent download problem occurs on
Windows too, albeit much less frequent.
Reading up some forums I got the impression...

$ sha1sum WoWS_internet_install_eu.exe
e9d3fcc8d4d8a2a88678fa75840d4e76a71b7977  WoWS_internet_install_eu.exe

$ du -sh WoWS_internet_install_eu.exe
6.7M    WoWS_internet_install_eu.exe

$ wine --version
wine-1.7.47-196-g4e6e9a1

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list