Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

node crashes with following message "Extension or internal compilation error." #41

Closed
dpasupathi opened this issue Jul 17, 2015 · 5 comments

Comments

@dpasupathi
Copy link

Hi,

I am trying to run node on my e500 ppc. I used -msoft-float option to work around the Illegal Instruction set issue. But now i am hitting the following crash. Appreciate if someone can help me on what is going wrong.

gdb) bt
#0 0x1038007c in v8::Context::Enter() ()
#1 0x1086e8e8 in node::CreateEnvironment(v8::Isolate_, uv_loop_s_, v8::Handlev8::Context, int, char const* const_, int, char const_ const*) ()
#2 0x1086f2a4 in node::Start(int, char**) ()
#3 0x1088b820 in main ()

(gdb) x/20i $pc -16
0x1038006c <_ZN2v87Context5EnterEv+40>: stw r25,20(r1)
0x10380070 <_ZN2v87Context5EnterEv+44>: stw r28,32(r1)
0x10380074 <_ZN2v87Context5EnterEv+48>: stw r29,36(r1)
0x10380078 <_ZN2v87Context5EnterEv+52>: stw r30,40(r1)
=> 0x1038007c <_ZN2v87Context5EnterEv+56>: lwz r9,0(r3)
0x10380080 <_ZN2v87Context5EnterEv+60>: rlwinm r9,r9,0,0,9
0x10380084 <_ZN2v87Context5EnterEv+64>: lwz r11,28(r9)
0x10380088 <_ZN2v87Context5EnterEv+68>: addi r27,r11,-16
0x1038008c <_ZN2v87Context5EnterEv+72>: lwz r30,13692(r27)
0x10380090 <_ZN2v87Context5EnterEv+76>: lwz r24,13632(r27)
0x10380094 <_ZN2v87Context5EnterEv+80>: stw r0,13632(r27)
0x10380098 <_ZN2v87Context5EnterEv+84>: lwz r10,24(r30)
0x1038009c <_ZN2v87Context5EnterEv+88>: lwz r29,20(r30)
0x103800a0 <_ZN2v87Context5EnterEv+92>: lwz r25,0(r3)
0x103800a4 <_ZN2v87Context5EnterEv+96>: cmpw cr7,r10,r29
0x103800a8 <_ZN2v87Context5EnterEv+100>:
bge cr7,0x10380128 <_ZN2v87Context5EnterEv+228>
0x103800ac <_ZN2v87Context5EnterEv+104>: lwz r9,16(r30)
0x103800b0 <_ZN2v87Context5EnterEv+108>: rlwinm r0,r10,2,0,29
0x103800b4 <_ZN2v87Context5EnterEv+112>: addi r11,r10,1
0x103800b8 <_ZN2v87Context5EnterEv+116>: stwx r25,r9,r0

@andrewlow
Copy link
Collaborator

Same problem as #35

This is really a V8 issue

You might want to participate here ibmruntimes/v8ppc#119
or read through ibmruntimes/v8ppc#99

Ultimately supporting the freescale CPUs (such as the e500) is going to require someone in the community to step up and work through the problems and send pull requests to this project (or V8)

@dpasupathi
Copy link
Author

Hi Andrew,

In the above crash i could see the segfault happening at
=> 0x1038007c <_ZN2v87Context5EnterEv+56>: lwz r9,0(r3)

I really doubt that this is not an missing instruction issue/illegal instruction issue with respect to e500. Can you please shed me more light on what exactly the problem in the above crash??

@andrewlow
Copy link
Collaborator

@dpasupathi I'm not sure what you're asking here.

We know that there are instructions used in the current V8 on PPC implementation that are not supported by the e500 chips.

If you're making the assumption that the crash report showing lwz r9,0(r3) is an indicator that there is a problem on the e500 with the lwz instructions, then you're simply making an incorrect assumption.

Very likely the value of r3 is entirely bogus - due to previous instructions in the stream which were not interpreted correctly by the e500 and thus r3 is now trash in some way.

@dpasupathi
Copy link
Author

Andrew,

To be clear I am running the nodejs on e500mc (not e500v2). As mentioned in the other thread (ibmruntimes/v8ppc#119) e500mc has native floating point support and as per the thread the only instruction set that's missing would be fsqrt.

In this specific crash I am not sure how r3 value is bogus, since I am not completely aware of v8 code it is hard for me to understand "Extension or internal compilation error". This error is printed from src/isolate.cc.

else if (location != NULL && !location->script().is_null()) {
// We are bootstrapping and caught an error where the location is set
// and we have a script for the location.
// In this case we could have an extension (or an internal error
// somewhere) and we print out the line number at which the error occured
// to the console for easier debugging.
int line_number =
location->script()->GetLineNumber(location->start_pos()) + 1;
if (exception->IsString() && location->script()->name()->IsString()) {
base::OS::PrintError(
"Extension or internal compilation error: %s in %s at line %d.\n",
String::cast(exception)->ToCString().get(),
String::cast(location->script()->name())->ToCString().get(),
line_number);
} else if (location->script()->name()->IsString()) {
base::OS::PrintError(
"Extension or internal compilation error in %s at line %d.\n",
String::cast(location->script()->name())->ToCString().get(),
line_number);
} else {
base::OS::PrintError("Extension or internal compilation error.\n");

}

@mhdawson
Copy link

Give the age of this I'm going to close it. If you disagree please let me know and I'll re-open

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants