-
Notifications
You must be signed in to change notification settings - Fork 39
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
Configuration.executorService is not respected by TLValidationJob #105
Comments
The ExecutorService configurable via Configuration#setThreadExecutor(ExecutorService) is meant for signature validation only. It wouldn't be advisable to use the same ExecutorService for both signature validation and TSL loading, because TSL loading can be triggered by signature validation (if TSL has expired and needs a refresh), blocking the signature validation process until TSL has been updated. If then the ExecutorService's thread pool has already been saturated, having each of its thread blocked and waiting for TSL to get updated, then this will result in a deadlock. We are looking into possibilities to make ExecutorService separately configurable for each of these use-cases in the future. |
Please at least provide thread factories for all executors and give the threads proper names, so that it would be clear where the threads come from. As a side note, calling tsl.refresh() blocks the calling thread, even if the actual refresh happens in another thread. |
The blocking happens in the underlying DSS library level, so in order to add a fire-and-forget implementation of Generally, blocking is preferrable for TSL updates, because in case the TSL has expired, a TSL refresh could be triggered by any signature creation or validation event that accesses the TSL. So, the event that triggered the update (as well as any other signature creation or validation events that are running in parallel and use the same TSL) must block until the internal state of TSL has been properly updated and synchronized. |
Questions:
E.g. we got that this morning, restart of the server fixed the issue :-(
The logs preceding the OCSP error (note that the signature was provided by the PROD Smart-ID service, so the cert is definitely valid):
The main difference with working flow after the restart is this line:
Which probably means that SK-issued certificate is "untrusted" Even before that we found the following in the logs:
Update: we submitted a separate CRITICAL issue about the TSL loading failure: #109 |
It creates its own ExecutorService and threads, but it should use the one provided by Configuration class.
The text was updated successfully, but these errors were encountered: