Bugs: Browse | Submit New | Admin

[#7989] signal 4, Illegal instruction.

Date:
2007-01-19 00:41
Priority:
3
Submitted By:
Jerome L (yayel)
Assigned To:
Shyouhei Urabe (shyouhei)
Category:
Language / Runtime / Core Libraries
State:
Open
Platform:
 
Summary:
signal 4, Illegal instruction.

Detailed description
Hi

Got a ruby crash while executing the following rails controller if @gallery is nil at line #11 :


class EspacemariesController < ApplicationController

  verify :only => 'show',
         :params => :client,
         :redirect_to => { :action => 'index' }

  def index    
  end

  def show
    if @gallery = Gallery.find_by_client( params[:client].downcase, :conditions => 'is_archived IS NULL OR is_archived
= 0' )
      
      @pictures = Picture.find( :all,
                                :include => 'media_type',
                                :conditions => ['gallery_id = ? AND media_types.type = "Image"', @gallery.id
],
                                :order => 'medias.position') || [ ]
      

      @movies = Media.find( :all,
                            :include => 'media_type',
                            :conditions => ['gallery_id = ? AND media_types.type = "Movie"', @gallery.id
]) || [ ]
    else
      flash[:error] = 'Désolé, nous ne retrouvons pas ce nom de famille.'
      redirect_to :index
    end
  end

end



Here is the gdb trace:

(gdb) core-file ruby18.core
warning: core file may not match specified executable file.
Core was generated by `ruby18'.
Program terminated with signal 4, Illegal instruction.
Loaded symbols for /usr/local/lib/libruby18.so.18
Loaded symbols for /lib/libcrypt.so.3
Loaded symbols for /lib/libm.so.4
Loaded symbols for /usr/lib/libpthread.so.2
Loaded symbols for /lib/libc.so.6
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/readline.so
Loaded symbols for /lib/libreadline.so.6
Loaded symbols for /lib/libncurses.so.6
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/digest/sha2.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/digest.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/openssl.so
Loaded symbols for /usr/lib/libssl.so.4
Loaded symbols for /lib/libcrypto.so.4
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/fcntl.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/strscan.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/stringio.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/syck.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/socket.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/etc.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/digest/md5.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/nkf.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/racc/cparse.so
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/iconv.so
Loaded symbols for /usr/local/lib/libiconv.so.3
Loaded symbols for /usr/local/lib/ruby/1.8/i386-freebsd6/zlib.so
Loaded symbols for /lib/libz.so.3
Loaded symbols for /usr/local/lib/ruby/site_ruby/1.8/i386-freebsd6/mysql.so
Loaded symbols for /usr/local/lib/mysql/libmysqlclient.so.15
Loaded symbols for /usr/local/lib/ruby/site_ruby/1.8/i386-freebsd6/RMagick.so
Loaded symbols for /usr/local/lib/libfreetype.so.9
Loaded symbols for /usr/local/lib/libMagick.so.10
Loaded symbols for /usr/local/lib/libjbig.so.1
Loaded symbols for /usr/local/lib/liblcms.so.1
Loaded symbols for /usr/local/lib/libtiff.so.4
Loaded symbols for /usr/local/lib/libjasper.so.4
Loaded symbols for /usr/local/lib/libjpeg.so.9
Loaded symbols for /usr/local/lib/libpng.so.5
Loaded symbols for /usr/local/lib/libfpx.so.1
Loaded symbols for /usr/X11R6/lib/libfontconfig.so.1
Loaded symbols for /usr/lib/libbz2.so.2
Loaded symbols for /usr/local/lib/libxml2.so.5
Loaded symbols for /usr/local/lib/libWand.so.10
Loaded symbols for /usr/lib/libstdc++.so.5
Loaded symbols for /usr/local/lib/libexpat.so.6
Loaded symbols for /libexec/ld-elf.so.1
#0  0x280a014c in rb_eval (self=Cannot access memory at address 0xbf9fff5c
) at eval.c:2897
2897    {
[New LWP 100486]
(gdb) backtrace
#0  0x280a014c in rb_eval (self=Cannot access memory at address 0xbf9fff5c
) at eval.c:2897
#1  0x280a128c in rb_eval (self=165042340, n=0x88f2aac) at eval.c:3050
#2  0x280a45ae in rb_call0 (klass=143199220, recv=165042340, id=44745, oid=165042340, argc=0, argv=0xbfa007a4,
body=0x88f2818, flags=0) at eval.c:5954
#3  0x280a537e in rb_call (klass=143199220, recv=165042340, mid=44745, argc=1, argv=0xbfa007a0, scope=1) at eval.c:6048
#4  0x280a080e in rb_eval (self=165042340, n=0x88f2aac) at ruby.h:654
#5  0x280a0762 in rb_eval (self=165042340, n=0x88f2aac) at eval.c:3453
#6  0x280a45ae in rb_call0 (klass=143199220, recv=165042340, id=45241, oid=165042340, argc=0, argv=0xbfa010e4,
body=0x88ebcd4, flags=4) at eval.c:5954
#7  0x280a537e in rb_call (klass=143199220, recv=165042340, mid=45241, argc=1, argv=0xbfa010e0, scope=1) at eval.c:6048
#8  0x280a080e in rb_eval (self=165042340, n=0x88f2aac) at ruby.h:654
#9  0x280a45ae in rb_call0 (klass=143199220, recv=165042340, id=45241, oid=165042340, argc=0, argv=0xbfa01664,
body=0x88ebcd4, flags=4) at eval.c:5954
#10 0x280a537e in rb_call (klass=143199220, recv=165042340, mid=45241, argc=1, argv=0xbfa01660, scope=1) at eval.c:6048
#11 0x280a080e in rb_eval (self=165042340, n=0x88f2aac) at ruby.h:654
#12 0x280a45ae in rb_call0 (klass=143199220, recv=165042340, id=45241, oid=165042340, argc=0, argv=0xbfa01be4,
body=0x88ebcd4, flags=4) at eval.c:5954
#13 0x280a537e in rb_call (klass=143199220, recv=165042340, mid=45241, argc=1, argv=0xbfa01be0, scope=1) at eval.c:6048
#14 0x280a080e in rb_eval (self=165042340, n=0x88f2aac) at ruby.h:654
#15 0x280a45ae in rb_call0 (klass=143199220, recv=165042340, id=45241, oid=165042340, argc=0, argv=0xbfa02164,
body=0x88ebcd4, flags=4) at eval.c:5954
#16 0x280a537e in rb_call (klass=143199220, recv=165042340, mid=45241, argc=1, argv=0xbfa02160, scope=1) at eval.c:6048
#17 0x280a080e in rb_eval (self=165042340, n=0x88f2aac) at ruby.h:654
#18 0x280a45ae in rb_call0 (klass=143199220, recv=165042340, id=45241, oid=165042340, argc=0, argv=0xbfa026e4,
body=0x88ebcd4, flags=4) at eval.c:5954
#19 0x280a537e in rb_call (klass=143199220, recv=165042340, mid=45241, argc=1, argv=0xbfa026e0, scope=1) at eval.c:6048
#20 0x280a080e in rb_eval (self=165042340, n=0x88f2aac) at ruby.h:654
#21 0x280a45ae in rb_call0 (klass=143199220, recv=165042340, id=45241, oid=165042340, argc=0, argv=0xbfa02c64,
body=0x88ebcd4, flags=4) at eval.c:5954
#22 0x280a537e in rb_call (klass=143199220, recv=165042340, mid=45241, argc=1, argv=0xbfa02c60, scope=1) at eval.c:6048
#23 0x280a080e in rb_eval (self=165042340, n=0x88f2aac) at ruby.h:654
#24 0x280a45ae in rb_call0 (klass=143199220, recv=165042340, id=45241, oid=165042340, argc=0, argv=0xbfa031e4,
body=0x88ebcd4, flags=4) at eval.c:5954

(...) 

#4406 0x280a537e in rb_call (klass=135330340, recv=148918640, mid=10513, argc=1, argv=0xbfbfa6d0, scope=1)
at eval.c:6048
#4407 0x280a080e in rb_eval (self=148918640, n=0x88f2aac) at ruby.h:654
#4408 0x280a3720 in rb_eval (self=148918640, n=0x88f2aac) at eval.c:3173
#4409 0x280a772d in rb_yield_0 (val=165047900, self=148918640, klass=0, flags=134681800, avalue=2) at eval.c:4987
#4410 0x280a0a58 in rb_eval (self=148914220, n=0x88f2aac) at eval.c:3248
#4411 0x280a30cf in rb_eval (self=148914220, n=0x88f2aac) at eval.c:3283
#4412 0x280a772d in rb_yield_0 (val=6, self=148914220, klass=0, flags=135614480, avalue=0) at eval.c:4987
#4413 0x280adaef in rb_f_loop () at eval.c:5131
#4414 0x280a4a3d in rb_call0 (klass=134769820, recv=148914220, id=3937, oid=165042340, argc=0, argv=0x0, body=0x8085130,
flags=2) at eval.c:5656
#4415 0x280a537e in rb_call (klass=134769820, recv=148914220, mid=3937, argc=0, argv=0x0, scope=1) at eval.c:6048
#4416 0x280a080e in rb_eval (self=148914220, n=0x88f2aac) at ruby.h:654
#4417 0x280a3720 in rb_eval (self=148914220, n=0x88f2aac) at eval.c:3173
#4418 0x280a772d in rb_yield_0 (val=3417358, self=148914220, klass=0, flags=135614400, avalue=0) at eval.c:4987
#4419 0x280b225d in rb_f_catch (dmy=148914220, tag=3417358) at eval.c:12972
#4420 0x280a4a2d in rb_call0 (klass=134769820, recv=148914220, id=4001, oid=165042340, argc=1, argv=0xbfbfc3b0,
body=0x8084ed8, flags=2) at eval.c:5659
#4421 0x280a537e in rb_call (klass=134769820, recv=148914220, mid=4001, argc=1, argv=0xbfbfc3b0, scope=1)
at eval.c:6048
#4422 0x280a080e in rb_eval (self=148914220, n=0x88f2aac) at ruby.h:654
#4423 0x280a3720 in rb_eval (self=148914220, n=0x88f2aac) at eval.c:3173
#4424 0x280a45ae in rb_call0 (klass=135459660, recv=148914220, id=10569, oid=165042340, argc=0, argv=0x0, body=0x8154f70,
flags=0) at eval.c:5954
#4425 0x280a537e in rb_call (klass=135459660, recv=148914220, mid=10569, argc=0, argv=0x0, scope=0) at eval.c:6048
#4426 0x280a069f in rb_eval (self=148918640, n=0x88f2aac) at ruby.h:654
#4427 0x280a3720 in rb_eval (self=148918640, n=0x88f2aac) at eval.c:3173
#4428 0x280a45ae in rb_call0 (klass=135330340, recv=148918640, id=10249, oid=165042340, argc=0, argv=0x0, body=0x8072b5c,
flags=0) at eval.c:5954
#4429 0x280a537e in rb_call (klass=135330340, recv=148918640, mid=10249, argc=0, argv=0x0, scope=0) at eval.c:6048
#4430 0x280a069f in rb_eval (self=134620600, n=0x88f2aac) at ruby.h:654
#4431 0x280a772d in rb_yield_0 (val=2622734, self=134620600, klass=0, flags=134695720, avalue=0) at eval.c:4987
#4432 0x280b225d in rb_f_catch (dmy=134620600, tag=2622734) at eval.c:12972
#4433 0x280a4a2d in rb_call0 (klass=134769820, recv=134620600, id=4001, oid=165042340, argc=1, argv=0xbfbfdc50,
body=0x8084ed8, flags=2) at eval.c:5659
#4434 0x280a537e in rb_call (klass=134769820, recv=134620600, mid=4001, argc=1, argv=0xbfbfdc50, scope=1)
at eval.c:6048
#4435 0x280a080e in rb_eval (self=134620600, n=0x88f2aac) at ruby.h:654
#4436 0x280a3720 in rb_eval (self=134620600, n=0x88f2aac) at eval.c:3173
#4437 0x280a45ae in rb_call0 (klass=134620520, recv=134620600, id=5041, oid=165042340, argc=0, argv=0xbfbfe5b4,
body=0x807517c, flags=0) at eval.c:5954
#4438 0x280a537e in rb_call (klass=134620520, recv=134620600, mid=5041, argc=1, argv=0xbfbfe5b0, scope=0)
at eval.c:6048
#4439 0x280a069f in rb_eval (self=134765040, n=0x88f2aac) at ruby.h:654
#4440 0x280ada3c in ruby_exec_internal () at eval.c:1604
#4441 0x280ada82 in ruby_exec () at eval.c:1624
#4442 0x280aebbf in ruby_run () at eval.c:1634
#4443 0x08048694 in main ()
(gdb) 


Any idea ?

Add A Comment: Notepad

Please login


Followup

Message
Date: 2007-05-29 21:52
Sender: Ryan Davis

I suspect this is in one of the external libraries that you're
using but can't tell from the backtrace nor the code. Since you
have rmagick and friends loaded, it isn't very trustworthy. I'm
going to have to ask you for a minimally reproducible test case.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
category_idMisc / Other Standard Library2007-05-29 21:54zenspider
resolution_idNone2007-05-29 21:52zenspider
assigned_tomatz2007-05-29 17:21zenspider
category_idLanguage / Runtime / Core Libraries2007-05-29 15:54zenspider
assigned_tonone2007-01-31 23:05yayel