-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Race condition somewhere? fetching PDFs using the Sniffer while Qiqqa updates the library (OCR!) in the background randomly locks up Qiqqa mid-activity. #18
Comments
… locks being applied correctly and completely: for example, a few places did not follow best practices by using the dissuaded `lock(this){...}` idiom (https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/lock-statement)
… locks being applied correctly and completely. Also contains a few lines from work done before related to jimmejardine#10 et al.
…al sections in there were **humongous** in both code side and run-time duration; now the number of lock-ups due to *very* slow loading PDFs coming in from the Qiqqa Sniffer should be quite reduced: work related to jimmejardine#18
Done as per #33. locking code has been inspected and fixed in a few places; improved in another spot (SHA-1: a80be7d) Note: do not Commits: Revision: a80be7d Revision: 53f2ca8 Revision: 8b2b3de Revision: 5dcda97 |
|
Given the code for
Library.IsBusyAddingPDFs
I assume Qiqqa has more multithreading risks like that (a timeout/delay check isn't going to fly at all times and with a large library over here, those 3 seconds isn't going to cut it, resulting in a Qiqqa lock up some of the time)Random lock up behaviour like this strongly hints towards a race condition somewhere in the code, so I guess we'll have to go through the interlocking/thread interaction inside Qiqqa. 🙉 🙈 😄
Observations
These lockups almost always happen when you download a new/existing(?) PDF from the Sniffer into Qiqqa while both Qiqqa.exe and QiqqaOCR.exe are running.
Dialing down the number of QiqqaOCR.exe instances to 1(ONE) on my i7 dev box seems to reduce the chance of lockup like this happening, but it certainly is still present.
Using
Library.IsBusyAddingPDFs
in the Infrequent Background Task code seems to have minor negative = worse impact.My work on SHA-1: 8a1d766 (Fixing When re-indexing a large library, Qiqqa is unresponsive for a VERY long time (too long to wait: 1+ hours) #17) seems to have a strong detrimental = much worse effect as the number of lockup occurrences has increased notably since that change.
However, since that commit fixed When re-indexing a large library, Qiqqa is unresponsive for a VERY long time (too long to wait: 1+ hours) #17 and thus prevents me from short-circuiting to the Windows Task Manager
kill -9
=end process tree
decision, this "much worse" is quite possibly purely psychological as Qiqqa is running much longer now, per session.The text was updated successfully, but these errors were encountered: