Rebuild app failed due to issue with mini-racer


#1

Hello
I followed this instructions Changing Max Attachment Size and when rebuilding I see:

https://pastebin.com/12c5XGBB

Any idea how to fix it?


(Micah Mayo) #2

+1 - Experiencing a similar build failure:

09:28:31 Fetching lograge 0.7.1
09:28:31 Installing lograge 0.7.1
09:28:31 2:  lograge (0.7.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/lograge-0.7.1.gemspec
09:28:31 Fetching rails_multisite 2.0.4
09:28:31 Installing rails_multisite 2.0.4
09:28:31 2:  rails_multisite (2.0.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rails_multisite-2.0.4.gemspec
09:28:31 Fetching rspec-rails 3.6.1
09:28:31 Installing rspec-rails 3.6.1
09:28:31 2:  rspec-rails (3.6.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rspec-rails-3.6.1.gemspec
09:28:31 Using ember-rails 0.18.5
09:28:31 2:  ember-rails (0.18.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ember-rails-0.18.5.gemspec
09:28:31 1:  sassc (1.11.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sassc-1.11.2.gemspec
09:28:31 
09:28:31 
09:28:31 I, [2018-07-23T16:28:31.830637 #15]  INFO -- : Terminating async processes
09:28:31 I, [2018-07-23T16:28:31.830682 #15]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/post******** -D /etc/postgresql/10/main pid: 85
09:28:31 2018-07-23 16:28:31.830 UTC [85] LOG:  received fast shutdown request
09:28:31 2018-07-23 16:28:31.832 UTC [85] LOG:  aborting any active transactions
09:28:31 2018-07-23 16:28:31.833 UTC [85] LOG:  worker process: logical replication launcher (PID 94) exited with exit code 1
09:28:31 2018-07-23 16:28:31.834 UTC [89] LOG:  shutting down
09:28:32 2018-07-23 16:28:32.055 UTC [85] LOG:  database system is shut down

(Rafael dos Santos Silva) #3

HTTP 429 Too Many Requests https://index.rubygems.org/info/nokogumbo


(Micah Mayo) #4

@Falco -

I am not actually sure this is related to RubyGems - on closer inspection, it appears to be failing due to issues building mini-racer:

1:  sassc (1.11.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sassc-1.11.2.gemspec
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_racer-0.1.15/ext/mini_racer_extension
/usr/local/bin/ruby -r ./siteconf20180723-484-1dvgphl.rb extconf.rb
checking for -lpthread... yes
creating Makefile

current directory:
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_racer-0.1.15/ext/mini_racer_extension
make "DESTDIR=" clean

current directory:
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_racer-0.1.15/ext/mini_racer_extension
make "DESTDIR="
compiling mini_racer_extension.cc
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but
not for C++
mini_racer_extension.cc: In function ‘void gc_callback(v8::Isolate*, v8::GCType,
v8::GCCallbackFlags)’:
mini_racer_extension.cc:129:9: error: ‘TerminateExecution’ is not a member of
‘v8::V8’
         V8::TerminateExecution(isolate);
         ^
mini_racer_extension.cc: In function ‘VALUE rb_isolate_idle_notification(VALUE,
VALUE)’:
mini_racer_extension.cc:508:35: error: ‘class v8::Isolate’ has no member named
‘IdleNotification’
return isolate_info->isolate->IdleNotification(NUM2INT(idle_time_in_ms)) ?
Qtrue : Qfalse;
                                   ^
mini_racer_extension.cc: In function ‘void* gvl_ruby_callback(void*)’:
mini_racer_extension.cc:737:2: error: ‘TerminateExecution’ is not a member of
‘v8::V8’
  V8::TerminateExecution(args->GetIsolate());
  ^
mini_racer_extension.cc:761:7: error: ‘TerminateExecution’ is not a member of
‘v8::V8’
       V8::TerminateExecution(isolate);
       ^
mini_racer_extension.cc: In function ‘VALUE rb_context_stop(VALUE)’:
mini_racer_extension.cc:1036:5: error: ‘TerminateExecution’ is not a member of
‘v8::V8’
     V8::TerminateExecution(isolate);
     ^
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
cc1plus: warning: unrecognized command line option
‘-Wno-constant-logical-operand’
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1plus: warning: unrecognized command line option ‘-Wno-tautological-compare’
Makefile:209: recipe for target 'mini_racer_extension.o' failed
make: *** [mini_racer_extension.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_racer-0.1.15 for
inspection.
Results logged to
/var/www/discourse/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/mini_racer-0.1.15/gem_make.out

  /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:92:in `run'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:52:in `block in
make'
  /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:44:in `each'
  /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:44:in `make'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/ext_conf_builder.rb:61:in
`block in build'
  /usr/local/lib/ruby/2.5.0/tempfile.rb:295:in `open'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/ext_conf_builder.rb:30:in
`build'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:164:in `block (2
levels) in build_extension'
  /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:163:in `chdir'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:163:in `block in
build_extension'
  /usr/local/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:162:in
`build_extension'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:201:in `block in
build_extensions'
  /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:198:in `each'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:198:in
`build_extensions'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/installer.rb:777:in
`build_extensions'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/rubygems_gem_installer.rb:23:in
`build_extensions'
  /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/installer.rb:309:in `install'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/source/rubygems.rb:155:in
`block in install'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/rubygems_integration.rb:221:in
`preserve_paths'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/source/rubygems.rb:144:in
`install'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/installer/gem_installer.rb:63:in
`install'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/installer/parallel_installer.rb:162:in
`do_install'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/installer/parallel_installer.rb:153:in
`block in worker_pool'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/worker.rb:64:in
`apply_func'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/worker.rb:59:in
`block in process_queue'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/worker.rb:56:in
`loop'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/worker.rb:56:in
`process_queue'
/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'

An error occurred while installing mini_racer (0.1.15), and Bundler cannot
continue.
Make sure that `gem install mini_racer -v '0.1.15' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  mini_racer

We are tracking stable, and it looks like last night’s commit to discourse_docker may break building stable:

If I build with either the previous version of discourse_docker, or with tests-passed the build doesn’t fail.

@alekstrust not sure what branch you’re pointed at, but the above ^ may be related.


#5

Yes, I had to change to tests-passed and build completed successfully :slight_smile:

Thank you everybody.


(Jeff Atwood) #6

This makes sense, because as the base image gets older it makes more and more requests to RubyGems, presumably for newer versions of outdated dependencies?

Is that the correct way to describe this @tgxworld?


(Sam Saffron) #7

OH I just had this reported here:

Will update stable gemfile lock so this does not happen

EDIT: stable bundles just fine… maybe you are trying to update mini racer somehow…


(Alan Tan) #8

Yup this is the correct way to describe it. However, the number of requests to RubyGems should be limited right now because I updated the base image for launcher yesterday.


(Sam Saffron) #10

OK correction… now that I see it internally I see what happens.

Base image has libv8 6.7 … so even though the bundle specifies 6.3 somehow bundler is not passing this information to mini_racer…

To save us all heartache I will just backport the mini racer update since the api is stable

EDIT done …


(Jay Pfaffman) #11

I’m trying to rebuild a two-container install (on tests-passed) and it’s failing on installing the mini-racer Gem.

Do we have a regression here? I did a git pull; does something else need to happen to get the correct image?

Edit: Somehow I’d pinned a particular commit, so I wasn’t getting latest.


(Ernesto Serrano) #12

Updating mini_racer to 0.2.0 fixes this problem for legacy users (v1.9.7), you can add the attached snippet to your app.yml file and do a sudo /var/discourse/launcher rebuild, that code simply edit via sed the Gemfile.lock to fix the mini_racer version to 0.2.0

    hooks:
      after_code:
        - exec:
            cd: $home/plugins
            cmd:
              - mkdir -p plugins
              - git clone https://github.com/discourse/docker_manager.git
              - git clone https://github.com/amolinaalvarez/discourse-lever-markdown.git
        # Fix for mini-racer error
        - exec:
            cd: $home
            cmd:
              - sed -i "s/mini_racer .*/mini_racer (0.2.0)/" Gemfile.lock

(Sam Saffron) #13

Stable is on mini racer 0.2.0 …

I see no reason you would need to do this.


(Ernesto Serrano) #14

It is because we are still using the legacy v1.9.7 version because we have a lot of self code not yet migrated to 2.0, waiting a v1.9.8 versión that fixes that dependency for legacy users.