GemTalk / Rowan

a new project/package manager for Smalltalk that supports FileTree and Tonel repositories, and is independent of Monticello and Metacello
MIT License
14 stars 7 forks source link

infinite recursion in RwPrjLoadToolV2 when method is in both base image and Rowan sources #900

Open dalehenrich opened 1 year ago

dalehenrich commented 1 year ago

From internal bug 50406:

Rowan branch masterV2.5
commit 743fe0c698b6827c9c73564cff065c155e90738f

3.7.0 server
commit e9add8691bc5c87c85ced0eabc02b1d9e7998f2f

Thus AbstractDictionary>>at:ifPresent: is present in both base image and in Rowan sources.

slowrowan has in fileinrowan.out near line 91900
Error 2318 , a UserDefinedError occurred (error 2318), reason:halt, internal error - Existing LoadedMethod AbstractDictionary>>at:ifPresent: found for extension compiled method ( package Filein1A).
ERROR: UNEXPECTED ERROR

line 93286
Error 2318 , a UserDefinedError occurred (error 2318), reason:halt, Unexpectedly dirty projects: gemstoneBaseImage
ERROR: UNEXPECTED ERROR

Then the step
topaz 1 +> ! Reload and include X509-Core package (currently in Unpackaged packages)
topaz 1 +> run
  | customConditionalAttributes |
  customConditionalAttributes := (UserGlobals at: #PACKAGE_OBSOLETE_COMPILER_CLASSES ifAbsent: [ false ])
....
goes into a very slow infinite recursion , around 5 to 10 seconds of CPU time per level
of recursion.

When an error is handled within
RwPrjLoadToolV2 >> _doProjectSetLoad:instanceMigrator:symbolList:originalProjectSet:processedClassNames:
and then that method recurses,
it needs to do something to ensure that the subsequent recursion will terminate.

34 RwProjectSetDefinition >> compareAgainstBaseForLoader: @5 line 8
35 RwPrjLoadToolV2 >> _loadProjectSetDefinition:instanceMigrator:symbolList: @8 line 15
36 [] in RwPrjLoadToolV2 >> _doProjectSetLoad:instanceMigrator:symbolList:originalProjectSet:processedClassNames: @7 line 5
37 ExecBlock0 (ExecBlock) >> on:do: @3 line 44
38 RwPrjLoadToolV2 >> _doProjectSetLoad:instanceMigrator:symbolList:originalProjectSet:processedClassNames: @2 line 8
...
195 RwPrjLoadToolV2 >> _doProjectSetLoad:instanceMigrator:symbolList:originalProjectSet:processedClassNames: @3 line 44
196 RwPrjLoadToolV2 >> loadProjectSetDefinition:instanceMigrator:symbolList: @3 line 6
197 RwPrjLoadToolV2 >> loadProjectDefinition:platformConfigurationAttributes:instanceMigrator:symbolList: @16 line 20
198 RwPrjLoadToolV2 >> loadProjectDefinition:platformConfigurationAttributes:instanceMigrator: @4 line 5
199 RwPrjLoadToolV2 >> loadProjectDefinition: @5 line 3
200 RwResolvedProjectV2 >> load @7 line 11
201 RwDefinedProject (RwAbstractUnloadedProject) >> load @3 line 10
202 [] in Executed Code @15 line 9
203 ExecBlock0 (ExecBlock) >> on:do: @3 line 44
204 Executed Code @5 line 10 

target fix for v3...