-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segv when wrapped in a Timeout.timeout
#586
Comments
It is normal and expected that you get several hosts when calling What is the result of See also #490 |
From your stacktrace above:
So rails is trying to cancel all running queries, but this segfaults on C level.
For me it looks like a segfault due to some out-of-memory condition in |
It is not normal. The thing happening is The reproduction makes it quite obvious if you want to try it locally! The issue you are pointing is referencing the same bug, but if |
That would make sense, since the |
Now it makes sense to me! This is a regression in pg-1.5.6 introduced by #559. I'll prepare a fix. |
Commit 016c17c introduced a regression, that leads to a host list duplication every time conn.reset is used. Since the hosts are duplicated when resolve_hosts is called, the conn.coninfo_hash can not be used. So the fix is to store the original hash of connection options for later use in conn.reset . Fixes ged#586
Commit 016c17c introduced a regression, that leads to a host list duplication every time conn.reset is used. Since the hosts are duplicated when resolve_hosts is called, the conn.coninfo_hash can not be used. So the fix is to store the original hash of connection options for later use in conn.reset . Fixes ged#586
Commit 016c17c introduced a regression, that leads to a host list duplication every time conn.reset is used. Since the hosts are duplicated when resolve_hosts is called, the conn.coninfo_hash can not be used. So the fix is to store the original hash of connection options for later use in conn.reset . Fixes ged#586
Any plans of making this part of a release soonish ? I'd rather upgrade the dependency in the postgis adapter to be sure ppl don't get their connection bloated ( |
pg-1.5.8 is out with this fix included. |
Here's the failure (and ruby/system versions):
https://github.com/rgeo/activerecord-postgis-adapter/actions/runs/10715263199/job/29710385170
I'm not so used to reading segv messages.
I'll try to see if I can have a stable reproduction
Not reproducing but finding another issue, likely related (I'll split in two issues if not later).
The reset method calls
resolve_hosts
and reassign the newiopts
to the newly created connection. But with alocalhost
host, this gets wild quite fast if you reset a few time the connection:A more complete reproduction would be:
The text was updated successfully, but these errors were encountered: