Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compass] org/jruby/RubyFile.java: No such process #2498

Closed
zigolab opened this issue Jan 22, 2015 · 16 comments
Closed

[compass] org/jruby/RubyFile.java: No such process #2498

zigolab opened this issue Jan 22, 2015 · 16 comments

Comments

@zigolab
Copy link

zigolab commented Jan 22, 2015

I built a test project with yo angular.
When I run grunt serve -v, using jruby 1.7.18 on Windows 7, compass fails with the following error

Running "concurrent:server" (concurrent) task
[D] Task source: test\node_modules\grunt-concurrent\tasks\concurrent.js
Verifying property concurrent.server exists in config...OK
Files: [no src] -> server
Options: limit=2
Warning: Errno::ESRCH on line ["941"] of org/jruby/RubyFile.java: No such process - test/.tmp/styles/main.css

Diving into the grunt code, it seems that the problem is related to the way jruby instantiate the compass process on Windows 7... If I run the same command using Windows 7+jruby 1.7.15 or OS X+jruby 1.7.18 everything goes fine.

My setup is:

Windows 7 SP1
Java SE (build 1.8.0_25-b18) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
jruby 1.7.18 (1.9.3p551)
npm 2.1.18
grunt-cli v0.1.13
grunt v0.4.5

@headius
Copy link
Member

headius commented Jan 22, 2015

Windows is known to be a little...undersupported in the preview. Can you provide a literal transcript of your session leading up to the error, so we can reproduce it and fix it?

@rtyler
Copy link

rtyler commented Jan 22, 2015

@headius this is a JRuby 1.7.18 issue, not the 9k preview1

@zigolab
Copy link
Author

zigolab commented Jan 22, 2015

I asked for help from the grunt project to find out how compass is instantiated.
I will post more details as soon as I will have more information about it.
In the meantime, I tested the same command on Windows 7 with:

  • rubyinstaller-1.9.3-p551: ok
  • jruby_windows_x64_1_7_15: ok
  • jruby_windows_x64_1_7_16: error
  • jruby_windows_x64_1_7_17: error
  • jruby_windows_x64_1_7_18: error

compass gems used for the tests:

  • compass (1.0.3)
  • compass-core (1.0.3)
  • compass-import-once (1.0.5)

@Hooter
Copy link

Hooter commented Jan 26, 2015

I have the same system configuration.

  • jruby_windows_x64_1_7_18: error
  • jruby-9.0.0.0.pre1: ok

@headius
Copy link
Member

headius commented Feb 23, 2015

Need more information here to reproduce...I'm not sure how to set up any of the tools/libs involved.

@headius headius added this to the 9.0.0.0.pre2 milestone Feb 23, 2015
@headius
Copy link
Member

headius commented Feb 24, 2015

Sorry, I missed that this is working in 9k.pre1. Do we have any more information on what's happening on 1.7? Perhaps someone can push a demo repository that reproduces the issue with JRuby 1.7 HEAD on Windows?

@headius headius removed this from the 9.0.0.0.pre2 milestone Feb 24, 2015
@smuschevich
Copy link

I had the same error.
Downgrading to 1.7.15 helped me.

@ph
Copy link

ph commented Sep 4, 2015

I've run into a similar problem using jruby-1.7.22 on windows when trying to install a specific gem. The gem install work fine on jruby and mri on linux/mac but on windows I get an error. I have tried JRuby 9.0.1.0 and I get the same error but not on the same file.

Machine information

Windows Server 2012 R2
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

Exception `Errno::ESRCH' at org/jruby/RubyFile.java:614 - No such process - No message available
ERROR:  While executing gem ... (Errno::ESRCH)
    No such process - No message available
        org/jruby/RubyFile.java:614:in `chmod'
        C:/jenkins/workspace/Logstash_Master_Default_Plugins_On_Windows/vendor/jruby/lib/ruby/1.9/fileutils.rb:1333:in `
chmod'
        C:/jenkins/workspace/Logstash_Master_Default_Plugins_On_Windows/vendor/jruby/lib/ruby/1.9/fileutils.rb:980:in `c
hmod'
        org/jruby/RubyArray.java:1613:in `each'
        C:/jenkins/workspace/Logstash_Master_Default_Plugins_On_Windows/vendor/jruby/lib/ruby/1.9/fileutils.rb:979:in `c
hmod'
        C:/jenkins/workspace/Logstash_Master_Default_Plugins_On_Windows/vendor/jruby/lib/ruby/shared/rubygems/package.rb
:371:in `extract_tar_gz'
        org/jruby/RubyIO.java:1183:in `open'
        org/jruby/RubyKernel.java:350:in `open'

It will fail during the gem uncompress when trying to do a File.chmod on a specific file, I believe this operation is a no-op on windows? I've looked at the file in windows and it look fine, all the contents is present. The funny thing, that part of the code work for all the previous files with the same permission.

How to reproduce it on windows

Download https://s3.amazonaws.com/jruby.org/downloads/1.7.22/jruby-bin-1.7.22.zip
Run this command: .\bin\gem install docker-api --debug -V

I've tried a few commands to get more information, File.exist? true File.stat raise an exception, File.file? return true

rb(main):003:0> File.exist?('C:/jenkins/workspace/Logstash_Master_Default_Plugins_On_Windows/vendor/jruby/lib/ruby/gems
shared/gems/docker-api-1.22.3/spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/cr
ates_a_new_container_to_run_the_specified_command.yml')
> true
rb(main):004:0> File.stat('C:/jenkins/workspace/Logstash_Master_Default_Plugins_On_Windows/vendor/jruby/lib/ruby/gems/s
ared/gems/docker-api-1.22.3/spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/crea
es_a_new_container_to_run_the_specified_command.yml')
rrno::ESRCH: No such process - C:/jenkins/workspace/Logstash_Master_Default_Plugins_On_Windows/vendor/jruby/lib/ruby/ge
s/shared/gems/docker-api-1.22.3/spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/
reates_a_new_container_to_run_the_specified_command.yml
       from org/jruby/RubyFile.java:872:in `stat'
       from (irb):4:in `evaluate'
       from org/jruby/RubyKernel.java:1111:in `eval'
       from org/jruby/RubyKernel.java:1511:in `loop'
       from org/jruby/RubyKernel.java:1274:in `catch'
       from org/jruby/RubyKernel.java:1274:in `catch'
       from C:/jenkins/workspace/Logstash_Master_Default_Plugins_On_Windows/vendor/jruby/bin/jirb:13:in `(root)'
rb(main):005:0>
irb(main):007:0> File.file?('C:/jenkins/workspace/Logstash_Master_Default_Plugins_On_Windows/vendor/jruby/lib/ruby/gems/
shared/gems/docker-api-1.22.3/spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/cre
ates_a_new_container_to_run_the_specified_command.yml')
=> true

@enebo
Copy link
Member

enebo commented Sep 8, 2015

I think the ESRCH is a red herring to this problem since it appears we always return ESRCH past first ENOENT valid path (I opened issue jnr/jnr-posix#61 to track this).

@ph
Copy link

ph commented Sep 8, 2015

thanks @enebo!

Concerning my issue on windows 2012, updating the machine with the latest updates fixed it!
Seems to be related to a really long path, related MS KB https://support.microsoft.com/en-us/kb/2891362

@enebo enebo modified the milestone: Non-Release Sep 9, 2015
@pondrejka
Copy link

I have the same problem when using the sass-maven-plugin that uses jruby.
The problem occurs when the plugin tries to compile sass files into non-existent directories.
The error is the following:

Errno::ESRCH: No such process - D:/Works/AppsLab/GenericNotes/ENotes.UI_16Nov2016/ENotes.UI/enotes.ui-main/src/main/webapp/css/oj/v2.2.0/alta/oj-alta-notag.css
                     mtime at org/jruby/RubyFile.java:941
  stylesheet_needs_update? at C:/Users/pondrejk/.m2/repository/nl/geodienstencentrum/maven/sass-maven-plugin/2.1/sass-maven-plugin-2.1.jar!/gems/sass-3.4.10/lib/sass/plugin/staleness_checker.rb:65
        update_stylesheets at C:/Users/pondrejk/.m2/repository/nl/geodienstencentrum/maven/sass-maven-plugin/2.1/sass-maven-plugin-2.1.jar!/gems/sass-3.4.10/lib/sass/plugin/compiler.rb:211
                      each at org/jruby/RubyArray.java:1613
        update_stylesheets at C:/Users/pondrejk/.m2/repository/nl/geodienstencentrum/maven/sass-maven-plugin/2.1/sass-maven-plugin-2.1.jar!/gems/sass-3.4.10/lib/sass/plugin/compiler.rb:209
        update_stylesheets at C:/Users/pondrejk/.m2/repository/nl/geodienstencentrum/maven/sass-maven-plugin/2.1/sass-maven-plugin-2.1.jar!/gems/sass-3.4.10/lib/sass/plugin.rb:82
                    (root) at <script>:23

The problem occurs when I use sass-maven-plugin 2.1 or higher, which uses jruby 1.7.18 or higher.
The problem goes away when I downgrade my sass-maven-plugin to 2.0, which uses jruby 1.6.8.

@mprins
Copy link
Contributor

mprins commented Nov 18, 2016

@pondrejka sass-maven-plugin stopped using jruby 1.7.x quite some time ago (as of 2.9), current release is 2.22 using jruby 9.1.5.0 so you should really move forward to something supported

@pondrejka
Copy link

@mprins I tried that, however, with 2.22 sass-maven and jruby 9.1.5.0 I had the problem I described above. This is why I downgraded my sass-maven-plugin to 2.0, which uses jruby 1.6.8, which does not have this problem.

@headius
Copy link
Member

headius commented Jul 9, 2020

This is quite old, with thousands of fixes in JRuby and a lot of changes on the sass side. I'm going to close as invalid. If there's still an issue to fix here, please open a new bug.

@headius headius closed this as completed Jul 9, 2020
@headius headius added this to the Invalid or Duplicate milestone Jul 9, 2020
@dmitry-weirdo
Copy link

Still the same issue, and it's 2020 :(

INFO] Queueing Sass template for compile: C:/java/my-app/src/main/resources/static/scss/style => C:/java/my-app/target/classes/static/css
Errno::ESRCH: No such process - C:/java/my-app/target/classes/static/css/style.css
                     mtime at org/jruby/RubyFile.java:1079
  stylesheet_needs_update? at uri:classloader:/gems/sass-3.7.4/lib/sass/plugin/staleness_checker.rb:65
        update_stylesheets at uri:classloader:/gems/sass-3.7.4/lib/sass/plugin/compiler.rb:211
                      each at org/jruby/RubyArray.java:1792
        update_stylesheets at uri:classloader:/gems/sass-3.7.4/lib/sass/plugin/compiler.rb:209
        update_stylesheets at uri:classloader:/gems/sass-3.7.4/lib/sass/plugin.rb:82
                    <main> at <script>:19
Execution default of goal nl.geodienstencentrum.maven:sass-maven-plugin:3.7.2:update-stylesheets failed: (ESRCH) No such process - C:/java/my-app/target/classes/static/css/style.css

<sass-maven-plugin.version>3.7.2</sass-maven-plugin.version>, which contains <jruby.version>9.2.7.0</jruby.version>

@headius
Copy link
Member

headius commented Dec 2, 2020

@dmitry-weirdo That appears to be using JRuby 9.2.7.0, which is pretty old at this point. Windows also introduces some of its own problems. If you can reproduce this with JRuby 9.2.13.0 could you open a new issue for us to track and fix the underlying problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants