ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: samuel@oriontransfer.net
To: ruby-core@ruby-lang.org
Subject: [ruby-core:89944] [Ruby trunk Bug#15329] Native implementation of coroutines - segfault
Date: Thu, 22 Nov 2018 02:21:24 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-75033.20181122022123.b7804ed02d544c06@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15329.20181121185456@ruby-lang.org

Issue #15329 has been updated by ioquatix (Samuel Williams).


You need to use debugger to get stack trace.

Here is an example of running it in GDB to get stack trace:

```
(gdb) run --disable-gems -I. -I../lib -I../test/lib ../test/ruby/test_enumerator.rb
Starting program: C:\msys64\home\samuel\ruby\build\ruby.exe --disable-gems -I. -I../lib -I../test/lib ../test/ruby/test_enumerator.rb
[New Thread 29384.0x73bc]
[New Thread 29384.0x7b88]
[New Thread 29384.0x710c]
[New Thread 29384.0x6958]
[New Thread 29384.0x2c64]
Run options:
# Running tests:
Thread 1 received signal SIGSEGV, Segmentation fault.
0x000000006a635a83 in rb_vm_bh_to_procval ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
(gdb) bt
#0  0x000000006a635a83 in rb_vm_bh_to_procval ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#1  0x000000006a635afc in vm_yield_with_cfunc.isra ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#2  0x000000006a63782e in vm_invoke_block ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#3  0x000000006a6427bf in vm_exec_core ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#4  0x000000006a6396a8 in rb_vm_exec ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#5  0x000000006a63be53 in vm_call0_body.constprop ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#6  0x000000006a63cbbb in rb_call0 ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#7  0x000000006a63d24c in iterate_method ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#8  0x000000006a634fb3 in rb_iterate0 ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#9  0x000000006a635241 in rb_block_call ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#10 0x000000006a4bd88b in enumerator_block_call ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#11 0x000000006a63bf0e in vm_call0_body.constprop ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#12 0x000000006a63cbbb in rb_call0 ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#13 0x000000006a63d24c in iterate_method ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#14 0x000000006a634fb3 in rb_iterate0 ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#15 0x000000006a635241 in rb_block_call ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#16 0x000000006a4bda13 in next_i ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#17 0x000000006a635b95 in vm_yield_with_cfunc.isra ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#18 0x000000006a63b592 in rb_vm_invoke_proc ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#19 0x000000006a49ed1e in rb_fiber_start ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#20 0x000000006a49f429 in fiber_entry ()
   from C:\msys64\home\samuel\ruby\build\x64-msvcrt-ruby260.dll
#21 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
```

I just merged windows stack allocation into trunk. It shouldn't affect you thought.

----------------------------------------
Bug #15329: Native implementation of coroutines - segfault
https://bugs.ruby-lang.org/issues/15329#change-75033

* Author: ahorek (Pavel Rosický)
* Status: Open
* Priority: Normal
* Assignee: ioquatix (Samuel Williams)
* Target version: 2.6
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Hi, after https://github.com/ruby/ruby/commit/07a324a0f6464f31765ee4bc5cfc23a99d426705 issue #14739 was merged I'm getting a segfault

uname -a (WSL)
```
Linux DESKTOP-2POPPQP 4.4.0-17134-Microsoft #345-Microsoft Wed Sep 19 17:47:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
```

gcc -v
```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.4' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4)
```

previous ruby builds were fine

```
ruby-head - #autoreconf.
ruby-head - #configuring.......................................................................
ruby-head - #post-configuration..
ruby-head - #compiling...................................................................................................................................
ruby-head - #installing........................
Error running '__rvm_make install',
please read /home/ahorek/.rvm/log/1542824691_ruby-head/install.log
There has been an error while running make install. Halting the installation.
```

```
make[1]: Entering directory `/home/ahorek/.rvm/src/ruby-head'
make[1]: Nothing to be done for `enc'.
make[1]: Leaving directory `/home/ahorek/.rvm/src/ruby-head'
making trans
make[1]: Entering directory `/home/ahorek/.rvm/src/ruby-head'
make[1]: Nothing to be done for `./enc/trans'.
make[1]: Leaving directory `/home/ahorek/.rvm/src/ruby-head'
making encs
make[1]: Entering directory `/home/ahorek/.rvm/src/ruby-head'
make[1]: Nothing to be done for `encs'.
make[1]: Leaving directory `/home/ahorek/.rvm/src/ruby-head'
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"
./tool/runruby.rb:110: warning: Insecure world writable dir /home/ahorek/.rvm/gems/ruby-2.5.1/bin in PATH, mode 040777
Segmentation fault (core dumped)
make: *** [do-install-nodoc] Error 139
++ return 2
```

@ioquatix any ideas what could went wrong?

---Files--------------------------------
configure.log (29.1 KB)
install.log (18.6 KB)
make.log (53.3 KB)


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

  parent reply	other threads:[~2018-11-22  2:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15329.20181121185456@ruby-lang.org>
2018-11-21 18:54 ` [ruby-core:89927] [Ruby trunk Bug#15329] Native implementation of coroutines - segfault pdahorek
2018-11-21 20:43 ` [ruby-core:89929] " samuel
2018-11-21 20:57 ` [ruby-core:89930] " pdahorek
2018-11-21 22:30 ` [ruby-core:89932] " samuel
2018-11-22  1:28 ` [ruby-core:89940] " pdahorek
2018-11-22  1:55 ` [ruby-core:89941] " samuel
2018-11-22  2:09 ` [ruby-core:89942] " pdahorek
2018-11-22  2:21 ` samuel [this message]
2018-11-22  6:30 ` [ruby-core:89952] " samuel
2018-11-22  6:32 ` [ruby-core:89953] " samuel
2018-11-22 10:16 ` [ruby-core:89966] " pdahorek
2018-11-22 11:48 ` [ruby-core:89969] " samuel
2018-11-22 12:59 ` [ruby-core:89970] " pdahorek
2018-11-24  5:48 ` [ruby-core:90023] " samuel
2018-11-24 17:59 ` [ruby-core:90043] " pdahorek
2018-11-24 20:51 ` [ruby-core:90049] [Ruby trunk Bug#15329][Closed] " samuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-75033.20181122022123.b7804ed02d544c06@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).