librelist archives

« back to archive

Shoes segfaults on startup (Linux x86_64), ruby_sysinit is the cause?

Shoes segfaults on startup (Linux x86_64), ruby_sysinit is the cause?

From:
Csomay Mihaly
Date:
2010-03-10 @ 07:33
Hi,

I tried shoes on Arch Linux x86_64, it builds fine, but on startup it
segfaults:
./dist/shoes: line 22:  7907 Segmentation fault      
LD_LIBRARY_PATH=$APPPATH $APPPATH/shoes-bin "$@"

So I compiled previous versions to find out where it starts happening.
This is the commit, where it first happens:
http://github.com/shoes/shoes/commit/1fc71d0f4343f7adb740aed59b90ef93024ef5b6

Up to that point shoes -m starts up the manual, but from that point on, all
I get is a segfault.

Any chance to get it sorted out?
I can help with testing patches, but I don't know enough shoes/ruby
internals to fix it myself.
Thanks.

csm

Re: [shoes] Shoes segfaults on startup (Linux x86_64), ruby_sysinit is the cause?

From:
i5m
Date:
2010-03-10 @ 09:20
csm,

thanks for tracking down the problem. Looks like the fix ashbb did needs to
be Windows only then. Ashbb should be able to sort this for you, but in the
meantime have a go yourself. Try editing world.c to say:

{
  VALUE v;
  char *argv[] = {"ruby", "-e", "1"};
  #ifdef SHOES_WIN32
      int sysinit_argc = 0;
      char**  sysinit_argv = NULL;
  #endif
  RUBY_INIT_STACK;
  #ifdef SHOES_WIN32
      ruby_sysinit( &sysinit_argc, &sysinit_argv );
  #endif
  ruby_init();
  v = (VALUE)ruby_options(3, argv);
  return !FIXNUM_P(v);
}



-----------------------
i5m.co.uk
GPG Key: 0xA18A602B


On Wed, Mar 10, 2010 at 7:33 AM, Csomay Mihaly <list@csomay.hu> wrote:

> Hi,
>
> I tried shoes on Arch Linux x86_64, it builds fine, but on startup it
> segfaults:
> ./dist/shoes: line 22:  7907 Segmentation fault
>  LD_LIBRARY_PATH=$APPPATH $APPPATH/shoes-bin "$@"
>
> So I compiled previous versions to find out where it starts happening.
> This is the commit, where it first happens:
>
> http://github.com/shoes/shoes/commit/1fc71d0f4343f7adb740aed59b90ef93024ef5b6
>
> Up to that point shoes -m starts up the manual, but from that point on, all
> I get is a segfault.
>
> Any chance to get it sorted out?
> I can help with testing patches, but I don't know enough shoes/ruby
> internals to fix it myself.
> Thanks.
>
> csm
>

Re: [shoes] Shoes segfaults on startup (Linux x86_64), ruby_sysinit is the cause?

From:
Csomay Mihaly
Date:
2010-03-10 @ 09:58
i5m <i5ivem@googlemail.com> writes:

> thanks for tracking down the problem. Looks like the fix ashbb did
> needs to be Windows only then. Ashbb should be able to sort this for
> you, but in the meantime have a go yourself. Try editing world.c to
> say:
>
> {
>   VALUE v;
>   char *argv[] = {"ruby", "-e", "1"};
>   #ifdef SHOES_WIN32
>       int sysinit_argc = 0;
>       char**  sysinit_argv = NULL;
>   #endif
>   RUBY_INIT_STACK;
>   #ifdef SHOES_WIN32
>       ruby_sysinit( &sysinit_argc, &sysinit_argv );
>   #endif
>   ruby_init();
>   v = (VALUE)ruby_options(3, argv);
>   return !FIXNUM_P(v);
> }

Yeah, that works, I tried that already before posting, I just don't know
if ruby_sysinit does something I might need on Linux too :)
Looking through the commits, it seems that this commit was already
reverted once:
http://github.com/shoes/shoes/commit/782608bf0ec114c069f0ab334e4bf5d4a5515040
and then put back once again:
http://github.com/shoes/shoes/commit/7c9236ee4dd2ade08a9d0cd8818b8ff073857504
So... what does ruby_sysinit do? I couldn't find anything after a quick
search, only complaints about segfaults...

csm

Re: [shoes] Shoes segfaults on startup (Linux x86_64), ruby_sysinit is the cause?

From:
i5m
Date:
2010-03-10 @ 10:43
I don't know. Getting in way over my head. Some reading here:

http://www.ruby-forum.com/topic/126298

(same thing also here;
http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131
and
here:
http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131
)

and also this email thread:
<http://www.ruby-forum.com/topic/126298>
http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947


<http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947>Interestingly,
nobu, the guy(?) who reverted the commit would seem to know what he's doing.
As far as I can tell he implemented this function in Ruby. Perhaps we could
send him an email and ask him to explain?


-----------------------
i5m.co.uk
GPG Key: 0xA18A602B


On Wed, Mar 10, 2010 at 9:58 AM, Csomay Mihaly <list@csomay.hu> wrote:

> i5m <i5ivem@googlemail.com> writes:
>
> > thanks for tracking down the problem. Looks like the fix ashbb did
> > needs to be Windows only then. Ashbb should be able to sort this for
> > you, but in the meantime have a go yourself. Try editing world.c to
> > say:
> >
> > {
> >   VALUE v;
> >   char *argv[] = {"ruby", "-e", "1"};
> >   #ifdef SHOES_WIN32
> >       int sysinit_argc = 0;
> >       char**  sysinit_argv = NULL;
> >   #endif
> >   RUBY_INIT_STACK;
> >   #ifdef SHOES_WIN32
> >       ruby_sysinit( &sysinit_argc, &sysinit_argv );
> >   #endif
> >   ruby_init();
> >   v = (VALUE)ruby_options(3, argv);
> >   return !FIXNUM_P(v);
> > }
>
> Yeah, that works, I tried that already before posting, I just don't know
> if ruby_sysinit does something I might need on Linux too :)
> Looking through the commits, it seems that this commit was already
> reverted once:
>
> http://github.com/shoes/shoes/commit/782608bf0ec114c069f0ab334e4bf5d4a5515040
> and then put back once again:
>
> http://github.com/shoes/shoes/commit/7c9236ee4dd2ade08a9d0cd8818b8ff073857504
> So... what does ruby_sysinit do? I couldn't find anything after a quick
> search, only complaints about segfaults...
>
> csm
>

Re: [shoes] Shoes segfaults on startup (Linux x86_64), ruby_sysinit is the cause?

From:
Steve Klabnik
Date:
2010-03-10 @ 17:29
This is awesome. I'll look into this when I get back from SXSW, as
Linux x86_64 is near and dear to my heart.

On 3/10/10, i5m <i5ivem@googlemail.com> wrote:
> I don't know. Getting in way over my head. Some reading here:
>
> http://www.ruby-forum.com/topic/126298
>
> (same thing also here;
> http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131
> and
> here:
> http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131
> )
>
> and also this email thread:
> <http://www.ruby-forum.com/topic/126298>
> http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947
>
> 
<http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947>Interestingly,
> nobu, the guy(?) who reverted the commit would seem to know what he's doing.
> As far as I can tell he implemented this function in Ruby. Perhaps we could
> send him an email and ask him to explain?
>
>
> -----------------------
> i5m.co.uk
> GPG Key: 0xA18A602B
>
>
> On Wed, Mar 10, 2010 at 9:58 AM, Csomay Mihaly <list@csomay.hu> wrote:
>
>> i5m <i5ivem@googlemail.com> writes:
>>
>> > thanks for tracking down the problem. Looks like the fix ashbb did
>> > needs to be Windows only then. Ashbb should be able to sort this for
>> > you, but in the meantime have a go yourself. Try editing world.c to
>> > say:
>> >
>> > {
>> >   VALUE v;
>> >   char *argv[] = {"ruby", "-e", "1"};
>> >   #ifdef SHOES_WIN32
>> >       int sysinit_argc = 0;
>> >       char**  sysinit_argv = NULL;
>> >   #endif
>> >   RUBY_INIT_STACK;
>> >   #ifdef SHOES_WIN32
>> >       ruby_sysinit( &sysinit_argc, &sysinit_argv );
>> >   #endif
>> >   ruby_init();
>> >   v = (VALUE)ruby_options(3, argv);
>> >   return !FIXNUM_P(v);
>> > }
>>
>> Yeah, that works, I tried that already before posting, I just don't know
>> if ruby_sysinit does something I might need on Linux too :)
>> Looking through the commits, it seems that this commit was already
>> reverted once:
>>
>> http://github.com/shoes/shoes/commit/782608bf0ec114c069f0ab334e4bf5d4a5515040
>> and then put back once again:
>>
>> http://github.com/shoes/shoes/commit/7c9236ee4dd2ade08a9d0cd8818b8ff073857504
>> So... what does ruby_sysinit do? I couldn't find anything after a quick
>> search, only complaints about segfaults...
>>
>> csm
>>
>

