Shippable / support

Shippable SaaS customers can report issues and feature requests in this repository
101 stars 28 forks source link

Build randomly fail with ruby 2.4.2 (same with 2.4.3) #4033

Closed mberrueta closed 6 years ago

mberrueta commented 6 years ago

Hello all!

I'm trying to update my ruby version. Locally and in the server it works well, but with shippable I'm having some issues, and I'm not able to solve it

Thanks in advance for the help

Description of your issue:

failed build /runs/5194/1/

shippable.yml

language: ruby

rvm:
  - 2.4.2

env:
  global:
    - COVERAGE=false
    - COVERAGE_REPORTS=shippable/codecoverage
    - CI_REPORTS=shippable/testresults
    - PGHOST=localhost
    - APP_NAME=xxx
    - secure: xxxxx
    - PROJECT=xxxx
    - SLACK_WEB_HOOK=/services/ccc/ccc/ccc
    - MONGO_USERNAME=ccc
    - MONGO_PASSWORD=ccc

integrations:
  key:
    - integrationName: heroku
      type: ssh-key

services:
  - postgres
  - mongodb

addons:
  postgresql: '9.3'
cache: true

before_install:
  - apt-get update && apt-get -y install libgmp-dev libpq-dev
  - gem update --system

before_script:
  - mkdir -p shippable/testresults
  - mkdir -p shippable/codecoverage
  - bundle install --gemfile="Gemfile"
  - bundle exec rake db:create
  - bundle exec rake db:migrate

script:
  - bundle-audit update
  - bundle exec rake ci

after_script:
  - bundle exec rake db:drop

after_success:
  - which heroku || wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
  - mkdir -p ~/.ssh && cp /tmp/ssh/heroku ~/.ssh/id_rsa.pub && ssh-add ~/.ssh/id_rsa.pub

  - >
    if [ "$BRANCH" == "develop" -a "$PULL_REQUEST" == "false" ] ; then
      git remote add heroku git@heroku.com:$APP_NAME-staging.git && git push heroku develop:master -f;
    fi;

  - >
    if [ "$BRANCH" == "master"  -a "$PULL_REQUEST" == "false" ] ; then
      git remote add heroku git@heroku.com:$APP_NAME-production.git && git push heroku master -f;
    fi;

  -  

And randomly ( different errors in different places)

[BUG] Segmentation fault at 0x0000000000000008 ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]

image

a-murphy commented 6 years ago

Could you try running gem list locally to compare the versions of the gems you have installed locally to the gems on Shippable? Tests that only pass (or fail) when running in a certain location are very often the result of installing different versions of dependencies in different locations.

mberrueta commented 6 years ago

sure.

$ gem list

*** LOCAL GEMS ***

