Skip to content
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

Improvement #5577 : embedded: after fb_shutdown some files stay locked [CORE5299] #7702

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hvlad
Copy link
Member

@hvlad hvlad commented Aug 8, 2023

No description provided.

@hvlad hvlad self-assigned this Aug 8, 2023
@hvlad hvlad linked an issue Aug 8, 2023 that may be closed by this pull request
@asfernandes
Copy link
Member

This would be problematic for applications that uses ICU and FB-embedded.
Firebird may call cleanup of a library it didn't loaded.
ICU is used by many applications.
I think this should not be done.

@hvlad
Copy link
Member Author

hvlad commented Aug 9, 2023

This would be problematic for applications that uses ICU and FB-embedded. Firebird may call cleanup of a library it didn't loaded.

Are you means the case when app already loaded ICU before engine does ?
Here I agree, u_cleanup() could be dangerous for the app.

We might "just unload" ICU libraries, not calling u_cleanup().
This will unload ICU libraries if there are no more references only and should be safe.
But all data files loaded by ICU (.dat and *.res) will remains in memory.

Maybe we could introduce some way to control this (to call u_cleanup() or not) ?

@hvlad
Copy link
Member Author

hvlad commented Aug 9, 2023

One more question - how to handle the case when ICU is loaded multiply times by Firebird itself.
It could be loaded by the engine, the trace and even by the fbclient, AFAIU.

@asfernandes
Copy link
Member

Are you means the case when app already loaded ICU before engine does ?

Yes, but the inverse may also be possible.

I see no safe way to have u_cleanup() called.

And if you unload without calling it, then there will be multiple memory leaks each time this is done.

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.

embedded: after fb_shutdown some files stay locked [CORE5299]
2 participants