[Bug 35397] Endless Steam Client Update even after fresh install (BSD 'read_directory_getdirentries' implementation broken)

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jul 4 18:23:43 CDT 2014


http://bugs.winehq.org/show_bug.cgi?id=35397

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
            Version|1.7.20                      |1.7.10
            Summary|Endless Steam Client Update |Endless Steam Client Update
                   |even after fresh install    |even after fresh install
                   |                            |(BSD
                   |                            |'read_directory_getdirentri
                   |                            |es' implementation broken)
     Ever confirmed|0                           |1

--- Comment #10 from Anastasius Focht <focht at gmx.net> ---
Hello Werner,

please don't change the reported Wine version.

The rule is: earliest Wine version this bug was reported against.

--- quote ---
Meanwhile I have FreeBSD 9.2 with i386-wine-devel-1.7.20,1 installed, but still
no difference. Has any progress been made in this matter? I see that David
Naylor has this as "TODO" in the Freebsd wine wiki.
--- quote ---

Gemach, gemach ... I spent half a day getting a VirtualBox VM with FreeBSD 9.2
up and running that has a _suitable_ environment for doing investigations.
The suffering ... ahhh.

After spending some good hours I came to conclusion that the BSD helper for
'NtQueryDirectoryFile' -> 'read_directory_getdirentries' is broken.

It misses out entries.
Wildcard case = more entries = more likely to overflow during single read ->
restart scan.
Entries get duplicated again with the first part and the real remainder entries
are lost.

--- snip ---
...
0028:Call KERNEL32.FindFirstFileW(00201068 L"\\\\?\\C:\\Program
Files\\Steam\\package\\tmp\\friends\\*",01792fb0) ret=0043e32a
0028:trace:file:FindFirstFileExW L"\\\\?\\C:\\Program
Files\\Steam\\package\\tmp\\friends\\*" 0 0x1792fb0 0 0x0 0
0028:trace:file:RtlDosPathNameToNtPathName_U (L"\\\\?\\C:\\Program
Files\\Steam\\package\\tmp\\friends\\*",0xbf9760,0xbf9768,0x0)
0028:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\Program
Files\\Steam\\package\\tmp\\friends\\" ->
"/home/vboxuser/.wine/dosdevices/c:/Program Files/Steam/package/tmp/friends/"
0028:trace:file:NtQueryDirectoryFile (0xb8 0x0 0x0 0x0 0xbf9738 0x1786e0
0x00002000 0x00000003 0x00000000 L"*" 0x00000001
0028:trace:file:append_entry long L"." short L"" mask L"*"
0028:trace:file:match_filename (L".", L"*")
0028:trace:file:append_entry long L".." short L"" mask L"*"
0028:trace:file:match_filename (L"..", L"*")
0028:trace:file:append_entry long L"friend_join.wav_" short L"FRIE~QLW.WAV"
mask L"*"
0028:trace:file:match_filename (L"friend_join.wav_", L"*")
0028:trace:file:append_entry long L"friend_online.wav_" short L"FRIE~TZT.WAV"
mask L"*"
0028:trace:file:match_filename (L"friend_online.wav_", L"*")
0028:trace:file:append_entry long L"icon_chatFailed.tga_" short L"ICON~UPV.TGA"
mask L"*" 
...
0028:trace:file:append_entry long L"trackerui_thai.txt_" short L"TRAC~5S5.TXT"
mask L"*"
0028:trace:file:match_filename (L"trackerui_thai.txt_", L"*")
0028:trace:file:append_entry long L"trackerui_turkish.txt_" short
L"TRAC~3YQ.TXT" mask L"*"
0028:trace:file:match_filename (L"trackerui_turkish.txt_", L"*")
0028:trace:file:append_entry long L"." short L"" mask L"*"
0028:trace:file:match_filename (L".", L"*")
0028:trace:file:append_entry long L".." short L"" mask L"*"
0028:trace:file:match_filename (L"..", L"*")
0028:trace:file:append_entry long L"friend_join.wav_" short L"FRIE~QLW.WAV"
mask L"*"
0028:trace:file:match_filename (L"friend_join.wav_", L"*")
0028:trace:file:append_entry long L"friend_online.wav_" short L"FRIE~TZT.WAV"
mask L"*"
0028:trace:file:match_filename (L"friend_online.wav_", L"*")
0028:trace:file:append_entry long L"icon_chatFailed.tga_" short L"ICON~UPV.TGA"
mask L"*"
0028:trace:file:match_filename (L"icon_chatFailed.tga_", L"*") 
...
0028:trace:file:append_entry long L"trackerui_portuguese.txt_" short
L"TRAC~Y0F.TXT" mask L"*"
0028:trace:file:match_filename (L"trackerui_portuguese.txt_", L"*")
0028:trace:file:append_entry long L"trackerui_romanian.txt_" short
L"TRAC~CAS.TXT" mask L"*"
0028:trace:file:match_filename (L"trackerui_romanian.txt_", L"*")
0028:trace:file:append_entry long L"trackerui_russian.txt_" short
L"TRAC~MXI.TXT" mask L"*"
0028:trace:file:match_filename (L"trackerui_russian.txt_", L"*")
0028:trace:file:NtQueryDirectoryFile => 0 (6824)
0028:trace:file:FindNextFileW 0x177d30 0x1792fb0
0028:trace:file:FindNextFileW returning L"." (L"")
0028:Ret  KERNEL32.FindFirstFileW() retval=00177d30 ret=0043e32a 
...
--- snip ---

This is from a single 'NtQueryDirectoryFile' call within 'FindFirstFileW'.
Notice the repeating entries (".", "..", "friend_join.wav_") after first half
(restart).

Using the POSIX fallback 'read_directory_readdir' (= pretending system with no
'getdirentries' system call) helped, it made the Steam client to work.

I'm really surprised that only the Steam didn't work for you.
With that kind of bug quite a number of installers/apps/games should be broken.

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