Forum: Ruby-core [ruby-trunk - Bug #5986][Open] Segmentation Fault

Posted by Luis Matta (Guest)
on 2012-02-08 20:12
(Received via mailing list)
Issue #5986 has been reported by Luis Matta.

----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Open
Priority: Urgent
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Yui NARUSE (Guest)
on 2012-02-08 20:34
(Received via mailing list)
Issue #5986 has been updated by Yui NARUSE.

Status changed from Open to Feedback

Could you make a self-contained small reproducible code?
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Feedback
Priority: Urgent
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Luis Matta (Guest)
on 2012-02-08 21:43
(Received via mailing list)
Issue #5986 has been updated by Luis Matta.


I can not, no code is running (besides ActiveAdmin Dashboard/Home -- and 
I have not Customized it), it is my project.
The login screen works, bug after that it crashes.

Maybe a plain ActiveAdmin+Rails3.2.1+Thin+Nginx project would crash, and 
I will test this.
Also the same code runs perfectly on WebBrick using the same ruby 
version on the development machines.

Sorry.
(Forgot to mention that I am using a Unix socket to comunicate between 
Nginx and Thin)
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Feedback
Priority: Urgent
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Yui NARUSE (Guest)
on 2012-02-08 23:30
(Received via mailing list)
Issue #5986 has been updated by Yui NARUSE.

Priority changed from Urgent to Low


----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Feedback
Priority: Low
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Luis Matta (Guest)
on 2012-02-08 23:43
(Received via mailing list)
Issue #5986 has been updated by Luis Matta.

File AATest.7z added

This simple project fails (and I can share its code), and It makes me 
wonder if the failure is just that Ruby is allowing a stack overflow 
error cause a segmentation fault:

$ thin -V -D start
>> Using rack adapter
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Debugging ON
>> Tracing ON
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
GET /admin HTTP/1.1
Host: localhost:3000
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, 
like Gecko) Chrome/16.0.912.77 Safari/535.7
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer: http://localhost:3000/admin
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,pt-BR;q=0.6
Accept-Charset: UTF-8,*;q=0.5
Cookie: 
_AATest_session=BAh7CUkiD3Nlc3Npb25faWQGOgZFRkkiJTk5MDMwYWZmZWE2OTgwNjBmZTVkZTQxNzk1ODQ5MzYyBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTBEZHlTMnduNTM4N3htL2FUMEEwcmUrV2cya2dkVitZMFlPbFFkVS9FM289BjsARkkiH3dhcmRlbi51c2VyLmFkbWluX3VzZXIua2V5BjsAVFsISSIOQWRtaW5Vc2VyBjsARlsGaQZJIiIkMmEkMTAkYm1uNEZFN2p4RG9BN0NSamp1aW1XdQY7AFRJIgpmbGFzaAY7AEZvOiVBY3Rpb25EaXNwYXRjaDo6Rmxhc2g6OkZsYXNoSGFzaAk6CkB1c2VkbzoIU2V0BjoKQGhhc2h7BjoKYWxlcnRUOgxAY2xvc2VkRjoNQGZsYXNoZXN7BjsKSSIfWW91IGFyZSBhbHJlYWR5IHNpZ25lZCBpbi4GOwBUOglAbm93MA%3D%3D--38c24a3f709dec34d314247c336f4132de3a3557

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
X-UA-Compatible: IE=Edge
ETag: "84b316f2ca5bac58156ce0a5e6d7dc43"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: 
_AATest_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRkkiJTk5MDMwYWZmZWE2OTgwNjBmZTVkZTQxNzk1ODQ5MzYyBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTBEZHlTMnduNTM4N3htL2FUMEEwcmUrV2cya2dkVitZMFlPbFFkVS9FM289BjsARkkiH3dhcmRlbi51c2VyLmFkbWluX3VzZXIua2V5BjsAVFsISSIOQWRtaW5Vc2VyBjsARlsGaQZJIiIkMmEkMTAkYm1uNEZFN2p4RG9BN0NSamp1aW1XdQY7AFQ%3D--bb7255eb79a5aa847599cd80a9c77664ad470fb1; 
path=/; HttpOnly
X-Request-Id: f51c7312667349ecf82a3460b860edeb
X-Runtime: 0.177047
Connection: close
Server: thin 1.3.1 codename Triple Espresso

!! Unexpected error while processing request: stack level too deep
stack level too deep
  /home/levmatta/.rvm/gems/ruby-1.9.3-p0@play1/gems/activeadmin-0.4.0/lib/active_admin/arbre/html/element.rb:148
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Feedback
Priority: Low
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Luis Matta (Guest)
on 2012-02-10 19:45
(Received via mailing list)
Issue #5986 has been updated by Luis Matta.


Yui NARUSE wrote:
> Could you make a self-contained small reproducible code?

Is the code I submitted OK? Do you need anything else ?
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Feedback
Priority: Low
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Yui NARUSE (Guest)
on 2012-02-10 21:32
(Received via mailing list)
Issue #5986 has been updated by Yui NARUSE.


Luis Matta wrote:
> Yui NARUSE wrote:
> > Could you make a self-contained small reproducible code?
>
> Is the code I submitted OK? Do you need anything else ?

I can't reoroduced with following procedure on FreeBSD 9.0:
* wget https://bugs.ruby-lang.org/attachments/2442/AATest.7z
* 7z x AATest.7z
* cd AATest
* rvm install ruby-1.9.3-p0
* gem instal bundler
* bundle install
* thin -V -D start
* bundle install
* Access to /admin/ from web browser

Anyone can reproduce?
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Feedback
Priority: Low
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Luis Matta (Guest)
on 2012-02-14 14:40
(Received via mailing list)
Issue #5986 has been updated by Luis Matta.


Please notice that the login screen works, is the screen just after the 
login.
Standard User is : admin@example.com
Password: password
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Feedback
Priority: Low
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Ygor Eduardo Bersani Pereira (Guest)
on 2012-02-14 17:53
(Received via mailing list)
Issue #5986 has been updated by Ygor Eduardo Bersani Pereira.


I have the same problem on Ubuntu 11.10 64bits.
I tested the AATest project and got the same error.
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Feedback
Priority: Low
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Yui NARUSE (Guest)
on 2012-02-14 20:47
(Received via mailing list)
Issue #5986 has been updated by Yui NARUSE.


Luis Matta wrote:
> Please notice that the login screen works, is the screen just after the login.
> Standard User is : admin@example.com
> Password: password

I succeeded to reproduce with the login.
And I get the bottom of the backtrace of the segv as following.
Frames between 35852 and 35853 is odd because it should have 
event_callback on the middle of them.
This is not because of optimization of the compiler, because disas 
event_callback_wrapper shows
it doesn't call rb_funcall directly.

Anyway I doubt this is Third Party's Issue mainly EventMachine.

#35852 0x00000008009c8b8b in rb_funcall (recv=34493000200, mid=Variable 
"mid" is not available.
) at vm_eval.c:236
#35853 0x0000000800687f36 in event_callback_wrapper (a1=Variable "a1" is 
not available.
) at rubymain.cpp:162


...
#35821 0x00000008009d1e35 in exec_recursive_i (tag=Variable "tag" is not 
available.
) at thread.c:3940
#35822 0x00000008009d23ce in exec_recursive (func=0x8008ce0e0 
<io_puts_ary>, obj=34410987160,
    pairid=0, arg=34391503720, outer=0) at thread.c:3991
#35823 0x00000008008cdeda in rb_io_puts (argc=1, argv=Variable "argv" is 
not available.
) at io.c:6406
#35824 0x00000008008ce138 in io_puts_ary (ary=34410987480, 
out=34391503720, recur=1) at io.c:6363
#35825 0x00000008009d1e35 in exec_recursive_i (tag=Variable "tag" is not 
available.
) at thread.c:3940
#35826 0x00000008009d23ce in exec_recursive (func=0x8008ce0e0 
<io_puts_ary>, obj=34410987480,
    pairid=0, arg=34391503720, outer=0) at thread.c:3991
#35827 0x00000008008cdeda in rb_io_puts (argc=1, argv=Variable "argv" is 
not available.
) at io.c:6406
#35828 0x00000008009c7f73 in vm_call0 (th=0x801c18300, recv=Variable 
"recv" is not available.
) at vm_eval.c:79
#35829 0x00000008009ba210 in rb_funcall2 (recv=34391503720, mid=6192, 
argc=1, argv=0x801cf0338)
    at vm_eval.c:236
#35830 0x00000008009bc7e2 in vm_call_method (th=0x801c18300, 
cfp=0x801def5b0, num=Variable "num" is
not available.
)
    at vm_insnhelper.c:404
#35831 0x00000008009c2075 in vm_exec_core (th=0x801c18300, 
initial=Variable "initial" is not availab
le.
) at insns.def:1015
#35832 0x00000008009c6b2e in vm_exec (th=0x801c18300) at vm.c:1220
#35833 0x00000008009cb6dd in invoke_block_from_c (th=0x801c18300, 
block=0x82f3f5d80,
    self=34493119480, argc=1, argv=Variable "argv" is not available.
) at vm.c:624
#35834 0x00000008009cbc54 in rb_yield (val=34492746840) at vm.c:654
#35835 0x00000008008757bc in rb_ary_each (array=Variable "array" is not 
available.
) at array.c:1478
#35836 0x00000008009bc7e2 in vm_call_method (th=0x801c18300, 
cfp=0x801def7c0, num=Variable "num" is
not available.
)
    at vm_insnhelper.c:404
#35837 0x00000008009c2075 in vm_exec_core (th=0x801c18300, 
initial=Variable "initial" is not availab
le.
) at insns.def:1015
#35838 0x00000008009c6b2e in vm_exec (th=0x801c18300) at vm.c:1220
#35839 0x00000008009c81b2 in vm_call0 (th=0x801c18300, recv=34410946840, 
id=Variable "id" is not ava
ilable.
) at vm_eval.c:66
#35840 0x00000008009ba210 in rb_funcall2 (recv=34410946840, mid=384, 
argc=1, argv=0x7fffffff6860)
    at vm_eval.c:236
#35841 0x00000008009bc4b3 in vm_method_missing (th=0x801c18300, 
id=108558, recv=34410946840, num=Var
iable "num" is not available.
)
    at vm_insnhelper.c:458
#35842 0x00000008009bc960 in vm_call_method (th=0x801c18300, cfp=0x0, 
num=0, blockptr=0x82f3f5d80,
    flag=270, id=Variable "id" is not available.
) at vm_insnhelper.c:677
#35843 0x00000008009c2075 in vm_exec_core (th=0x801c18300, 
initial=Variable "initial" is not availab
le.
) at insns.def:1015
#35844 0x00000008009c6b2e in vm_exec (th=0x801c18300) at vm.c:1220
#35845 0x00000008009c81b2 in vm_call0 (th=0x801c18300, recv=34410981200, 
id=Variable "id" is not ava
ilable.
) at vm_eval.c:66
#35846 0x00000008009ba210 in rb_funcall2 (recv=34410981200, mid=384, 
argc=1, argv=0x7fffffff6e10)
    at vm_eval.c:236
#35847 0x00000008009bc4b3 in vm_method_missing (th=0x801c18300, 
id=108558, recv=34410981200, num=Var
iable "num" is not available.
)
    at vm_insnhelper.c:458
#35848 0x00000008009bc960 in vm_call_method (th=0x801c18300, cfp=0x0, 
num=0, blockptr=0x801def9f8,
    flag=0, id=Variable "id" is not available.
) at vm_insnhelper.c:677
#35849 0x00000008009c2075 in vm_exec_core (th=0x801c18300, 
initial=Variable "initial" is not availab
le.
) at insns.def:1015
#35850 0x00000008009c6b2e in vm_exec (th=0x801c18300) at vm.c:1220
#35851 0x00000008009c81b2 in vm_call0 (th=0x801c18300, recv=34493000200, 
id=Variable "id" is not ava
ilable.
) at vm_eval.c:66
#35852 0x00000008009c8b8b in rb_funcall (recv=34493000200, mid=Variable 
"mid" is not available.
) at vm_eval.c:236
#35853 0x0000000800687f36 in event_callback_wrapper (a1=Variable "a1" is 
not available.
) at rubymain.cpp:162

#35854 0x000000080068e238 in ConnectionDescriptor::_DispatchInboundData 
(this=0x82f4b4900, buffer=Va
riable "buffer" is not available.
)
    at ed.cpp:770
#35855 0x000000080068e2cf in ConnectionDescriptor::Read 
(this=0x82f4b4900) at ed.cpp:718
#35856 0x000000080068fc5f in EventMachine_t::_RunSelectOnce 
(this=0x82faad000) at em.cpp:859
#35857 0x0000000800690bbb in EventMachine_t::_RunOnce (this=Variable 
"this" is not available.
) at em.cpp:455
#35858 0x0000000800694fcc in EventMachine_t::Run (this=0x82faad000) at 
em.cpp:432
#35859 0x00000008006879a9 in t_run_machine_without_threads 
(self=Variable "self" is not available.
) at rubymain.cpp:185
#35860 0x00000008009bc7e2 in vm_call_method (th=0x801c18300, 
cfp=0x801defbe0, num=Variable "num" is not available.
)
    at vm_insnhelper.c:404
---Type <return> to continue, or q <return> to quit---
#35861 0x00000008009c2075 in vm_exec_core (th=0x801c18300, 
initial=Variable "initial" is not available.
) at insns.def:1015
#35862 0x00000008009c6b2e in vm_exec (th=0x801c18300) at vm.c:1220
#35863 0x00000008009c6f75 in rb_iseq_eval (iseqval=34405987000) at 
vm.c:1447
#35864 0x00000008008ad4bb in rb_load_internal (fname=34405995280, 
wrap=Variable "wrap" is not available.
) at load.c:310
#35865 0x00000008008ad621 in rb_f_load (argc=Variable "argc" is not 
available.
) at load.c:383
#35866 0x00000008009bc7e2 in vm_call_method (th=0x801c18300, 
cfp=0x801defef8, num=Variable "num" is not available.
)
    at vm_insnhelper.c:404
#35867 0x00000008009c2075 in vm_exec_core (th=0x801c18300, 
initial=Variable "initial" is not available.
) at insns.def:1015
#35868 0x00000008009c6b2e in vm_exec (th=0x801c18300) at vm.c:1220
#35869 0x00000008009c6df7 in rb_iseq_eval_main (iseqval=34401265640) at 
vm.c:1461
#35870 0x00000008008aaa0f in ruby_exec_internal (n=0x80279a7e8) at 
eval.c:204
#35871 0x00000008008aaa39 in ruby_exec_node (n=0x80279a7e8) at 
eval.c:251
#35872 0x00000008008ac62f in ruby_run_node (n=0x80279a7e8) at eval.c:244
#35873 0x0000000000400902 in main (argc=5, argv=0x7fffffffcbd0) at 
main.c:38
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986

Author: Luis Matta
Status: Feedback
Priority: Low
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by levmatta (Luis Matta) (Guest)
on 2012-04-20 13:55
(Received via mailing list)
Issue #5986 has been updated by levmatta (Luis Matta).


naruse is there any thing I should do:
"Anyway I doubt this is Third Party's Issue mainly EventMachine."
Is a confusing phrase, should I open a issue with EventMachine (or Thin) 
?
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986#change-26044

Author: levmatta (Luis Matta)
Status: Feedback
Priority: Low
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by naruse (Yui NARUSE) (Guest)
on 2012-04-21 10:16
(Received via mailing list)
Issue #5986 has been updated by naruse (Yui NARUSE).


levmatta (Luis Matta) wrote:
> naruse is there any thing I should do:
> "Anyway I doubt this is Third Party's Issue mainly EventMachine."
> Is a confusing phrase, should I open a issue with EventMachine (or Thin) ?

I have no idea.
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986#change-26062

Author: levmatta (Luis Matta)
Status: Feedback
Priority: Low
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by mame (Yusuke Endoh) (Guest)
on 2012-04-22 03:40
(Received via mailing list)
Issue #5986 has been updated by mame (Yusuke Endoh).

Status changed from Feedback to Assigned
Assignee set to nobu (Nobuyoshi Nakada)

Hello,

I cannot reproduce this, but I guess this is a bug of Ruby which is
triggered by a bug of active_admin.


Arbre::HTML::Element (which is defined in active_admin) defines #to_ary
*wrongly*, as the class does not mimic Array class.
https://github.com/gregbell/active_admin/blob/mast...

  def to_ary
    Collection.new [self]
  end

(The Collection class inherits Array)

And, an instance of the class is passed to Kernel.puts, which cause a 
bug.


In short, this is considered like the following small code:

  class Foo
    def to_ary
      Array.new [self]
    end
  end
  puts Foo.new

(This code does not cause SEGV in my 32 bit system, but naruse said
it does in x86_64)

This causes infinite recursion, which leads to stack overflow.
This behavior can be also observed in the following stack trace:

> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_io_puts+0x157) 
[0x7fb247a35b07]
> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x88cdd) 
[0x7fb247a35cdd]
> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17da08) 
[0x7fb247b2aa08]
> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17e7dc) 
[0x7fb247b2b7dc]
> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_io_puts+0x157) 
[0x7fb247a35b07]
> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x88cdd) 
[0x7fb247a35cdd]
> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17da08) 
[0x7fb247b2aa08]
> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17e7dc) 
[0x7fb247b2b7dc]
> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_io_puts+0x157) 
[0x7fb247a35b07]


Because rb_io_puts (the implementation of IO#puts) uses 
rb_exec_recursive,
the infinite recursion should be detected.
So, I guess there is something wrong in rb_exec_recursive.


Nobu, please check it.

--
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986#change-26073

Author: levmatta (Luis Matta)
Status: Assigned
Priority: Low
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by levmatta (Luis Matta) (Guest)
on 2012-04-24 17:10
(Received via mailing list)
Issue #5986 has been updated by levmatta (Luis Matta).


Thanks Yusuke.
I have notified the ActiveAdmin project 
(https://github.com/gregbell/active_admin/issues/1269) and I have closed 
the issue at EventMachine 
(https://github.com/eventmachine/eventmachine/issues/318).
Chears.
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986#change-26165

Author: levmatta (Luis Matta)
Status: Assigned
Priority: Low
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Posted by Nobuyoshi Nakada (nobu)
on 2012-12-01 10:44
(Received via mailing list)
Issue #5986 has been updated by nobu (Nobuyoshi Nakada).


Since that to_ary method creates new arrays for each time, 
rb_exec_recursive() can't catch it.
----------------------------------------
Bug #5986: Segmentation Fault
https://bugs.ruby-lang.org/issues/5986#change-34271

Author: levmatta (Luis Matta)
Status: Assigned
Priority: Low
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p68 (2012-02-08 revision 34493) [x86_64-linux]


Simply trying to render the home page of active-admin.

I have tested this on Ubuntu 10.04 LTS 64bits, using rvm ruby 1.9.3-head 
(with and without "rvm pkg install openssl"), and 1.9.2-head.
The structure: Nginx 1.0.11 (using ppa), RVM, Thin 1.3.1, Rails 3.2.1, 
ActiveAdmin 0.4, and stuff.
I am using SSL with a custom self-signed Certification Authority.

Thanks
(Since this broke my new production environment I have set it to Urgent 
- apologies if it is an abuse)
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.