visit-dav/visit

llnl rzhound + xquartz garbled windows

cyrush opened this issue · 7 comments

Describe the bug

From LLNL user:

Various issues when cloning a window, 2nd or further windows are blank or turn black, or the graphics are garbled in them.
Commands issued for one window are executed in another window.
Further details:
Happens from two different Mac (a 2023 Mac Studio and a 2023 MacBook Pro).
Does not happen when connecting to rzhound from RZVNC.
Happens in ViSit serial mode or parallel ('sxterm') mode.
These problems were not occurring with rztopaz.
Current Mac is OS 14.6.1.
Rzhound ViSit version is 3.4.1.
Reinstalling XQuartz on Mac did not fix the issue.

I (Cyrus) see similar things when using my laptop screen, but not when using an external monitor.

may be related to #19544

Ok, so I played around with rzhound displaying back to my macOS system for a while. Please see the video I recorded of all the issues I ran into in /usr/workspace/visit/bug_data/VisIt_341_rzhound_issues.mp4. There are many subtle issues.

FYI...I realize that when I updated XQuartz to 2.8.5 from 2.7.11 (2016'ish), I did not have indirect glx enabled. I had to fix that with

 defaults write org.xquartz.X11 enable_iglx -bool true

But, I made the recording above before doig that.

I expirimented with SR mode and got mostly same behavior. There was maybe slightly less issues but all issues still occurred eventually. I even got the viewer to core dump. I recorded log data but couldn't get a useful stack dump.

Handling AddPlotRPC RPC.
ViewerPlotList::GetDefaultSILRestriction(): Trying to find SIL restriction for key: localhost:/usr/gapps/visit/data/globe.silo:0
Found key. Copying SIL restriction.
Setting SIL restriction's top set to 0
signalhandler_core: SIGSEGV! (Segmentation fault)

The above SIGSEGV is from the viewer 3.4.1 install.

I also managed to get a kind of stack trace from my own 3.4.1 debug build of enginer_ser

free(): invalid pointer

Loguru caught a signal: SIGABRT
Stack trace:
27            0x40217e /g/g11/miller86/visit/visit/3.4RC/build/exe/engine_ser() [0x40217e]
26      0x15554479b7e5 __libc_start_main + 229
25            0x40261d /g/g11/miller86/visit/visit/3.4RC/build/exe/engine_ser() [0x40261d]
24            0x4024da /g/g11/miller86/visit/visit/3.4RC/build/exe/engine_ser() [0x4024da]
23      0x1555554afb91 Engine::EventLoop() + 515
22      0x1555554afd56 Engine::ProcessInput() + 92
21      0x15554da34436 Xfer::Process() + 544
20      0x15554d8a4ed4 AttributeSubject::Notify() + 28
19      0x15554d9f727f Subject::Notify() + 163
18      0x1555554b9615 EngineRPCExecutor<SetWinAnnotAttsRPC>::Update(Subject*) + 53
17      0x1555554a5d4f EngineRPCExecutor<SetWinAnnotAttsRPC>::Execute(SetWinAnnotAttsRPC*) + 305
16      0x1555554cdbbf NetworkManager::SetWindowAttributes(WindowAttributes const&, std::string const&, double const*, std::string const&, int) + 195
15      0x1555554ce113 NetworkManager::SetWindowAttributes(EngineVisWinInfo&, WindowAttributes const&, std::string const&, double const*, std::string const&) + 1361
14      0x15554fcf2b58 avtColorTables::SetColorTables(ColorTableAttributes const&) + 54
13      0x15554d8d0c81 ColorTableAttributes::operator=(ColorTableAttributes const&) + 51
12      0x15554d8cfd36 ColorTableAttributes::Copy(ColorTableAttributes const&) + 206
11      0x15554d8c8c12 ColorControlPointList::~ColorControlPointList() + 24
10      0x15554d8c8bd2 ColorControlPointList::~ColorControlPointList() + 188
9       0x15555548536f std::vector<std::string>::~vector() + 65
8       0x1555554853f4 std::_Vector_base<std::string>::~_Vector_base() + 62
7       0x15555548951a std::_Vector_base<std::string>::_M_deallocate(std::string*, unsigned long) + 50
6       0x15555548c6a3 std::allocator_traits<std::allocator<std::string> >::deallocate(std::allocator<std::string>&, std::string*, unsigned long) + 43
5       0x155555492c58 __gnu_cxx::new_allocator<std::string>::deallocate(std::string*, unsigned long) + 46
4       0x1555447f95b4 /lib64/libc.so.6(+0x985b4) [0x1555447f95b4]
3       0x1555447f7a2c /lib64/libc.so.6(+0x96a2c) [0x1555447f7a2c]
2       0x1555447f0727 /lib64/libc.so.6(+0x8f727) [0x1555447f0727]
1       0x155544782e65 abort + 295
0       0x1555447af52f gsignal + 271
2024-10-02 14:52:30.519 ( 428.021s) [main thread     ]                       :0     FATL| Signal: SIGABRT

More debugger info from gdb...

#0  0x00001555447af52f in raise () from /lib64/libc.so.6
#1  0x0000155544782e65 in abort () from /lib64/libc.so.6
#2  0x00001555447f0727 in __libc_message () from /lib64/libc.so.6
#3  0x00001555447f7a2c in malloc_printerr () from /lib64/libc.so.6
#4  0x00001555447f95b4 in _int_free () from /lib64/libc.so.6
#5  0x0000155555492c58 in __gnu_cxx::new_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::deallocate (this=0x44c1cc0, __p=0x4b1a9b0, __t=2)
    at /collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/include/c++/10/ext/new_allocator.h:133
#6  0x000015555548c6a3 in std::allocator_traits<std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::deallocate (__a=..., __p=0x4b1a9b0, __n=2)
    at /collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/include/c++/10/bits/alloc_traits.h:492
#7  0x000015555548951a in std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_deallocate (this=0x44c1cc0, 
    __p=0x4b1a9b0, __n=2) at /collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/include/c++/10/bits/stl_vector.h:354
