Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brooke McKim  
View profile  
 More options Nov 12 2012, 8:49 pm
From: Brooke McKim <brooke.mc...@gmail.com>
Date: Mon, 12 Nov 2012 17:49:46 -0800 (PST)
Local: Mon, Nov 12 2012 8:49 pm
Subject: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

Hello All,

I am not sure if this is a Rubinius bug or Celluloid bug,
but https://gist.github.com/4063344. If I have a class with Celluloid
included that calls URI.parse(url).read the actor will die with the
stacktrace in the gist. If I then, outside of a Celluloid class, call
URI.parse(url).read (which completes sucessfully) and then go back and try
it on my Celluloid class it works fine.

I am using rubinius 2.0.0rc1 (1.9.3 d2326d8e 2012-11-02 JI)
[x86_64-apple-darwin12.2.0]

This works fine in CRuby 1.9.3.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Arcieri  
View profile  
 More options Nov 12 2012, 8:52 pm
From: Tony Arcieri <tony.arci...@gmail.com>
Date: Mon, 12 Nov 2012 17:51:56 -0800
Local: Mon, Nov 12 2012 8:51 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

I think this is an issue with the limited stack depth of fibers (I'm not
sure what the limit is on Rubinius) and a recursive algorithm. Let me poke
the rbx people and see what they say.

On Mon, Nov 12, 2012 at 5:49 PM, Brooke McKim <brooke.mc...@gmail.com>wrote:

> Hello All,

> I am not sure if this is a Rubinius bug or Celluloid bug, but
> https://gist.github.com/4063344. If I have a class with Celluloid
> included that calls URI.parse(url).read the actor will die with the
> stacktrace in the gist. If I then, outside of a Celluloid class, call
> URI.parse(url).read (which completes sucessfully) and then go back and try
> it on my Celluloid class it works fine.

> I am using rubinius 2.0.0rc1 (1.9.3 d2326d8e 2012-11-02 JI)
> [x86_64-apple-darwin12.2.0]

> This works fine in CRuby 1.9.3.

--
Tony Arcieri

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joseph Fredette  
View profile  
 More options Nov 12 2012, 8:52 pm
From: Joseph Fredette <jfred...@gmail.com>
Date: Mon, 12 Nov 2012 20:52:22 -0500
Local: Mon, Nov 12 2012 8:52 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

I'm not 100%, but the fact that it only happens in RBX indicates an rbx bug
to me, the folks in #rubinius on freenode are quite helpful, I'm sure they
could point you in the direction of the rbx-source. Great opportunity to
write a patch!

On Mon, Nov 12, 2012 at 8:49 PM, Brooke McKim <brooke.mc...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brooke McKim  
View profile  
 More options Nov 12 2012, 8:56 pm
From: Brooke McKim <brooke.mc...@gmail.com>
Date: Mon, 12 Nov 2012 17:56:46 -0800 (PST)
Local: Mon, Nov 12 2012 8:56 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

I should also note that if I use Net::HTTP.get_response( URI.parse(url) )
instead of .read it works fine.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Arcieri  
View profile  
 More options Nov 12 2012, 8:59 pm
From: Tony Arcieri <tony.arci...@gmail.com>
Date: Mon, 12 Nov 2012 17:59:26 -0800
Local: Mon, Nov 12 2012 8:59 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

It looks like URI#read uses open-uri which takes a different code path than
Net::HTTP

On Mon, Nov 12, 2012 at 5:56 PM, Brooke McKim <brooke.mc...@gmail.com>wrote:

--
Tony Arcieri

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joseph Fredette  
View profile  
 More options Nov 12 2012, 9:02 pm
From: Joseph Fredette <jfred...@gmail.com>
Date: Mon, 12 Nov 2012 21:02:11 -0500
Local: Mon, Nov 12 2012 9:02 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

The apparently infinite call to #create_parts seems to indicate a real bug
-- probably a broken/underspecced conditional. Which indicates an actual
bug w/ RBX-- though I wonder how such a thing could get by -- does it cause
an issue w/o the Celluloid stuff in the way? It seems like something that
would be common enough to cause trouble prior to now.

On Mon, Nov 12, 2012 at 8:56 PM, Brooke McKim <brooke.mc...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Arcieri  
View profile  
 More options Nov 12 2012, 9:05 pm
