Closed Bug 911347 Opened 11 years ago Closed 11 years ago

Intermittent test_0201_app_launch_apply_update.js | Failed to clean up directory: [Error 5] Access is denied: 'c:\\users\\cltbld\\appdata\\local\\temp\\tmpebndee\\ExecutableDir.tmp\\bin\\mimeTypes.rdf' etc..

Categories

(Testing :: XPCShell Harness, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(firefox24 unaffected, firefox25 unaffected, firefox26 fixed)

RESOLVED FIXED
mozilla26
Tracking Status
firefox24 --- unaffected
firefox25 --- unaffected
firefox26 --- fixed

People

(Reporter: RyanVM, Assigned: mihneadb)

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=27234346&tree=Mozilla-Inbound

Windows 7 32-bit mozilla-inbound opt test xpcshell on 2013-08-30 12:36:50 PDT for push 41a898465636
slave: t-w732-ix-119

12:51:25     INFO -  TEST-INFO | C:\slave\test\build\tests\xpcshell\tests\toolkit\mozapps\update\test\unit\test_0201_app_launch_apply_update.js | running test ...
12:51:29     INFO -  TEST-PASS | C:\slave\test\build\tests\xpcshell\tests\toolkit\mozapps\update\test\unit\test_0201_app_launch_apply_update.js | test passed (time: 3931.000ms)
12:51:29     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:30     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:31     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:32     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:33     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:34     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:35     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:36     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:37     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:38     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:39     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:40     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:41     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:42     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:43     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:44     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:45     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:46     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:47     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:48     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:49     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:50     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:51     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:52     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:53     INFO -  TEST-INFO | Failed to remove directory: c:\users\cltbld\appdata\local\temp\tmpebndee. Waiting.
12:51:54  WARNING -  TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\xpcshell\tests\toolkit\mozapps\update\test\unit\test_0201_app_launch_apply_update.js | Failed to clean up directory: [Error 5] Access is denied: 'c:\\users\\cltbld\\appdata\\local\\temp\\tmpebndee\\ExecutableDir.tmp\\bin\\mimeTypes.rdf'
12:51:54     INFO -  >>>>>>>

and so on...
The problem is that our workaround was only for the plugin directory. It turns
out that this file still in use thing happens for other stuff as well. I suggest
we extend our current approach to include all file cleaning on Windows. It's
not pretty but I don't see a different way.

Talked to Mook_as in IRC and found out the reason why there is this delay between
closing the process and unlocking the file because of some "feature" of Windows
dealing with reopening files immediately.
Attachment #798026 - Flags: review?(ted)
Assignee: nobody → mihneadb
Status: NEW → ASSIGNED
Opened bug 911607 for the other error in the log file.
Comment on attachment 798026 [details] [diff] [review]
Fix xpcshell static file cleanup on Windows

Review of attachment 798026 [details] [diff] [review]:
-----------------------------------------------------------------

::: testing/xpcshell/runxpcshelltests.py
@@ +376,5 @@
>                  # removed fine
>                  return
>  
> +        # we try again later at the end of the run for windows
> +        if 'WindowsError' in traceback.format_exc():

This is a really weird way to test for Windows. I'd prefer if you just used mozinfo.isWin. Alternately, any reason not to just drop the conditional here and always queue directories for later cleanup? Shouldn't be harmful on any platform.
Attachment #798026 - Flags: review?(ted)
You are absolutely correct, I'll fix it.
Please note that this means we won't error if we can't clean up any temp directory
that we set up for a test. Then again, I've never seen this happen other than
on Windows because of the file locking thing.

Also, Linux and OS X let you remove a file that is in use by a process so the
check was only affecting Windows anyway.
Attachment #798940 - Flags: review?(ted)
Attachment #798026 - Attachment is obsolete: true
Comment on attachment 798940 [details] [diff] [review]
Fix xpcshell static file cleanup on Windows

Review of attachment 798940 [details] [diff] [review]:
-----------------------------------------------------------------

This seems fine. I don't think it's worth the orange pain for this case that we can't do much about. Our test slaves have their temp dirs cleaned on reboot nowadays, so this shouldn't lead to problems down the road.
Attachment #798940 - Flags: review?(ted) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1153ba67c760
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: