ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:71345] [Ruby trunk - Bug #11658] [Open] Segmentation fault with activeadmin test suite
       [not found] <redmine.issue-11658.20151105034634@ruby-lang.org>
@ 2015-11-05  3:46 ` shibata.hiroshi
  2015-11-05  6:38   ` [ruby-core:71347] " Eric Wong
  2015-11-05  7:00 ` [ruby-core:71350] [Ruby trunk - Bug #11658] " shibata.hiroshi
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: shibata.hiroshi @ 2015-11-05  3:46 UTC (permalink / raw
  To: ruby-core

Issue #11658 has been reported by Hiroshi SHIBATA.

----------------------------------------
Bug #11658: Segmentation fault with activeadmin test suite
https://bugs.ruby-lang.org/issues/11658

* Author: Hiroshi SHIBATA
* Status: Open
* Priority: Normal
* Assignee: Eric Wong
* ruby -v: ruby 2.3.0dev (2015-11-04 trunk 52452) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I detect causes of SEGV with Ruby 2.3.0 HEAD and activeadmin-1.0.0.pre2 after r52332.

Please try following instructions with ruby of r52332.

```sh
$ gem install bundler
$ git clone --branch v1.0.0.pre2 https://github.com/activeadmin/activeadmin
$ cd activeadmin
$ bundle exec rspec spec/unit/active_admin_spec.rb
```

this segv is happened at launching rails server too. I attached crash log.

Please investigate this.



---Files--------------------------------
ruby_2015-11-05-115449_osx.crash (19.2 KB)


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

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

* [ruby-core:71347] Re: [Ruby trunk - Bug #11658] [Open] Segmentation fault with activeadmin test suite
  2015-11-05  3:46 ` [ruby-core:71345] [Ruby trunk - Bug #11658] [Open] Segmentation fault with activeadmin test suite shibata.hiroshi
@ 2015-11-05  6:38   ` Eric Wong
  0 siblings, 0 replies; 11+ messages in thread
From: Eric Wong @ 2015-11-05  6:38 UTC (permalink / raw
  To: Ruby developers

Anyway to reproduce this without loading a JS engine?
I haven't touched anything Rails-related in years because of JS.

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

* [ruby-core:71350] [Ruby trunk - Bug #11658] Segmentation fault with activeadmin test suite
       [not found] <redmine.issue-11658.20151105034634@ruby-lang.org>
  2015-11-05  3:46 ` [ruby-core:71345] [Ruby trunk - Bug #11658] [Open] Segmentation fault with activeadmin test suite shibata.hiroshi
@ 2015-11-05  7:00 ` shibata.hiroshi
  2015-11-05  7:22   ` [ruby-core:71351] " Eric Wong
  2015-11-05  8:44 ` [ruby-core:71352] [Ruby trunk - Bug #11658] [Assigned] " shibata.hiroshi
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: shibata.hiroshi @ 2015-11-05  7:00 UTC (permalink / raw
  To: ruby-core

Issue #11658 has been updated by Hiroshi SHIBATA.


> Anyway to reproduce this without loading a JS engine?

Yes, I can reproduce with `ruby -Ilib:spec -e "require 'rails_helper'"` in activeadmin directory.

----------------------------------------
Bug #11658: Segmentation fault with activeadmin test suite
https://bugs.ruby-lang.org/issues/11658#change-54718

* Author: Hiroshi SHIBATA
* Status: Open
* Priority: Normal
* Assignee: Eric Wong
* ruby -v: ruby 2.3.0dev (2015-11-04 trunk 52452) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I detect causes of SEGV with Ruby 2.3.0 HEAD and activeadmin-1.0.0.pre2 after r52332.

Please try following instructions with ruby of r52332.

```sh
$ gem install bundler
$ git clone --branch v1.0.0.pre2 https://github.com/activeadmin/activeadmin
$ cd activeadmin
$ bundle exec rspec spec/unit/active_admin_spec.rb
```

this segv is happened at launching rails server too. I attached crash log.

Please investigate this.



---Files--------------------------------
ruby_2015-11-05-115449_osx.crash (19.2 KB)


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

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

* [ruby-core:71351] Re: [Ruby trunk - Bug #11658] Segmentation fault with activeadmin test suite
  2015-11-05  7:00 ` [ruby-core:71350] [Ruby trunk - Bug #11658] " shibata.hiroshi
@ 2015-11-05  7:22   ` Eric Wong
  0 siblings, 0 replies; 11+ messages in thread
From: Eric Wong @ 2015-11-05  7:22 UTC (permalink / raw
  To: Ruby developers

It's still asking for a JS runtime:

  /lib/ruby/gems/2.3.0/gems/execjs-2.4.0/lib/execjs/runtimes.rb:45:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes

Sorry I can't trust JS to run.
Do you have standalone Ruby code to reproduce the issue?
Also, does this error happen on GNU/Linux systems with NPTL?
Maybe it is a platform-dependent threading bug.

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

* [ruby-core:71352] [Ruby trunk - Bug #11658] [Assigned] Segmentation fault with activeadmin test suite
       [not found] <redmine.issue-11658.20151105034634@ruby-lang.org>
  2015-11-05  3:46 ` [ruby-core:71345] [Ruby trunk - Bug #11658] [Open] Segmentation fault with activeadmin test suite shibata.hiroshi
  2015-11-05  7:00 ` [ruby-core:71350] [Ruby trunk - Bug #11658] " shibata.hiroshi
@ 2015-11-05  8:44 ` shibata.hiroshi
  2015-11-05 22:24   ` [ruby-core:71359] " Eric Wong
  2015-11-06  3:20 ` [ruby-core:71367] [Ruby trunk - Bug #11658] " shibata.hiroshi
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: shibata.hiroshi @ 2015-11-05  8:44 UTC (permalink / raw
  To: ruby-core

Issue #11658 has been updated by Hiroshi SHIBATA.

Status changed from Open to Assigned

Can you install `nodejs` via apt?

I got another error related with r52332 at ubuntu 14.04

```
$ sudo apt install nodejs
$ cd activeadmin
$ bundle exec rake spec
(snip)
/data/dev/activeadmin/lib/active_admin/resource/action_items.rb:5:in `<module:ActiveAdmin>': No live threads left. Deadlock? (fatal)
	from /data/dev/activeadmin/lib/active_admin/resource/action_items.rb:3:in `<top (required)>'
```

above error happend by "ruby 2.3.0dev (2015-11-05 trunk 52458) [x86_64-linux]"

it works with Ruby 2.2.0(ruby 2.2.4p185 (2015-11-01 revision 52414) [x86_64-linux])


----------------------------------------
Bug #11658: Segmentation fault with activeadmin test suite
https://bugs.ruby-lang.org/issues/11658#change-54720

* Author: Hiroshi SHIBATA
* Status: Assigned
* Priority: Normal
* Assignee: Eric Wong
* ruby -v: ruby 2.3.0dev (2015-11-04 trunk 52452) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I detect causes of SEGV with Ruby 2.3.0 HEAD and activeadmin-1.0.0.pre2 after r52332.

Please try following instructions with ruby of r52332.

```sh
$ gem install bundler
$ git clone --branch v1.0.0.pre2 https://github.com/activeadmin/activeadmin
$ cd activeadmin
$ bundle exec rspec spec/unit/active_admin_spec.rb
```

this segv is happened at launching rails server too. I attached crash log.

Please investigate this.



---Files--------------------------------
ruby_2015-11-05-115449_osx.crash (19.2 KB)


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

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

* [ruby-core:71359] Re: [Ruby trunk - Bug #11658] [Assigned] Segmentation fault with activeadmin test suite
  2015-11-05  8:44 ` [ruby-core:71352] [Ruby trunk - Bug #11658] [Assigned] " shibata.hiroshi
@ 2015-11-05 22:24   ` Eric Wong
  0 siblings, 0 replies; 11+ messages in thread
From: Eric Wong @ 2015-11-05 22:24 UTC (permalink / raw
  To: Ruby developers

shibata.hiroshi@gmail.com wrote:
> Can you install `nodejs` via apt?

Sorry, I'm willing to audit all that code before I run it.
I cannot afford to develop any expectation of being able to
run/debug JS in any way; likewise for X11/GNOME or worse things.

> $ sudo apt install nodejs
> $ cd activeadmin
> $ bundle exec rake spec
> (snip)
> /data/dev/activeadmin/lib/active_admin/resource/action_items.rb:5:in `<module:ActiveAdmin>': No live threads left. Deadlock? (fatal)
> 	from /data/dev/activeadmin/lib/active_admin/resource/action_items.rb:3:in `<top (required)>'

Maybe this three-line patch fixes the deadlock recursion problem:

    http://80x24.org/spew/20151105213303.19743-1-e%4080x24.org/raw

No successful standalone reproduction, yet:

    http://80x24.org/spew/20151105220751.24371-1-e%4080x24.org/raw

As stated in https://bugs.ruby-lang.org/issues/11384 ,
I was not comfortable with the original patch; so maybe
reverting the series is better if we cannot solve it right away;
especially since I don't consider the additional locking a complete
fix in [ruby-core:71305]

    http://80x24.org/spew/20151105212409.23859-1-e%4080x24.org/raw
    (reverts r52446, r52335, r52332)

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

* [ruby-core:71367] [Ruby trunk - Bug #11658] Segmentation fault with activeadmin test suite
       [not found] <redmine.issue-11658.20151105034634@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2015-11-05  8:44 ` [ruby-core:71352] [Ruby trunk - Bug #11658] [Assigned] " shibata.hiroshi
@ 2015-11-06  3:20 ` shibata.hiroshi
  2015-11-06  3:51   ` [ruby-core:71368] " Eric Wong
  2015-11-09  5:02 ` [ruby-core:71390] " h.shirosaki
  2015-11-09 15:36 ` [ruby-core:71420] " deivid.rodriguez
  5 siblings, 1 reply; 11+ messages in thread
From: shibata.hiroshi @ 2015-11-06  3:20 UTC (permalink / raw
  To: ruby-core

Issue #11658 has been updated by Hiroshi SHIBATA.


>Maybe this three-line patch fixes the deadlock recursion problem:

>http://80x24.org/spew/20151105213303.19743-1-e%4080x24.org/raw

I confirmed r52461 with this patch at activeadmin-1.0.0.pre2 tests.

----------------------------------------
Bug #11658: Segmentation fault with activeadmin test suite
https://bugs.ruby-lang.org/issues/11658#change-54737

* Author: Hiroshi SHIBATA
* Status: Assigned
* Priority: Normal
* Assignee: Eric Wong
* ruby -v: ruby 2.3.0dev (2015-11-04 trunk 52452) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I detect causes of SEGV with Ruby 2.3.0 HEAD and activeadmin-1.0.0.pre2 after r52332.

Please try following instructions with ruby of r52332.

```sh
$ gem install bundler
$ git clone --branch v1.0.0.pre2 https://github.com/activeadmin/activeadmin
$ cd activeadmin
$ bundle exec rspec spec/unit/active_admin_spec.rb
```

this segv is happened at launching rails server too. I attached crash log.

Please investigate this.



---Files--------------------------------
ruby_2015-11-05-115449_osx.crash (19.2 KB)


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

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

* [ruby-core:71368] Re: [Ruby trunk - Bug #11658] Segmentation fault with activeadmin test suite
  2015-11-06  3:20 ` [ruby-core:71367] [Ruby trunk - Bug #11658] " shibata.hiroshi
@ 2015-11-06  3:51   ` Eric Wong
  0 siblings, 0 replies; 11+ messages in thread
From: Eric Wong @ 2015-11-06  3:51 UTC (permalink / raw
  To: Ruby developers

shibata.hiroshi@gmail.com wrote:
> >Maybe this three-line patch fixes the deadlock recursion problem:
> 
> >http://80x24.org/spew/20151105213303.19743-1-e%4080x24.org/raw
> 
> I confirmed r52461 with this patch at activeadmin-1.0.0.pre2 tests.

Thanks, now we need to figure out a test case for this...

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

* [ruby-core:71390] [Ruby trunk - Bug #11658] Segmentation fault with activeadmin test suite
       [not found] <redmine.issue-11658.20151105034634@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2015-11-06  3:20 ` [ruby-core:71367] [Ruby trunk - Bug #11658] " shibata.hiroshi
@ 2015-11-09  5:02 ` h.shirosaki
  2015-11-09 15:36 ` [ruby-core:71420] " deivid.rodriguez
  5 siblings, 0 replies; 11+ messages in thread
From: h.shirosaki @ 2015-11-09  5:02 UTC (permalink / raw
  To: ruby-core

Issue #11658 has been updated by Hiroshi Shirosaki.


I found a test that causes deadlock.

~~~
diff --git a/test/ruby/test_autoload.rb b/test/ruby/test_autoload.rb
index 719502d..a672e0b 100644
--- a/test/ruby/test_autoload.rb
+++ b/test/ruby/test_autoload.rb
@@ -215,6 +215,25 @@ p Foo::Bar
     end
   end

+  def test_autoload_while_autoloading
+    ruby_impl_require do |called_with|
+      Tempfile.create(%w(a .rb)) do |a|
+        Tempfile.create(%w(b .rb)) do |b|
+          a.puts "require '#{b.path}'; class AutoloadTest; end"
+          b.puts "class AutoloadTest; module B; end; end"
+          [a, b].each(&:flush)
+          add_autoload(a.path)
+          begin
+            assert(Object::AutoloadTest)
+          ensure
+            remove_autoload_constant
+          end
+          assert_equal [a.path, b.path], called_with
+        end
+      end
+    end
+  end
+
   def add_autoload(path)
     (@autoload_paths ||= []) << path
     ::Object.class_eval {autoload(:AutoloadTest, path)}
~~~

----------------------------------------
Bug #11658: Segmentation fault with activeadmin test suite
https://bugs.ruby-lang.org/issues/11658#change-54760

* Author: Hiroshi SHIBATA
* Status: Assigned
* Priority: Normal
* Assignee: Eric Wong
* ruby -v: ruby 2.3.0dev (2015-11-04 trunk 52452) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I detect causes of SEGV with Ruby 2.3.0 HEAD and activeadmin-1.0.0.pre2 after r52332.

Please try following instructions with ruby of r52332.

```sh
$ gem install bundler
$ git clone --branch v1.0.0.pre2 https://github.com/activeadmin/activeadmin
$ cd activeadmin
$ bundle exec rspec spec/unit/active_admin_spec.rb
```

this segv is happened at launching rails server too. I attached crash log.

Please investigate this.



---Files--------------------------------
ruby_2015-11-05-115449_osx.crash (19.2 KB)


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

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

* [ruby-core:71420] [Ruby trunk - Bug #11658] Segmentation fault with activeadmin test suite
       [not found] <redmine.issue-11658.20151105034634@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2015-11-09  5:02 ` [ruby-core:71390] " h.shirosaki
@ 2015-11-09 15:36 ` deivid.rodriguez
  2015-11-09 21:21   ` [ruby-core:71422] " Eric Wong
  5 siblings, 1 reply; 11+ messages in thread
From: deivid.rodriguez @ 2015-11-09 15:36 UTC (permalink / raw
  To: ruby-core

Issue #11658 has been updated by David Rodríguez.


I confirmed on my system.

- The proposed test deadlocks.
- The proposed 3 line patch makes the test pass.
- The proposed 3 line patch resolves activeadmin's deadlock issue.


----------------------------------------
Bug #11658: Segmentation fault with activeadmin test suite
https://bugs.ruby-lang.org/issues/11658#change-54789

* Author: Hiroshi SHIBATA
* Status: Assigned
* Priority: Normal
* Assignee: Eric Wong
* ruby -v: ruby 2.3.0dev (2015-11-04 trunk 52452) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I detect causes of SEGV with Ruby 2.3.0 HEAD and activeadmin-1.0.0.pre2 after r52332.

Please try following instructions with ruby of r52332.

```sh
$ gem install bundler
$ git clone --branch v1.0.0.pre2 https://github.com/activeadmin/activeadmin
$ cd activeadmin
$ bundle exec rspec spec/unit/active_admin_spec.rb
```

this segv is happened at launching rails server too. I attached crash log.

Please investigate this.



---Files--------------------------------
ruby_2015-11-05-115449_osx.crash (19.2 KB)


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

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

* [ruby-core:71422] Re: [Ruby trunk - Bug #11658] Segmentation fault with activeadmin test suite
  2015-11-09 15:36 ` [ruby-core:71420] " deivid.rodriguez
@ 2015-11-09 21:21   ` Eric Wong
  0 siblings, 0 replies; 11+ messages in thread
From: Eric Wong @ 2015-11-09 21:21 UTC (permalink / raw
  To: Ruby developers

Thanks all.  Committed my 3-liner and h.shirosaki's test as r52511

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

end of thread, other threads:[~2015-11-09 20:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-11658.20151105034634@ruby-lang.org>
2015-11-05  3:46 ` [ruby-core:71345] [Ruby trunk - Bug #11658] [Open] Segmentation fault with activeadmin test suite shibata.hiroshi
2015-11-05  6:38   ` [ruby-core:71347] " Eric Wong
2015-11-05  7:00 ` [ruby-core:71350] [Ruby trunk - Bug #11658] " shibata.hiroshi
2015-11-05  7:22   ` [ruby-core:71351] " Eric Wong
2015-11-05  8:44 ` [ruby-core:71352] [Ruby trunk - Bug #11658] [Assigned] " shibata.hiroshi
2015-11-05 22:24   ` [ruby-core:71359] " Eric Wong
2015-11-06  3:20 ` [ruby-core:71367] [Ruby trunk - Bug #11658] " shibata.hiroshi
2015-11-06  3:51   ` [ruby-core:71368] " Eric Wong
2015-11-09  5:02 ` [ruby-core:71390] " h.shirosaki
2015-11-09 15:36 ` [ruby-core:71420] " deivid.rodriguez
2015-11-09 21:21   ` [ruby-core:71422] " Eric Wong

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).