[Vm-dev] corruption of PC in context objects or not (?)
Andrei Chis
chisvasileandrei at gmail.com
Fri Sep 11 15:58:40 UTC 2020
Hi,
We are getting often crashes on our CI when calling `Context>copyTo:` in a
GT image and a vm build from https://github.com/feenkcom/opensmalltalk-vm.
To sum up during `Context>copyTo:`, `Object>>#copy` is called on a
context leading to a segmentation fault crash. Looking at that context in
lldb the pc looks off. It has the value `0xfffffffffea7f6e1`.
(lldb) call (void *) printOop(0x1206b6990)
0x1206b6990: a(n) Context
0x1206b6a48 0xfffffffffea7f6e1 0x9
0x1146b2e08 0x1206b6b00
0x1206b6b28 0x1206b6b50
Can this indicate some corruption or is it expected to have such values?
`CoInterpreter>>ensureContextHasBytecodePC:` has code that also handles
negative values for the pc which suggests that this might be expected.
Changing `Context>copyTo:` by adding a `self pc` before calling `self copy`
leads to no more crashes. Not sure if there is a reason for that or just
plain luck.
A simple reduced stack is below (more details in this issue [1]). The crash
happens always with contexts reified as objects (in this case 0x1206b6990 s
[] in GtExamplesCommandLineHandler>runPackages).
Could this suggest some kind of issue in the vm when reifying contexts, or
just some other problem with memory corruption?
0x7ffeefbb4380 M Context(Object)>copy 0x1206b6990: a(n) Context
0x7ffeefbb43b8 M Context>copyTo: 0x1206b6990: a(n) Context
0x7ffeefbb4400 M Context>copyTo: 0x1206b5ae0: a(n) Context
...
0x7ffeefba6078 M Context>copyTo: 0x110548b28: a(n) Context
0x7ffeefba60d0 I Context>copyTo: 0x110548a70: a(n) Context
0x7ffeefba6118 I MessageNotUnderstood(Exception)>freezeUpTo:
0x110548a20: a(n) MessageNotUnderstood
0x7ffeefba6160 I MessageNotUnderstood(Exception)>freeze
0x110548a20: a(n) MessageNotUnderstood
0x7ffeefba6190 M [] in GtExampleEvaluator>result 0x110544fb8: a(n)
GtExampleEvaluator
0x7ffeefba61c8 M BlockClosure>cull: 0x110545188: a(n) BlockClosure
0x7ffeefba6208 M Context>evaluateSignal: 0x110548c98: a(n) Context
0x7ffeefba6240 M Context>handleSignal: 0x110548c98: a(n) Context
0x7ffeefba6278 M Context>handleSignal: 0x110548be0: a(n) Context
0x7ffeefba62b0 M MessageNotUnderstood(Exception)>signal
0x110548a20: a(n) MessageNotUnderstood
0x7ffeefba62f0 M
GtDummyExamplesWithInheritanceSubclassB(Object)>doesNotUnderstand:
exampleH 0x1105487d8: a(n) GtDummyExamplesWithInheritanceSubclassB
0x7ffeefba6328 M
GtExampleEvaluator>primitiveProcessExample:withEvaluationContext:
0x110544fb8: a(n) GtExampleEvaluator
...
0x7ffeefbe64d0 M [] in GtExamplesHDReport class(HDReport
class)>runPackages: 0x1145e41c8: a(n) GtExamplesHDReport class
0x7ffeefbe6520 M [] in Set>collect: 0x1206b5ab0: a(n) Set
0x7ffeefbe6568 M Array(SequenceableCollection)>do: 0x1206b5c50: a(n) Array
0x1206b5b98 s Set>collect:
0x1206b5ae0 s GtExamplesHDReport class(HDReport class)>runPackages:
0x1206b6990 s [] in GtExamplesCommandLineHandler>runPackages
0x1206b6a48 s BlockClosure>ensure:
0x1206b6b68 s UIManager class>nonInteractiveDuring:
0x1206b6c48 s GtExamplesCommandLineHandler>runPackages
0x1206b6d98 s GtExamplesCommandLineHandler>activate
0x1206b75d0 s GtExamplesCommandLineHandler
class(CommandLineHandler class)>activateWith:
0x1207d2f00 s [] in
PharoCommandLineHandler(BasicCommandLineHandler)>activateSubCommand:
0x1207e6620 s BlockClosure>on:do:
0x1207f7ab8 s
PharoCommandLineHandler(BasicCommandLineHandler)>activateSubCommand:
0x120809d40 s
PharoCommandLineHandler(BasicCommandLineHandler)>handleSubcommand
0x12082ca60 s
PharoCommandLineHandler(BasicCommandLineHandler)>handleArgument:
0x120789938 s [] in
PharoCommandLineHandler(BasicCommandLineHandler)>activate
0x1207a83e0 s BlockClosure>on:do:
0x1207b57a0 s [] in
PharoCommandLineHandler(BasicCommandLineHandler)>activate
0x1207bf830 s [] in BlockClosure>newProcess
Cheers,
Andrei
[1] https://github.com/feenkcom/gtoolkit/issues/1440
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200911/b85fcd52/attachment-0001.html>
More information about the Vm-dev
mailing list