[ https://issues.apache.org/jira/browse/BEAM-9399?focusedWorklogId=410776&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-410776 ]
ASF GitHub Bot logged work on BEAM-9399: ---------------------------------------- Author: ASF GitHub Bot Created on: 27/Mar/20 02:24 Start Date: 27/Mar/20 02:24 Worklog Time Spent: 10m Work Description: aaltay commented on issue #11096: [BEAM-9399] Change the redirection of System.err to be a custom PrintStream URL: https://github.com/apache/beam/pull/11096#issuecomment-604781282 retest this please ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 410776) Time Spent: 3h 20m (was: 3h 10m) > Possible deadlock between DataflowWorkerLoggingHandler and overridden > System.err PrintStream > -------------------------------------------------------------------------------------------- > > Key: BEAM-9399 > URL: https://issues.apache.org/jira/browse/BEAM-9399 > Project: Beam > Issue Type: Bug > Components: runner-dataflow > Reporter: Sam Whittle > Assignee: Sam Whittle > Priority: Minor > Time Spent: 3h 20m > Remaining Estimate: 0h > > When an exception is encountered in DataflowWorkerLoggingHandler the > ErrorManager is used to log the exception. ErrorManager uses System.err > which is overridden to be a PrintStream that writes back into > DataflowWorkerLoggingHandler. > This has the lock ordering DataflowWorkerLoggingHandler -> PrintStream. > Other logging of System.err has the inverse lock ordering > PrintStream->DataflowWorkerLoggingHandler so there is potential for deadlock. > This is one known cause of the inversion, but any other System.err logs from > inside DataflowWorkerLoggingHandler could cause the same issue. > Proposed fix is to address low-hanging fruit of having ErrorManager output to > the original System.err. A full fix would be to improve our override of > System.err to a PrintStream that can detect the locking inversion or possibly > we could use the PrintStream mutex in both cases. -- This message was sent by Atlassian Jira (v8.3.4#803005)