hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Fatal error: unexpected N4HPHP13DataBlockFullE

Open MarkGavalda opened this issue 12 years ago • 13 comments

Latest nightly isn't segfaulting (as it used to) anymore but becomes non-working until it's restarted. I have tried all kinds of variations of these parameters, currently using the following in server.ini:

hhvm.jit_a_size = 201326592
hhvm.jit_astubs_size = 201326592
hhvm.jit_global_data_size = 201326592
hhvm.jit_acold_size = 201326592
hhvm.jit_afrozen_size = 201326592

No matter what I do, it keeps running into this same issue for us. We're hosting WordPress based sites only!

Same happens on all kinds of machines, with 2GB RAM to 32GB.

Please let me know what else do I need to post to get this resolved I'll be happy to test and debug and whatnot. :)

\nFatal error: unexpected N4HPHP13DataBlockFullE: Attempted to emit 1 byte(s) into a 62914560 byte DataBlock with 18446744073709551607 bytes available. This almost certainly means the TC is full. If this is the case, increasing Eval.JitASize, Eval.JitAColdSize, Eval.JitAFrozenSize and Eval.JitGlobalDataSize in the configuration file when running this script or application should fix this problem.

MarkGavalda avatar Jun 06 '14 12:06 MarkGavalda

It should be hhvm.jit_asize per https://github.com/facebook/hhvm/wiki/INI%20Settings.

I don't know if that is your issue though.

ptarjan avatar Jun 06 '14 15:06 ptarjan

Dupe of #2851

fredemmott avatar Jun 09 '14 16:06 fredemmott

Question: is there no way to limit this TC filling, or can something be flushed/purged to prevent it from filling up? It either hangs or crashes.. and periodicaly restarting it to prevent this sounds lame.

frijsdijk avatar Feb 09 '15 09:02 frijsdijk

@frijsdijk it's my understanding that there is no way to flush or purge the translation cache short of restarting the server like you described. I believe it is this way because, if you run in Repo Authoritative mode as Facebook does, you need to restart your server on code deploy anyways.

jazzdan avatar Feb 09 '15 12:02 jazzdan

There was some earlier discussion about this here.

danslo avatar Feb 09 '15 13:02 danslo

It's something we are actively working, it's definitely become a major pain-point.

paulbiss avatar Feb 09 '15 19:02 paulbiss

I really hope the issue will be resolved soon. I have the same problem on a production site. Everytime HHVM goes down because of this.

thedevly avatar Feb 11 '15 20:02 thedevly

@doringheorghe: It's currently my highest priority, but it may be awhile before we have something that's production ready for this.

paulbiss avatar Feb 11 '15 22:02 paulbiss

I know. I used EasyEngine with HHVM and PHP5-FPM as a backup. I recommend php5-fpm as a backup anytime before HHVM is 100% stable.

thedevly avatar Feb 11 '15 22:02 thedevly

You can tune hhvm for this, it will cope alot better then. Of periodicaly restart hhvm. It's ugly I know, but you don't have to wait for it to crash.

frijsdijk avatar Feb 12 '15 08:02 frijsdijk

@frijsdijk what do you mean? can you please explain ?

thedevly avatar Feb 13 '15 21:02 thedevly

also, it's worth checking your backtrace - if it includes f_create_function() , you might be able to solve your problems by replacing:

$foo = create_function('bar()');

with:

$foo = function() { bar(); }

(we have leak issues with the first one as it technicaly creates a globally accesible function, whereas the latter doesn't)

fredemmott avatar Feb 13 '15 21:02 fredemmott

@doringheorghe increase the sizes of the various parameters, like the coredump file suggest. I've ended up quadroupling the values from default (Ubuntu 14.04):

hhvm.jit_a_size=251658240 hhvm.jit_a_cold_size=100663296 hhvm.jit_a_frozen_size=167772160 hhvm.jit_a_prof_size=268435456 hhvm.jit_a_max_usage=251658240 hhvm.jit_global_data_size=62914560

frijsdijk avatar Feb 13 '15 22:02 frijsdijk