Bug 143484

Summary: [Win] Bots complain about missing /etc/catalog
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Tools / TestsAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bfulgham, cdumez, commit-queue, glenn
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Windows 7   
See Also: https://bugs.webkit.org/show_bug.cgi?id=143463
https://bugs.webkit.org/show_bug.cgi?id=153683
Attachments:
Description Flags
Patch cdumez: review+

Description Chris Dumez 2015-04-07 10:16:51 PDT
Bots complain about missing /etc/catalog:
476 2928 worker/0 http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml passed
18:00:06.538 2928 worker/0 http/tests/security/xss-DENIED-xsl-external-entity.xml output stderr lines:
18:00:06.538 2928   ERROR: Failed to create path /tmp/DumpRenderTree-1sDSaK\Databases
18:00:06.538 2928   ..\platform\win\FileSystemWin.cpp(212) : WebCore::makeAllDirectories
18:00:06.538 2928   ERROR: Failed to create path /tmp/DumpRenderTree-1sDSaK\Databases
18:00:06.538 2928   ..\platform\win\FileSystemWin.cpp(212) : WebCore::makeAllDirectories
18:00:06.538 2928   LEAK: 3 CachedPage
18:00:06.538 2928   LEAK: 218 CachedResource
18:00:06.538 2928   LEAK: 4 CachedFrame
18:00:06.538 2928   LEAK: 7 Frame
18:00:06.538 2928   LEAK: 242 WebCoreNode
18:00:06.538 2928   LEAK: 46 RenderObject
18:00:06.538 2928   LEAK: 6 Page
18:00:06.538 2928   file:///C:/Program%20Files%20(x86)/Common%20Files/Apple/Apple%20Application%20Support/../etc/catalog:1: parser error : Document is empty
18:00:06.538 2928   
18:00:06.538 2928   ^
18:00:06.538 2928   file:///C:/Program%20Files%20(x86)/Common%20Files/Apple/Apple%20Application%20Support/../etc/catalog:1: parser error : Start tag expected, '<' not found
18:00:06.538 2928   
18:00:06.538 2928   ^
18:00:06.538 2928   compilation error: file http://127.0.0.1:8000/security/xss-DENIED-xsl-document-securityOrigin.xml line 2 element stylesheet
18:00:06.538 2928   xsl:version: only 1.0 features are supported
18:00:06.538 2928   compilation error: file http://127.0.0.1:8000/security/xss-DENIED-xsl-document-securityOrigin.xml line 2 element stylesheet
18:00:06.538 2928   xsl:version: only 1.0 features are supported
18:00:06.538 2928   compilation error: file http://127.0.0.1:8000/security/xss-DENIED-xsl-document-securityOrigin.xml line 2 element stylesheet
18:00:06.538 2928   xsl:version: only 1.0 features are supported
18:00:06.538 2928 worker/0 http/tests/security/xss-DENIED-xsl-external-entity.xml passed

It can apparently cause tests to fail sometimes:
http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpectations=true&tests=http%2Ftests%2Fsecurity%2Fxss-DENIED-xsl-external-entity-redirect.xml

Radar: <rdar://problem/4292995>
Comment 1 Brent Fulgham 2015-04-07 10:53:50 PDT
Created attachment 250276 [details]
Patch
Comment 2 Chris Dumez 2015-04-07 10:55:00 PDT
Comment on attachment 250276 [details]
Patch

r=me.
Comment 3 Brent Fulgham 2015-04-07 11:07:46 PDT
Committed r182481: <http://trac.webkit.org/changeset/182481>
Comment 4 Chris Dumez 2015-04-07 13:25:47 PDT
Did you confirm it worked locally?

It looks like it is still happening on the bots:
11:32:17.829 2580   file:///C:/Program%20Files%20(x86)/Common%20Files/Apple/Apple%20Application%20Support/../etc/catalog:1: parser error : Document is empty
11:32:17.829 2580   
11:32:17.829 2580   ^
11:32:17.829 2580   file:///C:/Program%20Files%20(x86)/Common%20Files/Apple/Apple%20Application%20Support/../etc/catalog:1: parser error : Start tag expected, '<' not found
11:32:17.829 2580   
11:32:17.829 2580   ^

see:
https://build.webkit.org/builders/Apple%20Win%207%20Debug%20%28Tests%29/builds/65586/steps/layout-test/logs/stdio
Comment 5 Brent Fulgham 2015-04-07 14:38:57 PDT
Because the httpd servers on the Windows bots run as a user, and are not launched directly from the command line, I think their environment doesn't pick up these updated settings.

I'm trying an experiment where I set this environment variable in the web server user's environment.
Comment 6 Brent Fulgham 2015-04-07 15:04:58 PDT
(In reply to comment #5)
> Because the httpd servers on the Windows bots run as a user, and are not
> launched directly from the command line, I think their environment doesn't
> pick up these updated settings.
> 
> I'm trying an experiment where I set this environment variable in the web
> server user's environment.

This didn't work, either. I can now see in the log file that the environment variable is being set properly, but this doesn't seem to be having the desired effect.
Comment 7 Brent Fulgham 2015-04-08 09:55:04 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > Because the httpd servers on the Windows bots run as a user, and are not
> > launched directly from the command line, I think their environment doesn't
> > pick up these updated settings.
> > 
> > I'm trying an experiment where I set this environment variable in the web
> > server user's environment.
> 
> This didn't work, either. I can now see in the log file that the environment
> variable is being set properly, but this doesn't seem to be having the
> desired effect.

This actually makes sense. If the XML_CATALOG_FILES is not set, it attempts to find the file at a relative path from libxml2.dll (../etc/catalog).

I just tried setting XML_CATALOG_FILES to point at the Cygwin version of this file. If that works, we can look at adding the catalog file to our WebKitAuxLibraries bundle.