Skip to content

Comments

Fix some DRb issues#2552

Merged
seki merged 3 commits intoruby:masterfrom
jeremyevans:drb
Oct 14, 2019
Merged

Fix some DRb issues#2552
seki merged 3 commits intoruby:masterfrom
jeremyevans:drb

Conversation

@jeremyevans
Copy link
Contributor

This fixes Ruby bugs 8039, 5618, 2339, 2718, 14471, and 7833.

@jeremyevans jeremyevans force-pushed the drb branch 2 times, most recently from 41baf12 to 173e580 Compare October 13, 2019 23:23
Copy link
Contributor

@seki seki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides this, I want an API that explicitly closes the connection pool

@jeremyevans
Copy link
Contributor Author

The CI failures appear to be related to timeouts. It doesn't appear to be failing in these tests, so I'm not sure exactly what is causing the timeouts. I'm going to try applying the patches one at a time to see if I can narrow down a possible cause.

Also fix a bug in rescue clause of any_to_s because sprintf
does not handle the %l modifier.

Fixes [Bug ruby#7833]
This associates each DRbConn with a pid, and if the pid changes,
it closes any DRbConns in the pool with a pid that no longer
matches.  This fixes DRb servers from sending messages intended
for one client to another client after forking.

Fixes [Bug ruby#2718]
Fixes [Bug ruby#14471]
This allows for normal TCP shutdown (fin-ack-fin-ack instead of
fin-ack-push-rst).

Patch from [email protected] (Pierre-Alexandre Meyer).

Fixes [Bug ruby#2339]
@seki seki merged commit d0ed935 into ruby:master Oct 14, 2019
else
klass = Kernel.instance_method(:class).bind(obj).call
end
sprintf("#<%s:0x%dx>", klass, obj.__id__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"#<%s:0x%dx>" is still incorrect. %d stands for decimal (and the x is just a literal x) but it seems hexadecimal is the intended conversion here: "#<%s:0x%x>" or even "#<%s:%#x>".

This method seems to based on pre-1.9 rb_any_to_s() (e.g. see the l modifier that C has for long) but it works differently even though it looks similar. However rb_any_to_s() is also the implementation of Kernel#to_s. Any reason not to just bind+call it like other standard libraries do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants