Re: Rawhide / ruby / SystemStackError / "stack level too deep"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 11, 2018 at 01:19:41PM +0100, Florian Weimer wrote:
> On 01/11/2018 12:42 PM, Richard W.M. Jones wrote:
> >If anyone notices Ruby programs which suddenly start to throw stack
> >overflow errors (SystemStackError or the error message
> >"stack level too deep") but*only*  in the latest Rawhide (glibc >=
> >2.26-9000, ruby >= 2.5.0), then I'm interested to hear from you.
> 
> Could you reproduce this outside of Koji?

Oh yes, very much so.  You need absolutely latest Rawhide however
(certainly of glibc & ruby, not sure what else).

  git clone https://github.com/libguestfs/nbdkit
  sudo dnf builddep nbdkit
  cd nbdkit
  ./configure
  make
  make check -C tests TESTS=test-ruby

The test will fail with an error message:

  nbdkit: error: ruby: stack level too deep

To go further with debugging it, I found the easiest way was:

  gdb --args src/nbdkit -f -v plugins/ruby/.libs/nbdkit-ruby-plugin.so tests/test.rb
  (gdb) break ec_stack_overflow
  (gdb) run

In another window do:

  telnet localhost 10809

Examining the Ruby execution context (*ec) seems to show that Ruby
gets confused by the use of C pthreads:

  machine = {
    stack_start = 0x7fffffffe000,  <-- in the main thread stack
    stack_end = 0x7ffff46997e8,    <-- apparently "huge" stack
    stack_maxsize = 8384512, 

which is caused just because we're running in a different thread from
the main thread.

What strange is how this suddenly started to happen, whereas the same
code has been working fine for years.  Unfortunately I cannot now
downgrade glibc to "prove" this is a glibc thing, rather than what's
more likely which is it's either Ruby itself or the test.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux