HaxeFoundation / neko

The Neko Virtual Machine
https://nekovm.org
Other
552 stars 107 forks source link

Uncaught exception - others.c(440) : Field conflict between null and doctype #214

Open mockey opened 3 years ago

mockey commented 3 years ago

I have an old web application that runs on neko (mod_neko with apache to be precise), where a user recently reported the following error after a page request: Uncaught exception - others.c(440) : Field conflict between null and doctype Any idea what this could be about?

ConstNW commented 3 years ago

probably multithread access to the field 'doctype'

mockey commented 3 years ago

What would cause this and how could that be avoided?

ConstNW commented 3 years ago

Use thread locks or mutex

mockey commented 3 years ago

I don't use any threads deliberately in my code. Is this done by mod_neko?

RealyUniqueName commented 3 years ago

This looks like a bug in neko vm. Here's the place where the error is thrown: https://github.com/HaxeFoundation/neko/blob/f1846a1cf4e2e2913a8357c623c3156fdcbdfccc/vm/others.c#L435-L441

ConstNW commented 3 years ago

Yes, it's a code where error message composed. That function val_id is called to get object's field id in object table by name ('doctype') or insert if it does not exists yet. In that case field id in object table exists but name check was failed and that why the error occur. Usually that's happens when threads have concurrent access to the same field.

mockey commented 3 years ago

As I said, I don't use threads in this app. I only use the usual neko web stuff.