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

Logging is sometimes re-entrant #192

Open
LeonarddeR opened this issue Oct 17, 2019 · 4 comments
Open

Logging is sometimes re-entrant #192

LeonarddeR opened this issue Oct 17, 2019 · 4 comments

Comments

@LeonarddeR
Copy link

Within NVDA, we use comtypes to access com objects. Until now, we ignored logging messages coming from comtypes. When I started investigating piping comtypes logging to the NVDA log, I noticed that NVDA crashed in a few minutes after enabling debug logging.

Here is an example traceback generated when comtypes logging is set to debug. It looks like some log messages generate another message that causes re-entrancy.

@junkmd
Copy link
Collaborator

junkmd commented Dec 3, 2022

@LeonarddeR

Is this still a problem?

@vasily-v-ryabov
Copy link
Collaborator

From brief look it seems a threading issue. See this StackOverflow question: https://stackoverflow.com/q/45680378/3648361 From the first look I couldn't understand whether we can fix it in comtypes or not.

@LeonarddeR
Copy link
Author

It's a long time ago I investigated this. There have been some logging changes in NVDA related to comtypes, see nvaccess/nvda#14317

@junkmd
Copy link
Collaborator

junkmd commented Dec 5, 2022

@LeonarddeR

I don't think this issue is limited to comtypes.

I think @vasily-v-ryabov is right, it is a problem that occurs with asynchronous, parallelprocessing or multiprocessing.
I think the solution is to eliminate logging from comtypes or to prevent your project's logging from picking up the library's logs.

I am not in favor of eliminating logging from comtypes.

Your project PR seems to have accomplished not picking up any logs on the library side.

What about this issue?

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

No branches or pull requests

3 participants