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

Data corruption computing character tables #187

Closed
fingolfin opened this issue Jan 14, 2019 · 2 comments
Closed

Data corruption computing character tables #187

fingolfin opened this issue Jan 14, 2019 · 2 comments
Assignees

Comments

@fingolfin
Copy link
Member

fingolfin commented Jan 14, 2019

See gap-system/gap#3114

This leads to an unexpected break loop when using the Julia GC instead of GASMAN:
g:= AtlasGroup( "U3(8).3^2" );; Irr( g );;

@fingolfin
Copy link
Member Author

A good way to get into a break loop just before the error happens is to apply this patch:

diff --git a/lib/ctblgrp.gi b/lib/ctblgrp.gi
index 0c45458005..21430b574b 100644
--- a/lib/ctblgrp.gi
+++ b/lib/ctblgrp.gi
@@ -1768,7 +1768,11 @@ StandardClassMatrixColumn := function(D,M,r,t)
 
     T:=DoubleCentralizerOrbit(D,r,t);
     Info(InfoCharacterTable,2,Length(T[1])," instead of ",D.classiz[r]);
-
+if t = 37 and Length(T[1]) = 1700 and D.classiz[r] = 96768 then
+    Print("HANDLE_OBJ(T) = ", HANDLE_OBJ(T), " = 0x", HexStringInt(HANDLE_OBJ(T)), "\n");
+    Print("HANDLE_OBJ(T[2]) = ", HANDLE_OBJ(T[2]), " = 0x", HexStringInt(HANDLE_OBJ(T[2])), "\n");
+    Error("Breakpoint");
+fi;
     if IsDxLargeGroup(D.group) then
       # if r and t are unique,the conjugation test can be weak (i.e. up to
       # galois automorphisms)

From that break prompt, I can trigger the issue just by printing T[2]; it seems that this triggers a GC, and apparently the master pointer for T[2] is freed, and then reused. To be clear: The content of the plist T of length 2 stays unchanged, but the master pointer stored in its second slot now points to another bag. So HANDLE_OBJ(T[2]) prints the same value, but the object it refers to has changed -- usually to a string.

Using watchpoints in lldb, I traced when this change happens, and it was in .... NewBag! Specifically, in SET_PTR_BAG(bag, DATA(header));. This is why I say it looks as if the master pointer object was freed and its memory reused.

I tried to prevent this, by assigning T[2] to a gobal variable from that break loop before resuming, but that did not stop the object from being collected.

@fingolfin
Copy link
Member Author

fingolfin commented Jan 21, 2019

Resolved by gap-system/gap#3199

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