From: Tony Arcieri <tony.arci...@gmail.com>
Date: Mon, 12 Nov 2012 18:05:35 -0800
Local: Mon, Nov 12 2012 9:05 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

On Mon, Nov 12, 2012 at 6:02 PM, Joseph Fredette <jfred...@gmail.com> wrote:
> The apparently infinite call to #create_parts seems to indicate a real bug
> -- probably a broken/underspecced conditional. Which indicates an actual
> bug w/ RBX-- though I wonder how such a thing could get by -- does it cause
> an issue w/o the Celluloid stuff in the way? It seems like something that
> would be common enough to cause trouble prior to now.

It's not an infinite call to #create_parts. It's breaking here, likely due
to Celluloid's use of fibers in conjunction with a deeply recursive
algorithm (probably exacerbated by rbx's propensity to use pure Ruby
wherever possible):

SystemStackError: SystemStackError
kernel/common/string.rb:1050:in `modify!'
kernel/common/string19.rb:418:in `<<'
kernel/common/regexp.rb:111:in `<<'
kernel/common/regexp.rb:277:in `push_current_character!'
kernel/common/regexp.rb:271:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until... 78 levels...
_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:272:in `process_until_group_finished'
kernel/common/regexp.rb:221:in `process_group'
kernel/common/regexp.rb:201:in `create_parts'

--
Tony Arcieri


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Fredette  
View profile  
 More options Nov 12 2012, 9:12 pm
From: Joe Fredette <jfred...@gmail.com>
Date: Mon, 12 Nov 2012 21:12:31 -0500
Local: Mon, Nov 12 2012 9:12 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

Interesting. My experience in debugging code with fibers involved is pretty limited, so the big stack of #create_parts called out louder than the stuff above it. Still, looking at the #create_parts code, it is prone to unbounded recursion (see the last line recursive call) when @source isn't being properly updated (perhaps it's not locked appropriately? But that wouldn't make sense since it's not shared.). Looking at it now, I understand better  your theory that the Fiber stack depth is just insufficient (or at least different) on RBX to cause issue.

/Joe

On Nov 12, 2012, at 9:05 PM, Tony Arcieri <tony.arci...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brooke McKim  
View profile  
 More options Nov 13 2012, 12:39 pm
From: Brooke McKim <bmc...@telvue.com>
Date: Tue, 13 Nov 2012 09:39:20 -0800 (PST)
Local: Tues, Nov 13 2012 12:39 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

Out of my own curiosity: What would cause it to start working after you
call .read from outside Celluloid?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Fredette  
View profile  
 More options Nov 13 2012, 12:44 pm
From: Joe Fredette <jfred...@gmail.com>
Date: Tue, 13 Nov 2012 12:44:34 -0500
Local: Tues, Nov 13 2012 12:44 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

My thought was that perhaps it wasn't Celluloid (though looking at it now, I think otherwise). My suggestion was intended to verify that assertion (eg, to rule out Celluloid as part of the problem)

On Nov 13, 2012, at 12:39 PM, Brooke McKim <bmc...@telvue.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brooke McKim  
View profile  
 More options Nov 13 2012, 12:47 pm
From: Brooke McKim <bmc...@telvue.com>
Date: Tue, 13 Nov 2012 12:47:09 -0500
Local: Tues, Nov 13 2012 12:47 pm
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

No, I mean I know it works outside Celluloid, but also if you first call it
outside Celluloid and then inside Celluloid it works fine.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julien Ammous  
View profile  
 More options Nov 26 2012, 4:38 am
From: Julien Ammous <schmu...@gmail.com>
Date: Mon, 26 Nov 2012 01:38:15 -0800 (PST)
Local: Mon, Nov 26 2012 4:38 am
Subject: Re: Rubunius - URI.parse(url).read fails inside actor unless it is called first outside an actor

it may just be some caching involved causing the first call to require a
larger stack space (it may also be a stupid idea, it did not look at the
code).
I am currently mainly using fibers for concurrency on my current project
and until now the only time I hit the fiber stack size problem is when
using rails with the asset pipeline which resulted in at least call blowing
up everything...

Most of the time you will never notice the limited fiber stack size but it
would be nice to have a way to change it, there is a feature request on the
ruby tracker opened in... 2010, and still open...
(http://bugs.ruby-lang.org/issues/3187)
I doubt we get anything useful before a looooooong time.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »