[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Segfault in timer.rb

Seg Fault

1/13/2005 6:49:00 PM

ts wrote:

>>>>>> "S" == Seg Fault <junkbloc...@yahoo.com>
writes:
>
> With such a name, ruby can only segfault and it do
> this just to be pleasant with you :-)

;) Actually, I took on the name after getting annoyed
by these segfaults :)

>S> Here's a gdb stacktrace
>
> Well, probably it was not compiled with the right
> option.
>
> With a correct backtrace, probably you'll not see
> such calls
>
>S> /usr/local/bin/cygruby19.dll
>S> #40 0x10019a5f in rb_alias () from
>S> /usr/local/bin/cygruby19.dll
>S> #41 0x100189bb in rb_alias () from
>S> /usr/local/bin/cygruby19.dll
>S> #42 0x1001a975 in rb_alias () from
>S> /usr/local/bin/cygruby19.dll
>S> #43 0x10019083 in rb_alias () from
>S> /usr/local/bin/cygruby19.dll
>
> this is probably rb_call() rather than rb_alias() :
> this means that gdb has problem to give the correct
> backtrace

That's all I could produce. I had built ruby with
these
options

% /usr/bin/env CFLAGS="-ggdb -g -O0" ./configure
--prefix=/usr/local --enable-install-doc
--disable-pthread
% make
% make install-all

and previously without the CFLAGS and
--disable-pthread
but got the same segfaults. It always happens in
Thread.start :/

I've spent more than a week dealing with this on
various machines and am almost driven to the brink of
looking for another language :(

> Guy Decoux

-Erlend Oye/Seg Fault/Who Cares



__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.co...


6 Answers

ts

1/14/2005 10:01:00 AM

0

>>>>> "S" == Seg Fault <junkblocker@yahoo.com> writes:

S> and previously without the CFLAGS and
S> --disable-pthread
S> but got the same segfaults. It always happens in
S> Thread.start :/

Well, try to write a small script to reproduce the problem. Personnally I
don't have access to a cygwin system, and ruby just work fine.


Guy Decoux




Alexander Kellett

1/15/2005 8:59:00 PM

0

On Jan 13, 2005, at 7:49 PM, Seg Fault wrote:
> I've spent more than a week dealing with this on
> various machines and am almost driven to the brink of
> looking for another language :(

instead of that try another version of ruby
rather than that joke of a platform named 'cygwin'

try the mswin32 port, or the mingw32 port,
both easy to find using google.

Alex



Erlend Oye

1/16/2005 5:17:00 AM

0

Alexander Kellett wrote:
> On Jan 13, 2005, at 7:49 PM, Seg Fault wrote:
>
>> I've spent more than a week dealing with this on
>> various machines and am almost driven to the brink of
>> looking for another language :(
>
>
> instead of that try another version of ruby
> rather than that joke of a platform named 'cygwin'
>

I'll do that when someone officially tells me that 'cygwin' is
not a supported platform.

> try the mswin32 port, or the mingw32 port,
> both easy to find using google.
>
> Alex
>

That joke of a platform named 'cygwin' has Perl/Ruby/Python
X Applications, Gnome, GTK... and so on built for it and working
just fine everyday. It has a nicely supported pkg system which
lets me switch from my Solaris system and not even notice much
difference, letting me install and use most *nix apps I use
everyday.

MinGW32 is "MINmalist GNU for Win32", meaning it comes with
nothing. You have to hunt for packages and are barely able to
find anything other than basic compiler toolchain. Heck, configure
for 'Screen' said it didn't even support the 'select' call??? not
to mention the basic *nixisms like fork (of course).

I can always use the release builds but I should be able to do builds
from the CVS and report the bugs and ask for help in Cygwin instead of
the suggestions that I switch platforms....and no, you are not the first
one suggesting this. This has been suggested on IRC
(#ruby-lang/freenode) too.

So, I'd like to know - is Cygwin a supported platform or not?
Saying it sucks and that's where the bug lies is not solving
anything here when we haven't even figured out where the bug is.

Look at the first response to Trans's question on the list today
about what do people want from Ruby...the answer says "The code
should work on all platform without any fuss like perl". So I
sure am not the only one looking for this.

Dangling unanswered questions are just going to turn the users away
and I would be away already if I was not serious about wanting to use
it on all my machine getting all the newer things that keep coming in
(via CVS).

-Erlend Oye


Alexander Kellett

1/16/2005 9:34:00 AM

0

On Jan 16, 2005, at 6:17 AM, Erlend Oye wrote:
> I can always use the release builds but I should be able to do builds
> from the CVS and report the bugs and ask for help in Cygwin instead of
> the suggestions that I switch platforms....and no, you are not the
> first
> one suggesting this. This has been suggested on IRC
> (#ruby-lang/freenode) too.

i've heard other bug reports with threading that
were solved when using a platform other than cygwin.
cygwin wasted a lot of my time in the past. i'm glad
to not be using it anymore. but... each to their own,
forgive my bitterness i just care about the s/w i use.

Alex



Ville Mattila

1/16/2005 6:49:00 PM

0

Alexander Kellett <ruby-lists@lypanov.net> writes:

> On Jan 16, 2005, at 6:17 AM, Erlend Oye wrote:
>> I can always use the release builds but I should be able to do builds
>> from the CVS and report the bugs and ask for help in Cygwin instead of
>> the suggestions that I switch platforms....and no, you are not the
>> first
>> one suggesting this. This has been suggested on IRC
>> (#ruby-lang/freenode) too.
>
> i've heard other bug reports with threading that
> were solved when using a platform other than cygwin.
> cygwin wasted a lot of my time in the past. i'm glad
> to not be using it anymore. but... each to their own,
> forgive my bitterness i just care about the s/w i use.

The cygwins signal handling is not most robust and ruby threading
implementation depends on working signals. However there is cygwin1
delopment snapshots that might cure Erlend's problem. Erlend could
you check the latest snapshot from http://cygwin.com/...

Also I think you'll get better OS features (OLE and stuff like that)
if you use native ruby i.e. one click installer or compile it
yourself (migw or msvc).

- Ville

Erlend Oye

1/16/2005 8:09:00 PM

0

Ville Mattila wrote:
> Alexander Kellett <ruby-lists@lypanov.net> writes:
>
>
>>On Jan 16, 2005, at 6:17 AM, Erlend Oye wrote:
>>
>>> I can always use the release builds but I should be able to do builds
>>>from the CVS and report the bugs and ask for help in Cygwin instead of
>>>the suggestions that I switch platforms....and no, you are not the
>>>first
>>>one suggesting this. This has been suggested on IRC
>>>(#ruby-lang/freenode) too.
>>
>>i've heard other bug reports with threading that
>>were solved when using a platform other than cygwin.
>>cygwin wasted a lot of my time in the past. i'm glad
>>to not be using it anymore. but... each to their own,
>>forgive my bitterness i just care about the s/w i use.
>
>
> The cygwins signal handling is not most robust and ruby threading
> implementation depends on working signals. However there is cygwin1
> delopment snapshots that might cure Erlend's problem. Erlend could
> you check the latest snapshot from http://cygwin.com/...
>
> Also I think you'll get better OS features (OLE and stuff like that)
> if you use native ruby i.e. one click installer or compile it
> yourself (migw or msvc).
>
> - Ville
>
>
I just tried the latest snapshot and it doesn't work. I get the segfault
anywhere from about 3rd to about 9th request thru the script (see
code pasted before). For those testing it on another platforms, no,
I haven't had this bug on Solaris or with mswin32 builds.

I don't have MSVC toolchain and MinGW looked very underpowered judging
from output of configure command, but then maybe that is a wrong impression.

<request>
I'd have no need to build this myself if nightlies or some frequent
snapshots were provided for platforms. All the cygwin/mingw builds
available are from even before the 1.8.2 release date. Is providing
nightlies (with 'test-all' target cases run) a possibility?
</request>

Thanks
Erlend