Ruby on Rails Kgio segmentation fault

75 views
Skip to first unread message

Ed Ed

unread,
May 5, 2014, 6:51:11 AM5/5/14
to rubyonra...@googlegroups.com
When I try to start unicorn I get this error:

/home/.rvm/gems/ruby-2.1.0/gems/kgio-2.8.1/lib/kgio_ext.so: [BUG]
Segmentation fault ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

How can I fix this problem?

--
Posted via http://www.ruby-forum.com/.

Hassan Schroeder

unread,
May 5, 2014, 10:06:49 AM5/5/14
to rubyonrails-talk
On Mon, May 5, 2014 at 3:51 AM, Ed Ed <li...@ruby-forum.com> wrote:
> When I try to start unicorn I get this error:
>
> /home/.rvm/gems/ruby-2.1.0/gems/kgio-2.8.1/lib/kgio_ext.so: [BUG]
> Segmentation fault ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
>
> How can I fix this problem?

WAG: figure out why your unicorn is apparently being started in the
context of the very old system ruby :-)

Providing actual information -- unicorn config file, startup invocation,
platform, etc. -- might help others help you on that ...

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

Ed Ed

unread,
May 5, 2014, 10:33:16 AM5/5/14
to rubyonra...@googlegroups.com
> WAG: figure out why your unicorn is apparently being started in the
> context of the very old system ruby :-)
>
I think that it isn't the main problem :)

Ok, I attach unicorn.sh file in my reply.

Attachments:
http://www.ruby-forum.com/attachment/9608/unicorn.sh

Hassan Schroeder

unread,
May 5, 2014, 11:33:47 AM5/5/14
to rubyonrails-talk
On Mon, May 5, 2014 at 7:33 AM, Ed Ed <li...@ruby-forum.com> wrote:
>> WAG: figure out why your unicorn is apparently being started in the
>> context of the very old system ruby :-)
>>
> I think that it isn't the main problem :)

Really? So the actual error message isn't relevant to your problem?

> Segmentation fault ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Good luck with that, then.

Ed Ed

unread,
May 5, 2014, 11:42:00 AM5/5/14
to rubyonra...@googlegroups.com
> Really? So the actual error message isn't relevant to your problem?
>

ruby -v gives me 2.1.0, but I can't understand why it try ruby 1.8.7

Hassan Schroeder

unread,
May 5, 2014, 12:36:49 PM5/5/14
to rubyonrails-talk
On Mon, May 5, 2014 at 8:42 AM, Ed Ed <li...@ruby-forum.com> wrote:

> ruby -v gives me 2.1.0, but I can't understand why it try ruby 1.8.7

/etc/init.d/ scripts are not typically run as "you".

What is the default PATH of the user that runs startup scripts?
Does it include your rvm path? If not, then it's hardly a surprise
that it's using the system ruby.

Ed Ed

unread,
May 6, 2014, 5:26:57 AM5/6/14
to rubyonra...@googlegroups.com
> What is the default PATH of the user that runs startup scripts?

when I call echo $PATH there exist path to my ruby 2.1.0 bin

Karthik Sirasanagandla

unread,
May 6, 2014, 6:22:38 AM5/6/14
to rubyonra...@googlegroups.com
Two things:
1. Add an echo to output the version of ruby used
2. Let the first/initialization command be to use the right version of ruby, say something like `rvm use ruby-2.x.x`

Hope it helps!

Cheers,
Karthik

Ed Ed

unread,
May 6, 2014, 7:21:28 AM5/6/14
to rubyonra...@googlegroups.com
> Two things:
> 1. Add an echo to output the version of ruby used
> 2. Let the first/initialization command be to use the right version of
> ruby, say something like `rvm use ruby-2.x.x`

rvm current and default is set to ruby-2.1.0

Karthik Sirasanagandla

unread,
May 6, 2014, 7:24:04 AM5/6/14
to rubyonra...@googlegroups.com
Jus' to be clear, add the said two things in your unicorn.sh script and see the output to help debugging. Makes sense?


--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/zyKyUOPxrxU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5134d1dfc413bef2bd2d6b124ce99cf6%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ed Ed

unread,
May 6, 2014, 8:58:40 AM5/6/14
to rubyonra...@googlegroups.com
Ok, I have done that from script and it shows that ruby is 2.1.0, but
the error with kgio gem still exists.

Colin Law

unread,
May 6, 2014, 9:06:06 AM5/6/14
to rubyonra...@googlegroups.com
On 6 May 2014 13:58, Ed Ed <li...@ruby-forum.com> wrote:
> Ok, I have done that from script and it shows that ruby is 2.1.0, but
> the error with kgio gem still exists.

What does the error say now? Copy/paste here to avoid typos.

Colin

>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a413ce1007f14c172c78d92be336b7e1%40ruby-forum.com.

Colin Law

unread,
May 6, 2014, 9:08:43 AM5/6/14
to rubyonra...@googlegroups.com
On 6 May 2014 13:58, Ed Ed <li...@ruby-forum.com> wrote:
> Ok, I have done that from script and it shows that ruby is 2.1.0, but
> the error with kgio gem still exists.

Googling for
kgio segmentation fault
found this as the first hit, is it helpful?
https://www.digitalocean.com/community/questions/unicorn-not-starting

Colin

Ed Ed

unread,
May 6, 2014, 11:52:35 AM5/6/14
to rubyonra...@googlegroups.com
> What does the error say now? Copy/paste here to avoid typos.

The error is written in my question.

Ed Ed

unread,
May 6, 2014, 11:53:49 AM5/6/14
to rubyonra...@googlegroups.com
> Googling for
> kgio segmentation fault
> found this as the first hit, is it helpful?
> https://www.digitalocean.com/community/questions/unicorn-not-starting

Yes, I have already viewed that.It didn't help me.

Colin Law

unread,
May 6, 2014, 12:15:44 PM5/6/14
to rubyonra...@googlegroups.com
On 6 May 2014 16:52, Ed Ed <li...@ruby-forum.com> wrote:
>> What does the error say now? Copy/paste here to avoid typos.
>
> The error is written in my question.

So it is still running the wrong ruby?

Colin

>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d1bcaf02589e73351771b8bd6323905f%40ruby-forum.com.

Ed Ed

unread,
May 7, 2014, 11:43:45 AM5/7/14
to rubyonra...@googlegroups.com
> So it is still running the wrong ruby?

It says that ruby is 2.1.0, but is still gives the error.

Colin Law

unread,
May 7, 2014, 12:15:56 PM5/7/14
to rubyonra...@googlegroups.com
On 7 May 2014 16:43, Ed Ed <li...@ruby-forum.com> wrote:
>> So it is still running the wrong ruby?
>
> It says that ruby is 2.1.0, but is still gives the error.

The error you posted says it is 1.8.7

Colin

Ed Ed

unread,
May 8, 2014, 4:00:35 AM5/8/14
to rubyonra...@googlegroups.com
> The error you posted says it is 1.8.7

I understand that and can't find the solution.

Colin Law

unread,
May 8, 2014, 4:16:13 AM5/8/14
to rubyonra...@googlegroups.com
On 8 May 2014 09:00, Ed Ed <li...@ruby-forum.com> wrote:
>> The error you posted says it is 1.8.7
>
> I understand that and can't find the solution.

What change did you make following the link I posted?

Colin

>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bdbe6c80811032ad060cb23a8073ad2e%40ruby-forum.com.

Ed Ed

unread,
May 8, 2014, 4:53:18 AM5/8/14
to rubyonra...@googlegroups.com
> What change did you make following the link I posted?

Add path in shell script. Is it necessary to start unicorn from init.d
directory? Or it doesn't matter?

Colin Law

unread,
May 8, 2014, 5:54:50 AM5/8/14
to rubyonra...@googlegroups.com
On 8 May 2014 09:53, Ed Ed <li...@ruby-forum.com> wrote:
>> What change did you make following the link I posted?
>
> Add path in shell script. Is it necessary to start unicorn from init.d
> directory? Or it doesn't matter?

I don't think it matters how you post it. I am getting to the end of
my knowledge here. I suggest starting a new thread with a subject
that indicates that the problem is getting unicorn to use the right
ruby, post your unicorn file see if someone more knowledgeable in
unicorn can help. A good subject line should make it more likely
someone who knows about unicorn will answer.

Colin
Reply all
Reply to author
Forward
0 new messages