-
Notifications
You must be signed in to change notification settings - Fork 74
[#722] fix segfault and hung threads on KeyboardIinterrupt during parallel get #728
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
base: main
Are you sure you want to change the base?
Conversation
|
After a bit of manual testing, will attempt to make a proper test for SIGINT and SIGTERM to ensure things are left in an ok state. |
e9d96e2 to
7e9a09f
Compare
|
A GUI for example that maintains background asynch parallel transfers using PRC could trap and guard against Ctrl-C thusly: Update: |
abafff5 to
fb36836
Compare
alanking
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable. Just a couple of things in the test
|
Looks like we have a conflict. Seems this PR is close to completion? |
|
Just checking to see if this PR is still being considered for 3.3.0. |
Will check its currency to see whether the segfault is still a concern. If so, then I think we can consider it for this release. |
fb36836 to
481952c
Compare
|
What's the status of this PR? |
I believe it's almost ready. I want to look over it once more. |
alanking
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awaiting signal that this is ready
I've added a test (first draft, will run soon) that interrupts a put . We weren't testing that previously. |
|
Now open to comment ... once more. These changes are final in my mind, as far as the significant changes to library functionality. |
|
I can squash the last 6 commits or so, if that helps reviewers. |
|
Yes please. |
|
Also, take a peek at the 2 failing checks to see if there's anything actionable. |
4b0458e to
14037f9
Compare
|
Sorry about the delay. (I see some reviews are already made.) I have just submitted a squash - but no actual changes of any kind since the last note I posted above. |
Going to have to make an issue for this one and handle it later, that is in |
|
Awaiting resolution of open review comments. |
Will take care of those later today. For now, putting in work done tho' new tests do not pass. Multithread programming is evil. |
|
This appears ready for review. Should be the final round.... |
|
Okay. Please take a look at codacy to see if there's anything worth addressing. |
korydraughn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're very close.
Already done. I don't see any more codacy issues worth looking at , beyond the ones already addressed. |
5fe8bda to
af51ad0
Compare
|
Pushed another example to the README, that I thought might be informative for folks trying to understand the PUT/GET abort facility. |
e05f038 to
e02c504
Compare
|
Ok. Things are quiet again and ready for final review. |
0f73366 to
96fb8b2
Compare
|
New wording looks good. Now we're waiting to see tests pass and then squashing? |
README, docstring, and comment changes/corrections.
96fb8b2 to
4268312
Compare
Just squashed. Last code changes seemed good in terms of test results, but one more pass can't hurt. |
|
Ok ...recommended changes made. Ready for final review / approval. |
alanking
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing else from me. Up to you if you want to address Codacy or the type checker, I guess.
|
Yeah, let's look into the type checker and codacy issues. The type checker issue looks like a quick fix. There are some medium to high issues reported by codacy though. Please stare at them and determine whether they are real issues. |
Fixed the type checker issue , pushed the change .... Went over the codacy issues again, and to my eyes they do not seem to matter. The "cell-variable defined in loop" problems appear moot because the results of the lambda functions depending on those variables are all queried and used only within the same iteration of the loop that defined them. Also, with the I'd say we're good to go. |
alanking
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your assessment. The variable used in the closure is defined on each iteration and the closure is passed to another method to be executed immediately (that is, not stored). Contrasting with the problematic example in the Pylint documentation here: https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/cell-var-from-loop.html
I think we are good to squash.
|
Sounds good to me. Squash to taste. |
Wherein we close down threads in an orderly way, so that things don't leave things to be disposed in the wrong order for the ever persnickety SSL shutdown logic.
Experiments show that SIGTERM actually does induce the Python interpreter to shut down non-daemonic threads, so installing a signal handler for that may not be necessary in the end.