[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults — v.ondruch@...

Issue #14357 has been reported by vo.x (Vit Ondruch).

11 messages 2018/01/15
[#85364] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults — Eric Wong <normalperson@...> 2018/02/03

v.ondruch@tiscali.cz wrote:

[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — hsbt@...

Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).

10 messages 2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — Eric Wong <normalperson@...> 2018/01/23

hsbt@ruby-lang.org wrote:

[ruby-core:84822] Re: [Ruby trunk Bug#14349] Net::HTTP doesn't reuse connections when used via ::new

From: Eric Wong <normalperson@...>
Date: 2018-01-10 19:26:22 UTC
List: ruby-core #84822
rohitpaulk@gmail.com wrote:
> From [Net::HTTP's docs](http://ruby-doc.org/stdlib-2.5.0/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-How+to+use+Net-3A-3AHTTP): 

> > If you wish to re-use a connection across multiple HTTP
> > requests without automatically closing it you can use ::new
> > instead of ::start. request will automatically open a
> > connection to the server if one is not currently open. You
> > can manually close the connection with finish.

I guess this is a documentation bug and it should mention #start
along with ::new.  Perhaps you can help reword this?

> I've attached a patch that I think solves the issue. With the
> patch, sockets will still get closed after single requests
> through methods like `Net::HTTP.get`, since they use the block
> form for `start`.

What Jeremy said; this may cause unintended resource exhaustion
on the client side.  It may not be a big problem on the C Ruby GC;
but it may be on other VMs.

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next