-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random segfaults in ::Heap::markFrom (core/state.h:348) #228
Comments
#6 0x00007ffff3e80b7d in (anonymous namespace)::Interpreter::jsonToHeap (this=0x0, this@entry=0x7fffffffc230, this=0x0 looks very suspicious Can you run in valgrind? It may be a bug in the native callbacks, or maybe the Python wrapper. I can assist you debugging it if you're comfortable with that. Otherwise I'll probably need a reproduction case. You can also build without optimisations for easier debugging with make OPT= |
--gc-min-objects 1 --gc-growth-trigger 1 will put more stress on the garbage collector (initiate a full collection cycle at every allocation). This will probably remove the randomness but will be slower as well. |
Sure thing! Thanks! Here is a Valgrind run, starting from the moment it actually starts processing the manifest. Note that the invalid reads/use of uninitialized value in If you prefer me to host the report elsewhere, feel free to tell me! |
In the an imported manifest, I have the following function:
Removing the |
From that valgrind output I think I know what's going on. For a given I'll look into a solution tomorrow (I'm too many margaritas down right now!). As a workaround you should be able to increase the GC tuning to make the GC less likely to run at that precise point in time where the heap is temporarily malformed. Of course this may be an unrelated bug but it looks like it explains the behavior pretty well to me. |
Hi, Thanks for #229. However, I still face random segmentation faults: gdb:
some valgrind:
|
Ok how about a reproduction case, or if you like we can meet up in NYC and debug it together. |
Hi, Unfortunately, I won't be back in NYC until few months. I'll try to create a reproduction case! Edit (Aug 22): Met on Google Hangout to share reproduction case. |
Are you still getting segfaults? I found that once I was running the new build (which was not the case originally because I had to clean out Python's eggs) the segfault went away. There were lingering valgrind errors but they all seemed to be coming from Python (false positives or actual bugs, who knows). |
Hi,
I experience random segmentation faults on ::Heap::markFrom (core/state.h:348) :
It appears the
curr
isNULL
, thus the crash oncurr->mark
:A bit more context:
My template is a quite big, so I won't paste it directly here. However, we can note that I am using the Python library, native callbacks,
std.mergePatch
, andtla_codes
. At first glance, we might think that mergePatch causes it as I recently introduced it in my templates.Thanks.
The text was updated successfully, but these errors were encountered: