bryancall opened a new pull request, #14128:
URL: https://github.com/apache/trafficserver/pull/14128

   With tunnel pre-warming on, `traffic_server` aborted at startup when an 
sni.yaml `forward_route` or `partial_blind_route` destination had a port 
`std::stoi` could not read: a `{inbound_local_port}` or `{proxy_protocol_port}` 
template, an empty port, or a number too large for an `int`. `parse_authority` 
passed the text after the colon to `std::stoi` without catching the exception 
it throws.
   
   It now catches it. That destination is left out of pre-warming with a 
Warning naming the sni.yaml entry, and the tunnel itself is unaffected. Every 
port `std::stoi` could read is handled exactly as before.
   
   A new Uranium test starts `traffic_server` with four such routes and one 
valid route. Without the fix it aborts; with it, each bad route logs the 
warning and only the valid route gets a pre-warm pool.
   
   Found from a Coverity Scan report of an uncaught exception.
   
   Tested with ASAN in the fedora:45 CI image: all 1418 unit tests and the 10 
Uranium tests for prewarm and tunnel. Without the fix the new test aborts with 
an unhandled std::invalid_argument from stoi. Ports such as 443x and 99999 
register the same pre-warm stats as on master.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to