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

'Fatal error: Allowed memory size ... exhausted' when opening the private messages inbox #6177

Open
computezrmle opened this issue Mar 21, 2025 · 8 comments

Comments

@computezrmle
Copy link
Contributor

When I open the private messages inbox https://lhcathome.cern.ch/lhcathome/pm.php?action=inbox the following error appears right above the messages table:
Fatal error: Allowed memory size of 1048576000 bytes exhausted (tried to allocate 803216184 bytes) in /boincdata/boinc/project/lhcathome/html/inc/text_transform.inc on line 151

Is this caused by BOINC in general or by a wrong configuration at the project's server?

@AenBleidd
Copy link
Member

@davidpanderson, @lfield, could you please take a look at this?

@lfield
Copy link
Contributor

lfield commented Mar 21, 2025

I think this is a code issue. line 151 is in a while(true) loop so will fail like this if it doesn't exit.

https://github.com/BOINC/boinc/blame/master/html/inc/text_transform.inc#L115

The code was from 8 months ago so being run on the dev project.

@davidpanderson
Copy link
Contributor

I'm looking at the code and can't immediately see an error.
It has something to do with processing [code] and [pre].

Can you look at your PMs in the database
select id, content from private_messages where userid=N;
(N is your user id)

For ones that have [code] and/or [pre],
you can look at them individually with

https://lhcathome.cern.ch/lhcathome/pm.php?action=read&id=N

where N is the message ID.
One of them must be causing the problem; send it to me

@davidpanderson
Copy link
Contributor

I created a branch dpa_bbcode5 with some debugging code
in html/inc/text_transform.inc

If you deploy this, it checks for that string getting too long and prints
an error message starting with REPLACE_PRE_CODE BUG
followed by the problem text.

Please try this and send me the problem text.

@AenBleidd
Copy link
Member

@lfield, any updates on that?

@lfield
Copy link
Contributor

lfield commented Mar 25, 2025

I have manged to reproduce the error. I think the error is due to the 9999 values.

https://github.com/BOINC/boinc/blame/master/html/inc/text_transform.inc#L122C34-L122C38

The message is 16967 characters long and starts to work when it gets close to 10000

@davidpanderson
Copy link
Contributor

I can't repro, even with > 10KB messages.

But in any case: please try the dpa_bbcode5 branch;
this removes any length constants.

@lfield
Copy link
Contributor

lfield commented Mar 25, 2025

Will send a test case by email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

4 participants