Re: [shoes] Shoes segfaults on startup (Linux x86_64), ruby_sysinit is the cause?

From:
Devyn Cairns
Date:
2010-03-10 @ 20:06
heh :D

On Wed, Mar 10, 2010 at 9:29 AM, Steve Klabnik <steve@steveklabnik.com>wrote:

> This is awesome. I'll look into this when I get back from SXSW, as
> Linux x86_64 is near and dear to my heart.
>
> On 3/10/10, i5m <i5ivem@googlemail.com> wrote:
> > I don't know. Getting in way over my head. Some reading here:
> >
> > http://www.ruby-forum.com/topic/126298
> >
> > (same thing also here;
> >
> http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131
> > and
> > here:
> >
> http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131
> > )
> >
> > and also this email thread:
> > <http://www.ruby-forum.com/topic/126298>
> >
> http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947
> >
> > <
> http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947
> >Interestingly,
> > nobu, the guy(?) who reverted the commit would seem to know what he's
> doing.
> > As far as I can tell he implemented this function in Ruby. Perhaps we
> could
> > send him an email and ask him to explain?
> >
> >
> > -----------------------
> > i5m.co.uk
> > GPG Key: 0xA18A602B
> >
> >
> > On Wed, Mar 10, 2010 at 9:58 AM, Csomay Mihaly <list@csomay.hu> wrote:
> >
> >> i5m <i5ivem@googlemail.com> writes:
> >>
> >> > thanks for tracking down the problem. Looks like the fix ashbb did
> >> > needs to be Windows only then. Ashbb should be able to sort this for
> >> > you, but in the meantime have a go yourself. Try editing world.c to
> >> > say:
> >> >
> >> > {
> >> >   VALUE v;
> >> >   char *argv[] = {"ruby", "-e", "1"};
> >> >   #ifdef SHOES_WIN32
> >> >       int sysinit_argc = 0;
> >> >       char**  sysinit_argv = NULL;
> >> >   #endif
> >> >   RUBY_INIT_STACK;
> >> >   #ifdef SHOES_WIN32
> >> >       ruby_sysinit( &sysinit_argc, &sysinit_argv );
> >> >   #endif
> >> >   ruby_init();
> >> >   v = (VALUE)ruby_options(3, argv);
> >> >   return !FIXNUM_P(v);
> >> > }
> >>
> >> Yeah, that works, I tried that already before posting, I just don't know
> >> if ruby_sysinit does something I might need on Linux too :)
> >> Looking through the commits, it seems that this commit was already
> >> reverted once:
> >>
> >>
> http://github.com/shoes/shoes/commit/782608bf0ec114c069f0ab334e4bf5d4a5515040
> >> and then put back once again:
> >>
> >>
> http://github.com/shoes/shoes/commit/7c9236ee4dd2ade08a9d0cd8818b8ff073857504
> >> So... what does ruby_sysinit do? I couldn't find anything after a quick
> >> search, only complaints about segfaults...
> >>
> >> csm
> >>
> >
>



-- 
   ~devyn