[Glass] Migrating from 3.2.9 to 3.3.3 block compilation issue

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Thu Jan 26 16:11:10 PST 2017


Mariano,

After looking at your log files, it looks like this is a bug in 
upgradeStone script that is specific to the gs_port branch --- related 
to using a non-DataCurator user for GsDevKit --- I've updated the 
gs_port branch with my proposed fix ...

Dale


On 1/26/17 1:20 PM, Mariano Martinez Peck wrote:
> Dale, after checking the logs in upgradeLog directory, I found out 
> that I had errors in file `upgradeTo3x.out ` pasted below.
>
> BTW, I can share with you a zip with all files if you want to.
>
>
> Cheers,
>
>
>
> topaz 1>
> topaz 1> ! clear caches - those that are unneeded or create problem 
> during initial load
> topaz 1> run
> "MCDefinition clearInstances"
> MCDefinition _classVars at: #Instances put: nil.
> "MCMethodDefinition shutdown"
> MCMethodDefinition _classVars at: #Definitions put: nil.
> "MethodVersionHistory reset"
> UserGlobals removeKey: #MethodVersionHistory_UniqueInstance ifAbsent: [].
> "clear out PackageOrganizer default class instance variable"
> PackageOrganizer atClassInstVar: #default put: nil.
> "clear out McCacheRepository default class instance variable"
> MCCacheRepository atClassInstVar: #default put: nil.
> "wipe out the working copy registry ... will be redefined later"
> MCPackageManager atClassInstVar: #registry put: nil.
> MCWorkingCopy atClassInstVar: #registry put: nil.
> "wipe out the default MCRepositoryGroup"
> MCRepositoryGroup atClassInstVar: #default put: nil.
> "Wipe out the Metacello registry ... if it exists"
> (GsCurrentSession currentSession symbolList objectNamed: 
> #MetacelloProjectRegistration)
>   ifNotNil: [:cl | cl _classVars at: #Registry put: nil ].
> true
> %
> *GemStone Smalltalk Compiler Errors:*
> *   "MCDefinition clearInstances"*
> *   MCDefinition _classVars at: #Instances put: nil.*
> * * ^1                     ********
> *   "MCMethodDefinition shutdown"*
> *   MCMethodDefinition _classVars at: #Definitions put: nil.*
> * * ^2                     ********
> *   "MethodVersionHistory reset"*
> *   UserGlobals removeKey: #MethodVersionHistory_UniqueInstance 
> ifAbsent: [].*
> *   "clear out PackageOrganizer default class instance variable"*
> *   PackageOrganizer atClassInstVar: #default put: nil.*
> * * ^3                     ********
> *   "clear out McCacheRepository default class instance variable"*
> *   MCCacheRepository atClassInstVar: #default put: nil.*
> * * ^4                     ********
> *   "wipe out the working copy registry ... will be redefined later"*
> *   MCPackageManager atClassInstVar: #registry put: nil.*
> * * ^5                     ********
> *   MCWorkingCopy atClassInstVar: #registry put: nil.*
> * * ^6                     ********
> *   "wipe out the default MCRepositoryGroup"*
> *   MCRepositoryGroup atClassInstVar: #default put: nil.*
> * * ^7                     ********
> *   "Wipe out the Metacello registry ... if it exists"*
> *   (GsCurrentSession currentSession symbolList objectNamed: 
> #MetacelloProjectRegistration)*
> *     ifNotNil: [:cl | cl _classVars at: #Registry put: nil ].*
> *   true*
> *
> *
> *1: [1031] undefined symbol*
> *2: [1031] undefined symbol*
> *3: [1031] undefined symbol*
> *4: [1031] undefined symbol*
> *5: [1031] undefined symbol*
> *6: [1031] undefined symbol*
> *7: [1031] undefined symbol*
> ERROR: UNEXPECTED ERROR
> topaz> time
>  01/26/2017 11:50:27.993 EST
> topaz > exec iferr 1 : stk
> Stack is not active
> topaz > exec iferr 2 : stack
> Stack is not active
> topaz > exec iferr 3 : input pop
> topaz > exec iferr 4 : exit
> Logging out session 1.
>
>
>
> On Thu, Jan 26, 2017 at 6:11 PM, Dale Henrichs via Glass 
> <glass at lists.gemtalksystems.com 
> <mailto:glass at lists.gemtalksystems.com>> wrote:
>
>     Mariano,
>
>     I'll dig into this later this afternoon (I'm out of time right
>     now) ... All of the code is reloaded at each upgrade, so it is
>     likely that there are few blocks that are hanging around
>     (SortedCollections, etc.) that need to be rebuilt ...
>
>     Dale
>
>
>     On 01/26/2017 11:01 AM, Mariano Martinez Peck via Glass wrote:
>>     Hi guys,
>>
>>     I am migrating some stones (tODE and GsDevKit based) that are on
>>     GemStone 3.2.9 to 3.3.3. I am doing this with the `upgradeStone`
>>     gsDevKit command.
>>
>>     I first hit one problem when trying to execute this code via topaz:
>>
>>     MCRepositoryGroup default removeRepository: (MCHttpRepository
>>                             location: 'xxx'
>>                             user: ''
>>                             password: '').
>>
>>
>>
>>     *ERROR 2142 , a ImproperOperation occurred (error 2142), Cannot
>>     execute method, 'method needs recompile, MCRepositoryGroup class
>>     >> default , oop 206736385' (ImproperOperation)
>>     *
>>
>>     Then, I said...ok, let's connect with tODE and investigate some
>>     more (like doing Object _objectForOop: 206736385). But when I try
>>     to connect with tODE I get:
>>
>>
>>     *Error running testLogin:*
>>     *
>>     *
>>     *'Error: Unable to log into server:a ImproperOperation occurred
>>     (error 2142), Cannot execute method, ''method needs recompile,
>>     TDTopezServer class >> createFor: , oop 245949953''with:
>>     ''TDTopezServer createFor: 1'''*
>>     *
>>     *
>>     *NOTE: netldi log can be found in the file:
>>     '$GS_HOME/server/stones/<stone-name>/logs/netldi.log'.*
>>     *
>>     *
>>
>>
>>     So...looks like I have methods to be recompiled everywhere. I saw
>>     this issue [1] but that does not seem to help as these closures
>>     are not in sorted collections right ?
>>
>>     Now, manually fixing each, like this:
>>
>>      | sc sortBlock val cls str val |
>>       sc := "sortedcollection instance".
>>       sortBlock := sc sortBlock.
>>       str := sortBlock _sourceString.
>>       val := str evaluate.
>>       sc _sortBlock: val
>>
>>     Is a pain...because I must know how to re-assign the new compiled
>>     method. Is there an alternative GENERIC solution to recompile all
>>     needed ones? I can think of that but using #become:
>>
>>
>>     System commit.
>>       [
>>       MCPlatformSupport installAlmostOutOfMemoryStaticHandler: 75.
>>     ExecBlock allSubInstances do: [:each |
>>     each become: each _sourceString evaluate.
>>     ].
>>     ]
>>       ensure: [ MCPlatformSupport
>>     uninstallAlmostOutOfMemoryStaticHandler ].
>>     System commit.
>>
>>     But...comment of #become: says that BlockClosure instances cannot
>>     be become...BUUUUUUH.
>>
>>     So.. any idea?
>>
>>     Thanks in advance,
>>
>>     [1] https://github.com/GsDevKit/GsDevKit_home/issues/70
>>     <https://github.com/GsDevKit/GsDevKit_home/issues/70>
>>
>>
>>     -- 
>>     Mariano
>>     http://marianopeck.wordpress.com <http://marianopeck.wordpress.com>
>>
>>
>>     _______________________________________________
>>     Glass mailing list
>>     Glass at lists.gemtalksystems.com
>>     <mailto:Glass at lists.gemtalksystems.com>
>>     http://lists.gemtalksystems.com/mailman/listinfo/glass
>>     <http://lists.gemtalksystems.com/mailman/listinfo/glass>
>     _______________________________________________ Glass mailing list
>     Glass at lists.gemtalksystems.com
>     <mailto:Glass at lists.gemtalksystems.com>
>     http://lists.gemtalksystems.com/mailman/listinfo/glass
>     <http://lists.gemtalksystems.com/mailman/listinfo/glass> 
>
> -- 
> Mariano http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20170126/4d85eba4/attachment.html>


More information about the Glass mailing list