boinc icon indicating copy to clipboard operation
boinc copied to clipboard

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

Open computezrmle opened this issue 8 months ago • 8 comments

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?

computezrmle avatar Mar 21 '25 08:03 computezrmle

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

AenBleidd avatar Mar 21 '25 09:03 AenBleidd

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.

lfield avatar Mar 21 '25 09:03 lfield

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 avatar Mar 21 '25 09:03 davidpanderson

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.

davidpanderson avatar Mar 21 '25 22:03 davidpanderson

@lfield, any updates on that?

AenBleidd avatar Mar 25 '25 10:03 AenBleidd

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

lfield avatar Mar 25 '25 14:03 lfield

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

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

davidpanderson avatar Mar 25 '25 20:03 davidpanderson

Will send a test case by email.

lfield avatar Mar 25 '25 22:03 lfield

@lfield, @davidpanderson, any update on this?

AenBleidd avatar Jul 07 '25 10:07 AenBleidd

I think this was fixed.

lfield avatar Jul 07 '25 10:07 lfield