Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.6.2
-
Fix Version/s: None
-
Component/s: JRuby-extras
-
Labels:None
-
Environment:windows xp,vista, ant1.8.1
-
Number of attachments :
Description
We are using JRuby with ant, it works very well with version 1.4.1, when upgrade to 1.6.2, we have many errors related to "Bad file descriptor", the stacktrace is as follow:
[createupdatevcproj] Bad file descriptor - Bad file descriptor [createupdatevcproj] org/jruby/RubyIO.java:1330:in `write' [createupdatevcproj] <script>:31:in `(root)' [createupdatevcproj] org/jruby/RubyIO.java:1122:in `open' [createupdatevcproj] <script>:30:in `(root)' (<script> l.35)
part of ant file:
.... <for param="projectfile" parallel="true" threadCount="10"> <filelist refid="qmake.project.files" /> <sequential> <createupdatevcproj projectfile="@{projectfile}" /> </sequential> </for> ...
the definition of "createupdatevcproj":
<scriptdef name="createupdatevcproj" language="ruby"> <attribute name="projectfile" /> <![CDATA[ begin antdir = $project.getProperty("global.antdir") devtdir = $project.getProperty("global.devtools") qtdir = $project.getProperty("global.qtdir") rubydir = $project.getProperty("global.rubydir") mkspec = $project.getProperty("build.mkspec") ttbuild = $project.getProperty("global.basedir")+"/Build" projectfile = $attributes.get("projectfile") require antdir + "/antlogging.rb" require 'pathname' pro_dir = File.dirname(projectfile) pro_file = File.basename(projectfile) commands = "@echo off \n" commands += "set PATH=#{devtdir}/bin;%PATH% \n" commands += "set TTBUILD=#{ttbuild} \n" commands += "call #{qtdir}/bin/qtvars.bat vsvars\n" commands += "call #{rubydir}/bin/rubyvars.bat \n" commands += "qmake.exe " commands += "-tp vc -nodepend -norecursive -nomoc -spec #{mkspec} " commands += pro_file commands += "\n" File.open(pro_dir + "/" + "UpdateVCProj.bat", 'w') {|f| f.write(commands) } rescue => e error_message("#{e.message}\n#{e.backtrace.join("\n")}",__FILE__,__LINE__) end ]]> </scriptdef>
I can't reproduce it with single ant script definition, I guess something happen when using mutithread with ant, our solution has hundreds of projects, many ant script with File operations report error saying "Bad file descriptor".