Hi There,
Recently after upgrading to 12.4.254.21 we started seeing segfaults per:
After... a rather giant adventure I manager to create a repro of the issue by that was somewhat debugguable.
When the segfault happens GDB says it is deep inside some interpreter tampoline
#131 0x00007e79de5b565e in Builtins_InterpreterEntryTrampoline () from /home/sam/Source/mini_racer/lib/mini_racer_extension.so try=0x7ffc85d0b210, nfds=nfds@entry=2,
#132 0x000037edcd572331 in ?? ()
#133 0x00000ede17b61561 in ?? ()
#134 0x00000ede17b55259 in ?? ()
#135 0x00000ede17b61561 in ?? ()
#136 0x000037edcd572331 in ?? ()
#137 0x0000135dd0aa93e1 in ?? ()
#138 0x000010765a0c0069 in ?? ()
#139 0x0000004a00000000 in ?? ()
#140 0x000016bc18c16201 in ?? ()
#141 0x0000000000000002 in ?? ()
#142 0x00000ede17b61931 in ?? ()
#143 0x00000ede17b61901 in ?? ()
#144 0x00007e79cfcfe778 in ?? ()
#145 0x00007e79de5b565e in Builtins_InterpreterEntryTrampoline () from /home/sam/Source/mini_racer/lib/mini_racer_extension.so
#146 0x00000ede17b61969 in ?? ()
#147 0x00000ede17b55259 in ?? ()
#148 0x00000ede17b5f329 in ?? ()
#149 0x00000ede17b55259 in ?? ()
#150 0x00000ede17b61969 in ?? ()
#151 0x00000ede17b61931 in ?? ()
#152 0x000010765a0c0069 in ?? ()
#153 0x000010765a0c0069 in ?? ()
#154 0x0000014400000000 in ?? ()
#155 0x000016bc18c14fa1 in ?? ()
#156 0x0000000000000002 in ?? ()
#157 0x000018d80e8ccd69 in ?? ()
#158 0x000020b3bd980109 in ?? ()
#159 0x00007e79cfcfe7a8 in ?? ()
#160 0x00007e79de5b325c in Builtins_JSEntryTrampoline () from /home/sam/Source/mini_racer/lib/mini_racer_extension.so _racer_extension.so
#161 0x000020b3bd980059 in ?? ()
#162 0x000010765a0c0c79 in ?? ()
#163 0x000018d80e8ccd69 in ?? ()
#164 0x000000000000002c in ?? ()
#165 0x00007e79cfcfe820 in ?? ()
#166 0x00007e79de5b2f9b in Builtins_JSEntry ()
To reproduce I have 2 Ruby threads kick off a bunch of JavaScript on a single contex.
All access to ->Run() is guarded with Locker, full source is at:
And crash happens at:
This is guarded here:
My questions:
2. Should I simply avoid mulithreading and instead queue all work to a single thread per Isolate/Context?
3. Are there any tips and tricks to debugging this, from what I can tell clang builds of both my extension and libv8_monolith.a are the only way I can get symbols going
4. For some reason if I build with `is_debug` as soon as I kick off an isolate I get warned about stack smashing, is this normal? Do "is_debug" builds work for people?
5. Are there any experts on this list that would be interested in some consulting work to help resolve this issue?
Any other ideas?
As it stands we are now stuck on a 1-2 year old version of v8 due to this crash and I worry that about having such an old version of v8 out there in wide adoption.
Thanks heaps
Sam