Files
kumomta/docs
Wez Furlong 0a831f60de mta-sts: reduce scope of cache lock
We've been troubleshooting a lockup on a system with a low core count.
What we found in a stack trace was that one of the threads was blocking
on the CACHE mutex in the sts logic.  That mutex is intended to be
short-duration in scope, managing the direct lookup or insertion
into the cache, and no more.

However, due to the the way that rust scopes the lifetime of the
MutexGuard that is acquired from the CACHE, we were holding it
across the async DNS operation that is used to validate that
a cached policy is still current.

This can result in a deadlock on a system with a sufficiently
low core count/high enough concurrent volume of traffic to sites
with MTA-STS enabled.

This commit resolves this by introducing a lookup function that
explicitly clones the cached policy without returning a MutexGuard.
2024-04-10 07:23:03 -07:00
..
2023-10-18 16:18:56 -06:00
2024-02-08 08:12:29 -07:00
2023-03-13 12:01:07 -07:00
2024-03-31 06:49:14 -07:00
2024-03-29 09:06:54 -07:00
2024-01-24 15:40:19 -05:00