Opened 8 years ago
Closed 8 years ago
#899 closed defect (fixed)
trying to save session with morph results nukes ChimeraX
Reported by: | Elaine Meng | Owned by: | pett |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Sessions | Version: | |
Keywords: | Cc: | chimera-programmers | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Attachments (1)
Change History (8)
by , 8 years ago
comment:1 by , 8 years ago
One attempt made a partial file (attached) which causes seg fault if you try to open it.
comment:2 by , 8 years ago
Owner: | changed from | to
---|
Here's the tail end of the stack of the crashed process:
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000b00000000
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0xb00000000:
MALLOC_LARGE 0000000135b41000-0000000135e6a000 [ 3236K] rw-/rwx SM=PRV
-->
STACK GUARD 0000700007cb2000-0000700007cb3000 [ 4K] ---/rwx SM=NUL stack guard for thread 21
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fffb74f0d42 pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fffb75de457 pthread_kill + 90
2 libsystem_c.dylib 0x00007fffb7407497 raise + 26
3 libsystem_platform.dylib 0x00007fffb75d1b3a _sigtramp + 26
4 ??? 000000000000000000 0 + 0
5 org.python.python 0x00000001039b4f38 PyFrame_New + 56 (frameobject.c:625)
6 org.python.python 0x0000000103a5e7ed _PyEval_EvalCodeWithName + 77 (ceval.c:3891)
7 org.python.python 0x0000000103a5fc1a _PyFunction_FastCallDict + 570 (ceval.c:5031)
8 org.python.python 0x000000010398f05a _PyObject_FastCallDict + 346 (abstract.c:2295)
9 org.python.python 0x000000010398f18c _PyObject_Call_Prepend + 156 (abstract.c:2358)
10 arraydatatype.cpython-36m-darwin.so 0x00000001051cae25 Pyx_PyObject_Call + 85 (arraydatatype.c:11516)
11 arraydatatype.cpython-36m-darwin.so 0x00000001051cd0a0 pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_7from_param + 496 (arraydatatype.c:3493)
12 org.python.python 0x00000001039d69f0 _PyCFunction_FastCallDict + 464 (methodobject.c:234)
13 org.python.python 0x000000010398f070 _PyObject_FastCallDict + 368 (abstract.c:2295)
14 org.python.python 0x0000000103989c46 PyObject_CallFunctionObjArgs + 502 (abstract.c:2811)
15 _ctypes.cpython-36m-darwin.so 0x0000000104bff810 _ctypes_callproc + 176 (callproc.c:1108)
16 _ctypes.cpython-36m-darwin.so 0x0000000104bf9959 PyCFuncPtr_call + 1049 (_ctypes.c:3870)
17 org.python.python 0x000000010398edb5 PyObject_Call + 101 (abstract.c:2246)
18 org.python.python 0x00000001039edd48 slot_tp_call + 152 (typeobject.c:6167)
19 org.python.python 0x000000010398f024 _PyObject_FastCallDict + 292 (abstract.c:2316)
comment:3 by , 8 years ago
Owner: | changed from | to
---|
I ran ChimeraX/bin/ChimeraX.valgrind --nogui on Linux after compiling the core with DEBUG=1. My guess is that is why this was assigned to me? There are lots of errors.
The first one is is molc.cpp:sseq_residue_at(). C++ doesn't bounds check operator[], you need to use the "at" member function. I've checked in that change. So now the morph command fails (the morph command was in a command script). See below for the traceback. Once that is fixed, the next error valgrind found might go away. The C++ stack for that is below too.
Didn't try opening the session file since written out corrupted.
Traceback (most recent call last): File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/ChimeraX_main.py", line 613, in init commands.run(sess, 'open %s' % arg) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/commands/run.py", line 31, in run results = command.run(text, log=log) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/commands/cli.py", line 2512, in run result = ci.function(session, **kw_args) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/commands/open.py", line 104, in open models = handle_unknown_kw(session.models.open, paths, format=format, name=name, **kw) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/commands/open.py", line 57, in handle_unknown_kw return f(*args, **kw) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/models.py", line 446, in open session, filenames, format=format, name=name, **kw) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/io.py", line 439, in open_multiple_data models, status = open_data(session, fspec, format=format, name=name, **kw) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/io.py", line 397, in open_data models, status = open_func(*args, **kw) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/scripting.py", line 116, in open_command_script run(session, text) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/commands/run.py", line 31, in run results = command.run(text, log=log) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/commands/cli.py", line 2512, in run result = ci.function(session, **kw_args) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/morph/morph.py", line 66, in morph color_segments = color_segments, color_core = color_core) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/morph/motion.py", line 20, in compute_morph res_interp = ResidueInterpolator(traj.residues, cartesian) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/morph/interpolate.py", line 116, in __init__ residue_interpolator(r, cartesian_atoms, dihedral_atoms) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/morph/interp_residue.py", line 100, in internal_residue_interpolator rba = (c.residue_before(r), c.residue_after(r)) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/atomic/molobject.py", line 1419, in residue_before return self.residue_at(pos-1) File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/atomic/molobject.py", line 1413, in residue_at return _residue_or_none(f(self._c_pointer, index)) IndexError: vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 305)
==26718== Conditional jump or move depends on uninitialised value(s) ==26718== at 0x35573CC6: distance (morph.cpp:26) ==26718== by 0x35573CC6: interp_dihedrals (morph.cpp:161) ==26718== by 0x35573CC6: interpolate_dihedrals (morph.cpp:202) ==26718== by 0x4F151F3: _PyCFunction_FastCallDict (methodobject.c:231)
comment:4 by , 8 years ago
Owner: | changed from | to
---|
Ok, I fixed StructureSequence methods residue_before() and residue_after() to check for end of sequence and now the morph works and the session saves. But restoring the session gives the following crash in atomstruct session restore code.
Process: ChimeraX [85046]
Path: /Users/USER/*/ChimeraX.app/Contents/MacOS/ChimeraX
Identifier: edu.ucsf.cgl.ChimeraX
Version: 0.1.0 (0.1.0.0)
Code Type: X86-64 (Native)
Parent Process: bash [80619]
Responsible: ChimeraX [85046]
User ID: 501
Date/Time: 2017-10-24 11:25:45.155 -0700
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: ADCA02F2-9A59-6574-CF8F-380125498A20
Sleep/Wake UUID: 857ADD97-6780-480E-ADF9-B781D71AF543
Time Awake Since Boot: 1200000 seconds
Time Since Wake: 5700 seconds
System Integrity Protection: enabled
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00007fb3fb7b0f40
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0x7fb3fb7b0f40:
MALLOC_TINY 00007fb3fb000000-00007fb3fb700000 [ 7168K] rw-/rwx SM=PRV
-->
MALLOC_SMALL 00007fb3fb800000-00007fb3fc000000 [ 8192K] rw-/rwx SM=PRV
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8cb27d42 pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff8cc15457 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff8ca3e497 raise + 26
3 libsystem_platform.dylib 0x00007fff8cc08b3a _sigtramp + 26
4 ??? 000000000000000000 0 + 0
5 libatomstruct.dylib 0x0000000108d7e58d atomstruct::BaseManager::session_restore(int, int, float, _object*) + 221
6 libatomstruct.dylib 0x0000000108d9d58f atomstruct::Structure::session_restore(int, _object*, _object*, _object*) + 3807
7 libmolc.dylib 0x0000000108d0e0bb structure_session_restore + 11
8 _ctypes.cpython-36m-darwin.so 0x0000000107f9ffcf ffi_call_unix64 + 79
9 _ctypes.cpython-36m-darwin.so 0x0000000107fa082a ffi_call + 858
10 _ctypes.cpython-36m-darwin.so 0x0000000107f9bac3 _ctypes_callproc + 787
11 _ctypes.cpython-36m-darwin.so 0x0000000107f95989 PyCFuncPtr_call + 1049
12 org.python.python 0x0000000106cdb1b4 _PyObject_FastCallDict + 292
13 org.python.python 0x0000000106dac4eb call_function + 427
comment:5 by , 8 years ago
Restoring the session with an Oct 15 build gives a slightly different crash dump indicating pseudobond groups may be involved.
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00007f9fc00baf38
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0x7f9fc00baf38:
MALLOC_SMALL 00007f9c9a800000-00007f9c9d000000 [ 40.0M] rw-/rwx SM=PRV
-->
Stack Guard 00007fff563c9000-00007fff59bc9000 [ 56.0M] ---/rwx SM=NUL
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8cb27d42 pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff8cc15457 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff8ca3e497 raise + 26
3 libsystem_platform.dylib 0x00007fff8cc08b3a _sigtramp + 26
4 ??? 000000000000000000 0 + 0
5 libatomstruct.dylib 0x0000000107900aab atomstruct::CS_PBGroup::session_restore(int, int, float) + 203
6 libatomstruct.dylib 0x000000010790441d atomstruct::BaseManager::session_restore(int, int, float, _object*) + 221
7 libatomstruct.dylib 0x00000001079234e4 atomstruct::Structure::session_restore(int, _object*, _object*, _object*) + 3908
8 libmolc.dylib 0x000000010789412b structure_session_restore + 11
9 _ctypes.cpython-36m-darwin.so 0x0000000106b22fcf ffi_call_unix64 + 79
10 _ctypes.cpython-36m-darwin.so 0x0000000106b2382a ffi_call + 858
11 _ctypes.cpython-36m-darwin.so 0x0000000106b1eac3 _ctypes_callproc + 787
comment:6 by , 8 years ago
FYI, now the first non-openssl valgrind error is:
==7023== Invalid read of size 4 ==7023== at 0x26268320: atomstruct::CS_PBGroup::session_restore(int, int**, float**) (PBGroup.cpp:323) ==7023== by 0x262C6420: atomstruct::Proxy_PBGroup::session_restore(int, int**, float**) (PBGroup.h:363) ==7023== by 0x262C5493: atomstruct::BaseManager::session_restore(int, int**, float**, _object*) (PBManager.cpp:206) ==7023== by 0x2629A345: atomstruct::Structure::session_restore(int, _object*, _object*, _object*) (Structure.cpp:1254) ==7023== by 0x418FDF3: structure_session_restore (molc.cpp:4215) .... ==7023== Address 0x2732d79c is 0 bytes after a block of size 28 alloc'd ==7023== at 0x4C2DD05: malloc (vg_replace_malloc.c:299) ==7023== by 0xD52AE60: PyDataMem_NEW (alloc.c:198) ==7023== by 0xD52AE60: _npy_alloc_cache (alloc.c:66) ==7023== by 0xD52AE60: npy_alloc_cache (alloc.c:94) ==7023== by 0xD592D8F: PyArray_NewFromDescr_int.constprop.2 (ctors.c:1061) ==7023== by 0xD594496: PyArray_NewFromDescr (ctors.c:1145) ==7023== by 0xD594496: PyArray_FromString (ctors.c:3639) ==7023== by 0xD620EAD: array_fromstring (multiarraymodule.c:2059) ==7023== by 0x4F153E8: PyCFunction_Call (methodobject.c:98) ==7023== by 0x2EC1F04B: __Pyx_PyObject_Call(_object*, _object*, _object*) (_serialize.cpp:9172) ==7023== by 0x2EC28D44: __pyx_f_4core_10_serialize__decode_ndarray(_object*) (_serialize.cpp:3229) ==7023== by 0x2EC2BC3F: __pyx_f_4core_10_serialize__decode_ext(int, _object*) (_serialize.cpp:6609)
comment:7 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Computation of the pointer offset for per-coord-set pseudobond groups was wrong
bad session file (ChimeraX died while writing it)