You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2020/03/11 10:24:00 UTC
[jira] [Updated] (YARN-10191) FS-CS converter: call System.exit()
for every code path in main()
[ https://issues.apache.org/jira/browse/YARN-10191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Bacsko updated YARN-10191:
--------------------------------
Description:
Note that we don't call {{System.exit()}} on the happy path scenario in the converter:
{code:java}
public static void main(String[] args) {
try {
FSConfigToCSConfigArgumentHandler fsConfigConversionArgumentHandler =
new FSConfigToCSConfigArgumentHandler();
int exitCode =
fsConfigConversionArgumentHandler.parseAndConvert(args);
if (exitCode != 0) {
LOG.error(FATAL,
"Error while starting FS configuration conversion, " +
"see previous error messages for details!");
System.exit(exitCode);
}
} catch (Throwable t) {
LOG.error(FATAL,
"Error while starting FS configuration conversion!", t);
System.exit(-1);
}
}
{code}
This is a mistake. If there's any non-daemon thread hanging around which was started by either FS or CS, the tool will never terminate. We must call {{System.exit()}} in every occasion to make sure that it never blocks at the end.
was:
Note that we don't always call {{System.exit()}} on the happy path scenario in the converter:
{code:java}
public static void main(String[] args) {
try {
FSConfigToCSConfigArgumentHandler fsConfigConversionArgumentHandler =
new FSConfigToCSConfigArgumentHandler();
int exitCode =
fsConfigConversionArgumentHandler.parseAndConvert(args);
if (exitCode != 0) {
LOG.error(FATAL,
"Error while starting FS configuration conversion, " +
"see previous error messages for details!");
System.exit(exitCode);
}
} catch (Throwable t) {
LOG.error(FATAL,
"Error while starting FS configuration conversion!", t);
System.exit(-1);
}
}
{code}
This is a mistake. If there's any non-daemon thread hanging around which was started by either FS or CS, the tool will never terminate. We must call {{System.exit()}} in every occasion to make sure that it never blocks at the end.
> FS-CS converter: call System.exit() for every code path in main()
> -----------------------------------------------------------------
>
> Key: YARN-10191
> URL: https://issues.apache.org/jira/browse/YARN-10191
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Peter Bacsko
> Assignee: Peter Bacsko
> Priority: Blocker
>
> Note that we don't call {{System.exit()}} on the happy path scenario in the converter:
> {code:java}
> public static void main(String[] args) {
> try {
> FSConfigToCSConfigArgumentHandler fsConfigConversionArgumentHandler =
> new FSConfigToCSConfigArgumentHandler();
> int exitCode =
> fsConfigConversionArgumentHandler.parseAndConvert(args);
> if (exitCode != 0) {
> LOG.error(FATAL,
> "Error while starting FS configuration conversion, " +
> "see previous error messages for details!");
> System.exit(exitCode);
> }
> } catch (Throwable t) {
> LOG.error(FATAL,
> "Error while starting FS configuration conversion!", t);
> System.exit(-1);
> }
> }
> {code}
> This is a mistake. If there's any non-daemon thread hanging around which was started by either FS or CS, the tool will never terminate. We must call {{System.exit()}} in every occasion to make sure that it never blocks at the end.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org