(gdb) bt
#0 0x00003fffb7916f70 in WTFCrash () at Source/WTF/wtf/Assertions.cpp:333
#1 0x00003fffb79399c8 in WTF::OSAllocator::commit (address=0x3fffb39cc000, bytes=16384, writable=<optimized out>, executable=<optimized out>)
at Source/WTF/wtf/OSAllocatorPosix.cpp:134
#2 0x00003fffb7680120 in commit (this=0x3fffb44cef38, this=0x3fffb44cef38, this=0x3fffb44cef38, size=<optimized out>, start=<optimized out>)
at Source/WTF/wtf/PageReservation.h:85
#3 JSC::JSStack::growSlowCase (this=0x3fffb44cef18, newEnd=0x3fffb39cff70) at Source/JavaScriptCore/interpreter/JSStack.cpp:89
#4 0x00003fffb767de68 in grow (newEnd=<optimized out>, this=0x3fffb44cef18) at Source/JavaScriptCore/interpreter/JSStackInlines.h:180
#5 JSC::JSStack::entryCheck (this=0x3fffb44cef18, codeBlock=<optimized out>, argsCount=<optimized out>)
at Source/JavaScriptCore/interpreter/JSStackInlines.h:77
#6 0x00003fffb767c5d0 in JSC::Interpreter::execute (this=0x3fffb44cef00, program=0x3fffb34eff70, callFrame=0x3fffb359f9b0, thisObj=0x3fffb357fbb0)
at Source/JavaScriptCore/interpreter/Interpreter.cpp:891
#7 0x00003fffb7780a28 in JSC::evaluate (exec=0x3fffb359f9b0, source=..., thisValue=..., returnedException=0x3fffffffed90)
at Source/JavaScriptCore/runtime/Completion.cpp:82
#8 0x00003fffb756ec30 in JSEvaluateScript (ctx=<optimized out>, script=0x3fffb44b3258, thisObject=0x0, sourceURL=<optimized out>,
startingLineNumber=<optimized out>, exception=0x0) at Source/JavaScriptCore/API/JSBase.cpp:63
#9 0x00003fffb7d7128c in seed_simple_evaluate (ctx=0x3fffb359f9b0, source=<optimized out>, exception=0x0) at seed-api.c:305
#10 0x00003fffb7d76c6c in seed_init_constrained_with_context_and_group (argc=<optimized out>, argv=<optimized out>, context=0x3fffb359f9b0,
group=0x3fffb44b4000) at seed-engine.c:1734
#11 0x00003fffb7d76f04 in seed_init_with_context_and_group (argc=<optimized out>, argv=<optimized out>, context=<optimized out>, group=<optimized out>)
at seed-engine.c:1792
#12 0x00003fffb7d77028 in seed_init_with_context_group (argc=0x3ffffffff200, argv=0x3ffffffff198, group=0x3fffb44b4000) at seed-engine.c:1830
#13 0x00003fffb7d770a0 in seed_init (argc=0x3ffffffff200, argv=<optimized out>) at seed-engine.c:1852
#14 0x00000000100010dc in main (argc=1, argv=<error reading variable: value has been optimized out>) at main.c:152
As you can see, the 'address' parameter on frame #1, which is passed to mprotect(), is not aligned to 64k (the page size for Fedora kernel on PPC64). The mprotect() syscall requires the address to be aligned to the kernel page size. A quick look at the code points to:
Would it be feasible to use 64k commitSize? Or maybe decouple the commitSize logic from the kernel page size?
Either way, please don't try to predict the kernel page size on build time. PPC64 (and other architectures) support multiple page sizes, so you can only rely on the the page size reported by the kernel on runtime. You can get it by calling 'sysconf(_SC_PAGESIZE)'.
Version-Release number of selected component (if applicable):
webkitgtk3-2.3.90-3.fc21.ppc64
How reproducible:
Always.
Steps to Reproduce:
1. yum install seed
2. seed
3.
Description of problem:
I notice this issue trying to build 'seed' on rawhide. Here is the error message during seed build:
Making all in readline fedora/ seed/master/ seed-3. 8.1/doc/ modules/ readline' ./doc/modules/ make-functions. js ../../. ./doc/modules/ readline/ readline. js > ../../. ./doc/modules/ readline/ readline- funcs.xml libjavascriptco regtk-3. 0.so.0( WTFCrash- 0x14038c) [0x3fff92ed6f5c] libjavascriptco regtk-3. 0.so.0( _ZN3WTF11OSAllo cator6commitEPv mbb-0x11e6a0) [0x3fff92ef99c8] libjavascriptco regtk-3. 0.so.0( _ZN3JSC7JSStack 12growSlowCaseE PNS_8RegisterE- 0x3c8b78) [0x3fff92c40120] libjavascriptco regtk-3. 0.so.0( _ZN3JSC7JSStack 10entryCheckEPN S_9CodeBlockEi- 0x3cab20) [0x3fff92c3de68] libjavascriptco regtk-3. 0.so.0( _ZN3JSC11Interp reter7executeEP NS_17ProgramExe cutableEPNS_ 9ExecStateEPNS_ 8JSObjectE- 0x3cc638) [0x3fff92c3c5d0] libjavascriptco regtk-3. 0.so.0( _ZN3JSC8evaluat eEPNS_9ExecStat eERKNS_ 10SourceCodeENS _7JSValueEPS5_ -0x2cda90) [0x3fff92d40a28] libjavascriptco regtk-3. 0.so.0( JSEvaluateScrip t-0x4d1aa8) [0x3fff92b2ec30] fedora/ seed/master/ seed-3. 8.1/libseed/ .libs/libseed- gtk3.so. 0(seed_ simple_ evaluate- 0x2f90c) [0x3fff9333128c] fedora/ seed/master/ seed-3. 8.1/libseed/ .libs/libseed- gtk3.so. 0(seed_ init_constraine d_with_ context_ and_group- 0x2a3ec) [0x3fff93336c6c] fedora/ seed/master/ seed-3. 8.1/libseed/ .libs/libseed- gtk3.so. 0(seed_ init_with_ context_ and_group- 0x2a164) [0x3fff93336f04] fedora/ seed/master/ seed-3. 8.1/libseed/ .libs/libseed- gtk3.so. 0(seed_ init_with_ context_ group-0x2a050) [0x3fff93337028] fedora/ seed/master/ seed-3. 8.1/libseed/ .libs/libseed- gtk3.so. 0(seed_ init-0x29fe8) [0x3fff933370a0] fedora/ seed/master/ seed-3. 8.1/src/ .libs/lt- seed() [0x100010dc] libc.so. 6(+0x466ec) [0x3fff931166ec] libc.so. 6(__libc_ start_main- 0x1aaf0c) [0x3fff931168f4] ./doc/modules/ make-functions. js ../../. ./doc/modules/ readline/ readline. js > ../../. ./doc/modules/ readline/ readline- funcs.xml
make[4]: Entering directory `/builddir/
../../../src/seed ../../.
1 0x3fff92ed6f5c /lib64/
2 0x3fff92ef99c8 /lib64/
3 0x3fff92c40120 /lib64/
4 0x3fff92c3de68 /lib64/
5 0x3fff92c3c5d0 /lib64/
6 0x3fff92d40a28 /lib64/
7 0x3fff92b2ec30 /lib64/
8 0x3fff9333128c /builddir/
9 0x3fff93336c6c /builddir/
10 0x3fff93336f04 /builddir/
11 0x3fff93337028 /builddir/
12 0x3fff933370a0 /builddir/
13 0x100010dc /builddir/
14 0x3fff931166ec /lib64/
15 0x3fff931168f4 /lib64/
/bin/sh: line 1: 4677 Segmentation fault ../../../src/seed ../../.
And here is a backtrace from gdb:
(gdb) bt WTF/wtf/ Assertions. cpp:333 r::commit (address= 0x3fffb39cc000, bytes=16384, writable=<optimized out>, executable= <optimized out>) WTF/wtf/ OSAllocatorPosi x.cpp:134 cef38, this=0x3fffb44c ef38, this=0x3fffb44c ef38, size=<optimized out>, start=<optimized out>) WTF/wtf/ PageReservation .h:85 :growSlowCase (this=0x3fffb44 cef18, newEnd= 0x3fffb39cff70) at Source/ JavaScriptCore/ interpreter/ JSStack. cpp:89 ef18) at Source/ JavaScriptCore/ interpreter/ JSStackInlines. h:180 :entryCheck (this=0x3fffb44 cef18, codeBlock= <optimized out>, argsCount= <optimized out>) JavaScriptCore/ interpreter/ JSStackInlines. h:77 r::execute (this=0x3fffb44 cef00, program= 0x3fffb34eff70, callFrame= 0x3fffb359f9b0, thisObj= 0x3fffb357fbb0) JavaScriptCore/ interpreter/ Interpreter. cpp:891 9f9b0, source=..., thisValue=..., returnedExcepti on=0x3fffffffed 90) JavaScriptCore/ runtime/ Completion. cpp:82 0x3fffb44b3258, thisObject=0x0, sourceURL= <optimized out>, eNumber= <optimized out>, exception=0x0) at Source/ JavaScriptCore/ API/JSBase. cpp:63 evaluate (ctx=0x3fffb359 f9b0, source=<optimized out>, exception=0x0) at seed-api.c:305 constrained_ with_context_ and_group (argc=<optimized out>, argv=<optimized out>, context= 0x3fffb359f9b0, 0x3fffb44b4000) at seed-engine.c:1734 with_context_ and_group (argc=<optimized out>, argv=<optimized out>, context=<optimized out>, group=<optimized out>) with_context_ group (argc=0x3ffffff ff200, argv=0x3fffffff f198, group=0x3fffb44 b4000) at seed-engine.c:1830 ff200, argv=<optimized out>) at seed-engine.c:1852
#0 0x00003fffb7916f70 in WTFCrash () at Source/
#1 0x00003fffb79399c8 in WTF::OSAllocato
at Source/
#2 0x00003fffb7680120 in commit (this=0x3fffb44
at Source/
#3 JSC::JSStack:
#4 0x00003fffb767de68 in grow (newEnd=<optimized out>, this=0x3fffb44c
#5 JSC::JSStack:
at Source/
#6 0x00003fffb767c5d0 in JSC::Interprete
at Source/
#7 0x00003fffb7780a28 in JSC::evaluate (exec=0x3fffb35
at Source/
#8 0x00003fffb756ec30 in JSEvaluateScript (ctx=<optimized out>, script=
startingLin
#9 0x00003fffb7d7128c in seed_simple_
#10 0x00003fffb7d76c6c in seed_init_
group=
#11 0x00003fffb7d76f04 in seed_init_
at seed-engine.c:1792
#12 0x00003fffb7d77028 in seed_init_
#13 0x00003fffb7d770a0 in seed_init (argc=0x3ffffff
#14 0x00000000100010dc in main (argc=1, argv=<error reading variable: value has been optimized out>) at main.c:152
As you can see, the 'address' parameter on frame #1, which is passed to mprotect(), is not aligned to 64k (the page size for Fedora kernel on PPC64). The mprotect() syscall requires the address to be aligned to the kernel page size. A quick look at the code points to:
./Source/ JavaScriptCore/ interpreter/ JSStack. h:76: static const size_t commitSize = 16 * 1024;
Would it be feasible to use 64k commitSize? Or maybe decouple the commitSize logic from the kernel page size?
Either way, please don't try to predict the kernel page size on build time. PPC64 (and other architectures) support multiple page sizes, so you can only rely on the the page size reported by the kernel on runtime. You can get it by calling 'sysconf( _SC_PAGESIZE) '.
Version-Release number of selected component (if applicable): 2.3.90- 3.fc21. ppc64
webkitgtk3-
How reproducible:
Always.
Steps to Reproduce:
1. yum install seed
2. seed
3.
Actual results:
See crash above.
Expected results:
Seed's prompt.
Additional info: