Skip to content
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

Update to recent upstream master #1

Merged
merged 276 commits into from
Dec 13, 2024
Merged

Conversation

apeters1971
Copy link

No description provided.

abh3 and others added 30 commits June 18, 2024 11:35
Given the throttle plugin is collecting timing statistics for I/O
anyway, have it begin to report these statistics out through the g-stream.
This allows the monitoring programs to determine the overall time spent
in the I/O subsystem.
Need to check if bit for noDread is enabled in dOpts for the check
to work correctly.

Signed-off-by: Guilherme Amadio <[email protected]>
Setting this on all paths causes directories to appear as files
when using oss.rsscmd option.

Signed-off-by: Guilherme Amadio <[email protected]>
In Alma 9.3 the default curl version is 7.76.1 and according to the documentation [1],
starting with 7.62.0 the default HTTP protocol used is HTTP 2 TLS. Since XRootD
supports only HTTP 1.1, this leads to the following error whenever a HTTP TPC
transfer is attempted:
"HTTP library failure: Stream error in the HTTP/2 framing layer"

This patch will force curl to use HTTP 1.1 without even attempting HTTP 2. This is
a workaround for the currently available curl version since normaly curl should
be able to gracefully downgrade from HTTP 2 to 1.1 by itself.

[1] https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html
The function InitTLS() can be called either from the constructor of
XrdCl::Tls(), or from XRootDTransport::InitProtocolReq(), while the
protocol initialization is happening. Since these calls can happen
concurrently, for example, when called as a socket callback during
the initial connection setup, there can be a crash if two threads
try to assign to the unique_ptr at the same time.

Fixes: #2220
Caused by .first in the second statement. Since we are touching these
lines, use map.emplace() to simplify the code as well.
Required due to GitHub Actions migration to node 20:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20

Note: CentOS 7 checkout fails with v4, so must use v1 (will be
removed at EOL later).
In some cases, a token may be mapped to a known user - but we only
want to utilize the mapping if there's scope-based authorization
in place.  This can now be controlled as part of the scitokens.cfg.
In the issuer section, one can add:

```
authorization_strategy = strategy1 strategy2 strategy3
```

Where possible strategies are `capability` (if authorized based on
scope, pass through the username mapping), `group` (if authorized
based on scope, pass through the group information), and `mapping`,
(always pass through the explicit mapping, even if there's no scope
present).
std::result_of is deprecated in C++17 and removed in C++20.
The comparison path[rule.second.size()] == '/' for ensuring path is
a subdirectory of the rule's path does not work for '/'. For example
if the rule's path is '/' and requested path is '/tmp', then the
comparison above checks path[rule.second.size()] == path[1] == '/',
but actually, path[1] == 't'.
amadio and others added 29 commits November 26, 2024 09:09
Between the call to stat and the open, the file size may change.
First open the file, then use fstat with the file descriptor to
ensure consistency.
First open then fstat, instead of stat then fopen, to guarantee that
the information from stat and open are consistent with each other.
Afterwards, convert file descriptor to FILE* with fdopen. Ensure also
that the file is closed should an error occur.
Make sure that the information is consistent by first opening and
subsequently using the same file descriptor for all operations.
Since we needed to add an include as well, make sure to include
our own headers first, then system headers.
The defaultID is created with defaultID = new XrdSecsssEnt(...); so
it cannot be deallocated with free(defaultID). Since the destructor
is private, we cannot call delete defaultID either. We must call the
specific function for this, which is defaultID->Delete(), which in
turn will call delete instead of free to deallocate the memory.
Using pointers in expressions that may cause overflow leads to
undefined behavior. See also https://lwn.net/Articles/278137/
The variable jkey is already checked to be non-null a few lines above.
In line 707, there is already an if(!ifList || !(*ifList)) which
makes the check in line 732 redundant.
The multiplication of int * int might be bigger than an int can hold,
but still fits in a size_t. Convert before multiplying to ensure no
overflow.
The multiplication is numq * xfrovhd, which if carried with ints
can overflow before being converted to unsigned long long. Convert
one of the operands to unsigned long long to avoid this.
From the man page for snprintf:

The functions snprintf() and vsnprintf() do not write more than size
bytes (including the terminating null byte ('\0')). If the output was
truncated due to this limit, then the return value is the number of
characters (excluding the terminating null byte) *which would have been
written to the final string if enough space had been available*. Thus,
a return value of size or more means that the output was truncated.

We therefore need to check if n > buffer size, and act accordingly.
The action to upload-artifact@v3 no longer works due to its
reliance on node16, which has just hit EOL and been removed.
Since upload-artifact@v4 also doesn't work on CentOS 7, the
only option to keep builds running is to not upload results.

https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
When moving to actions/checkout@v4, v1 was kept on Alpine Linux
by mistake. The previous commit moved CentOS 7 properly to v1,
and this commit fixes the problem in the Alpine Linux build.

Fixes: 9096834
This reverts commit 50209b3.
The fix is incorrect, as struct XrdSecsssRR_Data actually derives
from XrdSecsssRR_DataHdr, which introduces some members in between
such that prData.Data is not actually at the beginning of the struct,
but at some non-zero offset (i.e. different address than &prData).
This was an oversight when adding the option in commit below.

Fixes: a5cfef7
If a test causes a server to crash, a pid file with the pid of
the crashed server will be left behind. The teardown phase would
then fail due to a non-zero return of the ps command when assigning
the pid to $PID. This changes the test to skip killing a process
that has already exited without failing.
@apeters1971 apeters1971 merged commit 29d83d3 into cern-eos:master Dec 13, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.