#8  0x00001555554853f4 in std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~_Vector_base (this=0x44c1cc0, 
    __in_chrg=<optimized out>) at /collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/include/c++/10/bits/stl_vector.h:335
#9  0x000015555548536f in std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~vector (this=0x44c1cc0, 
    __in_chrg=<optimized out>) at /collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/include/c++/10/bits/stl_vector.h:683
#10 0x000015554d8c8bd2 in ColorControlPointList::~ColorControlPointList (this=0x44c1c50, __in_chrg=<optimized out>)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorControlPointList.C:225
#11 0x000015554d8c8c12 in ColorControlPointList::~ColorControlPointList (this=0x44c1c50, __in_chrg=<optimized out>)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorControlPointList.C:232
#12 0x000015554d8cfd36 in ColorTableAttributes::Copy (this=0xa24d60, obj=...)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorTableAttributes.C:104
#13 0x000015554d8d0c81 in ColorTableAttributes::operator= (this=0xa24d60, obj=...)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorTableAttributes.C:266
#14 0x000015554fcf2b58 in avtColorTables::SetColorTables (this=0x568f90, atts=...)
    at /g/g11/miller86/visit/visit/3.4RC/src/avt/Pipeline/Data/avtColorTables.C:1160
#15 0x00001555554ce113 in NetworkManager::SetWindowAttributes (this=0x546530, viswinInfo=..., atts=..., 
    extstr="AVT_ORIGINAL_EXTENTS", vexts=0x4e22f0, ctName="")
    at /g/g11/miller86/visit/visit/3.4RC/src/engine/main/NetworkManager.C:3280
#16 0x00001555554cdbbf in NetworkManager::SetWindowAttributes (this=0x546530, atts=..., extstr="AVT_ORIGINAL_EXTENTS", 
    vexts=0x4e22f0, ctName="", windowID=1) at /g/g11/miller86/visit/visit/3.4RC/src/engine/main/NetworkManager.C:3178
#17 0x00001555554a5d4f in EngineRPCExecutor<SetWinAnnotAttsRPC>::Execute (this=0x4ef680, rpc=0x4df990)
    at /g/g11/miller86/visit/visit/3.4RC/src/engine/main/Executors.h:780
#18 0x00001555554b9615 in EngineRPCExecutor<SetWinAnnotAttsRPC>::Update (this=0x4ef680, s=0x4df9c0)
    at /g/g11/miller86/visit/visit/3.4RC/src/engine/main/EngineRPCExecutor.h:33
#19 0x000015554d9f727f in Subject::Notify (this=0x4df9c0) at /g/g11/miller86/visit/visit/3.4RC/src/common/state/Subject.C:159
#20 0x000015554d8a4ed4 in AttributeSubject::Notify (this=0x4df990)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/AttributeSubject.C:65
#21 0x000015554da34436 in Xfer::Process (this=0x4db2b0) at /g/g11/miller86/visit/visit/3.4RC/src/common/state/Xfer.C:382
#22 0x00001555554afd56 in Engine::ProcessInput (this=0x48a4e0) at /g/g11/miller86/visit/visit/3.4RC/src/engine/main/Engine.C:1896
#23 0x00001555554afb91 in Engine::EventLoop (this=0x48a4e0) at /g/g11/miller86/visit/visit/3.4RC/src/engine/main/Engine.C:1840
#24 0x00000000004024da in EngineMain (argc=2, argv=0x7fffffffa988) at /g/g11/miller86/visit/visit/3.4RC/src/engine/main/main.C:297
#25 0x000000000040261d in main (argc=8, argv=0x7fffffffa988) at /g/g11/miller86/visit/visit/3.4RC/src/engine/main/main.C:360
(gdb) frame 10
#10 0x000015554d8c8bd2 in ColorControlPointList::~ColorControlPointList (this=0x44c1c50, __in_chrg=<optimized out>)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorControlPointList.C:225
225	ColorControlPointList::~ColorControlPointList()
(gdb) list
220	//
221	// Modifications:
222	//
223	// ****************************************************************************
224	
225	ColorControlPointList::~ColorControlPointList()
226	{
227	    AttributeGroupVector::iterator pos;
228	
229	    // Destroy the controlPoints field.
(gdb) up
#11 0x000015554d8c8c12 in ColorControlPointList::~ColorControlPointList (this=0x44c1c50, __in_chrg=<optimized out>)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorControlPointList.C:232
232	}
(gdb) down
#10 0x000015554d8c8bd2 in ColorControlPointList::~ColorControlPointList (this=0x44c1c50, __in_chrg=<optimized out>)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorControlPointList.C:225
225	ColorControlPointList::~ColorControlPointList()
(gdb) down
#9  0x000015555548536f in std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~vector (this=0x44c1cc0, 
    __in_chrg=<optimized out>) at /collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/include/c++/10/bits/stl_vector.h:683
683	      }
(gdb) up
#10 0x000015554d8c8bd2 in ColorControlPointList::~ColorControlPointList (this=0x44c1c50, __in_chrg=<optimized out>)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorControlPointList.C:225
225	ColorControlPointList::~ColorControlPointList()
(gdb) list
220	//
221	// Modifications:
222	//
223	// ****************************************************************************
224	
225	ColorControlPointList::~ColorControlPointList()
226	{
227	    AttributeGroupVector::iterator pos;
228	
229	    // Destroy the controlPoints field.
(gdb) 
230	    for(pos = controlPoints.begin(); pos != controlPoints.end(); ++pos)
231	        delete *pos;
232	}
233	
234	// ****************************************************************************
235	// Method: ColorControlPointList::operator =
236	//
237	// Purpose:
238	//   Assignment operator for the ColorControlPointList class.
239	//
(gdb) 
240	// Note:       Autogenerated by xml2atts.
241	//
242	// Programmer: xml2atts
243	// Creation:   omitted
244	//
245	// Modifications:
246	//
247	// ****************************************************************************
248	
249	ColorControlPointList&
(gdb) up
#11 0x000015554d8c8c12 in ColorControlPointList::~ColorControlPointList (this=0x44c1c50, __in_chrg=<optimized out>)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorControlPointList.C:232
232	}
(gdb) up
#12 0x000015554d8cfd36 in ColorTableAttributes::Copy (this=0xa24d60, obj=...)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorTableAttributes.C:104
104	        delete *pos;
(gdb) list
99	    colorTableNames = obj.colorTableNames;
100	    colorTableActiveFlags = obj.colorTableActiveFlags;
101	    // *** Copy the colorTables field ***
102	    // Delete the AttributeGroup objects and clear the vector.
103	    for(pos = colorTables.begin(); pos != colorTables.end(); ++pos)
104	        delete *pos;
105	    colorTables.clear();
106	    if(obj.colorTables.size() > 0)
107	        colorTables.reserve(obj.colorTables.size());
108	    // Duplicate the colorTables from obj.
(gdb) up
#13 0x000015554d8d0c81 in ColorTableAttributes::operator= (this=0xa24d60, obj=...)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorTableAttributes.C:266
266	    ColorTableAttributes::Copy(obj);
(gdb) up
#14 0x000015554fcf2b58 in avtColorTables::SetColorTables (this=0x568f90, atts=...)
    at /g/g11/miller86/visit/visit/3.4RC/src/avt/Pipeline/Data/avtColorTables.C:1160
1160	    *ctAtts = atts;
(gdb) dow
#13 0x000015554d8d0c81 in ColorTableAttributes::operator= (this=0xa24d60, obj=...)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorTableAttributes.C:266
266	    ColorTableAttributes::Copy(obj);
(gdb) down
#12 0x000015554d8cfd36 in ColorTableAttributes::Copy (this=0xa24d60, obj=...)
    at /g/g11/miller86/visit/visit/3.4RC/src/common/state/ColorTableAttributes.C:104
104	        delete *pos;
(gdb) list 50
45	// changes vectors, which are then applied when the color table they belong to
46	// is added to the CTAtts.
47	
48	// ****************************************************************************
49	// Method: ColorTableAttributes::ColorTableAttributes
50	//
51	// Purpose:
52	//   Init utility for the ColorTableAttributes class.
53	//
54	// Note:       Autogenerated by xml2atts.
(gdb) 
55	//
56	// Programmer: xml2atts
57	// Creation:   omitted
58	//
59	// Modifications:
60	//
61	// ****************************************************************************
62	
63	void ColorTableAttributes::Init()
64	{
(gdb) 
65	    defaultContinuous = "hot";
66	    defaultDiscrete = "levels";
67	    tagsMatchAny = true;
68	    tagListNames.push_back("Default"); // add the "Default" tag to the tag list.
69	    tagListNames.push_back("User Defined"); // add the "User Defined" tag to the tag list.
70	    tagListActive.push_back(true); // set the "Default" tag to on.
71	    tagListActive.push_back(true); // set the "User Defined" tag to on.
72	    tagListNumRefs.push_back(0); // the "Default" tag has no refs.
73	    tagListNumRefs.push_back(0); // the "User Defined" tag has no refs.
74	    tagListTableItemFlag.push_back(false); // the "Default" tag has no tag table entry.
(gdb) 
75	    tagListTableItemFlag.push_back(false); // the "User Defined" tag has no tag table entry.
76	
77	    ColorTableAttributes::SelectAll();
78	}
79	
80	// ****************************************************************************
81	// Method: ColorTableAttributes::ColorTableAttributes
82	//
83	// Purpose:
84	//   Copy utility for the ColorTableAttributes class.
(gdb) 
85	//
86	// Note:       Autogenerated by xml2atts.
87	//
88	// Programmer: xml2atts
89	// Creation:   omitted
90	//
91	// Modifications:
92	//
93	// ****************************************************************************
94	
(gdb) 
95	void ColorTableAttributes::Copy(const ColorTableAttributes &obj)
96	{
97	    AttributeGroupVector::const_iterator pos;
98	
99	    colorTableNames = obj.colorTableNames;
100	    colorTableActiveFlags = obj.colorTableActiveFlags;
101	    // *** Copy the colorTables field ***
102	    // Delete the AttributeGroup objects and clear the vector.
103	    for(pos = colorTables.begin(); pos != colorTables.end(); ++pos)
104	        delete *pos;
(gdb) 
105	    colorTables.clear();
106	    if(obj.colorTables.size() > 0)
107	        colorTables.reserve(obj.colorTables.size());
108	    // Duplicate the colorTables from obj.
109	    for(pos = obj.colorTables.begin(); pos != obj.colorTables.end(); ++pos)
110	    {
111	        ColorControlPointList *oldColorControlPointList = (ColorControlPointList *)(*pos);
112	        ColorControlPointList *newColorControlPointList = new ColorControlPointList(*oldColorControlPointList);
113	        colorTables.push_back(newColorControlPointList);
114	    }
(gdb) 
115	
116	    defaultContinuous = obj.defaultContinuous;
117	    defaultDiscrete = obj.defaultDiscrete;
118	    tagsMatchAny = obj.tagsMatchAny;
119	    tagListNames = obj.tagListNames;
120	    tagListActive = obj.tagListActive;
121	    tagListNumRefs = obj.tagListNumRefs;
122	    tagListTableItemFlag = obj.tagListTableItemFlag;
123	    tagChangesTag = obj.tagChangesTag;
124	    tagChangesType = obj.tagChangesType;

I tried with scalable rendering. While there was a modest reduction in issues...all issues eventually did happen. In fact, I even got VisIt to core a few times...

Handling AddPlotRPC RPC.
ViewerPlotList::GetDefaultSILRestriction(): Trying to find SIL restriction for key: localhost:/usr/gapps/visit/data/globe.silo:0
Found key. Copying SIL restriction.
Setting SIL restriction's top set to 0
signalhandler_core: SIGSEGV! (Segmentation fault)