This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pdgoins-work
Recipients neologix, paul.moore, pdgoins-work, pitrou, steve.dower, tim.golden, tim.peters, tupl, vstinner, zach.ware
Date 2018-04-26.19:04:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524769480.25.0.682650639539.issue21822@psf.upfronthosting.co.za>
In-reply-to
Content
Not sure if I'll do the full fix (need to check w/ my employer), but I'm doing some investigation.  Here's what I know so far:

At the Python level, the KeyboardInterrupt is being raised within _wait_for_tstate_lock, on "elif lock.acquire(block, timeout)".

Going into the C code, it looks like this goes through lock_PyThread_acquire_lock -> acquire_timed -> PyThread_acquire_lock_timed.  acquire_timed .  lock_PyThread_acquire_lock will abort the lock if it receives PY_LOCK_INTR from acquire_timed.

My best guess right now is that PyThread_acquire_lock_timed never returns PY_LOCK_INTR.  Indeed, I see this comment at the top of the NT version of that function:

    /* Fow now, intr_flag does nothing on Windows, and lock acquires are
     * uninterruptible.  */

And indeed, the thread_pthread.h implementations both have a path for returning PY_LOCK_INTR, while the thread_nt.h version does not.

...And that's where I am thus far.
History
Date User Action Args
2018-04-26 19:04:40pdgoins-worksetrecipients: + pdgoins-work, tim.peters, paul.moore, pitrou, vstinner, tim.golden, neologix, zach.ware, steve.dower, tupl
2018-04-26 19:04:40pdgoins-worksetmessageid: <1524769480.25.0.682650639539.issue21822@psf.upfronthosting.co.za>
2018-04-26 19:04:40pdgoins-worklinkissue21822 messages
2018-04-26 19:04:40pdgoins-workcreate