Skip to content

Conversation

@smithdh
Copy link
Contributor

@smithdh smithdh commented Oct 29, 2024

This is needed in order to allow a planned change in the way substreams are assigned to network pollers.

bbockelm and others added 23 commits September 3, 2024 16:37
Map various connection-related errors in XrdCl in XCache all the
way through to the HTTP layer.

This allows a failure to connect to the origin to be represented
with the correct status code ("Bad Gateway"); currently, a down
origin results in a 500 ("Internal Server Error") which is misleading
for users.
Seen on hppa Linux where EBADE is 160.

In function ‘int {anonymous}::initErrTable()’,
    inlined from ‘void __static_initialization_and_destruction_0()’ at /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:92:28,
    inlined from ‘(static initializers for /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc)’ at /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:128:1:
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:70:26: warning: array subscript 160 is above array bounds of ‘const char* [144]’ [-Warray-bounds=]
   70 |    if (Errno2String[EBADE]) {
      |        ~~~~~~~~~~~~~~~~~~^
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc: In function ‘(static initializers for /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc)’:
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:48:28: note: while referencing ‘{anonymous}::Errno2String’
   48 |        const char*         Errno2String[errSlots] = {0};
      |                            ^~~~~~~~~~~~
In function ‘int {anonymous}::initErrTable()’,
    inlined from ‘void __static_initialization_and_destruction_0()’ at /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:92:28,
    inlined from ‘(static initializers for /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc)’ at /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:128:1:
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:74:22: warning: array subscript 160 is above array bounds of ‘const char* [144]’ [-Warray-bounds=]
   74 |    Errno2String[EBADE] = "authentication failed - possible invalid exchange";
      |    ~~~~~~~~~~~~~~~~~~^
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc: In function ‘(static initializers for /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc)’:
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:48:28: note: while referencing ‘{anonymous}::Errno2String’
   48 |        const char*         Errno2String[errSlots] = {0};
      |                            ^~~~~~~~~~~~
The XrdSutCacheArg_t type is used to pass arguments of different
types. The type used must be wide enough to fit the widest of the
types passed. One of the types passed is time_t, which can be 64 bits
wide also on 32-bit systems. So a long, which is 32 bits wide on a
32-bit system is not sufficient.

This commit changes the type to long long.

Fixes: xrootd#2272
Calling openssl rand with 0 as the argument is an error:

$ openssl rand -base64 0
rand: Use -help for summary.
$ echo $?
1
The files generated by doxygen whose file names contain the string
unnamedN where N is a number are not generated using predictable
names.

This happens when running doxygen using multiple threads.

Set NUM_PROC_THREADS=1 to work around this issue.

See: doxygen/doxygen#11138
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.
In the new SciTag specification, the content of the emitted firefly
should always be created from the data sender point of view.
For HTTP PUT: the srcIp is the client, dstIP is the server,
sentBytes=socketReceivedBytes (~=fileSize),
receivedBytes=socketSentBytes (~=0)
For HTTP GET: the srcIP is the server, dstIP is the client,
sentBytes=socketSentBytes(~=fileSize)
receivedBytes=socketReceivedBytes(~=0)

The distinction is therefore done via the pmark.appname CGI that is
equal to "http-get" if the client request is a GET request or equal to
"http-put" if not.
@amadio
Copy link
Member

amadio commented Oct 30, 2024

Ah, sorry @smithdh, I meant to update with rebase... Could you please just force-push what you have locally again to your fork? Thanks! If you rebase on current devel and force push, that should fix the Alpine build. Cheers,

@amadio
Copy link
Member

amadio commented Oct 30, 2024

@smithdh This triggers some Clang warnings, could you please fix? Thanks! https://my.cdash.org/viewBuildError.php?type=1&buildid=2708695

This is needed in order to allow a planned change in the way substreams
are assigned to network pollers.
@smithdh smithdh force-pushed the xrdcl_onmessagesent_incoming_race branch from 49934c2 to 7841c40 Compare October 30, 2024 16:10
@smithdh
Copy link
Contributor Author

smithdh commented Oct 30, 2024

thanks, I force-pushed with rebase & fix for the "override" warnings.

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.

6 participants