Bug 3959

Summary: non-GPLv3 grep command segfaults - causing system initialization failure
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Stoicescu Cornel <corneliux.stoicescu>
Component: coreAssignee: Alexandru Damian <alexandru.damian>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: High CC: alexandru.damian, meta.mr.watcher, meta.watcher, richard.purdie
Version: 1.4   
Target Milestone: 1.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
boot log error
none
boot log for core-image-basic-qemux86-64 non-GPLv3 none

Description Stoicescu Cornel 2013-02-28 13:52:54 UTC
Created attachment 1093 [details]
boot log error

branch: master
commit: d7b248e715d99766bf8602ff9f038f8b0afa5e78

1. Set following sentences in local.conf to GPLv3
#####
INCOMPATIBLE_LICENSE = "GPLv3"
#####
2. Build core-image-minimal and core-image-basic
3. Start up target after build is finished

Notice error in boot sequence: screenshot attached

NOTE: After about 5 minutes the boot sequence resumes and the image boots successfully.
Comment 1 Saul Wold 2013-02-28 21:28:30 UTC
Which MACHINE?  I tried with qemuarm and it worked, but when I tried an x86-64 I got a load of failures, looks like grep is segfaulting all over the place during user space initialization.

In the future it would be useful to get a full output of the startup, you can do this with the runqemu serial arg, and then cut and paste from your terminal.
Comment 2 Stoicescu Cornel 2013-03-01 09:12:54 UTC
The machine in my case is qemux86-64.
Comment 3 Stoicescu Cornel 2013-03-04 09:40:40 UTC
Created attachment 1101 [details]
boot log for core-image-basic-qemux86-64 non-GPLv3
Comment 4 Stoicescu Cornel 2013-03-04 09:41:38 UTC
Full boot log attached. Thank you for your patience.
Comment 5 Saul Wold 2013-03-05 16:20:44 UTC
I have confirmed that the grep command is segfaulting for the non-gplv3 version.

Build with INCOMPATIBLE_LICENSE = "GPLv3", boot system, you might need to include gdb or other debugging tools.  This might require some special handling, due to the INCOMPATIBLE_LICENSE issues.
Comment 6 Alexandru Damian 2013-03-08 16:18:36 UTC
Very weird problem where "setlocale()" call returns a string in an unreachable memory space. Continue investigating. Backtrace is below, in case it rings a bell.

(gdb) backtrace 
#0  hard_locale (category=category@entry=3) at hard-locale.c:64
#1  0x00000000004082a7 in dfaparse (s=s@entry=0x7fffffffee9d ".", len=len@entry=1, 
    d=d@entry=0x61aea0 <dfa>) at dfa.c:1366
#2  0x000000000040ae18 in dfacomp (s=s@entry=0x7fffffffee9d ".", len=len@entry=1, 
    d=d@entry=0x61aea0 <dfa>, searchflag=searchflag@entry=1) at dfa.c:2978
#3  0x000000000040ce06 in Gcompile (pattern=0x7fffffffee9d ".", size=1)
    at search.c:248
#4  0x00000000004021ff in main (argc=4, argv=0x7fffffffec98) at grep.c:1700
Comment 8 Stoicescu Cornel 2013-04-17 11:22:30 UTC
Verified in master:595e92c76700306f9ff8fcf1557eb7ade1f3e907