anycable / anycable-rails

AnyCable for Ruby on Rails applications
https://anycable.io
MIT License
495 stars 35 forks source link

Stack level too deep #157

Closed hoangnm205 closed 2 years ago

hoangnm205 commented 3 years ago

Tell us about your environment

Ruby version: 3.0.1p64

Rails version: 6.1.3.2

anycable gem version: 1.1.0

anycable-rails gem version: 1.1.0

grpc gem version: 1.38.0-x86_64-linux

What did you do?

Run following command:

bundle exec rails g anycable:setup
anycable-go --port=8080
bundle exec anycable

What did you expect to happen?

#> Starting AnyCable gRPC server (pid: 48111)
#> Serving Rails application from ./config/environment.rb

What actually happened?

bundler: failed to load command: anycable (/home/x/.rbenv/versions/3.0.1/bin/anycable)
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/object/deep_dup.rb:47:in `block in deep_dup': stack level too deep (SystemStackError)
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/object/deep_dup.rb:45:in `each_pair'
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/object/deep_dup.rb:45:in `deep_dup'
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/object/deep_dup.rb:47:in `block in deep_dup'
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/object/deep_dup.rb:45:in `each_pair'
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/object/deep_dup.rb:45:in `deep_dup'
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/configuration.rb:126:in `initialize_copy'
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/engine/configuration.rb:15:in `initialize_dup'
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/engine/configuration.rb:15:in `dup'
     ... 47 levels...
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
    from /home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
    from /home/x/.rbenv/versions/3.0.1/bin/bundle:23:in `load'
    from /home/x/.rbenv/versions/3.0.1/bin/bundle:23:in `<main>'

Gemfile.lock

GIT
  remote: https://github.com/nopain2110/graphql_playground-rails.git
  revision: 626dd2c0844557f482f0f0c85f398a7b59ef5a11
  specs:
    graphql_playground-rails (2.1.1)
      rails (>= 5.1.0)

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (6.1.3.2)
      actionpack (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailbox (6.1.3.2)
      actionpack (= 6.1.3.2)
      activejob (= 6.1.3.2)
      activerecord (= 6.1.3.2)
      activestorage (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      mail (>= 2.7.1)
    actionmailer (6.1.3.2)
      actionpack (= 6.1.3.2)
      actionview (= 6.1.3.2)
      activejob (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (6.1.3.2)
      actionview (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      rack (~> 2.0, >= 2.0.9)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.2.0)
    actiontext (6.1.3.2)
      actionpack (= 6.1.3.2)
      activerecord (= 6.1.3.2)
      activestorage (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      nokogiri (>= 1.8.5)
    actionview (6.1.3.2)
      activesupport (= 6.1.3.2)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.1, >= 1.2.0)
    activejob (6.1.3.2)
      activesupport (= 6.1.3.2)
      globalid (>= 0.3.6)
    activemodel (6.1.3.2)
      activesupport (= 6.1.3.2)
    activerecord (6.1.3.2)
      activemodel (= 6.1.3.2)
      activesupport (= 6.1.3.2)
    activerecord-import (1.0.8)
      activerecord (>= 3.2)
    activerecord-postgres_enum (1.6.0)
      activerecord (>= 5, < 6.2)
      pg
    activestorage (6.1.3.2)
      actionpack (= 6.1.3.2)
      activejob (= 6.1.3.2)
      activerecord (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      marcel (~> 1.0.0)
      mini_mime (~> 1.0.2)
    activesupport (6.1.3.2)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
      zeitwerk (~> 2.3)
    acts-as-taggable-on (7.0.0)
      activerecord (>= 5.0, < 6.2)
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    ancestry (4.0.0)
      activerecord (>= 5.2.4.5)
    annotate (3.1.1)
      activerecord (>= 3.2, < 7.0)
      rake (>= 10.4, < 14.0)
    anycable-core (1.1.0)
      anyway_config (>= 2.1.0)
      google-protobuf (>= 3.13)
    anycable-rails (1.1.0)
      actioncable (>= 6)
      anycable-core (~> 1.1)
      globalid
    anyway_config (2.1.0)
      ruby-next-core (>= 0.11.0)
    ast (2.4.2)
    aws-eventstream (1.1.1)
    aws-partitions (1.453.0)
    aws-sdk-core (3.114.0)
      aws-eventstream (~> 1, >= 1.0.2)
      aws-partitions (~> 1, >= 1.239.0)
      aws-sigv4 (~> 1.1)
      jmespath (~> 1.0)
    aws-sdk-kms (1.43.0)
      aws-sdk-core (~> 3, >= 3.112.0)
      aws-sigv4 (~> 1.1)
    aws-sdk-s3 (1.94.1)
      aws-sdk-core (~> 3, >= 3.112.0)
      aws-sdk-kms (~> 1)
      aws-sigv4 (~> 1.1)
    aws-sigv4 (1.2.3)
      aws-eventstream (~> 1, >= 1.0.2)
    babosa (1.0.4)
    bcrypt (3.1.16)
    bootsnap (1.7.5)
      msgpack (~> 1.0)
    brakeman (5.0.1)
    builder (3.2.4)
    byebug (11.1.3)
    capybara (3.35.3)
      addressable
      mini_mime (>= 0.1.3)
      nokogiri (~> 1.8)
      rack (>= 1.6.0)
      rack-test (>= 0.6.3)
      regexp_parser (>= 1.5, < 3.0)
      xpath (~> 3.2)
    code_analyzer (0.5.2)
      sexp_processor
    coderay (1.1.3)
    colorize (0.8.1)
    concurrent-ruby (1.1.8)
    connection_pool (2.2.5)
    content_disposition (1.0.0)
    crass (1.0.6)
    csv (3.1.9)
    database_cleaner-active_record (2.0.1)
      activerecord (>= 5.a)
      database_cleaner-core (~> 2.0.0)
    database_cleaner-core (2.0.1)
    diff-lcs (1.4.4)
    dotenv (2.7.6)
    dotenv-rails (2.7.6)
      dotenv (= 2.7.6)
      railties (>= 3.2)
    down (5.2.1)
      addressable (~> 2.5)
    e2mmap (0.1.0)
    elasticsearch (7.12.0)
      elasticsearch-api (= 7.12.0)
      elasticsearch-transport (= 7.12.0)
    elasticsearch-api (7.12.0)
      multi_json
    elasticsearch-transport (7.12.0)
      faraday (~> 1)
      multi_json
    erubi (1.10.0)
    erubis (2.7.0)
    et-orbi (1.2.4)
      tzinfo
    ethon (0.14.0)
      ffi (>= 1.15.0)
    factory_bot (6.2.0)
      activesupport (>= 5.0.0)
    factory_bot_rails (6.2.0)
      factory_bot (~> 6.2.0)
      railties (>= 5.0.0)
    faker (2.17.0)
      i18n (>= 1.6, < 2)
    faraday (1.4.1)
      faraday-excon (~> 1.1)
      faraday-net_http (~> 1.0)
      faraday-net_http_persistent (~> 1.1)
      multipart-post (>= 1.2, < 3)
      ruby2_keywords (>= 0.0.4)
    faraday-excon (1.1.0)
    faraday-net_http (1.0.1)
    faraday-net_http_persistent (1.1.0)
    fasterer (0.9.0)
      colorize (~> 0.7)
      ruby_parser (>= 3.14.1)
    ffi (1.15.0)
    friendly_id (5.4.2)
      activerecord (>= 4.0.0)
    fugit (1.4.5)
      et-orbi (~> 1.1, >= 1.1.8)
      raabro (~> 1.4)
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    goldiloader (4.1.0)
      activerecord (>= 5.2, < 7.1)
      activesupport (>= 5.2, < 7.1)
    google-protobuf (3.17.1-x86_64-linux)
    googleapis-common-protos-types (1.0.6)
      google-protobuf (~> 3.14)
    graphql (1.12.9)
    graphql-rails_logger (1.2.3)
      actionpack (> 5.0)
      activesupport (> 5.0)
      railties (> 5.0)
      rouge (~> 3.0)
    grpc (1.38.0-x86_64-linux)
      google-protobuf (~> 3.15)
      googleapis-common-protos-types (~> 1.0)
    grpc-tools (1.38.0)
    gruf (2.10.0)
      activesupport (> 4)
      concurrent-ruby (> 1)
      e2mmap (~> 0.1)
      grpc (~> 1.10)
      grpc-tools (~> 1.10)
      json (>= 2.3)
      slop (~> 4.6)
      thwait (~> 0.1)
    hashie (4.1.0)
    i18n (1.8.10)
      concurrent-ruby (~> 1.0)
    image_processing (1.12.1)
      mini_magick (>= 4.9.5, < 5)
      ruby-vips (>= 2.0.17, < 3)
    jmespath (1.4.0)
    json (2.5.1)
    jwt (2.2.3)
    light-service (0.15.0)
      activesupport (>= 3.0.0)
    listen (3.5.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    loofah (2.9.1)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (1.0.1)
    method_source (1.0.0)
    mini_magick (4.11.0)
    mini_mime (1.0.3)
    minitest (5.14.4)
    msgpack (1.4.2)
    multi_json (1.15.0)
    multipart-post (2.1.1)
    nio4r (2.5.7)
    nokogiri (1.11.3-x86_64-linux)
      racc (~> 1.4)
    oj (3.11.5)
    parallel (1.20.1)
    parser (3.0.1.1)
      ast (~> 2.4.1)
    pg (1.2.3)
    pry (0.13.1)
      coderay (~> 1.1)
      method_source (~> 1.0)
    pry-byebug (3.9.0)
      byebug (~> 11.0)
      pry (~> 0.13.0)
    public_suffix (4.0.6)
    puma (5.3.0)
      nio4r (~> 2.0)
    raabro (1.4.0)
    racc (1.5.2)
    rack (2.2.3)
    rack-cors (1.1.1)
      rack (>= 2.0.0)
    rack-test (1.1.0)
      rack (>= 1.0, < 3)
    rails (6.1.3.2)
      actioncable (= 6.1.3.2)
      actionmailbox (= 6.1.3.2)
      actionmailer (= 6.1.3.2)
      actionpack (= 6.1.3.2)
      actiontext (= 6.1.3.2)
      actionview (= 6.1.3.2)
      activejob (= 6.1.3.2)
      activemodel (= 6.1.3.2)
      activerecord (= 6.1.3.2)
      activestorage (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      bundler (>= 1.15.0)
      railties (= 6.1.3.2)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.3.0)
      loofah (~> 2.3)
    rails_best_practices (1.20.1)
      activesupport
      code_analyzer (>= 0.5.2)
      erubis
      i18n
      json
      require_all (~> 3.0)
      ruby-progressbar
    railties (6.1.3.2)
      actionpack (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      method_source
      rake (>= 0.8.7)
      thor (~> 1.0)
    rainbow (3.0.0)
    rake (13.0.3)
    ranked-model (0.4.7)
      activerecord (>= 4.2)
    rb-fsevent (0.11.0)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    redis (4.2.5)
    regexp_parser (2.1.1)
    require_all (3.0.0)
    rexml (3.2.5)
    rouge (3.26.0)
    rspec-core (3.10.1)
      rspec-support (~> 3.10.0)
    rspec-expectations (3.10.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.10.0)
    rspec-mocks (3.10.2)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.10.0)
    rspec-rails (5.0.1)
      actionpack (>= 5.2)
      activesupport (>= 5.2)
      railties (>= 5.2)
      rspec-core (~> 3.10)
      rspec-expectations (~> 3.10)
      rspec-mocks (~> 3.10)
      rspec-support (~> 3.10)
    rspec-support (3.10.2)
    rubocop (1.16.0)
      parallel (~> 1.10)
      parser (>= 3.0.0.0)
      rainbow (>= 2.2.2, < 4.0)
      regexp_parser (>= 1.8, < 3.0)
      rexml
      rubocop-ast (>= 1.7.0, < 2.0)
      ruby-progressbar (~> 1.7)
      unicode-display_width (>= 1.4.0, < 3.0)
    rubocop-ast (1.7.0)
      parser (>= 3.0.1.1)
    rubocop-rails (2.10.1)
      activesupport (>= 4.2.0)
      rack (>= 1.1)
      rubocop (>= 1.7.0, < 2.0)
    rubocop-rspec (2.3.0)
      rubocop (~> 1.0)
      rubocop-ast (>= 1.1.0)
    ruby-next-core (0.12.0)
    ruby-progressbar (1.11.0)
    ruby-vips (2.1.2)
      ffi (~> 1.12)
    ruby2_keywords (0.0.4)
    ruby_parser (3.15.1)
      sexp_processor (~> 4.9)
    searchkick (4.4.4)
      activemodel (>= 5)
      elasticsearch (>= 6)
      hashie
    seed-fu (2.3.9)
      activerecord (>= 3.1)
      activesupport (>= 3.1)
    sexp_processor (4.15.2)
    shrine (3.3.0)
      content_disposition (~> 1.0)
      down (~> 5.1)
    sidekiq (6.2.1)
      connection_pool (>= 2.2.2)
      rack (~> 2.0)
      redis (>= 4.2.0)
    sidekiq-cron (1.2.0)
      fugit (~> 1.1)
      sidekiq (>= 4.2.1)
    slop (4.9.1)
    spring (2.1.1)
    sprockets (4.0.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.2)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    thor (1.1.0)
    thwait (0.2.0)
      e2mmap
    typhoeus (1.4.0)
      ethon (>= 0.9.0)
    tzinfo (2.0.4)
      concurrent-ruby (~> 1.0)
    unicode-display_width (2.0.0)
    websocket-driver (0.7.3)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    xpath (3.2.0)
      nokogiri (~> 1.8)
    zeitwerk (2.4.2)

PLATFORMS
  x86_64-linux

DEPENDENCIES
  activerecord-import
  activerecord-postgres_enum
  acts-as-taggable-on (~> 7.0)
  ancestry
  annotate
  anycable-rails (~> 1.1)
  aws-sdk-s3 (~> 1.14)
  babosa
  bcrypt (~> 3.1.7)
  bootsnap (>= 1.4.4)
  brakeman
  byebug
  capybara
  csv
  database_cleaner-active_record
  dotenv-rails
  factory_bot_rails
  faker
  fasterer
  friendly_id (~> 5.4.0)
  goldiloader
  graphql
  graphql-rails_logger
  graphql_playground-rails!
  gruf
  image_processing (~> 1.12, >= 1.12.1)
  jwt
  light-service
  listen (~> 3.3)
  oj
  pg (~> 1.1)
  pry-byebug
  puma (~> 5.0)
  rack-cors
  rails (~> 6.1.3, >= 6.1.3.2)
  rails_best_practices
  ranked-model
  redis (>= 4.0)
  rspec-rails
  rubocop-rails
  rubocop-rspec
  searchkick
  seed-fu
  shrine (~> 3.3)
  sidekiq
  sidekiq-cron (~> 1.1)
  spring
  typhoeus
  tzinfo-data

RUBY VERSION
   ruby 3.0.1p64

BUNDLED WITH
   2.2.15
palkan commented 3 years ago

It would be great if you show all the ... 47 levels... of the backtrace)

hoangnm205 commented 3 years ago

It would be great if you show all the ... 47 levels... of the backtrace)

Please show me how to show full backtrace of anycable? I've tried --debug --log-grpc but no success.

palkan commented 3 years ago

Oh, its a Ruby behavior for SystemStackError.

It looks like the only way to get the full stack trace is to use set_trace_func (see the post above). Could you give it a try? Without knowing the entrypoint of this #deep_dup cycle it's really hard to guess, what is the cause.

hoangnm205 commented 3 years ago
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/anyway_config-2.1.0/lib/anyway/ext/deep_dup.rb:9 #<refinement:Hash@Anyway::Ext::DeepDup>#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/anyway_config-2.1.0/lib/anyway/ext/deep_dup.rb:9 #<refinement:Hash@Anyway::Ext::DeepDup>#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/anyway_config-2.1.0/lib/anyway/ext/deep_dup.rb:9 #<refinement:Hash@Anyway::Ext::DeepDup>#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/json/common.rb:42 JSON#deep_const_get
/home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/json/common.rb:42 JSON#deep_const_get
/home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/json/common.rb:42 JSON#deep_const_get
/home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/json/common.rb:42 JSON#deep_const_get
/home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/json/common.rb:42 JSON#deep_const_get
/home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/json/common.rb:42 JSON#deep_const_get
/home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/json/common.rb:42 JSON#deep_const_get
/home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/json/common.rb:42 JSON#deep_const_get
/home/x/.rbenv/versions/3.0.1/lib/ruby/3.0.0/json/common.rb:42 JSON#deep_const_get
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:15 Object#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:15 Object#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:15 Object#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup
/home/x/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4/lib/active_support/core_ext/object/dee
_dup.rb:43 Hash#deep_dup

Full trace.txt: https://drive.google.com/file/d/1gu4BdDxYSJEiSEeGCiu9abqcTJDwz64r/view?usp=sharing

tranhoanglam commented 2 years ago

Hi @palkan, @hoangnm205 For above issue I think anycable-rails is not compatible with shrine

Steps to reproduce the issue

  1. Add anycable-rails, shrine gem to Gemfile
  2. bundle install
  3. bundle exec rails g anycable:setup
  4. bundle exec anycable

require "shrine" in config/application.rb seems to be a temporary fix for me now. I hope this can help someone.

vipera commented 2 years ago

For above issue I think anycable-rails is not compatible with shrine

@tranhoanglam I've just run into what I think is the same problem. I have shrine in my Gemfile.

In my case, running bundle exec anycable just hangs forever without raising SystemStackError (I only waited around about 10 minutes, though), but it's obviously stuck in a loop as one core is capped. Stracing the process revealed nothing in my case, and it doesn't react to being interrupted - had to stop it with SIGKILL, which made me suspicious of a Ruby bug.

This was with Rails 6.1.4, Ruby 3.0.1p64 (x86_64-linux-musl), under Alpine.

I tried running it with Ruby 3.0.2p107 and it's not happening now! :tada: I don't have any idea what was happening, but it might be a fix for anyone in the same situation.