| Ticket UUID: | 1988552 | ||
| Title: | test failures in iortrans.tf | ||
| Type: | Bug | Created on: | 2008-06-09 03:52:27 |
| Submitter: | kennykb | Assigned to: | andreas_kupries |
| Subsystem: | 26. Channel Transforms | Severity: | |
| Priority: | 5 Medium | Last modified: | 2008-06-11 01:06:57 |
| Status: | Closed | Closed by: | andreas_kupries |
| Resolution: | Fixed | Closed on: | 2008-06-10 18:06:57 |
| Version: | obsolete: 8.6a0 | ||
| Description: | ||||
The following tests all fail when compiled and run
with mingw on Windows XP:
iortrans.tf-6.1, 6.2, 7.1, 7.2, 7.3, 8.1, 8.2
In each case the error is:
error deleting "D:/SourceForge/tcl/nsk1200002852B/tempchanfile": permission denied
while executing
"file delete $fullName"
(procedure "removeFile" line 21)
invoked from within
"removeFile tempchanfile"
(procedure "tempdone" line 5)
invoked from within
"tempdone"
("uplevel" body line 12)
invoked from within
"uplevel 1 $script"
The problem appears to be that even after the
[close $tempchan] in the [tempdone] procedure,
a live handle exists to 'tempchanfile'. The
'permission denied' error is actually 'file
in use.'
The problem is not (as it has been with some
tests in the past) that Windows has yet to catch
up with closing the file. Adding an [after 1000]
in the [testdone] procedure prior to the
[file delete] does not work around the problem.
| ||||
| User Comments: | ||||
andreas_kupries added on 2008-06-10 11:36:13:
Logged In: YES user_id=75003 Originator: NO Reading all the relevant code I am getting an inkling of the problem. Using tf-6.1 as example: The code opens the file, pushes the transform on the channel, and then moves this channel to a second thread B via the testthread cut/splice commands. It then runs the test script in thread B, captures results and delivers them. Thread B is reaped/killed via tcltest::threadReap. This uses -async thread::exit's to kill the thread. The code uses 'after' delays to wait a bit for the kill, but otherwise is not sync. As such I can currently not exclude that we come to the 'removeFile' command while thread B is still alive and holding the channel open. The proper way of doing things might be to 'close $c' in the test-script given to inthread. The return from that is synchronized via 'vwait', so we can be sure that the channel would be gone. I.e. try to add the commands close $c set notes after line 1247 of ioTrans.test. Close channel and make the returned data explicit (was implicit in the result of 'note' before). Wait ... tf-6.2 fails for you as well, and I see that this one has an explicit 'close' command in the script. That counters my theory. ditto all the others as well. Ok, I will have to compile this on our XP box. Problem is that I use MSVC, mingw is only the bash/make environment. Although, if that works we have one mre nice datapoint. andreas_kupries added on 2008-06-11 00:30:55:
Logged In: YES user_id=75003 Originator: NO Ok. I see the same access denied problem with a tclsh/tcltest built with a MSVC compiler, using MinGW bash as environment. So, the MinGW compiler should make no difference. Investigating further. andreas_kupries added on 2008-06-11 00:37:51:
Logged In: YES user_id=75003 Originator: NO Aha. My advice regarding adding a 'close $c' to 6.1 is good. Running any of the other failing tests alone they pass. I would say that it is the open channel from 6.1 which causes the others to fail as well. The only difference between them is that 6.1 has no close command in-thread. andreas_kupries added on 2008-06-11 01:06:57:
Logged In: YES user_id=75003 Originator: NO Fixed, and fix committed to head. Plus a few others: tf-11.* did not cleanup the file, and tf-11.0 needed a close as well when doing the cleanup. iortrans-8.* were not unique, the threaded forms missed the .tf suffix. Now added. | ||||
