| Summary: | nodejs crashes when built with gcc 4.9 | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Dr I J Ormshaw <ian_ormshaw> |
| Component: | Other | Assignee: | Martin <martin> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | buildroot, jer |
| Priority: | P5 | ||
| Version: | 2015.02 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Xeon x86_64 i7 | Target: | |
| Build: | |||
| Attachments: |
Config file
The good config file The bad config file The differences between the good and bad config |
||
To help us in solving this bug, could you provide a minimal working Buildroot configuration, and a minimal non-working Buildroot configuration, as well as the exact steps to reproduce the problem? Also, please be sure to include the exact Buildroot version you have used, so that we can now which version of gcc 4.8.x and gcc 4.9.x you have tested. Thanks! Created attachment 6066 [details]
The good config file
Created attachment 6071 [details]
The bad config file
Created attachment 6076 [details]
The differences between the good and bad config
I've re-created the issue and attached the good and bad config files, I've also attaches the differences between the two, as a patch. The version of buildroot I am using is 2015.02 6bf057b0f2ba188397a691f74877a4a30aaea3f9 The console output for the failure is: [root@buildroot ~]# node traps: node[194] general protection ip:736725 sp:7ffc3c721350 error:0 in node[400000+73c000] Segmentation fault On an ARM system (cortex-a7) I am seeing a similar problem when I build everything with gcc-4.9.*. It doesn't crash, though, it merely exits certain functions early, causing it to output invalid HTTP headers. I have seen some references on the wider Internet pointing to similar problems, but those were not connected to a specific GCC version or even the same OS. The only thing I am certain of is that GCC 4.9 miscompiles nodejs, including version 4.1.1. I haven't tried with libuv and libhttpparser properly in place, though. (In reply to Dr I J Ormshaw from comment #5) > I've re-created the issue and attached the good and bad config files, I've > also attaches the differences between the two, as a patch. > > The version of buildroot I am using is > > 2015.02 > 6bf057b0f2ba188397a691f74877a4a30aaea3f9 > > The console output for the failure is: > > > [root@buildroot ~]# node > traps: node[194] general protection ip:736725 sp:7ffc3c721350 error:0 in > node[400000+73c000] > Segmentation fault I've not managed to reproduce your issue. Your config files contains various customisations like an override file, kernel patches, overlay etc so I'm not able to full replicate your setup. Instead I used buildroot version 2015.11 and the qemu_x86_64_defconfig as a start point. I configured for a core i7, gcc 4.9.3, glibc and node.js v0.10.40 and node works fine in qemu. I even tried eglibc as you do (which is now deprecated) and it worked fine too. I can only suggest you try to upgrade to buildroot 2015.11 and test again, perhaps your issue has been fixed. If you still find the issue then can you please attach a minimal non-working Buildroot configuration, removing any custom override files and packages which are not needed to reproduce the issue. Thanks Martin (In reply to Jeroen Roovers from comment #6) > On an ARM system (cortex-a7) I am seeing a similar problem when I build > everything with gcc-4.9.*. It doesn't crash, though, it merely exits certain > functions early, causing it to output invalid HTTP headers. I have seen some > references on the wider Internet pointing to similar problems, but those > were not connected to a specific GCC version or even the same OS. The only > thing I am certain of is that GCC 4.9 miscompiles nodejs, including version > 4.1.1. I haven't tried with libuv and libhttpparser properly in place, > though. I think this might be a different issue, the original issue is about a crash. If you think you still have an issue can you please raise a new bug. In the bug please attach a minimal non-working Buildroot configuration so we can try to reproduce it. Thanks Martin Thanks a lot Martin for taking the time to look at this bug, and to attempt to reproduce it! |
Created attachment 6016 [details] Config file nodejs crashed whenever it is run on an i7 system when compiled with gcc 4.9. Using the exact same configuration but with gcc 4.8 works correctly.