-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Strange crash after some time (mprotect WTFCrash()) #15329
Description
-
Which version of PhantomJS are you using? Tip: run
phantomjs --version.
2.1.1 -
What steps will reproduce the problem?
-
run my script https://github.com/k3a/phantomfb
-
it works for a while but then when used after couple of days again
-
it does SIGSEGV
-
Which operating system are you using?
GNU/Linux on Intel x86_84 -
Did you use binary PhantomJS or did you compile it from source?
First I used official Arch Linux binary but then compiled from the source to reproduce the bug with debug symbols -
Please provide any additional information below.
#0 0x000055555721459c in WTFCrash () at wtf/Assertions.cpp:345
#1 0x0000555557261b07 in WTF::OSAllocator::commit (address=0x7ffe37cc0000, bytes=65536, writable=<optimized out>, executable=<optimized out>) at wtf/OSAllocatorPosix.cpp:189
#2 0x0000555557245364 in WTF::PageAllocationAligned::allocate (size=size@entry=65536, alignment=alignment@entry=65536, usage=usage@entry=WTF::OSAllocator::UnknownUsage,
writable=writable@entry=true) at wtf/PageAllocationAligned.cpp:61
#3 0x0000555556f1822a in JSC::ExcessRegion::create (blockSize=65536) at heap/Region.h:179
#4 JSC::Region::create (superRegion=0x7ffff7eae058, blockSize=65536) at heap/Region.h:232
#5 JSC::BlockAllocator::allocate<JSC::MarkedBlock> (this=0x7ffff7eae058) at heap/BlockAllocator.h:152
#6 JSC::MarkedAllocator::allocateBlock (this=this@entry=0x7ffff7eb3df8, bytes=bytes@entry=32) at heap/MarkedAllocator.cpp:115
#7 0x0000555556f18c13 in JSC::MarkedAllocator::allocateSlowCase (this=0x7ffff7eb3df8, bytes=32) at heap/MarkedAllocator.cpp:97
#8 0x0000555556f752a1 in JSC::MarkedAllocator::allocate (bytes=<optimized out>, this=<optimized out>) at heap/MarkedAllocator.h:82
#9 JSC::MarkedSpace::allocateWithoutDestructor (bytes=<optimized out>, this=<optimized out>) at heap/MarkedSpace.h:205
#10 JSC::Heap::allocateWithoutDestructor (bytes=<optimized out>, this=<optimized out>) at heap/Heap.h:386
#11 JSC::allocateCell<JSC::JSFinalObject> (size=<optimized out>, heap=...) at runtime/JSCellInlines.h:97
#12 JSC::JSFinalObject::create (structure=0x7fff8beb9168, exec=<optimized out>) at runtime/JSObject.h:1052
#13 JSC::constructEmptyObject (structure=0x7fff8beb9168, exec=<optimized out>) at runtime/ObjectConstructor.h:65
#14 JSC::DFG::operationNewObject (exec=<optimized out>, structure=0x7fff8beb9168) at dfg/DFGOperations.cpp:417
From the source it seems that mprotect() failed. But I am not sure if it is a good idea to just crash the app without any explanation. In my case it could have been due to a temporary low memory situation. During that low memory situation, I haven't been actively interacting with the app, but maybe it does some allocations even while idling...