-
Notifications
You must be signed in to change notification settings - Fork 48
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
[java] "bad file descriptor" is thrown for simple RandomAccessFile.write/seek(0)/read sequence over CharybdeFS partition #13
Labels
Comments
cheremin
changed the title
[java] RandomAccessFile.write/seek(0)/read throws "bad descriptor" over CharybdeFS partition
[java] "bad file descriptor" is thrown for simple RandomAccessFile.write/seek(0)/read sequence over CharybdeFS partition
Nov 10, 2018
confirming this in Python 2.7:
|
More precise code to reproduce the issue:
First run (fails with bad file descriptor)
Second run (same code, but when the file already exists)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using CharybdeFS to test java applications, and one simple test shows strange behavior.
Steps:
mounted
folder with Charybde to, say,data
folder. (Both folders must be empty)mounted
partition run following java code:(readValue == writtenValue)
, and indeed, I've got them equal while running test over "normal" FS folderIOException("bad file descriptor")
inside.readLong()
method callBTW, java code essentially does just this:
mounted/test
So far I was able to reproduce it with java only. (Unfortunately I use python only occasionally, so don't sure how to translate java.io.RandomAccessFile)
Few notes on reproduction:
test
file must be new one. If there ismounted/test
already exist in charybde folder -- no exception is thrown.I've tried to run the app under
strace
, and here is relevant sequence of syscalls:I omit everything before/after, but nothing in between: here are all syscalls between file open and error.
The text was updated successfully, but these errors were encountered: