ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:88722] [Ruby trunk Bug#15041] [PATCH] cont.c: set th->root_fiber to current fiber at fork
       [not found] <redmine.issue-15041.20180829065903@ruby-lang.org>
@ 2018-08-29  6:59 ` normalperson
  2018-08-29  7:20 ` [ruby-core:88723] " ko1
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: normalperson @ 2018-08-29  6:59 UTC (permalink / raw
  To: ruby-core

Issue #15041 has been reported by normalperson (Eric Wong).

----------------------------------------
Bug #15041: [PATCH] cont.c: set th->root_fiber to current fiber at fork
https://bugs.ruby-lang.org/issues/15041

* Author: normalperson (Eric Wong)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED
----------------------------------------
cont.c: set th->root_fiber to current fiber at fork

Otherwise, th->root_fiber can point to an invalid Fiber,
because Fibers do not live across fork.  So consider
whatever Fiber is running the root fiber.


---Files--------------------------------
0001-cont.c-set-th-root_fiber-to-current-fiber-at-fork.patch (2.13 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:88723] [Ruby trunk Bug#15041] [PATCH] cont.c: set th->root_fiber to current fiber at fork
       [not found] <redmine.issue-15041.20180829065903@ruby-lang.org>
  2018-08-29  6:59 ` [ruby-core:88722] [Ruby trunk Bug#15041] [PATCH] cont.c: set th->root_fiber to current fiber at fork normalperson
@ 2018-08-29  7:20 ` ko1
  2018-08-29  8:09   ` [ruby-core:88724] " Eric Wong
  2019-01-14  9:23 ` [ruby-core:91073] " nagachika00
  2019-01-31 11:02 ` [ruby-core:91360] " usa
  3 siblings, 1 reply; 6+ messages in thread
From: ko1 @ 2018-08-29  7:20 UTC (permalink / raw
  To: ruby-core

Issue #15041 has been updated by ko1 (Koichi Sasada).


(I'm not sure why fork removes other fibers, but)
I think it is okay. let's try.


----------------------------------------
Bug #15041: [PATCH] cont.c: set th->root_fiber to current fiber at fork
https://bugs.ruby-lang.org/issues/15041#change-73777

* Author: normalperson (Eric Wong)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED
----------------------------------------
cont.c: set th->root_fiber to current fiber at fork

Otherwise, th->root_fiber can point to an invalid Fiber,
because Fibers do not live across fork.  So consider
whatever Fiber is running the root fiber.


---Files--------------------------------
0001-cont.c-set-th-root_fiber-to-current-fiber-at-fork.patch (2.13 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:88724] Re: [Ruby trunk Bug#15041] [PATCH] cont.c: set th->root_fiber to current fiber at fork
  2018-08-29  7:20 ` [ruby-core:88723] " ko1
@ 2018-08-29  8:09   ` Eric Wong
  2018-08-30  6:34     ` [ruby-core:88744] " Koichi Sasada
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2018-08-29  8:09 UTC (permalink / raw
  To: ruby-core

ko1@atdot.net wrote:
> (I'm not sure why fork removes other fibers, but)

	fib = Fiber.new { puts " HI" }
	fork { fib.resume }
	Process.waitall

Shows me: `resume': fiber called across stack rewinding barrier (FiberError)

If we reimplement Fiber entirely with Ruby bytecode, then we
can we can jump around anywhere (and migrate fibers across
threads).  But we lose C extension compatibility.

> I think it is okay. let's try.

OK, r64589

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:88744] Re: [Ruby trunk Bug#15041] [PATCH] cont.c: set th->root_fiber to current fiber at fork
  2018-08-29  8:09   ` [ruby-core:88724] " Eric Wong
@ 2018-08-30  6:34     ` Koichi Sasada
  0 siblings, 0 replies; 6+ messages in thread
From: Koichi Sasada @ 2018-08-30  6:34 UTC (permalink / raw
  To: Ruby developers

On 2018/08/29 17:09, Eric Wong wrote:
> Shows me: `resume': fiber called across stack rewinding barrier (FiberError)

Yes, I tried similar code.
Not sure why...

Nobu?

-- 
// SASADA Koichi at atdot dot net

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:91073] [Ruby trunk Bug#15041] [PATCH] cont.c: set th->root_fiber to current fiber at fork
       [not found] <redmine.issue-15041.20180829065903@ruby-lang.org>
  2018-08-29  6:59 ` [ruby-core:88722] [Ruby trunk Bug#15041] [PATCH] cont.c: set th->root_fiber to current fiber at fork normalperson
  2018-08-29  7:20 ` [ruby-core:88723] " ko1
@ 2019-01-14  9:23 ` nagachika00
  2019-01-31 11:02 ` [ruby-core:91360] " usa
  3 siblings, 0 replies; 6+ messages in thread
From: nagachika00 @ 2019-01-14  9:23 UTC (permalink / raw
  To: ruby-core

Issue #15041 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED to 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE

ruby_2_5 r66818 merged revision(s) 64589,64593.

----------------------------------------
Bug #15041: [PATCH] cont.c: set th->root_fiber to current fiber at fork
https://bugs.ruby-lang.org/issues/15041#change-76304

* Author: normalperson (Eric Wong)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE
----------------------------------------
cont.c: set th->root_fiber to current fiber at fork

Otherwise, th->root_fiber can point to an invalid Fiber,
because Fibers do not live across fork.  So consider
whatever Fiber is running the root fiber.


---Files--------------------------------
0001-cont.c-set-th-root_fiber-to-current-fiber-at-fork.patch (2.13 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:91360] [Ruby trunk Bug#15041] [PATCH] cont.c: set th->root_fiber to current fiber at fork
       [not found] <redmine.issue-15041.20180829065903@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-01-14  9:23 ` [ruby-core:91073] " nagachika00
@ 2019-01-31 11:02 ` usa
  3 siblings, 0 replies; 6+ messages in thread
From: usa @ 2019-01-31 11:02 UTC (permalink / raw
  To: ruby-core

Issue #15041 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE to 2.3: REQUIRED, 2.4: DONE, 2.5: DONE

ruby_2_4 r66968 merged revision(s) 64589,64593.

----------------------------------------
Bug #15041: [PATCH] cont.c: set th->root_fiber to current fiber at fork
https://bugs.ruby-lang.org/issues/15041#change-76613

* Author: normalperson (Eric Wong)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: REQUIRED, 2.4: DONE, 2.5: DONE
----------------------------------------
cont.c: set th->root_fiber to current fiber at fork

Otherwise, th->root_fiber can point to an invalid Fiber,
because Fibers do not live across fork.  So consider
whatever Fiber is running the root fiber.


---Files--------------------------------
0001-cont.c-set-th-root_fiber-to-current-fiber-at-fork.patch (2.13 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-31 11:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-15041.20180829065903@ruby-lang.org>
2018-08-29  6:59 ` [ruby-core:88722] [Ruby trunk Bug#15041] [PATCH] cont.c: set th->root_fiber to current fiber at fork normalperson
2018-08-29  7:20 ` [ruby-core:88723] " ko1
2018-08-29  8:09   ` [ruby-core:88724] " Eric Wong
2018-08-30  6:34     ` [ruby-core:88744] " Koichi Sasada
2019-01-14  9:23 ` [ruby-core:91073] " nagachika00
2019-01-31 11:02 ` [ruby-core:91360] " usa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).