gst-remote and snapshots

Tagged:
Project:GNU Smalltalk
Component:Base classes
Category:bug
Priority:normal
Assigned:Unassigned
Status:fixed
Description

When starting gst-remote with a previously saved image, I get an error (after that gst-remote actually starts).

Also, evaluating gst-remote --snapshot=foo.im (or gst-remote --eval "ObjectMemory snapshot: 'foo.im'") stops gst-remote.

gst-remote --server &
gst-remote --snapshot=foo.im
gst-remote --server -I foo.im &

Object: File error: Bad file descriptor
SystemExceptions.FileError(Exception)>>pass (ExcHandling.st:385)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:249)
SystemExceptions.FileError(Exception)>>activateHandler: (ExcHandling.st:516)
SystemExceptions.FileError(Exception)>>pass (ExcHandling.st:385)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:219)
SystemExceptions.FileError(Exception)>>activateHandler: (ExcHandling.st:516)
SystemExceptions.FileError(Exception)>>signal (ExcHandling.st:254)
SystemExceptions.FileError class(Exception class)>>signal: (ExcHandling.st:161)
File class>>checkError: (File.st:85)
optimized [] in Sockets.AbstractSocketImpl>>ensureReadable (Sockets.star#VFS.ZipFile/AbstractSocketImpl.st:438)
BlockClosure>>ensure: (BlkClosure.st:269)
[] in Sockets.TCPSocketImpl(Sockets.AbstractSocketImpl)>>ensureReadable (Sockets.star#VFS.ZipFile/AbstractSocketImpl.st:428)
Sockets.TCPSocketImpl(Sockets.AbstractSocketImpl)>>fileOp:with:with:ifFail: (Sockets.star#VFS.ZipFile/AbstractSocketImpl.st:168)
Sockets.TCPSocketImpl(Sockets.AbstractSocketImpl)>>ensureReadable (Sockets.star#VFS.ZipFile/AbstractSocketImpl.st:439)
Sockets.ServerSocket>>waitForConnection (Sockets.star#VFS.ZipFile/Sockets.st:974)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:214)
BlockClosure>>on:do: (BlkClosure.st:193)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:215)
BlockClosure>>repeat (BlkClosure.st:318)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:203)
BlockClosure>>on:do: (BlkClosure.st:193)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:244)
[] in Process>>onBlock:at:suspend: (Process.st:392)
BlockClosure>>on:do: (BlkClosure.st:193)
[] in Process>>onBlock:at:suspend: (Process.st:393)
BlockClosure>>ensure: (BlkClosure.st:269)
[] in Process>>onBlock:at:suspend: (Process.st:370)
[] in BlockClosure>>asContext: (BlkClosure.st:179)
BlockContext class>>fromClosure:parent: (BlkContext.st:68)
gst-remote server: Bad file descriptor
gst-remote server started.

Updates

#1 submitted by Gwenael Casaccio on Thu, 06/30/2011 - 10:11
Attachment:Remote.patch (2.08 KB)

This patch should solve the problem.

#2 submitted by Paolo Bonzini on Thu, 06/30/2011 - 11:38

(01:33:35 PM) bonzini: MrGwen: can you change it to check #aboutToSnapshot and 
    resume on #finishedSnapshot instead?
(01:33:54 PM) MrGwen: I'll try
(01:34:36 PM) bonzini: MrGwen: also, perhaps change it to instance side and use
    r := Remote new.
(01:34:46 PM) bonzini: MrGwen: this way on #returnFromSnapshot you can do
    #removeDependent:
(01:35:19 PM) bonzini: MrGwen: long term we can move more parts of the script into 
    the new class
(01:35:24 PM) bonzini: MrGwen: very good anyway, thanks!

#3 submitted by Gwenael Casaccio on Tue, 07/05/2011 - 08:16
Attachment:Remote2.patch (2.43 KB)

I've made the following changes:

 - everything is instance side
 - in update : if #aboutToSnapshot then suspend the process, else if #finishedSnapshot resume it and finally if it's #returnFromSnapshot removeDependent.

I've tested it and seems ok

Gwen

#4 submitted by Paolo Bonzini on Tue, 07/05/2011 - 08:32
Status:active» fixed

I'll rename the object to RemoteServer and apply the patch.

User login