Bug #5241

test_massign.rb:165 fails on Debian GNU/kFreeBSD (amd64)

Added by Lucas Nussbaum over 2 years ago. Updated over 2 years ago.

[ruby-core:39147]
Status:Closed
Priority:Normal
Assignee:Motohiro KOSAKI
Category:core
Target version:1.9.3
ruby -v:1.9.3 Backport:

Description

Hi,

With a reduced testcase:

ruby1.9.1 -e "Fiber::new {}.resume"

-e:1:in resume': can't alloc machine stack to fiber (FiberError)
from -e:1:in
'

That's using svn revision 33077. This might or might not be related to bug #5240.

freebsd_map_stack.patch Magnifier (719 Bytes) Lucas Nussbaum, 08/28/2011 03:53 PM

Associated revisions

Revision 33118
Added by Motohiro KOSAKI over 2 years ago

  • cont.c (fiber_entry): fix stack allocation failure on Debian GNU/kFreeBSD. Patch by Lucas Nussbaum . [Bug #5241]

History

#1 Updated by Motohiro KOSAKI over 2 years ago

  • Status changed from Open to Feedback

Why do kFreeBSD fail to allocate a stack?

#2 Updated by Lucas Nussbaum over 2 years ago

Hi,

The attached patch fixes the issue. It's a bug in FreeBSD's mmap, that was already reported.

FreeBSD is not defined on Debian GNU/kFreeBSD. Since it uses the FreeBSD kernel with the GNU Libc, semantics be be either those of the FreeBSD kernel, or those of the GNU Libc, so it doesn't make sense to just look at "FreeBSD". Instead, FreeBSD_kernel is defined.

I've looked at other uses of FreeBSD kernel, and try to remember to provide patches for them if I run into issues that could be caused by them.

I've also added a reference to the FreeBSD bug report in the comment.

#3 Updated by Motohiro KOSAKI over 2 years ago

  • Category set to core
  • Status changed from Feedback to Assigned
  • Assignee set to Motohiro KOSAKI
  • Target version set to 1.9.3

Ok, I'll commit your patch. Thank you!

#4 Updated by Motohiro KOSAKI over 2 years ago

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

This issue was solved with changeset r33118.
Lucas, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • cont.c (fiber_entry): fix stack allocation failure on Debian GNU/kFreeBSD. Patch by Lucas Nussbaum . [Bug #5241]

Also available in: Atom PDF