[issue25668] Deadlock in logging caused by a possible race condition with "format"

2021-12-12 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: -> resolved status: pending -> closed ___ Python tracker ___ ___

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2021-12-05 Thread Irit Katriel
Irit Katriel added the comment: > Please tell me what is unusual for you with this testcase? Grabbing a lock in __str__/__repr__ strikes me as unusual and a recipe for problems. You don't really know when those functions are called - from the debugger, from exception handlers, etc.. Even

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-02-19 Thread Vinay Sajip
Vinay Sajip added the comment: @Oliver Ruiz Dorantes I don't see how yuou reach that conclusion from what you're showing - it just looks like s mismatch bertween format string and arguments. If you can shrink it down to a small standalone script that demonstrates the problem, it would be

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-02-19 Thread Oliver Ruiz Dorantes
Oliver Ruiz Dorantes added the comment: I am logging from a different thread than the thread which actually created the object. Though I am getting its reference in a very odd way I can reproduce the following while is not a deadlock, I believe is related: Traceback (most recent call last):

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-14 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker ___ ___

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread R. David Murray
Changes by R. David Murray : -- nosy: -r.david.murray ___ Python tracker ___ ___

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Vinay Sajip
Vinay Sajip added the comment: Logging has been in the Python stdlib for over a dozen years, and in all that time, no one else has had a problem with the way handler locks and formatting work in logging. Your problem arises because your use case is very unusual, and this is why I don't

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Florent Viard
Florent Viard added the comment: Come on, please stop trying to close the issue so fast without deeply thinking about it. A lot of years without a "detailed" bug report indicating the root cause is not a "proof" that there is no bug. Otherwise, you can say that there is no more bug in

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Florent Viard
Florent Viard added the comment: Sorry to reply after a so long time. Please don't close this issue too fast, there is really a big issue that is not related to my specific case. (Note that the attached test case is not the real case, but a small piece of code that is able to reproduce the

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Florent Viard
Florent Viard added the comment: Sorry, typo in my last sentence: "I would have agreed with your point if the problem was NOT solvable,..." -- ___ Python tracker

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2015-11-24 Thread Vinay Sajip
Vinay Sajip added the comment: handle() and emit() are high level methods of a handler, and format() is at a lower level. Not all emit() methods will call format(). For example, socket-based and queue-based handlers don't. So it is not in general possible to separate format() out - you will

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2015-11-19 Thread Florent Viard
Florent Viard added the comment: I understand that it should have been the reason of this. But in my opinion, it is very bad to possibly have calculations and user space arbitrary operations inside the logging lock. If you look at my proposition, you can do the format after the filter, but

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2015-11-19 Thread R. David Murray
R. David Murray added the comment: Using the lock to cover as little as possible makes sense, but there may be a reason format is covered by the lock. I don't know the code well enough to say, we'll have to wait for Vinay. -- ___ Python tracker

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2015-11-19 Thread R. David Murray
R. David Murray added the comment: But not doing the format until the last moment is part of the design of logging (as low overhead as possible unless a message is actually emitted). I suspect you are just going to have to pre-calculate that variable if you want to log it. Let's see what

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2015-11-19 Thread Florent Viard
New submission from Florent Viard: When an user, use logging, to try to display an object that uses some threading locks, there could be a race condition and the logging module will deadlock. So, any thread that will try to use logging, will then be stuck forever. Please see the following

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2015-11-19 Thread Florent Viard
Florent Viard added the comment: Looking at the code, this issue makes sense in logging/__init__.py (+738): def handle(self, record): """ Conditionally emit the specified logging record. Emission depends on filters which may have been added to the handler.