[MacRuby] #216: fork subprocess exiting (normally) segfaults
#216: fork subprocess exiting (normally) segfaults -------------------------------+-------------------------------------------- Reporter: celtic@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: fork process -------------------------------+-------------------------------------------- When '''fork''''s subprocess dies, it segfaults about 80% of the time (out of a sample of 10 runs): {{{ echo "fork {}" | macruby }}} Calling the non-block version alone like this seems to segfault less often, perhaps 50% of the time: {{{ echo fork | macruby }}} Note that it's only the subprocess that segfaults, and not the main process. This can be demonstrated: {{{ fork { } sleep 1 puts "soup" }}} This produces the segfault output, followed by 'soup' a moment later. Strangely, sleeping after the non-block call causes things to work: {{{ fork sleep 1 }}} (no segfault with the above code) -- Ticket URL: <http://www.macruby.org/trac/ticket/216> MacRuby <http://macruby.org/>
#216: fork subprocess exiting (normally) segfaults -------------------------------+-------------------------------------------- Reporter: celtic@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: fork process -------------------------------+-------------------------------------------- Comment(by nate@…): I can confirm issues with fork(). All of celtic's examples result in an "Abort trap" error. -- Ticket URL: <http://www.macruby.org/trac/ticket/216#comment:2> MacRuby <http://macruby.org/>
#216: fork subprocess exiting (normally) segfaults -------------------------------+-------------------------------------------- Reporter: celtic@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: fork process -------------------------------+-------------------------------------------- Comment(by ernest.prabhakar@…): Any update on this? I notice that the MacRuby 0.5 beta (nightly) simply reports "fork" as unsupported, perhaps due to this. irb(main):001:0> fork RuntimeError: fork is not supported yet from core:in `fork' from (irb):1:in `<main>' from core:in `eval:' from core:in `evaluate:' -- Ticket URL: <http://www.macruby.org/trac/ticket/216#comment:4> MacRuby <http://macruby.org/>
#216: fork subprocess exiting (normally) segfaults -------------------------------+-------------------------------------------- Reporter: celtic@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: fork process -------------------------------+-------------------------------------------- Comment(by lsansonetti@…): #fork will be hard to support in MacRuby because the underlying system (CoreFoundation, libauto) do not support it. I highly recommend using threads OR GCD instead. -- Ticket URL: <http://www.macruby.org/trac/ticket/216#comment:5> MacRuby <http://macruby.org/>
#216: fork subprocess exiting (normally) segfaults -------------------------------+-------------------------------------------- Reporter: celtic@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: fork process -------------------------------+-------------------------------------------- Comment(by ernest.prabhakar@…): I can appreciate that, but I really want to run something in a separate *process* to take advantage of memory isolation. Is there another way to asynchronously spawn another process from Ruby? -- Ticket URL: <http://www.macruby.org/trac/ticket/216#comment:6> MacRuby <http://macruby.org/>
#216: fork subprocess exiting (normally) segfaults -------------------------------+-------------------------------------------- Reporter: celtic@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: fork process -------------------------------+-------------------------------------------- Comment(by lsansonetti@…): You can still spawn a new process (using #system, #`, #popen, etc.). If you want to run Ruby code in that process, you can spawn a new `/usr/bin/env macruby' process that way. -- Ticket URL: <http://www.macruby.org/trac/ticket/216#comment:7> MacRuby <http://macruby.org/>
#216: fork subprocess exiting (normally) segfaults -------------------------------+-------------------------------------------- Reporter: celtic@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: Component: MacRuby | Resolution: wontfix Keywords: fork process | -------------------------------+-------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => wontfix Comment: #fork will not be supported any time soon (very likely never). -- Ticket URL: <http://www.macruby.org/trac/ticket/216#comment:8> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby