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

invalid gemspec in ... stack level too deep 問題が続きます。 #338

Open
KazukiAmamiya opened this issue Dec 11, 2019 · 4 comments
Open

Comments

@KazukiAmamiya
Copy link

(多分)この一年ほど
invalid gemspec in ... stack level too deep 問題が続きます。
Rubyのバージョンを上げてから出てきたと覚えています。
一応動くのですが、コマンドの起動が異常に長くなります…

macOSはgemをすべてuninstallして入れ直したらあまり見なくなったのですが、Linuxでruby 2.6.*を使っていると出現します。(新しい環境でruby 2.5.*を使っていると大丈夫でした。)

こんな感じのエラメッセージが出ます。(Tracebackを見るために途中で強制的に止めています。)

Invalid gemspec in [/usr/share/rubygems-integration/all/specifications/rbnacl-libsodium.gemspec]: stack level too deep
Invalid gemspec in [/var/lib/gems/2.6.0/specifications/mime-types-data-3.2019.1009.gemspec]: stack level too deep
Invalid gemspec in [/usr/share/rubygems-integration/all/specifications/mime-types-data-3.2015.1120.gemspec]: stack level too deep
^CTraceback (most recent call last):
        9344: from /usr/local/bin/narou:23:in `<main>'
        9343: from /usr/lib/ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
        9342: from /usr/lib/ruby/2.6.0/rubygems.rb:303:in `synchronize'
        9341: from /usr/lib/ruby/2.6.0/rubygems.rb:305:in `block in activate_bin_path'
        9340: from /usr/lib/ruby/2.6.0/rubygems.rb:238:in `finish_resolve'
        9339: from /usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:63:in `require'
        9338: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1062:in `find_active_stub_by_path'
        9337: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:826:in `stubs'
        9336: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:788:in `installed_stubs'
        9335: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:795:in `map_stubs'
        9334: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:795:in `flat_map'
        9333: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:795:in `each'
        9332: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:798:in `block in map_stubs'
        9331: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:774:in `gemspec_stubs_in'
        9330: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:774:in `select'
        9329: from /usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:204:in `valid?'
        9328: from /usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:135:in `data'
        9327: from /usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:193:in `to_spec'
        9326: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1168:in `load'
        9325: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1168:in `eval'
        9324: from /usr/share/rubygems-integration/all/specifications/rbnacl-libsodium.gemspec:2:in `load'

...

          28: from /usr/share/rubygems-integration/all/specifications/rbnacl-libsodium.gemspec:2:in `load'
          27: from /usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:63:in `require'
          26: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1062:in `find_active_stub_by_path'
          25: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:826:in `stubs'
          24: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:788:in `installed_stubs'
          23: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:795:in `map_stubs'
          22: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:795:in `flat_map'
          21: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:795:in `each'
          20: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:798:in `block in map_stubs'
          19: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:774:in `gemspec_stubs_in'
          18: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:774:in `select'
          17: from /usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:204:in `valid?'
          16: from /usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:135:in `data'
          15: from /usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:193:in `to_spec'
          14: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1168:in `load'
          13: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1168:in `eval'
          12: from /usr/share/rubygems-integration/all/specifications/rbnacl-libsodium.gemspec:2:in `load'
          11: from /usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:83:in `require'
          10: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1085:in `find_in_unresolved_tree'
           9: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1085:in `each'
           8: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1086:in `block in find_in_unresolved_tree'
           7: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:2619:in `traverse'
           6: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:2619:in `each'
           5: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:2621:in `block in traverse'
           4: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:2621:in `each'
           3: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:2626:in `block (2 levels) in traverse'
           2: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1090:in `block (2 levels) in find_in_unresolved_tree'
           1: from /usr/lib/ruby/2.6.0/rubygems/basic_specification.rb:79:in `contains_requirable_file?'
/usr/lib/ruby/2.6.0/rubygems.rb:1024:in `suffixes': Interrupt

Rubyは詳しくなくて、これ以上の情報は拾えませんでした。すみません。

@whiteleaf7
Copy link
Owner

環境、再現方法などがないとどうしようも

@whiteleaf7
Copy link
Owner

https://jbbs.shitaraba.net/bbs/read.cgi/computer/44668/1511245701/1

報告用テンプレ


Narou.rb のバージョン:

OS のバージョン:

その他環境情報(任意):

何が起きたのか:

再現方法(何をやったら起こったのか詳細に):


エラーメッセージは再現方法に併記。
その際は --backtrace オプションをつけること。

@KazukiAmamiya
Copy link
Author

KazukiAmamiya commented Dec 11, 2019

再現環境

以下の組み合わせでそれぞれ発生。
最後に試した組み合わせは、Narou.rb 3.4.8, Ubuntu 18.04, Ruby 2.6.5 です。
(Ruby 2.5.7でもエラーが再現されてたのですが、何度かgemをリセットしたら消えました。Ruby 2.6.*ではいくらリセットしても消えませんでした)

Narou.rb のバージョン:3.4.1~3.4.8

OS のバージョン:Ubuntu 16.04, Ubuntu 18.04

その他環境情報(任意):

  • Ruby 2.6.3, 2.6.5(p144)
  • Vagrant 2.2.6 (libsodium関係で類似のエラーに対しての報告があったため、Debian/Ubuntu repositoryで配布されていない本家のものも入れた。)

何が起きたのか:narou コマンド実行時に Invalid gemspec in [...] stack level too deepが毎回出る。(遅くなる)

再現方法(何をやったら起こったのか詳細に):narou list, narou update, narou convertなどのコマンドの実行時に毎度Invalid gemspec in [...] stack level too deepというメッセージが出てくる。

メッセージは出るけど、エラーで異常終了するわけではないので--backtraceの結果はなし。
その代わり、途中のstackの状態は最初に投稿したlogを参照。

既存の環境ではgemを全部消して入れ直しても再現されるのですが、
真新しいLinux環境でVagrantを入れずにnarouを入れたところ再現できません。

おそらくlibsodiumなどに関わるものと思いますが、検証はできていません。

@whiteleaf7
Copy link
Owner

とりあえず、特殊な環境はこちらが検証環境を用意できないので、対応はできません
修正パッチは歓迎します

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

No branches or pull requests

2 participants