Project

General

Profile

Actions

Bug #3501

closed

Segmentation Fault in vm_xmalloc (apparently)

Added by lukaso (Lukas Oberhuber) over 13 years ago. Updated almost 13 years ago.

Status:
Third Party's Issue
Assignee:
-
ruby -v:
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.4.0]

Description

=begin
Here is a dump that occurred while running webrick. Hopefully it is useful. There was no load on the server and rails 2.3.8 was being run in development mode.

=====================
Processing EventsController#index (for 127.0.0.1 at 2010-06-28 16:53:01) [GET]
Event Load (43.2ms) SELECT * FROM "events"
Rendering template within layouts/events
Rendering events/index
Completed in 55ms (View: 8, DB: 43) | 200 OK [http://localhost/events]
/Users/lukas/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/utils.rb:125: [BUG] Segmentation fault
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.4.0]

-- control frame ----------
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC :(null)
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :now
c:0003 p:0021 s:0007 b:0007 l:001538 d:000006 BLOCK /Users/lukas/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/utils.rb:125
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP

/Users/lukas/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/utils.rb:125: [BUG] object allocation during garbage collection phase
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.4.0]

-- control frame ----------
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC :(null)
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :now
c:0003 p:0021 s:0007 b:0007 l:001538 d:000006 BLOCK /Users/lukas/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/utils.rb:125
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP

-- Ruby level backtrace information-----------------------------------------
/Users/lukas/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/utils.rb:125:in (null)' /Users/lukas/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/utils.rb:125:in now'
/Users/lukas/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/utils.rb:125:in `block in initialize'

-- C level backtrace information -------------------------------------------
0x10010cc8d 0 libruby.dylib 0x000000010010cc8d rb_vm_bugreport + 77
0x10002b074 1 libruby.dylib 0x000000010002b074 report_bug + 260
0x10002b208 2 libruby.dylib 0x000000010002b208 rb_bug + 200
0x10003dedb 3 libruby.dylib 0x000000010003dedb rb_newobj + 203
0x100007aaf 4 libruby.dylib 0x0000000100007aaf ary_alloc + 15
0x100007b73 5 libruby.dylib 0x0000000100007b73 ary_new + 35
0x1000fc930 6 libruby.dylib 0x00000001000fc930 rb_make_backtrace + 48
0x10010cc70 7 libruby.dylib 0x000000010010cc70 rb_vm_bugreport + 48
0x10002b074 8 libruby.dylib 0x000000010002b074 report_bug + 260
0x10002b208 9 libruby.dylib 0x000000010002b208 rb_bug + 200
0x1000b7014 10 libruby.dylib 0x00000001000b7014 sigsegv + 132
0x7fff853c735a 11 libSystem.B.dylib 0x00007fff853c735a _sigtramp + 26
0x101963670 12 ??? 0x0000000101963670 0x0 + 4321588848
0x10003e116 13 libruby.dylib 0x000000010003e116 vm_xmalloc + 150
0x1000d887d 14 libruby.dylib 0x00000001000d887d time_s_alloc + 29
0x100106ae1 15 libruby.dylib 0x0000000100106ae1 vm_call0 + 849
0x100106f2f 16 libruby.dylib 0x0000000100106f2f rb_funcall + 527
0x10005d993 17 libruby.dylib 0x000000010005d993 rb_obj_alloc + 99
0x10005e232 18 libruby.dylib 0x000000010005e232 rb_class_new_instance + 34
0x1000fcfe4 19 libruby.dylib 0x00000001000fcfe4 vm_call_cfunc + 340
0x1000fe8b0 20 libruby.dylib 0x00000001000fe8b0 vm_call_method + 896
0x1000ff7fc 21 libruby.dylib 0x00000001000ff7fc vm_exec_core + 3180
0x100104a93 22 libruby.dylib 0x0000000100104a93 vm_exec + 1203
0x100106543 23 libruby.dylib 0x0000000100106543 rb_vm_invoke_proc + 691
0x100111703 24 libruby.dylib 0x0000000100111703 thread_start_func_2 + 835
0x100111821 25 libruby.dylib 0x0000000100111821 thread_start_func_1 + 17
0x7fff853a0456 26 libSystem.B.dylib 0x00007fff853a0456 _pthread_start + 331
0x7fff853a0309 27 libSystem.B.dylib 0x00007fff853a0309 thread_start + 13

=================

$ gem list
/Users/lukas/.rvm/rubies/ruby-1.9.1-p378/bin/gem:4: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

*** LOCAL GEMS ***

actionmailer (2.3.8, 2.1.0)
actionpack (2.3.8, 2.1.0)
activerecord (2.3.8, 2.1.0)
activeresource (2.3.8, 2.1.0)
activesupport (2.3.8, 2.1.0)
ffi (0.6.3)
rack (1.1.0)
rails (2.3.8, 2.1.0)
rake (0.8.7)
rdoc (2.5.8)
rubygems-update (1.3.7)
sqlite3 (0.1.1)
=end

Actions #1

Updated by mame (Yusuke Endoh) over 13 years ago

=begin
Hi,

Is this reproducible with ruby_1_9_2 or trunk?

--
Yusuke Endoh
=end

Actions #2

Updated by lukaso (Lukas Oberhuber) over 13 years ago

=begin
I tried to run my application with 1.9.1-head. This did not work, probably because of was running into the GEM_HOME issue which kept the app from using sqlite. I've now tested the application on 1.9.2 preview 3, which appears to be working flawlessly.

On 1.9.1, the crashes were occurring quite frequently but always in slightly different places (I can attach more stack dumps if this would help).

-Lukas Oberhuber
=end

Actions #3

Updated by lukaso (Lukas Oberhuber) over 13 years ago

=begin
Well, I spoke too soon, as 1.9.2 preview 3 has also segfaulted. Here is the partial stack trace (the process froze and had to be kill -9 ed to shut down). Unfortunately I don't have a reliable test case. Maybe memory is being corrupted.

Processing UsersController#create to xml (for 127.0.0.1 at 2010-06-29 19:41:07) [POST]
Parameters: {"user"=>nil}
User Create (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES('2010-06-29 18:41:07', '2010-06-29 18:41:07')
Completed in 13ms (View: 2, DB: 0) | 201 Created [http://localhost/users.xml]
/Users/lukas/.rvm/rubies/ruby-1.9.2-preview3/lib/ruby/1.9.1/webrick/utils.rb:125: [BUG] Segmentation fault
ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.4.0]

-- control frame ----------
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC :(null)
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :now
c:0003 p:0021 s:0007 b:0007 l:000e58 d:000006 BLOCK /Users/lukas/.rvm/rubies/ruby-1.9.2-preview3/lib/ruby/1.9.1/webrick/utils.rb:125
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP

-- Ruby level backtrace information ----------------------------------------
/Users/lukas/.rvm/rubies/ruby-1.9.2-preview3/lib/ruby/1.9.1/webrick/utils.rb:125:in block in initialize' /Users/lukas/.rvm/rubies/ruby-1.9.2-preview3/lib/ruby/1.9.1/webrick/utils.rb:125:in now'
^C

=end

Actions #4

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

=begin
Does it reproduce with the latest snapshot?
=end

Actions #5

Updated by lukaso (Lukas Oberhuber) over 13 years ago

=begin
I should have reported back sooner but was waiting to see if the problem reproduced.

The seg faults appear due to the sqlite3 gem. Since I've switched to the sqlite3-ruby gem, there have been no further segfaults.

I think this should be closed for now, and I will reopen if I get another crash.

Sorry for the disturbance.
=end

Actions #6

Updated by mame (Yusuke Endoh) over 13 years ago

  • Status changed from Open to Third Party's Issue

=begin
Okay, this ticket is set to "Third Party's Issue."
Thanks!

--
Yusuke Endoh
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0