[JIRA] (MDA-271) Refactor SimpleCommandLine to avoid JVM exit, correctly handle context lifetime

Ian Young (Jira) jira at shibboleth.atlassian.net
Tue Jan 31 06:31:04 UTC 2023


Ian Young ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae127cb03-43ed-473d-b6ba-592949cb4be8 ) *reopened* an issue

While this was a good cleanup, avoiding System.exit turns out to have a side-effect I hadn't anticipated, so this needs to be looked at again.

It turns out that in some configurations, there are thread pools being implicitly created with non-daemon threads. Although this is fine in the context of a web service style of MDA use, if you're calling the MDA as a CLI application it will never terminate.

Arguably, this is something we could document and therefore implicitly turn into "your configuration is incorrect", but that seems pretty harsh. It's probably worth using an explicit System.exit(0) in the CLI in the normal termination path to preserve the old behaviour.

It's probably also worth reviewing the classes involved in allocating these thread pools (I think PipelineDemultiplexerStage, SplitMergeStage, PipelineMergeStage are implicated) to see whether at least the executors they construct by default should use daemon threads, perhaps through a common singleton.

Metadata Aggregator ( https://shibboleth.atlassian.net/browse/MDA?atlOrigin=eyJpIjoiODg4MmU5OWVjNmQzNGJiMmJkYmMwNzhmYmMxZTFhMDIiLCJwIjoiaiJ9 ) / Improvement ( https://shibboleth.atlassian.net/browse/MDA-271?atlOrigin=eyJpIjoiODg4MmU5OWVjNmQzNGJiMmJkYmMwNzhmYmMxZTFhMDIiLCJwIjoiaiJ9 ) MDA-271 ( https://shibboleth.atlassian.net/browse/MDA-271?atlOrigin=eyJpIjoiODg4MmU5OWVjNmQzNGJiMmJkYmMwNzhmYmMxZTFhMDIiLCJwIjoiaiJ9 ) Refactor SimpleCommandLine to avoid JVM exit, correctly handle context lifetime ( https://shibboleth.atlassian.net/browse/MDA-271?atlOrigin=eyJpIjoiODg4MmU5OWVjNmQzNGJiMmJkYmMwNzhmYmMxZTFhMDIiLCJwIjoiaiJ9 )

Change By: Ian Young ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae127cb03-43ed-473d-b6ba-592949cb4be8 ) Resolution: Done Status: Resolved Reopened

( https://shibboleth.atlassian.net/browse/MDA-271#add-comment?atlOrigin=eyJpIjoiODg4MmU5OWVjNmQzNGJiMmJkYmMwNzhmYmMxZTFhMDIiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/MDA-271#add-comment?atlOrigin=eyJpIjoiODg4MmU5OWVjNmQzNGJiMmJkYmMwNzhmYmMxZTFhMDIiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100214- sha1:9509471 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20230131/435cd2be/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-cfab6224-b9dd-4c65-bff5-ee5d2e246484
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230131/435cd2be/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-bb55be55-1ee2-4436-9fc1-0c5b080138e8
Type: image/png
Size: 448 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230131/435cd2be/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-785a7a50-3b5a-4560-9944-a8407fa5181f
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230131/435cd2be/attachment-0005.png>


More information about the commits mailing list