Message373670
If it is reproducable in C this is likely a bug in macOS, and should be reported to them.
I get the same behaviour as you with the test script, even if I add calls to fhandle.flush and os.fsync to force the content to stable storage.
Interestingly enough I sometimes get other behaviour that shouldn't happen:
Traceback (most recent call last):
File "/Users/ronald/Downloads/concurrency-tests/test-conc-read.py", line 33, in <module>
fhandle.flush()
OSError: [Errno 22] Invalid argument
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "concurrency-tests/test-conc-read.py", line 34, in <module>
os.fsync(fhandle.fileno())
OSError: [Errno 22] Invalid argument
This is with the change I wrote about earlier:
except FileNotFoundError:
print(i, ">> DELETED <<")
# Recreate the file
time.sleep(0.001) # Wait a bit
with open(dest_fname, 'wb') as fhandle:
fhandle.write(b'CONTENT')
fhandle.flush()
os.fsync(fhandle.fileno())
This shouldn't happen, "fhandle" is open at this point and hence the low-level file descriptor should still be valid. |
|
Date |
User |
Action |
Args |
2020-07-15 07:15:50 | ronaldoussoren | set | recipients:
+ ronaldoussoren, ned.deily, Giovanni Pizzi |
2020-07-15 07:15:50 | ronaldoussoren | set | messageid: <1594797350.89.0.135976676058.issue41291@roundup.psfhosted.org> |
2020-07-15 07:15:50 | ronaldoussoren | link | issue41291 messages |
2020-07-15 07:15:50 | ronaldoussoren | create | |
|