divyekapoor opened a new pull request #2411:
URL: https://github.com/apache/thrift/pull/2411
Details of the deadlock are in the ticket.
This PR addresses the deadlock by limiting the scope of the locks
acquired in FieldMetaData.java to only protect calls to the structMap
hashtable. No locks should be held when the call to sClass.newInstance()
is in progress.
Tested: Regular CI builds should pass.
<!-- Explain the changes in the pull request below: -->
The synchronized locks for the Java SE and Java ME versions are scoped to
just the behavior needed to be locked.
<!-- We recommend you review the checklist/tips before submitting a pull
request. -->
- [yes] Did you create an [Apache
Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? (not
required for trivial changes)
- [yes] If a ticket exists: Does your pull request title follow the pattern
"THRIFT-NNNN: describe my issue"?
- [yes] Did you squash your changes to a single commit? (not required, but
preferred)
- [yes] Did you do your best to avoid breaking changes? If one was needed,
did you label the Jira ticket with "Breaking-Change"?
- [change involves code] If your change does not involve any code, include
`[skip ci]` anywhere in the commit message to free up build resources.
<!--
The Contributing Guide at:
https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
has more details and tips for committing properly.
-->
--
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:
[email protected]