-
Notifications
You must be signed in to change notification settings - Fork 204
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
fork08 is failing with upgraded LTP suite #254
Comments
This case is interesting. It is currently not supported in Gramine. Some analysis follows. Correct Linux behaviorThis Basically, the parent opens a See also this explanation: https://stackoverflow.com/questions/36022953/if-a-parent-opens-a-file-then-forks-a-child-does-the-child-have-access-to-the. Also the man page for
Incorrect Gramine behaviorGramine creates two Gramine processes: one parent and one child. Each of them has its own copy of file metadata, including the file offset. In other words, Gramine currently does not share the file offset. So the Gramine-parent doesn't notice that the Gramine-child changed the file offset. Thus, @pwmarcz You were planning to implement the sharing of file metadata, right? |
We currently do not sychronize file offsets, and this is generally a hard problem to do practically (I prototyped a "sync engine", and it turned out to be way too complicated). So, probably not coming anytime soon. |
Description of the problem
The fork08 testcase checks that the parent's file descriptors will not be affected by being closed in the child.
Steps to reproduce
Since the issues are seen with the LTP upgraded tests and something that we are still migrating to the local CI, follow the below steps to checkout and run the latest LTP test in your local workspace.
Checkout Gramine with commit ID
e0105d39fe6f3d36d6ba4c46377435f6d4f650b7
which is[Docs] Fix documentation for fs.root
, as the local CI is not yet updated withgramine-test
for LTP suite.Checkout the local CI repo present here
https://github.com/jinengandhi-intel/graphene_local_ci/tree/ltp_upgrade
Expected results
TPASS: read the end of file correctly
Actual results
The trace log is attached below.
fork08_ltp_upgrade_log.txt
The text was updated successfully, but these errors were encountered: