-
-
Notifications
You must be signed in to change notification settings - Fork 474
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
Segfault happening #2265
Comments
Strange. The backtrace does not fit with the idea that the database connection failed. I am not sure that's what the problem was. What was this "unusual postgresql setup"? I tried limiting the number of connections and osm2pgsql properly reported an error and exited. |
Too few |
I am pretty sure it is not the |
I can see if I have a suitable system |
I believe I have figured out what is happening here: There are several threads in the thread pool. Thread A is started and opens a database connection and all is fine so far. Then thread B is started and doesn't get a database connection any more, it throws an exception. The exception is propagated and as part of that propagation lots of things are destructed. At some point the data structure containing the information about tables is destructed. Now thread A gets a chance to run again and wants to build the To solve this we would need to make sure all threads are destructed before anything else. But there is no way to kill a running std::thread. We would have to wait until it is done with its work, which doesn't make much sense, because that situation isn't recoverable anyway. In C++20 there is a new At the moment, I don't have a good idea how to solve this. :-( |
Yes |
See https://gist.github.com/tomhughes/0ebdc537b6a9a390b904d394d796b5e0
@pnorman Please add all the details about what you were doing here.
What version of osm2pgsql are you using?
2.0.0+ds-1~bpo12+1
What operating system and PostgreSQL/PostGIS version are you using?
Debian 12
Tell us something about your system
OpenStack Virtual Machine with 64 x 1 core AMD EPYC Processor, 444GB
What did you do exactly?
What did you expect to happen?
The planet to import.
What did happen instead?
A core dump occurred in the post-processing stage
What did you do to try analyzing the problem?
@tomhughes provided the backtrace at https://gist.github.com/tomhughes/0ebdc537b6a9a390b904d394d796b5e0
The machine had an unusual postgresql setup at the time. When starting the import it had sufficient connection slots for osm2pgsql to start, but by the time post-processing had started it would not be possible to acquire new connections. When I fixed this error in the machine configuration it worked fine.
The text was updated successfully, but these errors were encountered: