Artifacts Associated With Ticket 3103656fff
Ticket change [d3c601e48f] (rid 123340) by decosterjos on 2010-11-05 14:56:58:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
==== winFCmd-19.7 Windows extended path names FAILED ==== Contents of test case: list [catch { set f [open $tmpfile [list WRONLY CREAT]] close $f } res] $res [glob -directory $::env(TEMP) -tails tcl[pid].*] ---- Result was: 0 {} TCL7176.tmp ---- Result should have been (exact matching): 0 {} tcl7176.tmp ==== winFCmd-19.7 FAILED - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "decosterjos"
- subsystem initialized to: "37. File System"
- title initialized to: "Case insensitove test result for test winFCmd-19.7"
- type initialized to: "Bug"
Ticket change [b04afb58f8] (rid 97953) by nijtmans on 2010-11-05 23:00:05:
- icomment:
What platform? (XP, Vista, Win7) Tcl version? (8.5.x, 8.6bx, HEAD) Why did I never see this problem in my environment?
- login: "nijtmans"
- mimetype: "text/plain"
- title changed to: "Case insensitive test result for test winFCmd-19.7"
- username: "nijtmans"
- icomment:
Ticket change [33ffd7b838] (rid 106688) by decosterjos on 2010-11-05 23:11:44:
- icomment:
Vista, CVS HEAD
- login: "decosterjos"
- mimetype: "text/plain"
- username: "decosterjos"
- icomment:
Ticket change [5285f58d5e] (rid 126333) by decosterjos on 2010-11-05 23:55:58:
- icomment:
> Why did I never see this problem in my environment? I'm using the Makefile.vc from a Dos-box, maybe you're using msys?
- login: "decosterjos"
- mimetype: "text/plain"
- username: "decosterjos"
- icomment:
Ticket change [0084b65d85] (rid 119333) by nijtmans on 2010-11-11 22:41:45:
- icomment:
On Windows XP, with a fresh HEAD compile (compiled with mingw, but tests run from a DOS box, so that should be EXACTLY the same as VC++ 6.0): ========================================================= C:\workspace\tcl8.6\tests>..\win\tcltest all.tcl -file winFCmd.test -match winFCmd-19.7 Tests running in interp: C:/workspace/tcl8.6/win/tcltest.exe Tests located in: C:/workspace/tcl8.6/tests Tests running in: C:/workspace/tcl8.6/tests Temporary files stored in C:/IBM/WCDE_ENT70/workspace/tcl8.6/tests Test files run in separate interpreters Running tests that match: winFCmd-19.7 Skipping test files that match: l.*.test Only running test files that match: winFCmd.test Tests began at Thu Nov 11 16:33:44 +0100 2010 winFCmd.test Tests ended at Thu Nov 11 16:33:44 +0100 2010 all.tcl:Total190Passed1Skipped189Failed0 Sourced 1 Test Files. ==========================================================
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [ccbfe7b91d] (rid 95761) by dkf on 2010-11-11 23:28:10:
- icomment:
Might depend on filesystem in use. Jos and Jan, can you compare notes on this?
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [5828b064d5] (rid 117754) by decosterjos on 2010-11-12 00:40:14:
- icomment:
I'm using NTFS. Jos.
- login: "decosterjos"
- mimetype: "text/plain"
- username: "decosterjos"
- icomment:
Ticket change [c88314d333] (rid 122113) by decosterjos on 2010-11-12 04:23:40:
- icomment:
This seems to be a problem with [file normalize], and it is not happening in every run. I printed tmpfile before and after the [file normalize] statement in test 19-7. Next shown 2 runs, one good one bad: C:\tmp\tclhead\tcl\tcl\tests>..\win\Release_VC10\tclsh86t.exe all.tcl -file winF Cmd.test -match winFCmd-19.7 Tests running in interp: C:/tmp/tclhead/tcl/tcl/win/Release_VC10/tclsh86t.exe Tests located in: C:/tmp/tclhead/tcl/tcl/tests Tests running in: C:/tmp/tclhead/tcl/tcl/tests Temporary files stored in C:/tmp/tclhead/tcl/tcl/tests Test files run in separate interpreters Running tests that match: winFCmd-19.7 Skipping test files that match: l.*.test Only running test files that match: winFCmd.test Tests began at Thu Nov 11 22:14:53 +0100 2010 winFCmd.test C:/Users/decoster/AppData/Local/Temp/tcl1540.tmp C:/Users/decoster/AppData/Local/Temp/TCL1540.tmp ==== winFCmd-19.7 Windows extended path names FAILED ==== Contents of test case: list [catch { set f [open $tmpfile [list WRONLY CREAT]] close $f } res] $res [glob -directory $::env(TEMP) -tails tcl[pid].*] ---- Result was: 0 {} TCL1540.tmp ---- Result should have been (exact matching): 0 {} tcl1540.tmp ==== winFCmd-19.7 FAILED Tests ended at Thu Nov 11 22:14:53 +0100 2010 all.tcl: Total 190 Passed 0 Skipped 189 Failed 1 Sourced 1 Test Files. Files with failing tests: winFCmd.test C:\tmp\tclhead\tcl\tcl\tests>..\win\Release_VC10\tclsh86t.exe all.tcl -file winF Cmd.test -match winFCmd-19.7 Tests running in interp: C:/tmp/tclhead/tcl/tcl/win/Release_VC10/tclsh86t.exe Tests located in: C:/tmp/tclhead/tcl/tcl/tests Tests running in: C:/tmp/tclhead/tcl/tcl/tests Temporary files stored in C:/tmp/tclhead/tcl/tcl/tests Test files run in separate interpreters Running tests that match: winFCmd-19.7 Skipping test files that match: l.*.test Only running test files that match: winFCmd.test Tests began at Thu Nov 11 22:14:53 +0100 2010 winFCmd.test C:/Users/decoster/AppData/Local/Temp/tcl5720.tmp C:/Users/decoster/AppData/Local/Temp/tcl5720.tmp Tests ended at Thu Nov 11 22:14:53 +0100 2010 all.tcl: Total 190 Passed 1 Skipped 189 Failed 0 Sourced 1 Test Files. - login: "decosterjos"
- mimetype: "text/plain"
- username: "decosterjos"
- icomment:
Ticket change [2a7cd727bb] (rid 118586) by nijtmans on 2010-11-12 05:42:29:
- icomment:
I don't know if [file normalize] is allowed to uppercase the directory, but if it is then the simplest solution is the following patch. [filr normalize] behavior is not the object of this test case, so I have no problem doing that. (even though it is not a real fix......) Strange that test 19.8, which does almost exactly the same, doesn't have this problem (or does it?). It really looks like a strange Windows problem, which has nothing to do with Tcl....... I installed VC++ 10.0 on my Windows 7, and ran this test many times, but I still never see the failure. ;-( And I am using NTFS too. =============================== diff -u -r1.46 winFCmd.test --- tests/winFCmd.test10 Nov 2009 20:40:06 -00001.46 +++ tests/winFCmd.test11 Nov 2010 22:33:07 -0000 @@ -1493,16 +1493,16 @@ catch {file delete $tmpfile} } -result [list 0 {}] test winFCmd-19.7 {Windows extended path names} -constraints nt -setup { - set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] + set tmpfile [file join $::env(TEMP) "TCL[pid].TMP "] set tmpfile [file normalize $tmpfile] } -body { list [catch { set f [open $tmpfile [list WRONLY CREAT]] close $f - } res] $res [glob -directory $::env(TEMP) -tails tcl[pid].*] + } res] $res [glob -directory $::env(TEMP) -tails TCL[pid].*] } -cleanup { catch {file delete $tmpfile} -} -result [list 0 {} [list tcl[pid].tmp]] +} -result [list 0 {} [list TCL[pid].TMP]] test winFCmd-19.8 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] set tmpfile //?/[file normalize $tmpfile] - login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [a3050956fe] (rid 109992) by nijtmans on 2010-11-12 05:42:40:
- assignee changed to: "nijtmans"
Ticket change [40e849605d] (rid 116091) by dkf on 2010-11-12 05:47:21:
- assignee changed to: "dgp"
- foundin changed to: "obsolete: 8.6b1.1"
- priority changed to: "7 High"
Ticket change [e0a330451b] (rid 115230) by decosterjos on 2010-11-12 15:23:36:
- icomment:
Hi, Maybe we should change the object of this discussion to [file normalize], and not just test 19.7. This is my test setup: In file 't.tcl': set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] set normfile [file normalize $tmpfile] if {$tmpfile ne $normfile} { puts "QWERTY: $tmpfile ne $normfile" } In file 'test.tcl': while 1 { puts [incr i] set txt [exec ../win/release_vc10/tclsh86t.exe t.tcl] foreach l [split $txt \n] { if {[string match "QWERTY*" $l]} { puts $txt exit 1 } } } And I run test.tcl until it reports an error. Sometime take > 100 iterations before it gives the error, sometimes only once. I'm trying to trace this issue in [file normalize]. Jos. - login: "decosterjos"
- mimetype: "text/plain"
- username: "decosterjos"
- icomment:
Ticket change [f10994d9f1] (rid 109294) by nijtmans on 2010-11-12 18:54:52:
- icomment:
I suspect the function TclpObjNormalizePath (tclWinFile.c), which is doing some complicated things related to file normalization.
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [862f14b06b] (rid 131456) by decosterjos on 2010-11-12 19:54:51:
- icomment:
Yes, I see FindFirstFileW being called once more in the failing case.
- login: "decosterjos"
- mimetype: "text/plain"
- username: "decosterjos"
- icomment:
Ticket change [353ca65a5b] (rid 106887) by nijtmans on 2010-11-12 20:13:58:
- icomment:
That could be explained by the function NativeStat, which takes different routes. First it tries CreateFile, then GetFileAttributesEx, and if that fails too it uses FindFirstFileW as a final attempt to get a handle. I could imagine that file normalization is different for files that are accessable (those might have a DOS-compatible name as well) than files that are not accessable. When I run your example the first time, I got: QWERTY: C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/tcl128.tmp ne C:/Documents and Settings/Administrator/Local Settings/Temp/tcl128.tmp Manually changing the TEMP environment variable to the long form, I could run your example more than 50000 times without any failure. So, I suspect that your problem has to do with file accessability. Do you have something like a virus checker running which claims the temporary files just enough to make it temporary not accessable? That the direction I would search for. That would explain why no-one else saw this before....
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [dc1f7410dd] (rid 108085) by nijtmans on 2010-11-12 20:19:01:
- icomment:
B.T.W. Does Tcl 8.5 have the same problem?
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [3ad3ed037b] (rid 112626) by decosterjos on 2010-11-12 20:29:18:
- icomment:
Same issue with Tcl8.5 and with virus scanner disabled (8.5 and 8.6). Changing env(TMP) to env(HOME) seems to fix the issue. When using env(TMP), adding some printf statements to the involved functions in the core seems to make the issue disappear too.
- login: "decosterjos"
- mimetype: "text/plain"
- username: "decosterjos"
- icomment:
Ticket change [9b2b724673] (rid 111080) by nijtmans on 2010-11-12 20:33:01:
- icomment:
Have a look at [Bug 2893771], I guess that with this patch your problem started, and that means that Tcl 8.5 is fine. Could you go back to a CVS version of Nov 23 and see if this versions is fine, while a version of Nov 25 gives this problem? =============================================== In the ChangeLog: 2009-11-24 Pat Thoyts <[email protected]> * tests/fCmd.test: [Bug 2893771]: Teach [file stat] to handle locked * win/tclWinFile.c: files so that [file exists] no longer lies.
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [06d17d6cfc] (rid 89278) by nijtmans on 2010-11-12 20:37:14:
- icomment:
So, my hypothesis was wrong: if Tcl 8.5 has the same problem, then [Bug 2893771] is not the cause, simply because this patch was not backported (maybe it should.....)!
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [766127503a] (rid 105580) by nijtmans on 2010-11-12 20:44:04:
- icomment:
If 8.5 has the same problem, probably already a long time, then I don't think this Issue should have high prio. I wouldn't block 8.6b2 for it. Changed Group to current: 8.5.9, so it is clear that 8.6 didn't introduce this!
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [ff96ac4a1c] (rid 108776) by nijtmans on 2010-11-12 20:44:05:
- foundin changed to: "obsolete: 8.5.9"
- priority changed to: "5 Medium"
Ticket change [26382c9900] (rid 88306) by nijtmans on 2010-11-12 21:16:14:
- icomment:
Finally, I saw it once. After 144443 runs, test number 144444 failed!
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [954cc9e9b7] (rid 106135) by decosterjos on 2010-11-12 21:20:38:
- icomment:
Thanks for being so patient :-)
- login: "decosterjos"
- mimetype: "text/plain"
- username: "decosterjos"
- icomment: