cloudfoundry / ruby-buildpack

Cloud Foundry buildpack for Ruby, Sinatra and Rails
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
65 stars 160 forks source link

Intermittent `Could not read gem` error #84

Closed dreeve closed 7 years ago

dreeve commented 7 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

CF version 266 CF CLI version 6.24.0+c7a32d3.2017-02-10

What version of the buildpack you are using? Buildpack version 1.6.42

If you were attempting to accomplish a task, what was it you were attempting to do? Compiling the droplet.

What did you expect to happen? The droplet to compile successfully during a couple SLI test runs. It succeeded before and immediately after those failures.

What was the actual behavior? The droplet did not compile successfully due to an apparent failure when installing the rack gem.

Please confirm where necessary:

Log Output

[2017-07-10 22:24:27.83 (UTC)]> cf start 103b8a60-e5b4-465c-7 
Starting app 103b8a60-e5b4-465c-7 in org cf-sli / space dev as cf-sli...
Staging app and tracing logs...
   Downloading ruby_buildpack...
   Creating container
   Downloaded ruby_buildpack
   Successfully created container
   Downloading app package...
   Downloaded app package (54.9K)
   -------> Buildpack version 1.6.42
          Downloaded [file:///tmp/buildpacks/3ee19d5a12b4dc498b13df5a289a71ec/dependencies/https___buildpacks.cloudfoundry.org_dependencies_bundler_bundler-1.15.1-2803ca8e.tgz]
   -----> Supplying Ruby/Rack
          Downloaded [file:///tmp/buildpacks/3ee19d5a12b4dc498b13df5a289a71ec/dependencies/https___buildpacks.cloudfoundry.org_dependencies_ruby_ruby-2.4.1-linux-x64-9e451858.tgz]
   -----> Using Ruby version: ruby-2.4.1
   -------> Buildpack version 1.6.42
          You have the `.bundle/config` file checked into your repository
          not be shared between multiple checkouts of a single repo. Please
   -----> Finalizing Ruby/Rack
          Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --jobs=4 --retry=4 --deployment
          It contains local state like the location of the installed bundle
          as well as configured git local gems, and other settings that should
          remove the `.bundle/` folder from your repo and add it to your `.gitignore` file.
   ###### WARNING:
   -----> Installing dependencies using bundler 1.15.1
          Could not read gem at /tmp/app/vendor/cache/rack-1.5.2.gem. It may be corrupted.
          Bundler Output: Could not read gem at /tmp/app/vendor/cache/rack-1.5.2.gem. It may be corrupted.
    !
    !
   Failed to compile droplet
   Exit status 223
   Destroying container
    !     Failed to install gems via Bundler.
   Successfully destroyed container
Error staging application: App staging failed in the buildpack compile phase
FAILED
cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/148684101

The labels on this github issue will be updated when the story is started.

sclevine commented 7 years ago

Hi @dreeve,

Can you provide us with the app that you're pushing? Are you able to replicate this flake on PWS?

dreeve commented 7 years ago

@sclevine Sure! This is CloudOps' SLI test, which pushes this ruby app to PWS once per minute.

sclevine commented 7 years ago

This PR should address the failure: https://github.com/pivotal-cloudops/cf-sli/pull/3