Skip to content

MiniRacer hangs after fork #175

Closed
Closed
@SamSaffron

Description

@SamSaffron

@cataphract / @nightpool previous versions of mini_racer were fork friendly ... but now sadly it looks like we totally stall after forks due to a GC thread.

Repro is:

  def test_forking
    trigger_gc = lambda do
      ctx = MiniRacer::Context.new
      ctx.eval("var a = #{('x' * 100000).inspect}")
      ctx.eval("a = undefined")
      ctx.isolate.low_memory_notification
    end
    trigger_gc.call
    Process.wait fork { trigger_gc.call }
  end

Any ideas how we can sort this out?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions