Project

General

Profile

Bug #10933

[BUG] object allocation during garbage collection phase

Added by yoshuki (Yoshiyuki MIKAMI) over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
[ruby-dev:48891]

Description

いつもお世話になっています。
rspec中に遭遇して、その後繰り返しても再現しないのですが、役に立てばと採取できたログをお送りします。
追加で提出すべき情報があればお知らせください。
よろしくお願いいたします。

crash.txt (165 KB) crash.txt yoshuki (Yoshiyuki MIKAMI), 03/04/2015 01:33 AM
ruby_2015-03-04-020941_Silver.crash (35 KB) ruby_2015-03-04-020941_Silver.crash yoshuki (Yoshiyuki MIKAMI), 03/04/2015 01:33 AM

Related issues

Has duplicate Ruby trunk - Bug #11168: object allocation during garbage collection phase when rake assets:precompile on 2.2.2Closed
Has duplicate Ruby trunk - Bug #11351: Random chrash [BUG] object allocation during garbage collection phaseClosed
Has duplicate Ruby trunk - Bug #11354: Ruby Crash whileClosed
Has duplicate Ruby trunk - Bug #12067: [BUG] object allocation during garbage collection phaseClosed

Associated revisions

Revision 49842
Added by nobu (Nobuyoshi Nakada) over 2 years ago

symbol.c: make dsym_fstrs an identity hash

  • symbol.c (Init_sym): make dsym_fstrs a hash compared by identity as the keys are unique fstrings, to get rid of running hash and compare methods and causing new object allocation during garbage collection phase. [Bug #10933]

Revision 49842
Added by nobu (Nobuyoshi Nakada) over 2 years ago

symbol.c: make dsym_fstrs an identity hash

  • symbol.c (Init_sym): make dsym_fstrs a hash compared by identity as the keys are unique fstrings, to get rid of running hash and compare methods and causing new object allocation during garbage collection phase. [Bug #10933]

Revision 49842
Added by nobu (Nobuyoshi Nakada) over 2 years ago

symbol.c: make dsym_fstrs an identity hash

  • symbol.c (Init_sym): make dsym_fstrs a hash compared by identity as the keys are unique fstrings, to get rid of running hash and compare methods and causing new object allocation during garbage collection phase. [Bug #10933]

Revision 50493
Added by nagachika (Tomoyuki Chikanaga) over 2 years ago

merge revision(s) 49842: [Backport #10933]

* symbol.c (Init_sym): make dsym_fstrs a hash compared by identity
  as the keys are unique fstrings, to get rid of running hash and
  compare methods and causing new object allocation during garbage
  collection phase.   [Bug #10933]

History

#1 [ruby-dev:48892] Updated by yoshuki (Yoshiyuki MIKAMI) over 2 years ago

I encountered non-recurring bug during rspec.
I hope attached files will help.
If I should send extra information abount this bug, please let me know.

Thanks,

#2 [ruby-dev:48893] Updated by ko1 (Koichi Sasada) over 2 years ago

  • Assignee set to nobu (Nobuyoshi Nakada)

ありがとうございます。とてもわかりやすいログでした。

  • cleanup フェーズに入る
    • sweep_rest を行なう(lazy sweep の後始末を行なう)
    • ここで、GC 中フラグが立ち、オブジェクト割り当てが禁止される
    • dynamic symbol の free を行なう
      • rb_hash_delete_entry() が走る
      • st_delete() 中で rb_any_cmp() -> rb_eql() -> rb_funcall() が呼ばれる
        • compare 処理を行なう
        • interrupt が走り、ファイナライザが起動される
        • run_finalizer() 中で配列を作る(ここでは ruby-level ファイナライザが起動されるので、これに限らない)
          • [BUG]

ということで、2.2.1 で導入されたバグだということがわかりました。ありがとうございます。

#3 [ruby-dev:48894] Updated by yoshuki (Yoshiyuki MIKAMI) over 2 years ago

早速のレスありがとうございました。よろしくお願いします!

#4 Updated by nobu (Nobuyoshi Nakada) over 2 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r49842.


symbol.c: make dsym_fstrs an identity hash

  • symbol.c (Init_sym): make dsym_fstrs a hash compared by identity as the keys are unique fstrings, to get rid of running hash and compare methods and causing new object allocation during garbage collection phase. [Bug #10933]

#5 Updated by nobu (Nobuyoshi Nakada) over 2 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED

#6 [ruby-dev:48980] Updated by nagachika (Tomoyuki Chikanaga) over 2 years ago

  • Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE

Backported into ruby_2_2 branch at r50493.

#7 Updated by nobu (Nobuyoshi Nakada) over 2 years ago

  • Has duplicate Bug #11168: object allocation during garbage collection phase when rake assets:precompile on 2.2.2 added

#8 Updated by nobu (Nobuyoshi Nakada) about 2 years ago

  • Has duplicate Bug #11351: Random chrash [BUG] object allocation during garbage collection phase added

#9 Updated by nobu (Nobuyoshi Nakada) about 2 years ago

  • Has duplicate Bug #11354: Ruby Crash while added

#10 Updated by nobu (Nobuyoshi Nakada) about 2 years ago

  • Has duplicate Bug #11411: Crash in rb_gc_mark() during Rails app boot with GC.stress=1 added

#11 Updated by nobu (Nobuyoshi Nakada) about 2 years ago

  • Has duplicate deleted (Bug #11411: Crash in rb_gc_mark() during Rails app boot with GC.stress=1)

#12 Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Has duplicate Bug #12067: [BUG] object allocation during garbage collection phase added

#13 [ruby-dev:49733] Updated by vo.x (Vit Ondruch) about 1 year ago

Hi, just wondering that since this patch appears to fix this issue, is there a chance that somebody would provide more details how to actually systematically reproduce this issue?

Also available in: Atom PDF