actioncable (5.1.4)
actionmailer (5.1.4)
actionpack (5.1.4)
actionview (5.1.4)
active_model_otp (1.2.0)
active_model_serializers (0.10.7)
active_null (1.0.0)
activejob (5.1.4)
activemodel (5.1.4)
activerecord (5.1.4)
activerecord-import (0.21.0, 0.20.2)
activesupport (5.1.4)
addressable (2.5.2)
algoliasearch (1.19.1, 1.18.1)
algoliasearch-rails (1.20.4, 1.20.3)
ar_transaction_changes (1.1.2)
arel (8.0.0)
ast (2.3.0)
attr_encrypted (3.0.3)
awesome_print (1.8.0)
backports (3.10.3)
bcrypt (3.1.11)
benchmark-ips (2.7.2)
bigdecimal (default: 1.3.0)
binding_of_caller (0.7.3)
braintree (2.80.1, 2.79.0)
brakeman (4.1.1, 4.0.1)
bson (4.2.2)
builder (3.2.3)
bulk_insert (1.6.0)
bullet (5.7.0, 5.6.1)
bundle (0.0.1)
bundler (1.16.0)
bundler-audit (0.6.0)
bundler-unload (1.0.2)
byebug (9.1.0)
cancancan (2.1.2, 2.1.1)
capybara (2.16.1, 2.16.0)
case_transform (0.2)
chunky_png (1.3.8)
city-state (0.0.13)
cityhash (0.9.0)
code_analyzer (0.4.8)
coderay (1.1.2)
concurrent-ruby (1.0.5)
connection_pool (2.2.1)
crack (0.4.3)
crass (1.0.3)
cucumber (3.0.2, 2.99.0)
cucumber-core (3.0.0, 1.5.0)
cucumber-expressions (4.0.4)
cucumber-rails (1.5.0)
cucumber-tag_expressions (1.0.1)
cucumber-wire (0.0.1)
database_cleaner (1.6.2)
debug_inspector (0.0.3)
declarative (0.0.10)
declarative-option (0.1.0)
derailed (0.1.0)
derailed_benchmarks (1.3.2)
did_you_mean (1.1.0)
diff-lcs (1.3)
digest-crc (0.4.1)
docile (1.1.5)
domain_name (0.5.20170404)
encryptor (3.0.0)
erubi (1.7.0)
erubis (2.7.0)
et-orbi (1.0.8)
executable-hooks (1.3.2)
exifr (1.3.3, 1.3.2)
factory_bot (4.8.2)
factory_bot_rails (4.8.2)
faker (1.8.7, 1.8.4)
faraday (0.11.0)
faraday_middleware (0.12.2)
fast_excel (0.2.3)
fastimage (2.1.1, 2.1.0)
ffi (1.9.18)
formatador (0.2.5)
fullcontact (0.18.0)
gem-wrappers (1.2.7)
get_process_mem (0.2.1)
gherkin (4.1.3)
globalid (0.4.1)
google-api-client (0.14.5)
google-cloud (0.44.0)
google-cloud-bigquery (0.29.0)
google-cloud-core (1.1.0)
google-cloud-datastore (1.1.0)
google-cloud-dns (0.26.0)
google-cloud-env (1.0.1)
google-cloud-error_reporting (0.27.0)
google-cloud-language (0.27.1)
google-cloud-logging (1.2.3)
google-cloud-monitoring (0.25.0)
google-cloud-pubsub (0.27.2)
google-cloud-resource_manager (0.27.0)
google-cloud-spanner (1.0.0)
google-cloud-speech (0.26.2)
google-cloud-storage (1.7.1)
google-cloud-trace (0.27.2)
google-cloud-translate (1.0.1)
google-cloud-video_intelligence (0.23.0)
google-cloud-vision (0.25.0)
google-gax (0.8.12)
google-protobuf (3.2.0.2 universal-darwin)
googleapis-common-protos (1.3.7)
googleapis-common-protos-types (1.0.1)
googleauth (0.5.1)
grpc (1.6.7 universal-darwin)
grpc-google-iam-v1 (0.6.9)
gsl (2.1.0.3)
guard (2.14.1)
guard-brakeman (0.8.3)
guard-bundler (2.1.0)
guard-compat (1.2.1)
guard-cucumber (2.1.2, 1.5.4)
guard-rails (0.8.1)
guard-rspec (4.7.3)
guard-rubocop (1.3.0)
has_secure_token (1.0.0)
hashdiff (0.3.7)
hashie (3.5.7, 3.5.6)
heapy (0.1.3)
highline (2.0.0.pre.develop.14, 1.7.8)
http-cookie (1.0.3)
httparty (0.15.6)
httpclient (2.8.3)
i18n (0.9.1)
interception (0.5)
io-console (default: 0.4.6)
json (2.1.0, default: 2.0.4)
jsonapi-renderer (0.2.0)
jwt (1.5.6)
kaminari (1.1.1)
kaminari-actionview (1.1.1)
kaminari-activerecord (1.1.1)
kaminari-core (1.1.1)
liquid (4.0.0)
listen (3.1.5)
little-plugger (1.1.4)
logging (2.2.2)
loofah (2.1.1)
lumberjack (1.0.12)
macaddr (1.7.1)
mail (2.7.0)
mailgun-ruby (1.1.8)
memoist (0.16.0)
memory_profiler (0.9.8)
method_source (0.9.0)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.10.3, 5.10.1)
mock_redis (0.17.3)
monetize (1.7.0)
money (6.10.1, 6.10.0)
mongo (2.4.3)
mongoid (6.2.1)
multi_json (1.12.2)
multi_test (0.1.2)
multi_xml (0.6.0)
multipart-post (2.0.0)
mustermann (1.0.1)
n_1_finder (0.0.6)
namae (1.0.0, 0.11.3)
naught (1.1.0)
nenv (0.3.0)
net-telnet (0.1.1)
netrc (0.11.0)
newrelic_rpm (4.7.1.340, 4.6.0.338)
nio4r (2.2.0, 2.1.0)
nokogiri (1.8.1)
notiffany (0.1.1)
oj (3.3.9)
openssl (default: 2.0.5)
os (0.9.6)
paranoia (2.4.0)
parser (2.4.0.2)
pg (0.21.0)
phone (1.2.3)
power_assert (0.4.1)
powerpack (0.1.1)
proxies (0.2.1)
pry (0.11.3)
pry-byebug (3.5.1, 3.5.0)
pry-doc (0.11.1)
pry-inline (1.0.4)
pry-rails (0.3.6)
pry-rescue (1.4.5)
pry-stack_explorer (0.4.9.2)
psych (default: 2.2.2)
public_suffix (3.0.1)
puma (3.11.0, 3.10.0)
rack (2.0.3)
rack-accept-default (0.0.2)
rack-accept_headers (0.5.1)
rack-cors (1.0.2)
rack-protection (2.0.0)
rack-test (0.8.2, 0.8.0, 0.7.1, 0.7.0)
rails-controller-testing (1.0.2)
rails-dom-testing (2.0.3)
rails-html-sanitizer (1.0.3)
rails_12factor (0.0.3)
rails_best_practices (1.19.0)
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (5.1.4)
rainbow (2.2.2)
rake (12.3.0, 12.0.0, 10.5.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
rdoc (default: 5.0.0)
redis (4.0.1, 3.3.5)
redis-actionpack (5.0.2)
redis-activesupport (5.0.4)
redis-objects (1.4.0, 1.3.1, 1.2.1)
redis-rack (2.0.4, 2.0.3)
redis-rails (5.0.2)
redis-store (1.4.1)
representable (3.0.4)
request_store (1.3.2)
require_all (1.5.0, 1.4.0)
rest-client (2.0.2)
retriable (3.1.1)
rly (0.2.3)
rollbar (2.15.5)
rotp (3.3.0)
rqrcode (0.10.1)
rspec (3.7.0)
rspec-core (3.7.0)
rspec-expectations (3.7.0)
rspec-mocks (3.7.0)
rspec-rails (3.7.2, 3.7.1)
rspec-support (3.7.0)
rubocop (0.48.1)
ruby-progressbar (1.9.0)
ruby_dep (1.5.0)
rubygems-bundler (1.4.4)
rubyzip (1.2.1)
rufus-scheduler (3.4.2)
rvm (1.11.3.9)
s3 (0.3.25)
safe_yaml (1.0.4)
sendinblue (2.4)
sexp_processor (4.10.0)
shellany (0.0.1)
sidekiq (5.0.5)
sidekiq-failures (1.0.0)
sidekiq-scheduler (2.1.10)
signet (0.8.1)
simplecov (0.15.1)
simplecov-csv (0.1.3)
simplecov-html (0.10.2)
sinatra (2.0.0)
slack-notifier (2.3.1)
solargraph (0.15.3)
spring (2.0.2)
spring-commands-cucumber (1.0.1)
spring-commands-rspec (1.0.4)
stackdriver-core (1.2.0)
statesman (3.2.0, 3.1.0)
systemu (2.6.5)
test-unit (3.2.3)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
tty-cursor (0.5.0)
tty-spinner (0.7.0)
tzinfo (1.2.4)
uber (0.1.0)
unf (0.1.4)
unf_ext (0.0.7.4)
unicode (0.4.4.4)
unicode-display_width (1.3.0)
uniform_notifier (1.10.0)
uuid (2.3.8)
versioncake (3.3.0)
webmock (3.1.1, 3.1.0)
websocket-driver (0.6.5)
websocket-extensions (0.1.3)
xmlrpc (0.2.1)
xpath (2.1.0)
yard (0.9.12, 0.9.10, 0.9.9)
zonefile (1.06)
mberrueta commented 6 years ago

anyway, the malloc issues, or segmentation fault seems weird. not sure if can be a gem version issue

a-murphy commented 6 years ago

I haven't finished comparing versions yet, but you do have a newer version of Cucumber locally as well as the version that matches the one installed in your build on Shippable. Do you know if your local tests are using Cucumber version 3.0.2 or 2.99.0? Your Shippable build is using 2.99.0.

mberrueta commented 6 years ago

sorry the delay

$ cucumber --version
Running via Spring preloader in process 2017
2.99.0
$ rspec --version
Running via Spring preloader in process 2166
RSpec 3.7
  - rspec-core 3.7.0
  - rspec-expectations 3.7.0
  - rspec-mocks 3.7.0
  - rspec-rails 3.7.2
  - rspec-support 3.7.0
a-murphy commented 6 years ago

The only gem in the list that I found to have a version in the Shippable logs that didn't match was bundler (1.16.0 in the local list and 1.16.1 on Shippable). There are several gems that have multiple versions listed locally, but except for Cucumber, the most recent one matches Shippable.

Issues opened for segmentation faults usually turn out to be related to specific versions of a dependency or combination of dependencies. I would suggest trying running the tests with a more recent version of Cucumber just in case, unless you already know that they won't run with that version of Cucumber for a different reason. If it still fails, all I can suggest is comparing the stack traces for the errors to find common gems that may be causing the errors.

If you think it may be related to the amount of memory available, although those errors usually occur in a similar place each time it fails, you can also try running your build on a custom node with more memory available. The default Shippable nodes have 3.75 GB RAM. It's also possible to upgrade to Shippable nodes with more memory if it does turn out to be related.

mberrueta commented 6 years ago

thanks man! I will try with those suggestions

ambarish2012 commented 6 years ago

@mberrueta please let me know if any of the suggestions helped and if I can close this issue.

mberrueta commented 6 years ago

sorry, I was too busy. Close it if you want and I can reopen after another gems update, if still happening