Skip to content
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

GC bug #330

Open
layus opened this issue Nov 6, 2020 · 3 comments
Open

GC bug #330

layus opened this issue Nov 6, 2020 · 3 comments

Comments

@layus
Copy link
Member

layus commented Nov 6, 2020

Hi guys !

What about a funny issue to enlighten your confinement ?

%****************************************************************
%**
%** Error: unhandled exception
%**
%** typeError('BitArray' <GRedToUnstable>)
%**--------------------------------------------------------------

%****************************************************************
%**
%** Error: unhandled exception
%**
%** typeError('BitArray' <GRedToUnstable>)
%**--------------------------------------------------------------
%%% feeding file /home/layus/projects/mozart2/lib/main/base/Base.oz
@layus
Copy link
Member Author

layus commented Nov 6, 2020

With some context:

Scanning dependencies of target library_stage_1
[ 28%] (stage 1) /home/gmaudoux/projets/mozart2/build/lib/stage1/Base.ozf

%****************************************************************
%**
%** Error: unhandled exception
%**
%** typeError('BitArray' <GRedToUnstable>)
%**--------------------------------------------------------------

%****************************************************************
%**
%** Error: unhandled exception
%**
%** typeError('BitArray' <GRedToUnstable>)
%**--------------------------------------------------------------
%%% feeding file /home/gmaudoux/projets/mozart2/lib/main/base/Base.oz
%** ------------------ crashed
make[2]: *** [lib/CMakeFiles/library_stage_1.dir/build.make:82: lib/stage1/Base.ozf] Error 1
make[1]: *** [CMakeFiles/Makefile2:1106: lib/CMakeFiles/library_stage_1.dir/all] Error 2
make: *** [Makefile:182: all] Error 2

@layus
Copy link
Member Author

layus commented Nov 6, 2020

@sjrd Any idea what an GRedToUnstable is ? And why it appears instead of a plain, honnest BitArray ?

@sjrd
Copy link
Member

sjrd commented Nov 6, 2020

GRedToStable and GRedToUnstable, IIRC, are special nodes that are supposed to only be used in a transient state during GC (or more generally GR, not sure what that stands for anymore ^^). When we copy a node A from the old space to the new space, we replace its original Node with a GRedToStable (resp. GRedToUnstable) that points to its new node if it is a StableNode (resp. UnstableNode). That way, when the copy finds the same node again through a different path, it knows that it should not create another copy of the value, but simply use the new location.

I don't know why a GRedToUnstable remains observable, but it's clearly a GC bug. In-between GCs, the graph of objects should contain no GRedToStable nor GRedToUnstable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants