-
Notifications
You must be signed in to change notification settings - Fork 747
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
Memory leak in libpostal libpostal_parse_address method #1407
Comments
It's possible there is a leak in libpostal itself...
|
@saudet Thank you for the prompt response! How can we verify if the issue is with |
That's a normal C function call, so no deallocator gets created for
pointers returned.
|
Just to verify, does that mean that every native method returning an object which inherits from |
No, it just means that C functions returning a pointer don't have a
deallocator. I don't know how libpostal is supposed to be used. Please ask
upstream.
|
I understand, thank you. |
Hi,
When using the libpostal 1.1-1.5.8 I experience a memory leak in my java process.
My code is iterating on a large number of addresses, and over time the java process memory is increasing until it crashes due to OOM.
I have monitored the jvm heap and non heap memory metrics and there is no issue there.
This leads me to the conclusion that the issue is with the native allocation of the returned address response, which is not deallocating the parsed addresses.
I did some debugging and found that the
libpostal_address_parser_response_t
object does not contain a deallocator, which if I understand correctly is in charge of deallocating the response object ( see in image).The following is my code (I am using the default options provided by the library):
I would very appreciate your prompt assistance with the issue as it is having a big impact on our production env.
Thank you and have a very nice day.
The text was updated successfully, but these errors were encountered: