forked from xrootd/xrootd
-
Notifications
You must be signed in to change notification settings - Fork 0
Merge pull request #34 from stfc/v5.8.2patched #35
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
Open
Jo-stfc
wants to merge
129
commits into
otf-chk-v2
Choose a base branch
from
xrdceph-otf-checksums
base: otf-chk-v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
V5.8.2patched
The access mode values for files are not the same for all platforms. The detection of a read only request here assumes that O_RDONLY is 0, which is not mandated by the POSIX standaed. Linux: #define O_ACCMODE 00000003 #define O_RDONLY 00000000 #define O_WRONLY 00000001 #define O_RDWR 00000002 But this is also allowed: #define O_RDONLY 0x0001 /* Open read-only. */ #define O_WRONLY 0x0002 /* Open write-only. */ #define O_RDWR (O_RDONLY|O_WRONLY) /* Open for reading and writing. */ #define O_ACCMODE O_RDWR /* Mask for file access modes. */ And on systems using this option the detection of a read only request as implemented here is is broken and the cache test fails. This commit fixes the detection so that it is done in the intended way that works everywhere.
The test binaries are in ${CMAKE_BINARY_DIR}/bin which is already in PATH.
"man 2 open" says:
The argument flags must include one of the following access modes:
O_RDONLY, O_WRONLY, or O_RDWR.
So O_APPEND on its own is not allowed.
The change here is based on "man fdopen":
┌──────────────┬───────────────────────────────┐
│ fopen() mode │ open() flags │
├──────────────┼───────────────────────────────┤
│ r │ O_RDONLY │
├──────────────┼───────────────────────────────┤
│ w │ O_WRONLY | O_CREAT | O_TRUNC │
├──────────────┼───────────────────────────────┤
│ a │ O_WRONLY | O_CREAT | O_APPEND │
├──────────────┼───────────────────────────────┤
│ r+ │ O_RDWR │
├──────────────┼───────────────────────────────┤
│ w+ │ O_RDWR | O_CREAT | O_TRUNC │
├──────────────┼───────────────────────────────┤
│ a+ │ O_RDWR | O_CREAT | O_APPEND │
└──────────────┴───────────────────────────────┘
…as already been scanned during the initial namspace scan (thanks to bbockelm for tracing it down).
When using `X-Transfer-Status`, there were three subtle HTTP protocol errors: - The trailer contained a `\n` which is not a permitted character. This caused clients to view the last CRLF as leftover data on an idle TCP channel. - A trailer was sent but no `Trailer` header was sent in the response. - When the server said that the connection would be kept alive but an error occurred, it closed the TCP connection unexpectedly on the client. The server now keeps the TCP connection open if keepalive is enabled, provided the HTTP response was sent cleanly.
This unit test (including an XrdOss wrapper to inject failures) tests the behavior of the HTTP server when a read error occurs. The server should either abruptly close the TCP connection or, if Trailers are enabled, send an error message and keep the connection alive.
Fixes lost response when an error occurs before the resend of a requeued request. e.g. a requeued message can happen when the client has been redirected or told to wait and resend a request later by kxr_wait. An error before resend could be that the stream connect is lost or the request times-out before resend.
This makes the code more readable and clears up potential thread safety issues since correctness is undefined/unclear when some variable access is racy but other isn't. Additionally, since the order doesn't need to be sequentially consistent, this removes any fencing instructions or memory barriers on x86.
There's no concurrency control to prevent a parallel Redrive from executing while the object it is operating on is being destroyed. If this line of code can be reached then it can potentially cause corruption. Hopefully, by loudly logging, we can observe if it happens in practice.
Signed-off-by: Rahul Chauhan <rahul.chauhan@cern.ch>
Add permission denied error code for destination Signed-off-by: Rahul Chauhan <rahul.chauhan@cern.ch>
The HTTP status text is not stored in the varible but mapped from the status code in XrdHttpProtocol::StartSimpleResp. This varible stores the detailed error message to be sent to the user beyond the information provided by the http error codes.
This fixes xrdcp --recursive dir1/ root://server//dir/subdir, when subdir/ does not exist at the remote end. However, due to how the code currently handles directories by scanning them and creating a list of files to copy, having similar behavior to plain cp (i.e. having the contents of dir1/ appear in root://server//dir/subdir instead of in root://server//dir/subdir/dir1/) is not easy to achieve without causing a change in behavior also when copying a mix of files and directories into the same destination. For now, to achieve this, the alternative is to run the copy as xrdcp --recursive dir1/* root://server//dir/subdir, which then puts the contents of dir1/ directly into subdir/ at the destination. Fixes: xrootd#2501
As soon as the block is freed, it may cause the file to be marked as "inactive" (and thus eligible for deletion). If a file sync is desired, then we must delay decreasing the block's reference count until after the sync is scheduled to ensure it is still alive when the sync scheduling increases the reference count on the file. This change eliminates a use-after-free segfault observed on my local stress test which would trigger about 50% of the time (10 clients reading unique 3-byte files in a caching setup would crash after 20-30 seconds).
Move operations from a manager should succed after redirection
- Add tests for rename operation with HTTP
- MOVE operation is currently fails
after redirection
- Thus the tests assert against http code 401;
a fix would change it to 201 instead
- For redirection from meta-manager; move failes
for a manager node
…peration; this allows rename after redirections
uint16_t to time_t. Since time_t can be 64 bits the Python bindings need to use unsigned long long.
We test for overflow, but now timeouts use time_t, which may be 64 bits wide, so use 2^65 to force an overflow in that case too.
Reverts commit eb4295e as the hack introduced there is no longer needed after the current fix. Fixes: xrootd#2357
This adds support to get/put void* values in the client environment. Since pointers are only defined during runtime, no support for shell import is provided for pointers. Issue: xrootd#2522
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
V5.8.2patched