[ 
https://issues.apache.org/jira/browse/YARN-9129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16723430#comment-16723430
 ] 

Eric Yang commented on YARN-9129:
---------------------------------

[~billie.rinaldi] Patch 001 includes the free pointer fixes, and flush message 
fixes.  Jason is correct that fflush on stderr is unnecessary, but the patch 
does have fflush them.

This patch also includes the fix for CLI version of container shell to display 
error message reported from server side.  It was not working because the CLI 
version of container shell will attempt to disable stty echo for the terminal 
to work in batch mode.  Server side and client side both are writing messages 
without reading.  This cause the server message to be hidden.  The fix is to 
ensure the server side message will be read by client first before client try 
to disable stty echo.

In my local valgrind test, I am unable to reproduce leak in 
test_add_ports_mapping_to_command.

> Ensure flush after printing to stderr plus additional cleanup
> -------------------------------------------------------------
>
>                 Key: YARN-9129
>                 URL: https://issues.apache.org/jira/browse/YARN-9129
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Billie Rinaldi
>            Assignee: Eric Yang
>            Priority: Major
>             Fix For: 3.3.0
>
>         Attachments: YARN-9129.001.patch
>
>
> Following up on findings in YARN-8962, I noticed the following issues in 
> container-executor and main.c:
> - There seem to be some vars that are not cleaned up in container_executor:
> In run_docker else: free docker_binary
> In exec_container:
>   before return INVALID_COMMAND_FILE: free docker_binary
>   3x return DOCKER_EXEC_FAILED: set exit code and goto cleanup instead
>   cleanup needed before exit calls?
> - In YARN-8777 we added several fprintf(stderr calls, but the convention in 
> container-executor.c appears to be fprintf(ERRORFILE followed by 
> fflush(ERRORFILE).
> - There are leaks in TestDockerUtil_test_add_ports_mapping_to_command_Test.
> - There are additional places where flush is not performed after writing to 
> stderr, including main.c display_feature_disabled_message. This can result in 
> the client not receiving the error message if the connection is closed too 
> quickly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to