Skip to content
Tcl Source Code View Ticket
Login

View Ticket

parallell 'source'ing files from linked directory fails randomly

Closed / Accepted19ea026e43c243824c523eba9163ed6442436903Created 12 years agoUpdated 12 years ago
Descriptionhtml2015-04-22 13:40:44

Notice: whole analyze assumes tclWinFile.c from 0a2e3bb2d9 trunk.

Suppose such situation on Windows: several Tcl executable instances (in my situation it was software which integrates Tcl inside) 'source' files at the same time from the same directory, which is symbolic link or mounted drive. (in my situation mentioned software was just installed into this linked directory)

Problem is that in such situation TclpObjNormalizePath randomly fails at tclWinFile.c:2587 (exactly this line: handle = FindFirstFileW((WCHAR *) nativePath, &fData);), because at the same time other process opened the linked directory using NativeReadReparse function without FILE_SHARE_READ flag in CreateFile (see tclWinFile.c:671).

I cannot find the reason to not give shared access for reading the directory in NativeReadReparse as it only reads Reparse Point. My patch corrects this problem (it passes FILE_SHARE_READ flag into CreateFile in NativeReadReparse). Please, consider this correction, or explain the reason why it cannot be used.

Referenced by2
dgp Ticket [19ea026e43]: 5 changes [History diff]2015-04-22 14:04:40
oehharwiki2015-04-23 12:21:38

Checked with Jan and APN. Test suite has no new issue, but [8f6132d6ee] was discovered.

Committed to core-8-5-branch [7d39fa6f82] and trunk [990679a4a2].

Bug closed.

Thank you, Harald

Log in (anonymous is fine) to add a comment.