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

Serialization of 'Closure' is not allowed #11226

Open
JohntheFish opened this issue Feb 16, 2023 · 7 comments
Open

Serialization of 'Closure' is not allowed #11226

JohntheFish opened this issue Feb 16, 2023 · 7 comments

Comments

@JohntheFish
Copy link
Contributor

JohntheFish commented Feb 16, 2023

Affected Version of Concrete CMS

8.5.x

Description

In an 8.5.12 site, Php error log is showing occasional bursts of

PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in [no active file]:0
Stack trace:
#0 [internal function]: session_write_close()
#1 {main}
  thrown in [no active file] on line 0

How to reproduce

I wish I knew...

Additional Context

This may coincide with busy times. So could be load related. Or it could be that random events are more likely when the site is busy.

@JohntheFish JohntheFish added the Type:Bug Existing functionality not performing as expected. label Feb 16, 2023
@aembler
Copy link
Member

aembler commented Feb 16, 2023

Without additional context I'm not sure how we could begin to solve and/or close this issue.

@JohntheFish
Copy link
Contributor Author

JohntheFish commented Feb 16, 2023

Agreed. I have been reading code hoping to find an object serialized into a session that contains a lambda fn. No luck so far.
Unfortunately the above is all the trace I have.

@JohntheFish
Copy link
Contributor Author

In the forums @mnakalay has pointed out a similarity to #8791 and #8824

My problem site is multilingual.

Unfortunately the site owner does not want the full whoops report enabled. With that in mind see #11229

@mnakalay
Copy link
Contributor

@JohntheFish any chance you might find a correlation between the time of these errors and emails being sent or cron jobs running?

@mnakalay
Copy link
Contributor

#8791 pointed out by @mlocati is the same error I pointed out in the forum, but in a different context, a SiteTree entity being serialized.

@JohntheFish
Copy link
Contributor Author

That is the line of investigation I am currently following. With the previous issues you noted in mind I am also asking site editors about updating language trees and scanning for translations. Session is the top suspect because the php log notes session_write_close(), with cache as a runner up suspect.

@mnakalay
Copy link
Contributor

I supposed you already noticed but the siteTree only gets a value in the Page object if getSiteTreeObject() is called.

That method can be called directly but is also called by the public getSite() method.

So maybe, look for block templates, especially those overriding the block's controller and using any of these 2 methods on a Page object?

And since Doctrine proxies are full of Closures maybe regenerate your DB entities?

That's all I can think of at the moment...

@aembler aembler removed the Type:Bug Existing functionality not performing as expected. label Feb 24, 2023
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