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

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

Open
mockey opened this issue Oct 28, 2020 · 7 comments
Open

Comments

@mockey
Copy link

mockey commented Oct 28, 2020

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
Copy link
Contributor

ConstNW commented Oct 28, 2020

probably multithread access to the field 'doctype'

@mockey
Copy link
Author

mockey commented Oct 29, 2020

What would cause this and how could that be avoided?

@ConstNW
Copy link
Contributor

ConstNW commented Oct 30, 2020

Use thread locks or mutex

@mockey
Copy link
Author

mockey commented Nov 9, 2020

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

@RealyUniqueName
Copy link
Member

This looks like a bug in neko vm.
Here's the place where the error is thrown:

neko/vm/others.c

Lines 435 to 441 in f1846a1

if( fdata != val_null && scmp(val_string(fdata),val_strlen(fdata),oname,(int)(name - oname)) != 0 ) {
buffer b = alloc_buffer("Field conflict between ");
val_buffer(b,fdata);
buffer_append(b," and ");
buffer_append(b,oname);
bfailure(b);
}

@ConstNW
Copy link
Contributor

ConstNW commented Nov 9, 2020

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
Copy link
Author

mockey commented Nov 10, 2020

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

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