-
Notifications
You must be signed in to change notification settings - Fork 917
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
Concurrent map writes #1031
Comments
This is also impacting us. Downgrading to 1.9.0 fixes it. We don't use inline SSL certificates (the feature in 1.10). |
We also ran into this bug. The bug seems to be caused in the I think (but I might be wrong on this) that this bug already somewhat existed before, for instance with the I believe the problem causing the bug is that the Some possible solutions for this bug:
On a side note: |
Sorry for the bug! 😢 Just a thought about this one:
Doesn't that contradict this?
Anyways, times have changed, I'm a full time frontend developer now. I haven't really touched PostgreSQL in months. My original PR was written 3 years ago - it was merged two months ago, but all I really did was to rebase my patch on top of the master branch. @bjornouderoelink seems like you have quite a deep understanding of this bug, would it be possible for you to make a pull request with a bug fix? Unfortunately, I'm afraid that I don't have time to get back into PostgreSQL land, write a bugfix and then make sure I don't introduce a new bug. (Maybe, in the future, will I once again work with databases, but nowadays it's all about React for me.) If it's too hard to fix the bug, I suppose another alternative would be to revert my patch. But then again, it looks like other people (like @umran and @binlab) are already relying on it, so that would be unfortunate. |
It indeed looks like it contradicts, but I do believe it is correct. As for a solution: I was able to reproduce the panic quite consistently before. I could not reproduce it anymore after applying that fix, which would suggests it indeed solves the bug. Though with concurrency this is always tricky because the bug could only occur with the right timings. There is still one problem with the inline SSL functionality though that I think is not fixed entirely with my current solution. |
Is it possible to solve this using two different maps? One with the sslinline still intact, and another one where it's deleted? (And otherwise, the two maps would be identical) |
Well, yes. That might be a solution. I am wondering though, and maybe you know/remember this @eirslett, the comment above the |
I think the reason I added the delete, was to prevent the private key from being passed around to wherever it's supposed to not go - whether that was to other parts of the program itself (maybe inadvertently in debug logs), or over TCP to the actual PostgreSQL server. Maybe I realized it was sent over the wire to the PostgreSQL server, and the connection was dropped because of the unrecognized connection parameter. The code I wrote says
which I believe was an actual problem. (PostgreSQL dropping the connection) And
which was probably my paranoia. (Prevent secrets from leaking) |
I agree that it would not be great if that data is sent to places it should not go. Especially so if that drops the connection to the database. For now though I'm a bit hesitant to add the Maybe @mjibson or any other maintainer can weigh in on this? Or someone that actively uses the inline SSL functionality? Edit: nevermind, I found something. In that case, I think we could add the "sslinline" key there and make it return true, so it is not sent to Postgres. |
I don't care at all. If there's a PR that passes tests and ya'll think it's good I'll hit merge. That's pretty much what I do nowadays. Mention me in a PR when it's ready. |
Oh, just straight up reverting the commit is also fine. I have no preference. |
I opened a PR for this issue. The CI tests show a failure, however in the details all tests succeed except for the goimports one. |
I don't think that copying the values is necessary. Perhaps |
I agree that copying the I don't really know which two fields you would want add to the |
After upgrading from 1.9.0 to 1.10.0 we started seeing the following panic.
There have been issues about this which have been related to SSL options. Since 1.10 touched the SSL space it's possible there has been a regression.
The text was updated successfully, but these errors were encountered: