Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3189 closed defect (not a bug)

Keyboard interrupt during session restore (hang reading volume data?)

Reported by: chimerax-bug-report@… Owned by: Tom Goddard
Priority: normal Milestone:
Component: Sessions Version:
Keywords: Cc: Greg Couch
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-4.4.0-178-generic-x86_64-with-debian-stretch-sid
ChimeraX Version: 0.92 (2020-03-05)
Description
(Describe the actions that caused this problem to occur here)

Log:
UCSF ChimeraX version: 0.92 (2020-03-05)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open /data/disk3/modeling/gp17-2020/Figure4-20200512-fiber-ET.cxs

Traceback (most recent call last):  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/ui/gui.py", line 634, in _qt_safe  
run(session, "open " + " ".join([FileNameArg.unparse(p) for p in paths]))  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/core/commands/run.py", line 31, in run  
results = command.run(text, log=log)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/core/commands/cli.py", line 2845, in run  
result = ci.function(session, **kw_args)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/core/commands/open.py", line 68, in open  
path_models = session.models.open(paths, format=format, name=name, **kw)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/core/models.py", line 726, in open  
session, filenames, format=format, name=name, **kw)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/core/io.py", line 504, in open_multiple_data  
models, status = open_data(session, fspec, format=format, name=name, **kw)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/core/io.py", line 457, in open_data  
models, status = open_func(*args, **kw)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/core/session.py", line 894, in open  
session.restore(stream, path=path, resize_window=resize_window)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/core/session.py", line 653, in restore  
obj = sm.restore_snapshot(self, data)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/map/session.py", line 219, in restore_snapshot  
grids = grid_data_from_state(data, gdcache, session, rfp)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/site-
packages/chimerax/map/session.py", line 354, in grid_data_from_state  
a = frombuffer(decompress(b64decode(s['array'])), dtype =
dtype(s['value_type']))  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/gzip.py", line
532, in decompress  
return f.read()  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/gzip.py", line
276, in read  
return self._buffer.read(size)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/gzip.py", line
473, in read  
self._fp.prepend(self._decompressor.unconsumed_tail)  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/gzip.py", line
99, in prepend  
self._length = len(self._buffer)  
KeyboardInterrupt  
  
KeyboardInterrupt  
  
File "/home/cwang/software/chimerax-2020.03.05/lib/python3.7/gzip.py", line
99, in prepend  
self._length = len(self._buffer)  
  
See log for complete Python traceback.  
  




OpenGL version: 3.3.0 NVIDIA 384.130
OpenGL renderer: Quadro K2200/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Change History (5)

comment:1 by Eric Pettersen, 5 years ago

Cc: Greg Couch added
Component: UnassignedSessions
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionKeyboard interrupt during session restore (hang reading volume data?)

comment:2 by Greg Couch, 5 years ago

Not sure if this is the case hear, but make sure you don't use a bare except, at least do "except Exception" so keyboard interrupts exceptions can propagate.

comment:3 by Tom Goddard, 5 years ago

Resolution: not a bug
Status: assignedclosed

The full exception is in the bug report. A session file was opened, it was restoring a volume grid which was included in the file and compressed and it was unzipping it, and the user typed ctrl-C at the Linux shell that started ChimeraX.

Not sure what bug the user is reporting. Was the decompression just too slow with a giant map? Or did they just expect ctrl-C in the shell to exit ChimeraX?

Map decompression is using gzip which is quite slow. Possibly a progress message would help. Definitely would help to use blosc decompression instead. I'll make a ticket for that.

comment:4 by Tom Goddard, 5 years ago

Another question is whether ctrl-C at the shell should kill ChimeraX. I think it should not that the current behavior is better. The most common case of ctrl-C at the shell (instead of closing the app through the gui) is probably that ChimeraX is in a long computation (so gui does not respond). Ctrl-C exits the computation and allows ChimeraX to continue running so the user does not lose their session.

comment:5 by Greg Couch, 5 years ago

It would be fine for the session code to do a "except BaseException". It should be a conscious decision on our part.

Note: See TracTickets for help on using tickets.