[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 314de5326f8b687a3fa7b19ea8faaa449f59b8fe by Miss Islington (bot) in branch '3.9': bpo-44219: Mention GH-28250 is a deadlock bugfix (GH-28261) (GH-28275) https://github.com/python/cpython/commit/314de5326f8b687a3fa7b19ea8faaa449f59b8fe --

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 60ddf499e14cc7daba3804e5a3460e4224dacc5c by Miss Islington (bot) in branch '3.10': bpo-44219: Mention GH-28250 is a deadlock bugfix (GH-28261) (GH-28274) https://github.com/python/cpython/commit/60ddf499e14cc7daba3804e5a3460e4224dacc5c

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +26692 pull_request: https://github.com/python/cpython/pull/28274 ___ Python tracker ___

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +26693 pull_request: https://github.com/python/cpython/pull/28275 ___ Python tracker ___

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 296b7100705ef52aece3378b0ae42c33a58526e1 by Łukasz Langa in branch 'main': bpo-44219: Mention GH-28250 is a deadlock bugfix (GH-28261) https://github.com/python/cpython/commit/296b7100705ef52aece3378b0ae42c33a58526e1 --

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26681 pull_request: https://github.com/python/cpython/pull/28261 ___ Python tracker ___

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread STINNER Victor
STINNER Victor added the comment: > In my case, the file in question is implemented as a FUSE mount which is > served by the same process (different thread of course). Thus holding the GIL > at this point causes a rather interesting deadlock. Since the change fixes a deadlock, I agree to

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 23c46778d65870784cb6d4de30f43aac62d71e73 by Miss Islington (bot) in branch '3.10': bpo-44219: Release the GIL during isatty syscalls (GH-28250) (GH-28255) https://github.com/python/cpython/commit/23c46778d65870784cb6d4de30f43aac62d71e73

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread miss-islington
miss-islington added the comment: New changeset 5c65834d801d6b4313eef0684a30e12c22ccfedd by Miss Islington (bot) in branch '3.9': bpo-44219: Release the GIL during isatty syscalls (GH-28250) https://github.com/python/cpython/commit/5c65834d801d6b4313eef0684a30e12c22ccfedd --

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +26675 pull_request: https://github.com/python/cpython/pull/28256 ___ Python tracker ___

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +26674 pull_request: https://github.com/python/cpython/pull/28255 ___ Python tracker

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset 06148b1870fceb1a21738761b8e1ac3bf654319b by Vincent Michel in branch 'main': bpo-44219: Release the GIL during isatty syscalls (GH-28250) https://github.com/python/cpython/commit/06148b1870fceb1a21738761b8e1ac3bf654319b -- nosy:

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Vincent Michel
Vincent Michel added the comment: There are a couple of reasons why I did not make changes to the stdstream related functions. The first one is that a PR with many changes is less likely to get reviewed and merged than a PR with fewer changes. The second one is that it's hard for me to

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Matthias Urlichs
Matthias Urlichs added the comment: Please do. However, I do think that changing the stdstream related ioctl calls also is a good idea, if only for code regularity/completeness sake. (Besides, nothing prevents somebody from starting a FUSE file system and then redirecting stdout to it …)

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Vincent Michel
Change by Vincent Michel : -- pull_requests: +26671 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28250 ___ Python tracker ___

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-08 Thread Vincent Michel
Vincent Michel added the comment: Here's a possible patch that fixes the 3 unprotected calls to `isatty` mentioned above. It successfully passes the test suite. I can submit a PR with this patch if necessary. -- keywords: +patch Added file:

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-07 Thread Vincent Michel
Vincent Michel added the comment: My team ran into this issue while developing a fuse application too. In an effort to help this issue move forward, I tried to list all occurrences of the `isatty` C function in the cpython code base. I found 14 of them. 9 of them are directly related to

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-05-23 Thread Matthias Urlichs
New submission from Matthias Urlichs : Opening a file calls `isatty` which calls an ioctl with the GIL held. GDB: ``` #0 __GI___tcgetattr (fd=18, termios_p=termios_p@entry=0x7f618a5df920) at ../sysdeps/unix/sysv/linux/tcgetattr.c:38 #1 0x7f618bd1ca0c in __isatty (fd=) at