Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible memory leak with skin scripts? #17

Open
djay opened this issue Feb 6, 2024 · 6 comments
Open

Possible memory leak with skin scripts? #17

djay opened this issue Feb 6, 2024 · 6 comments

Comments

@djay
Copy link

djay commented Feb 6, 2024

BUG/PROBLEM REPORT / FEATURE REQUEST

What I did:

I've been trying to track down a memory leak with too many PortletRenders being kept in memory.
They seem to link back to z3c.jbot.patches.registry.
This seems to keep a acquisition wrapped references to the script but for all different weird combinations of the paths that can access that script. The wrapping contains a request. The request contains memoization which contains a lot of stuff including portlet renders.

image

{   (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at /Plone/portal_catalog/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at /Plone/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/cmfeditions_views/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/cmfeditions_views/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_scripts/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at /Plone/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at plone_scripts/queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at queryCatalog>): <FSPythonScript at queryCatalog>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <FSPythonScript at getFolderContents>): <FSPythonScript at getFolderContents>,
    (<zope.interface.Provides object at 0x7fe15962d6d0>, <zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at 0x7fe166127910>): <zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at 0x7fe159a18810>,
    ...
    (<zope.interface.Provides object at 0x7fe160236910>, <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7fe1840ebc50>): <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7fe159765650>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_templates/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at /Plone/news/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/cmfeditions_views/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at /Plone/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at /Plone/news/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at /Plone/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_scripts/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_scripts/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_templates/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_templates/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at /Plone/events/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/cmfeditions_views/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_templates/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/cmfeditions_views/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_scripts/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at /Plone/events/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at /Plone/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at /Plone/events/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at /Plone/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at /Plone/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/cmfeditions_views/standard_error_message>): <FSPythonScript at standard_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/cmfeditions_views/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/cmfeditions_views/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/externalEditorEnabled>): <FSPythonScript at externalEditorEnabled>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPythonScript at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/translate>): <FSPythonScript at translate>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/index_html>): <FSPageTemplate at index_html>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <FSPageTemplate at plone_login/plone_content/plone_images/plone_scripts/plone_form_scripts/plone_templates/plone_prefs/plone_wysiwyg/plone_ecmascript/PasswordReset/mimetypes_icons/CMFEditions/cmfeditions_views/default_error_message>): <FSPageTemplate at default_error_message>,
    (<zope.interface.Provides object at 0x7fe16044ab90>, <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7fe1630c9290>): <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7fe16a472b10>,
    ...
    (<InterfaceClass zope.interface.Interface>, <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7fe16b3f8590>): <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7fe163b22050>}

What I expect to happen:

I'm not sure I understand how jbot is supposed to work with skins but I would have thought it doesn't need to keep the wrapping or the request or even all teh different ways its was accessed.

What actually happened:

What version of Python and Zope/Addons I am using:

this was on plone 5.0 with 0.7.2 z3c.jbot but I increased to 1.1.1 and it still happened.

@djay
Copy link
Author

djay commented Feb 6, 2024

any thoughts on this @jensens ?

@davisagli
Copy link
Member

davisagli commented Feb 7, 2024

@djay It doesn't look to me like the registry is storing an acquisition-wrapped object (

inst = registry[key] = cls.__new__(cls)
) but maybe something that's acquisition wrapped is copied in the next line?

Maybe an IPubEnd handler to delete request.__annotations__ would help

@djay
Copy link
Author

djay commented Feb 7, 2024

@davisagli its the key thats the problem not the value. You can see from the 2 tuple in the objgraph chain. I'm not sure of the implications but as far as I can I understand you don't need the full object for the key?
So I put in an first hack in #18.

Does it really matter the request aquisition path however?
I'm not sure there is even tests for skin script overrides :(

Maybe an IPubEnd handler to delete request.annotations would help

yes also maybe a good idea. Although a request with attached response is not great to hang onto regardless. which package would deleting anotations go? memoize?

@davisagli
Copy link
Member

@djay I don't think the acquisition wrapper matters, since the function re-wraps the cached inst before returning it. But you'll have to try it yourself and see what happens, since the package isn't well tested.

@djay
Copy link
Author

djay commented Feb 7, 2024

@davisagli the key has the original wrapped object in it unchanged.

Maybe an IPubEnd handler to delete request.annotations would help

Another way to solve that might be to use a weakref for annotations so it would get naturually be cleaned up. or at least for memoize. since its a cache anyway.

@d-maurer
Copy link

d-maurer commented Feb 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants