You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2021/08/06 17:33:00 UTC

[jira] [Closed] (DAFFODIL-1879) Compilation related data structures cannot be garbage collected due to RuntimeData strong references

     [ https://issues.apache.org/jira/browse/DAFFODIL-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Thompson closed DAFFODIL-1879.
-----------------------------------

Verified the specified commit (commit eb603e7f4a342e1a63d1e07f59c714cf531724bc) is included in the latest pull from the daffodil repository.

Verified changes identified in commit comment were implemented.

Verified the all daffodil subproject sbt test suites execute successfully including the modified and added tests.

Verified the nightly test schemas compile and save successfully with the exception of the ATO and JSON schemas. These issues will be addressed in new JIRA tickets DAFFODIL-2551 and DAFFODIL-2552.

Verified the nightly test suite executes successfully with the exception of ATO and JSON tests.

> Compilation related data structures cannot be garbage collected due to RuntimeData strong references
> ----------------------------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-1879
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1879
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, Front End
>            Reporter: Steve Lawrence
>            Assignee: Mike Beckerle
>            Priority: Major
>             Fix For: 3.2.0
>
>
> All the *RuntimeData and DPathCompileInfo constructors accept pass-by-name parameters. Some of the arguments passed into these constructors reference objects that are only needed for schema compilation (e.g. dsom, grammar, etc.). Because they are pass by name, these objects are strong reference and thus cannot be garbage collected, leading to the entire compilation state being store in memory.
> Fortunately, those parameters are marked as transient and so when serialized and deserialized they are effectively garbage collected. But if one does not save/reload a schema, lots of wasted memory used during schema compilation will stick around. Pass-by-name parameters cannot be vars, so the simple thing of making them vars and then setting to null does not work. These objects should be restructured to allow them to be garbage collected once compiled.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)