Bug 144866 - Fix run-javascriptcore-tests step on the WinCairo bot
Summary: Fix run-javascriptcore-tests step on the WinCairo bot
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Csaba Osztrogonác
URL:
Keywords:
Depends on: 144888
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-11 04:35 PDT by Csaba Osztrogonác
Modified: 2015-09-24 06:58 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.15 KB, patch)
2015-05-11 04:43 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Patch to catch symlink exception. (1.19 KB, patch)
2015-05-12 05:25 PDT, peavo
ossy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2015-05-11 04:35:22 PDT
It fails with the following message long long time ago:

C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:357:in `symlink': symlink() function is unimplemented on this machine (NotImplementedError)
	from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:357:in `block in ln_s'
	from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:1586:in `fu_each_src_dest0'
	from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:355:in `ln_s'
	from Tools/Scripts/run-jsc-stress-tests:1179:in `block in prepareBundle'
	from Tools/Scripts/run-jsc-stress-tests:1174:in `chdir'
	from Tools/Scripts/run-jsc-stress-tests:1174:in `prepareBundle'
	from Tools/Scripts/run-jsc-stress-tests:1576:in `runNormal'
	from Tools/Scripts/run-jsc-stress-tests:1608:in `<main>'

http://stackoverflow.com/questions/21511347/how-to-create-a-symlink-on-windows-via-ruby
It says that creating symlinks with symlink() isn't supported on Windows, it can
be done with only workaround. How does it work on the Apple Windows buildbots?
And it worked previously on the WinCairo bot too. What changed?

Maybe we can fix it with setting $copyVM to true based on OS. 
But I can't test if this fix is enough or not.
Comment 1 Csaba Osztrogonác 2015-05-11 04:43:16 PDT
Created attachment 252856 [details]
Patch

speculative fix, could somebody test it?
Comment 2 Csaba Osztrogonác 2015-05-11 04:49:52 PDT
Just to document my findings:

latest pass:
- r181974
- Wed Mar 25 15:39:49 2015
https://build.webkit.org/builders/WinCairo%2064-Bit%20Release/builds/44990

(build failure during this period)

first failure:
- r183565
- Wed Apr 29 12:20:43 2015
https://build.webkit.org/builders/WinCairo%2064-Bit%20Release/builds/45143
Comment 3 peavo 2015-05-11 08:52:31 PDT
(In reply to comment #0)
> It says that creating symlinks with symlink() isn't supported on Windows, it
> can
> be done with only workaround. How does it work on the Apple Windows
> buildbots?
> And it worked previously on the WinCairo bot too. What changed?
> 

Thanks for looking into this :) I believe the WinCairo bot is now set up without cygwin.

> Maybe we can fix it with setting $copyVM to true based on OS. 
> But I can't test if this fix is enough or not.

Another possibility is to catch all exceptions:

Index: run-jsc-stress-tests
===================================================================
--- run-jsc-stress-tests        (revisjon 184067)
+++ run-jsc-stress-tests        (arbeidskopi)
@@ -1177,7 +1177,10 @@
             else
                 begin
                     FileUtils.ln_s source, destination
-                rescue
+                rescue Exception => e
+                    puts "Exception raised"
+                    puts [e, e.backtrace].flatten.join("\n")
+
                     FileUtils.cp_r source, destination
                 end
             end
Comment 4 Alex Christensen 2015-05-11 12:45:23 PDT
(In reply to comment #0)
> And it worked previously on the WinCairo bot too. What changed?
WinCairo bot does not use cygwin.  AppleWin bots do.  WinCairo bot used to.
Still under construction: http://trac.webkit.org/wiki/WindowsWithoutCygwin
Comment 5 WebKit Commit Bot 2015-05-11 13:44:05 PDT
Comment on attachment 252856 [details]
Patch

Clearing flags on attachment: 252856

Committed r184119: <http://trac.webkit.org/changeset/184119>
Comment 6 WebKit Commit Bot 2015-05-11 13:44:08 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Alexey Proskuryakov 2015-05-11 16:34:35 PDT
This broke JSC tests on Apple Windows:

https://build.webkit.org/builders/Apple%20Win%207%20Release%20(Tests)?numbuilds=50
Comment 8 Alex Christensen 2015-05-11 16:36:38 PDT
(In reply to comment #7)
> This broke JSC tests on Apple Windows:
> 
> https://build.webkit.org/builders/
> Apple%20Win%207%20Release%20(Tests)?numbuilds=50
Those are just warnings.  Do we want to cover up the warnings or rollout this patch?
Comment 9 WebKit Commit Bot 2015-05-11 16:37:38 PDT
Re-opened since this is blocked by bug 144888
Comment 10 peavo 2015-05-12 05:25:30 PDT
Created attachment 252956 [details]
Patch to catch symlink exception.
Comment 11 Csaba Osztrogonác 2015-05-12 05:30:23 PDT
Comment on attachment 252956 [details]
Patch to catch symlink exception.

LGTM, let's try this one.
Comment 12 peavo 2015-05-12 05:33:15 PDT
(In reply to comment #11)
> Comment on attachment 252956 [details]
> Patch to catch symlink exception.
> 
> LGTM, let's try this one.

Thanks :)
Comment 13 peavo 2015-05-12 07:27:33 PDT
Committed r184201: <http://trac.webkit.org/changeset/184201>
Comment 14 Csaba Osztrogonác 2015-05-12 08:33:58 PDT
The bot is still broken, but at least the sylink problem is fixed now.

process_begin: CreateProcess(NULL, sh test_script_0, ...) failed.
make (e=2): The system cannot find the file specified.

make: *** [test_done_0] Error 2
Tools/Scripts/run-jsc-stress-tests:79:in `mysys': Command failed: #<Process::Status: pid 5988 exit 2> (RuntimeError)
	from Tools/Scripts/run-jsc-stress-tests:1411:in `runAndMonitorTestRunnerCommand'
	from Tools/Scripts/run-jsc-stress-tests:1499:in `block in runTestRunner'
	from Tools/Scripts/run-jsc-stress-tests:1498:in `chdir'
	from Tools/Scripts/run-jsc-stress-tests:1498:in `runTestRunner'
	from Tools/Scripts/run-jsc-stress-tests:1579:in `runNormal'
	from Tools/Scripts/run-jsc-stress-tests:1609:in `<main>'

It would be great if the port maintainers could fix this issue.
I don't have any chance without WinCairo build environment.
Comment 15 Csaba Osztrogonác 2015-05-12 08:42:27 PDT
Maybe installing some tools on the bot would solve this issue.

But it seems there are many unix tools are used by the runner scripts:
sh, touch, dirname, rm, awk, diff, ...
Comment 16 Alex Christensen 2015-05-12 10:01:18 PDT
(In reply to comment #15)
> Maybe installing some tools on the bot would solve this issue.
> 
> But it seems there are many unix tools are used by the runner scripts:
> sh, touch, dirname, rm, awk, diff, ...

gnuwin32 has many of these tools, and there are many places where we should use a perl/python/ruby function instead of calling an executable from the command line.  I'll look into this soon.  Ideally we would get all the bots running without cygwin, but that will take a significant amount of work
Comment 17 Csaba Osztrogonác 2015-09-24 06:58:42 PDT
The WinCairo bot doesn't run tests long time ago.