The Trunk: System-cmm.602.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-cmm.602.mcz

commits-2
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.602.mcz

==================== Summary ====================

Name: System-cmm.602
Author: cmm
Time: 15 October 2013, 1:45:33.881 pm
UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
Ancestors: System-eem.601

- Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
- Convenience method for checking for any of the various headless VM  options.
- API consistency for accessing command-line arguments.
- Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
- RecentMessages simplifications, fixes and cleanups.

=============== Diff against System-eem.601 ===============

Item was removed:
- ----- Method: AbstractLauncher class>>extractParameters (in category 'private') -----
- extractParameters
-
- | pName value index globals |
- globals := Dictionary new.
- index := 3.
- [pName := Smalltalk  getSystemAttribute: index.
- pName isEmptyOrNil] whileFalse:[
- index := index + 1.
- value := Smalltalk getSystemAttribute: index.
- value ifNil: [value := ''].
-   globals at: pName asUppercase put: value.
- index := index + 1].
- ^globals!

Item was changed:
  ----- Method: AbstractLauncher>>numericParameterAtOneOf:ifAbsent: (in category 'private') -----
  numericParameterAtOneOf: alternateParameterNames ifAbsent: aBlock
  "Return the parameter named using one of the alternate names or an empty string"
 
  | parameterValue |
+ self isThisEverCalled.
  parameterValue := self parameterAtOneOf: alternateParameterNames.
  parameterValue isEmpty
  ifTrue: [^aBlock value].
  ^[Number readFrom: parameterValue] ifError: aBlock
 
  !

Item was changed:
  ----- Method: AbstractLauncher>>parameterAtOneOf: (in category 'private') -----
  parameterAtOneOf: alternateParameterNames
  | parameterName |
  "Return the parameter named using one of the alternate names or an empty string"
+ self isThisEverCalled.
-
  parameterName := self determineParameterNameFrom: alternateParameterNames.
  ^parameterName isNil
  ifTrue: ['']
  ifFalse: [self parameterAt: parameterName ifAbsent: ['']]!

Item was changed:
  ----- Method: AbstractLauncher>>parameters (in category 'private') -----
  parameters
  parameters == nil
+ ifTrue: [parameters := Smalltalk namedArguments].
- ifTrue: [parameters := self class extractParameters].
  ^parameters!

Item was changed:
  ----- Method: AutoStart class>>checkForPluginUpdate (in category 'updating') -----
  checkForPluginUpdate
  | pluginVersion updateURL |
  World
  ifNotNil: [
  World install.
  ActiveHand position: 100@100].
  HTTPClient isRunningInBrowser
  ifFalse: [^false].
+ pluginVersion := Smalltalk namedArguments
- pluginVersion := AbstractLauncher extractParameters
  at: (Smalltalk platformName copyWithout: Character space) asUppercase
  ifAbsent: [^false].
+ updateURL := Smalltalk namedArguments
- updateURL := AbstractLauncher extractParameters
  at: 'UPDATE_URL'
  ifAbsent: [^false].
  ^SystemVersion check: pluginVersion andRequestPluginUpdate: updateURL!

Item was changed:
  ----- Method: AutoStart class>>checkForUpdates (in category 'updating') -----
  checkForUpdates
  | availableUpdate updateServer |
+ World ifNotNil:
+ [ World install.
+ ActiveHand position: 100 @ 100 ].
+ HTTPClient isRunningInBrowser ifFalse: [ ^ self processUpdates ].
+ availableUpdate := (Smalltalk namedArguments
- World
- ifNotNil: [
- World install.
- ActiveHand position: 100@100].
- HTTPClient isRunningInBrowser
- ifFalse: [^self processUpdates].
- availableUpdate := (AbstractLauncher extractParameters
  at: 'UPDATE'
+ ifAbsent: [ '' ]) asInteger.
+ availableUpdate ifNil: [ ^ false ].
+ updateServer := Smalltalk namedArguments
- ifAbsent: [''] ) asInteger.
- availableUpdate
- ifNil: [^false].
- updateServer := AbstractLauncher extractParameters
  at: 'UPDATESERVER'
+ ifAbsent:
+ [ Smalltalk namedArguments
+ at: 'UPDATE_SERVER'
+ ifAbsent: [ 'Squeakland' ] ].
- ifAbsent: [AbstractLauncher extractParameters
- at: 'UPDATE_SERVER'
- ifAbsent: ['Squeakland']].
  Utilities setUpdateServer: updateServer.
+ ^ SystemVersion checkAndApplyUpdates: availableUpdate!
- ^SystemVersion checkAndApplyUpdates: availableUpdate!

Item was changed:
  ----- Method: AutoStart class>>startUp: (in category 'initialization') -----
  startUp: resuming
  "The image is either being newly started (resuming is true), or it's just been snapshotted.
  If this has just been a snapshot, skip all the startup stuff."
 
  | startupParameters launchers |
  self active ifTrue: [^self].
  self active: true.
  resuming ifFalse: [^self].
 
  HTTPClient determineIfRunningInBrowser.
+ startupParameters := Smalltalk namedArguments.
- startupParameters := AbstractLauncher extractParameters.
  (startupParameters includesKey: 'apiSupported' asUppercase )
  ifTrue: [
  HTTPClient browserSupportsAPI: ((startupParameters at: 'apiSupported' asUppercase) asUppercase = 'TRUE').
  HTTPClient isRunningInBrowser
  ifFalse: [HTTPClient isRunningInBrowser: true]].
  self checkForUpdates
  ifTrue: [^self].
  self checkForPluginUpdate.
  launchers := self installedLaunchers collect: [:launcher |
  launcher new].
  launchers do: [:launcher |
  launcher parameters: startupParameters].
  launchers do: [:launcher |
  Smalltalk at: #WorldState ifPresent: [ :ws | ws addDeferredUIMessage: [launcher startUp]]]!

Item was added:
+ ----- Method: Preferences class>>readDocumentAtStartup: (in category 'standard queries') -----
+ readDocumentAtStartup: aBoolean
+ ^ self
+ setPreference: #readDocumentAtStartup
+ toValue: aBoolean!

Item was changed:
  ----- Method: Project class>>loaderUrl (in category 'squeaklet on server') -----
  loaderUrl
+ "Return a url that will launch a project in a browser by composing a url like <loaderURL>?<projectURL>"
+ ^ Smalltalk namedArguments
+ at: 'LOADER_URL'
+ ifAbsent: [  ]!
- "Return a url that will allow to launch a project in a browser by composing a url like
- <loaderURL>?<projectURL>"
-
- ^AbstractLauncher extractParameters at: 'LOADER_URL' ifAbsent: [nil].!

Item was changed:
  Object subclass: #RecentMessages
+ instanceVariableNames: 'methodReferences maximumSubmissionCount isSuspended'
+ classVariableNames: 'Default'
- instanceVariableNames: 'methodReferences size maximumSubmissionCount isSuspended'
- classVariableNames: 'Default NumberOfRecentSubmissionsToStore'
  poolDictionaries: ''
  category: 'System-Support'!

Item was changed:
  ----- Method: RecentMessages class>>newRemembering: (in category 'instance creation') -----
+ newRemembering: anInteger
+ ^ self new
+ maximumSubmissionCount: anInteger ;
+ yourself!
- newRemembering: anInteger
- ^ self basicNew initializeWithSize: anInteger.!

Item was changed:
  ----- Method: RecentMessages class>>numberOfRecentSubmissionsToStore (in category 'preferences') -----
  numberOfRecentSubmissionsToStore
+ <preference: 'Number of recent submissions to store' category: 'Tools' description: 'Answer how many methods back the ''recent method submissions'' history should store' type: #Number>
+ ^ self default maximumSubmissionCount!
- <preference: 'Number of recent submissions to store'
- category: 'Tools'
- description: 'Answer how many methods back the ''recent method submissions'' history should store'
- type: #Number>
- ^NumberOfRecentSubmissionsToStore
- ifNil: [NumberOfRecentSubmissionsToStore := 30].!

Item was changed:
  ----- Method: RecentMessages class>>numberOfRecentSubmissionsToStore: (in category 'preferences') -----
  numberOfRecentSubmissionsToStore: anInteger
+ self default maximumSubmissionCount: anInteger!
- NumberOfRecentSubmissionsToStore := anInteger.!

Item was changed:
  ----- Method: RecentMessages>>defaultSize (in category 'private') -----
  defaultSize
+ ^ 30!
- ^ 10.!

Item was changed:
  ----- Method: RecentMessages>>initialize (in category 'initialize-release') -----
  initialize
+ super initialize.
+ methodReferences := OrderedCollection new: 30!
- self initializeWithSize: self defaultSize!

Item was removed:
- ----- Method: RecentMessages>>initializeWithSize: (in category 'initialize-release') -----
- initializeWithSize: anInteger
- maximumSubmissionCount := anInteger.
- methodReferences := OrderedCollection new.!

Item was changed:
  ----- Method: RecentMessages>>leastRecent (in category 'accessing') -----
  leastRecent
  ^ methodReferences
+ ifEmpty: [ nil ]
+ ifNotEmpty: [ methodReferences last ]!
- ifEmpty: [nil]
- ifNotEmpty: [methodReferences first].!

Item was changed:
  ----- Method: RecentMessages>>maximumSubmissionCount: (in category 'accessing') -----
  maximumSubmissionCount: anInteger
  maximumSubmissionCount := anInteger.
+ self trim!
- [self size > self maximumSubmissionCount]
- whileTrue: [methodReferences removeFirst].!

Item was changed:
  ----- Method: RecentMessages>>methodReferences (in category 'accessing') -----
  methodReferences
+ ^ methodReferences asArray!
- "Return A COPY of all method references."
- ^ Array withAll: methodReferences.!

Item was changed:
  ----- Method: RecentMessages>>mostRecent (in category 'accessing') -----
  mostRecent
+ ^ methodReferences first!
- [methodReferences notEmpty and: [methodReferences last isValid not]]
- whileTrue: [methodReferences removeLast].
- ^ methodReferences last.!

Item was changed:
  ----- Method: RecentMessages>>recordSelector:forClass:inEnvironment: (in category 'accessing') -----
+ recordSelector: aSelector forClass: aClass inEnvironment: anEnvironment
- recordSelector: aSelector forClass: aClass inEnvironment: anEnvironment
  | ref |
+ (isSuspended = true or: [ aClass wantsChangeSetLogging not ]) ifTrue: [ ^ self ].
- isSuspended = true ifTrue: [ ^ self ].
  ref := MethodReference
+ class: aClass
+ selector: aSelector
+ environment: anEnvironment.
+ methodReferences
+ remove: ref ifAbsent: [  ] ;
+ addFirst: ref.
+ self trim!
- class: aClass
- selector: aSelector
- environment: anEnvironment.
- aClass wantsChangeSetLogging ifFalse: [^ ref].
- ^ methodReferences
- detect: [:mref | mref = ref]
- ifNone: [methodReferences addLast: ref.
- self size > self maximumSubmissionCount
- ifTrue: [methodReferences removeFirst].
- ref].!

Item was removed:
- ----- Method: RecentMessages>>revertLast (in category 'accessing') -----
- revertLast
- "If the most recent method submission was a method change, revert
- that change, and if it was a submission of a brand-new method,
- remove that method."
- | changeRecords lastSubmission theClass theSelector |
-
- methodReferences ifEmpty: [^ Beeper beep].
- lastSubmission := methodReferences last.
- theClass := lastSubmission actualClass ifNil: [^ Beeper beep].
- theSelector := lastSubmission methodSymbol.
- changeRecords := theClass changeRecordsAt: theSelector.
- changeRecords isEmptyOrNil ifTrue: [^ Beeper beep].
- changeRecords size = 1
- ifTrue:
- ["method has no prior version, so reverting in this case means removing"
- theClass removeSelector: theSelector]
- ifFalse:
- [changeRecords second fileIn].!

Item was added:
+ ----- Method: RecentMessages>>revertMostRecent (in category 'accessing') -----
+ revertMostRecent
+ "If the most recent method submission was a method change, revert
+ that change, and if it was a submission of a brand-new method,
+ remove that method."
+ | changeRecords lastSubmission theClass theSelector |
+ methodReferences ifEmpty: [ ^ Beeper beep ].
+ lastSubmission := methodReferences last.
+ theClass := lastSubmission actualClass ifNil: [ ^ Beeper beep ].
+ theSelector := lastSubmission methodSymbol.
+ changeRecords := theClass changeRecordsAt: theSelector.
+ changeRecords isEmptyOrNil ifTrue: [ ^ Beeper beep ].
+ changeRecords size = 1
+ ifTrue: [ "method has no prior version, so reverting in this case means removing"
+ theClass removeSelector: theSelector ]
+ ifFalse: [ changeRecords second fileIn ]
+ !

Item was added:
+ ----- Method: RecentMessages>>trim (in category 'private') -----
+ trim
+ [ methodReferences size > maximumSubmissionCount ] whileTrue: [ methodReferences removeLast ]!

Item was changed:
  ----- Method: SmalltalkImage>>argumentAt: (in category 'command line') -----
+ argumentAt: argumentIndex
- argumentAt: i
  "Answer the i-th argument of the command line, or nil if not so many argument."
+ ^ self getSystemAttribute:
+ argumentIndex +
+ (Preferences readDocumentAtStartup
+ ifTrue: [ 2 ]
+ ifFalse: [ 1 ])!
-
- ^self getSystemAttribute: 2 + i!

Item was changed:
  ----- Method: SmalltalkImage>>documentPath (in category 'command line') -----
  documentPath
  "Answer the absolute path of the document passed to the vm or nil if none."
-
  "Smalltalk commandLine documentPath"
+ ^ Preferences readDocumentAtStartup ifTrue: [ self getSystemAttribute: 2 ]!
-
- ^self getSystemAttribute: 2!

Item was changed:
  ----- Method: SmalltalkImage>>extractParameters (in category 'command line') -----
  extractParameters
+ self deprecated: 'Use #namedArguments'.
+ ^ self namedArguments!
- "This method is used by Seaside 2.8.3"
-
- | pName value index paramNameValueDictionary |
- paramNameValueDictionary := Dictionary new.
- index := 3. "Muss bei 3 starten, da 2 documentName ist"
- [pName := self  getSystemAttribute: index.
- pName isEmptyOrNil] whileFalse:[
- index := index + 1.
- value := self getSystemAttribute: index.
- value ifNil: [value := ''].
-   paramNameValueDictionary at: pName asUppercase put: value.
- index := index + 1].
- ^paramNameValueDictionary!

Item was changed:
  ----- Method: SmalltalkImage>>getSystemAttribute: (in category 'private') -----
  getSystemAttribute: attributeID
  "Optional. Answer the string for the system attribute with the given
  integer ID. Answer nil if the given attribute is not defined on this
  platform. On platforms that support invoking programs from command
  lines (e.g., Unix), this mechanism can be used to pass command line
  arguments to programs written in Squeak.
 
  By convention, the first command line argument that is not a VM
  configuration option is considered a 'document' to be filed in. Such a
  document can add methods and classes, can contain a serialized object,
  can include code to be executed, or any combination of these.
 
  Currently defined attributes include:
  -1000 1000th command line argument that specify VM options
  ...
  -1 first command line argument that specify VM options
  0 the full path name for currently executing VM
  (or, on some platforms, just the path name of the VM's directory)
  1 full path name of this image (better use primImageName instead)
+ 2 first command-line argument for Squeak programs.
+ Note: if Preferences readDocumentAtStartup is set, this first argument is treated as a URL to a Squeak document to open.
+ 3 second command-line argument for Squeak programs
- 2 a Squeak document to open, if any
- 3 first command line argument for Squeak programs
  ...
  1000 1000th command line argument for Squeak programs
  1001 this platform's operating system 'Mac OS', 'Win32', 'unix', ...
  1002 operating system version
  1003 this platform's processor type
  1004 vm version
  1005 window system name
  1006 vm build id
  1007 Interpreter class (Cog VM only)
  1008 Cogit class (Cog VM only)
  1009 Platform source version (Cog VM only?)
  1201 max filename length (Mac OS only)
  1202 file last error (Mac OS only)
  10001 hardware details (Win32 only)
  10002 operating system details (Win32 only)
  10003 graphics hardware details (Win32 only)
  "
 
  <primitive: 149>
  ^ nil!

Item was added:
+ ----- Method: SmalltalkImage>>isHeadless (in category 'vm parameters') -----
+ isHeadless
+ "Answer whether the command-line specified to launch the VM headless."
+ self optionsDo:
+ [ : each | (#('display=none' '-headless' '-vm-display-null' ) includes: each) ifTrue: [ ^ true ] ].
+ ^ false!

Item was added:
+ ----- Method: SmalltalkImage>>namedArguments (in category 'command line') -----
+ namedArguments
+ "Assume arguments passed to the image are key->value pairs, answer a Dictionary of the argument names and their values."
+ | argName value index paramNameValueDictionary |
+ paramNameValueDictionary := Dictionary new.
+ index := 1.
+ [ argName := self argumentAt: index.
+ argName isEmptyOrNil ] whileFalse:
+ [ index := index + 1.
+ value := (self argumentAt: index) ifNil: [ String empty ].
+ paramNameValueDictionary
+ at: argName asUppercase
+ put: value.
+ index := index + 1 ].
+ ^ paramNameValueDictionary!

Item was changed:
  ----- Method: SmalltalkImage>>options (in category 'command line') -----
  options
  "Answer an array with all the command line options."
-
  "Smalltalk commandLine options"
+ ^ Array streamContents:
+ [ : stream | self optionsDo:
+ [ : each | stream nextPut: each ] ]!
-
- ^Array streamContents: [:str |
- | arg i |
- i := 1.
- [i > 1000 or: [(arg := self optionAt: i) == nil]]
- whileFalse:
- [str nextPut: arg.
- i := i + 1]].!

Item was added:
+ ----- Method: SmalltalkImage>>optionsDo: (in category 'command line') -----
+ optionsDo: aBlock
+ "Enumerate the command-line arguments passed to the vm only.  This does not include arguments passed to the image."
+ 1
+ to: 1000
+ by: 1
+ do:
+ [ : n |
+ (self optionAt: n)
+ ifNil: [ ^ self ]
+ ifNotNil: [ : opt | aBlock value: opt ] ]!

Item was removed:
- ----- Method: Utilities class>>mostRecentlySubmittedMessage (in category 'recent method submissions') -----
- mostRecentlySubmittedMessage
- self deprecated: 'Use RecentMessages default mostRecent'.
- ^ RecentMessages default mostRecent.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Frank Shearar-3
On 15 October 2013 19:45,  <[hidden email]> wrote:

> Chris Muller uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-cmm.602.mcz
>
> ==================== Summary ====================
>
> Name: System-cmm.602
> Author: cmm
> Time: 15 October 2013, 1:45:33.881 pm
> UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
> Ancestors: System-eem.601
>
> - Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
> - Convenience method for checking for any of the various headless VM  options.
> - API consistency for accessing command-line arguments.
> - Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
> - RecentMessages simplifications, fixes and cleanups.
>
> =============== Diff against System-eem.601 ===============

This might be temporal, or temperamental, coincidence but
http://build.squeak.org/job/SqueakTrunk/561/console shows a segfault
while updating to this commit.

I'm going to rerun the build, just in case it was a once-off. I'll
report back when it's done.

Here's the top part of the stack; see the URL for full details:

2013-10-15T20:09:57.114+01:00: Installing System-cmm.602

Segmentation fault Tue Oct 15 20:09:57 2013


Squeak VM version: 4.0-2776 #1 Thu Aug 22 10:35:56 PDT 2013 gcc 4.1.2
[Production ITHB VM]
Built from: CoInterpreter VMMaker.oscog-eem.331 uuid:
37d2e4b0-2f37-4e2d-8313-c63637785e59 Aug 22 2013
With: StackToRegisterMappingCogit VMMaker.oscog-eem.333 uuid:
84da9cb8-7f30-4cb7-b4fb-239a11f63b54 Aug 22 2013
Revision: VM: r2776 http://www.squeakvm.org/svn/squeak/branches/Cog
Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
Build host: Linux mcqfes 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST
2009 i686 i686 i386 GNU/Linux
plugin path: /home/jenkins/workspace/SqueakTrunk/target/cog.r2776/coglinux/bin/../lib/squeak/4.0-2776
[default: /home/jenkins/workspace/SqueakTrunk/target/cog.r2776/coglinux/lib/squeak/4.0-2776/]


C stack backtrace:
/home/jenkins/workspace/SqueakTrunk/target/cog.r2776/coglinux/bin/../lib/squeak/4.0-2776/squeak[0x805d051]
/home/jenkins/workspace/SqueakTrunk/target/cog.r2776/coglinux/bin/../lib/squeak/4.0-2776/squeak[0x805d228]
[0xb770640c]
/home/jenkins/workspace/SqueakTrunk/target/cog.r2776/coglinux/bin/../lib/squeak/4.0-2776/squeak(interpret+0x3a57)[0x80848e7]
/home/jenkins/workspace/SqueakTrunk/target/cog.r2776/coglinux/bin/../lib/squeak/4.0-2776/squeak[0x8086e4f]
/home/jenkins/workspace/SqueakTrunk/target/cog.r2776/coglinux/bin/../lib/squeak/4.0-2776/squeak(interpret+0x1eb)[0x808107b]
/home/jenkins/workspace/SqueakTrunk/target/cog.r2776/coglinux/bin/../lib/squeak/4.0-2776/squeak(main+0x397)[0x805d717]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0xb74e9935]


Smalltalk stack dump:
0xbfc7a26c I CanvasCharacterScanner class(Behavior)>allInstancesDo:
0x793d4b2c: a(n) CanvasCharacterScanner class
0xbfc7a294 I CanvasCharacterScanner class(Behavior)>allInstances
0x793d4b2c: a(n) CanvasCharacterScanner class
0xbfc7a2b8 I CanvasCharacterScanner
class(ClassDescription)>updateInstancesFrom: 0x79747798: a(n)
CanvasCharacterScanner class
0xbfc7a2e0 M [] in ClassBuilder>update:to: 0x79747260: a(n) ClassBuilder
0xbfc7c128 M BlockClosure>ensure: 0x79843ec8: a(n) BlockClosure
0xbfc7c158 I BlockClosure>valueUnpreemptively 0x79843ec8: a(n) BlockClosure
0xbfc7c174 M ClassBuilder>update:to: 0x79747260: a(n) ClassBuilder
0xbfc7c19c I ClassBuilder>mutate:to: 0x79747260: a(n) ClassBuilder

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Frank Shearar-3
On 15 October 2013 21:30, Frank Shearar <[hidden email]> wrote:

> On 15 October 2013 19:45,  <[hidden email]> wrote:
>> Chris Muller uploaded a new version of System to project The Trunk:
>> http://source.squeak.org/trunk/System-cmm.602.mcz
>>
>> ==================== Summary ====================
>>
>> Name: System-cmm.602
>> Author: cmm
>> Time: 15 October 2013, 1:45:33.881 pm
>> UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
>> Ancestors: System-eem.601
>>
>> - Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
>> - Convenience method for checking for any of the various headless VM  options.
>> - API consistency for accessing command-line arguments.
>> - Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
>> - RecentMessages simplifications, fixes and cleanups.
>>
>> =============== Diff against System-eem.601 ===============
>
> This might be temporal, or temperamental, coincidence but
> http://build.squeak.org/job/SqueakTrunk/561/console shows a segfault
> while updating to this commit.
>
> I'm going to rerun the build, just in case it was a once-off. I'll
> report back when it's done.
>
> Here's the top part of the stack; see the URL for full details:

http://build.squeak.org/job/SqueakTrunk/562/console shows it happening
again. So either something's very badly wrong, or something's very
badly wrong just on that slave. (But you'll see in its history that it
can run builds.)

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Chris Muller-3
Really strange.  My changes were almost entirely refactorings.  I
can't think of any reason they should cause a segfault.

What's the input file being fed to this image (as the first arg after
the image name)?  Whatever it's doing, it appears to be loading
something from some MC repository, which triggers a call to
ClassBuilder>recompile:from:to:mutate: which causes the
updateInstancesFrom: on CanvasCharacterScanner.

Which package and version is it trying to load when it crashes?  That
might offer a clue..



On Tue, Oct 15, 2013 at 4:05 PM, Frank Shearar <[hidden email]> wrote:

> On 15 October 2013 21:30, Frank Shearar <[hidden email]> wrote:
>> On 15 October 2013 19:45,  <[hidden email]> wrote:
>>> Chris Muller uploaded a new version of System to project The Trunk:
>>> http://source.squeak.org/trunk/System-cmm.602.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: System-cmm.602
>>> Author: cmm
>>> Time: 15 October 2013, 1:45:33.881 pm
>>> UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
>>> Ancestors: System-eem.601
>>>
>>> - Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
>>> - Convenience method for checking for any of the various headless VM  options.
>>> - API consistency for accessing command-line arguments.
>>> - Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
>>> - RecentMessages simplifications, fixes and cleanups.
>>>
>>> =============== Diff against System-eem.601 ===============
>>
>> This might be temporal, or temperamental, coincidence but
>> http://build.squeak.org/job/SqueakTrunk/561/console shows a segfault
>> while updating to this commit.
>>
>> I'm going to rerun the build, just in case it was a once-off. I'll
>> report back when it's done.
>>
>> Here's the top part of the stack; see the URL for full details:
>
> http://build.squeak.org/job/SqueakTrunk/562/console shows it happening
> again. So either something's very badly wrong, or something's very
> badly wrong just on that slave. (But you'll see in its history that it
> can run builds.)
>
> frank
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Frank Shearar-3
Indeed! The stack trace - as always - originates in the CI scripts'
update-image.st
(https://github.com/squeak-smalltalk/squeak-ci/blob/d34ea864fe71bf53e28fe0c3813d2040c963cc3e/update-image.st).

That script uses (a copy of the) pretty much the standard update
mechanism, only with loads of logging thrown in. As far as I know it's
System-cmm.602 that's in flight. I agree with you about it being weird
that it might be System-cmm.602. But it might not be: it might just be
that System's the poor commit that happens to stumble upon something
broken by the Graphics work? There's a CanvasCharacterScanner at the
top of the stack.

I also tried to update through the canonical standard way, and saw the
same stack trace (which I've attached).

frank

On 16 October 2013 03:18, Chris Muller <[hidden email]> wrote:

> Really strange.  My changes were almost entirely refactorings.  I
> can't think of any reason they should cause a segfault.
>
> What's the input file being fed to this image (as the first arg after
> the image name)?  Whatever it's doing, it appears to be loading
> something from some MC repository, which triggers a call to
> ClassBuilder>recompile:from:to:mutate: which causes the
> updateInstancesFrom: on CanvasCharacterScanner.
>
> Which package and version is it trying to load when it crashes?  That
> might offer a clue..
>
>
>
> On Tue, Oct 15, 2013 at 4:05 PM, Frank Shearar <[hidden email]> wrote:
>> On 15 October 2013 21:30, Frank Shearar <[hidden email]> wrote:
>>> On 15 October 2013 19:45,  <[hidden email]> wrote:
>>>> Chris Muller uploaded a new version of System to project The Trunk:
>>>> http://source.squeak.org/trunk/System-cmm.602.mcz
>>>>
>>>> ==================== Summary ====================
>>>>
>>>> Name: System-cmm.602
>>>> Author: cmm
>>>> Time: 15 October 2013, 1:45:33.881 pm
>>>> UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
>>>> Ancestors: System-eem.601
>>>>
>>>> - Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
>>>> - Convenience method for checking for any of the various headless VM  options.
>>>> - API consistency for accessing command-line arguments.
>>>> - Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
>>>> - RecentMessages simplifications, fixes and cleanups.
>>>>
>>>> =============== Diff against System-eem.601 ===============
>>>
>>> This might be temporal, or temperamental, coincidence but
>>> http://build.squeak.org/job/SqueakTrunk/561/console shows a segfault
>>> while updating to this commit.
>>>
>>> I'm going to rerun the build, just in case it was a once-off. I'll
>>> report back when it's done.
>>>
>>> Here's the top part of the stack; see the URL for full details:
>>
>> http://build.squeak.org/job/SqueakTrunk/562/console shows it happening
>> again. So either something's very badly wrong, or something's very
>> badly wrong just on that slave. (But you'll see in its history that it
>> can run builds.)
>>
>> frank
>>
>



oops.txt (21K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Bob Arning-2
In reply to this post by Frank Shearar-3
FWIW, after it starts loading System-cmm.602, it starts reshaping MorphicExtras-nice.125. Then it dies.

Cheers,
Bob

On 10/15/13 5:05 PM, Frank Shearar wrote:
On 15 October 2013 21:30, Frank Shearar [hidden email] wrote:
On 15 October 2013 19:45,  [hidden email] wrote:
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.602.mcz

==================== Summary ====================

Name: System-cmm.602
Author: cmm
Time: 15 October 2013, 1:45:33.881 pm
UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
Ancestors: System-eem.601

- Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
- Convenience method for checking for any of the various headless VM  options.
- API consistency for accessing command-line arguments.
- Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
- RecentMessages simplifications, fixes and cleanups.

=============== Diff against System-eem.601 ===============
This might be temporal, or temperamental, coincidence but
http://build.squeak.org/job/SqueakTrunk/561/console shows a segfault
while updating to this commit.

I'm going to rerun the build, just in case it was a once-off. I'll
report back when it's done.

Here's the top part of the stack; see the URL for full details:
http://build.squeak.org/job/SqueakTrunk/562/console shows it happening
again. So either something's very badly wrong, or something's very
badly wrong just on that slave. (But you'll see in its history that it
can run builds.)

frank





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Nicolas Cellier
Ah, interesting, but MorphicExtras-nice.125.mcz is changing a class that is essentially unused, and I'm sure it was possible to update before...


2013/10/16 Bob Arning <[hidden email]>
FWIW, after it starts loading System-cmm.602, it starts reshaping MorphicExtras-nice.125. Then it dies.

Cheers,
Bob

On 10/15/13 5:05 PM, Frank Shearar wrote:
On 15 October 2013 21:30, Frank Shearar [hidden email] wrote:
On 15 October 2013 19:45,  [hidden email] wrote:
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.602.mcz

==================== Summary ====================

Name: System-cmm.602
Author: cmm
Time: 15 October 2013, 1:45:33.881 pm
UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
Ancestors: System-eem.601

- Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
- Convenience method for checking for any of the various headless VM  options.
- API consistency for accessing command-line arguments.
- Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
- RecentMessages simplifications, fixes and cleanups.

=============== Diff against System-eem.601 ===============
This might be temporal, or temperamental, coincidence but
http://build.squeak.org/job/SqueakTrunk/561/console shows a segfault
while updating to this commit.

I'm going to rerun the build, just in case it was a once-off. I'll
report back when it's done.

Here's the top part of the stack; see the URL for full details:
http://build.squeak.org/job/SqueakTrunk/562/console shows it happening
again. So either something's very badly wrong, or something's very
badly wrong just on that slave. (But you'll see in its history that it
can run builds.)

frank









Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Nicolas Cellier
To reproduce, just load System-cmm.602 from a MC browser and it quits quite fast...
From assert cog vm, here is the end of the report:

**IncrementalGC**
**FullGC**

stack page bytes 2048 available headroom 1252 minimum unused headroom 724

    (sweep failed to find exact end of memory)
Abort trap

and the beginning is:

sweep failed to find exact end of memory

Squeak VM version: 4.0 4.0.2778 Mac OS X built on Aug  8 2013 07:43:35 Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) [Assert VM]
Built from: CoInterpreter * VMMaker.oscog-nice.336 uuid: 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
With: StackToRegisterMappingCogit * VMMaker.oscog-nice.336 uuid: 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
Revision: VM: r2778 http://squeakvm.org/svn/squeak/branches/Cog
Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins


C stack backtrace:
0   Squeak                              0x0004deec reportStackState + 147
1   Squeak                              0x0004e26b error + 31
2   Squeak                              0x000b43ec fullGC + 897
3   Squeak                              0x000b4cd5 sufficientSpaceAfterGC + 64
4   Squeak                              0x000b6094 primitiveNewWithArg + 147
5   ???                                 0x11acc789 0x0 + 296535945
6   Squeak                              0x000c9795 interpret + 32627
7   Squeak                              0x000429dd EventLoopEventHandler + 28
8   HIToolbox                           0x911eac2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
9   HIToolbox                           0x911e9ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
10  HIToolbox                           0x911e9d55 SendEventToEventTargetWithOptions + 58
11  HIToolbox                           0x9121ea24 _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 3006
12  HIToolbox                           0x911eb080 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 2672
13  HIToolbox                           0x911e9ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
14  HIToolbox                           0x9120c7f3 SendEventToEventTarget + 52
15  HIToolbox                           0x91395c17 ToolboxEventDispatcher + 86
16  HIToolbox                           0x91395d4f RunApplicationEventLoop + 243
17  Squeak                              0x00040e61 RunApplicationEventLoopWithSqueak + 185
18  Squeak                              0x0004de37 main + 1079
19  Squeak                              0x000027be start + 54


Smalltalk stack dump:
0xbffeb058 M Array(SequenceableCollection)>select: 0x13fe1d04: a(n) Array
0xbffeb074 M MCFileRepositoryInspector>versionNamesForSelectedPackage 0x135d28b0: a(n) MCFileRepositoryInspector
0xbffeb094 M MCFileRepositoryInspector(MCRepositoryInspector)>versionList 0x135d28b0: a(n) MCFileRepositoryInspector

Squeak stack has no importance, I just clicked somewhere in a MC trunk repo inspector...

It sounds like memory corruption...

What it interesting is that loading this mcz also blow a 4.10.10 interpreter VM...

I just fail to see what could cause such a violent ... Ah WAIT WAIT WAIT:

MCPackageLoader>>basicLoad invoke RecentMessages default suspendWhile: [ ]
suspendWhile is using the last instance variable... which is being shifted inside the suspendWhile: []...
So when we're back from the block, it's not long before die...

At least i'm happy it's not related to CharacterScanner stuff.



2013/10/16 Nicolas Cellier <[hidden email]>
Ah, interesting, but MorphicExtras-nice.125.mcz is changing a class that is essentially unused, and I'm sure it was possible to update before...


2013/10/16 Bob Arning <[hidden email]>
FWIW, after it starts loading System-cmm.602, it starts reshaping MorphicExtras-nice.125. Then it dies.

Cheers,
Bob

On 10/15/13 5:05 PM, Frank Shearar wrote:
On 15 October 2013 21:30, Frank Shearar [hidden email] wrote:
On 15 October 2013 19:45,  [hidden email] wrote:
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.602.mcz

==================== Summary ====================

Name: System-cmm.602
Author: cmm
Time: 15 October 2013, 1:45:33.881 pm
UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
Ancestors: System-eem.601

- Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
- Convenience method for checking for any of the various headless VM  options.
- API consistency for accessing command-line arguments.
- Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
- RecentMessages simplifications, fixes and cleanups.

=============== Diff against System-eem.601 ===============
This might be temporal, or temperamental, coincidence but
http://build.squeak.org/job/SqueakTrunk/561/console shows a segfault
while updating to this commit.

I'm going to rerun the build, just in case it was a once-off. I'll
report back when it's done.

Here's the top part of the stack; see the URL for full details:
http://build.squeak.org/job/SqueakTrunk/562/console shows it happening
again. So either something's very badly wrong, or something's very
badly wrong just on that slave. (But you'll see in its history that it
can run builds.)

frank










Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Nicolas Cellier
So you need to publish a new version of RecentMessages with size restored as last inst var, publish a mcm
Then remove the inst var size

Be aware that the more classes you put in basicLoad, the more fragile it will be w.r.t. class layout change.
Believe me, I have a solid experience in this area with my Compiler changes ;)


2013/10/16 Nicolas Cellier <[hidden email]>
To reproduce, just load System-cmm.602 from a MC browser and it quits quite fast...
From assert cog vm, here is the end of the report:

**IncrementalGC**
**FullGC**

stack page bytes 2048 available headroom 1252 minimum unused headroom 724

    (sweep failed to find exact end of memory)
Abort trap

and the beginning is:

sweep failed to find exact end of memory

Squeak VM version: 4.0 4.0.2778 Mac OS X built on Aug  8 2013 07:43:35 Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) [Assert VM]
Built from: CoInterpreter * VMMaker.oscog-nice.336 uuid: 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
With: StackToRegisterMappingCogit * VMMaker.oscog-nice.336 uuid: 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
Revision: VM: r2778 http://squeakvm.org/svn/squeak/branches/Cog
Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins


C stack backtrace:
0   Squeak                              0x0004deec reportStackState + 147
1   Squeak                              0x0004e26b error + 31
2   Squeak                              0x000b43ec fullGC + 897
3   Squeak                              0x000b4cd5 sufficientSpaceAfterGC + 64
4   Squeak                              0x000b6094 primitiveNewWithArg + 147
5   ???                                 0x11acc789 0x0 + 296535945
6   Squeak                              0x000c9795 interpret + 32627
7   Squeak                              0x000429dd EventLoopEventHandler + 28
8   HIToolbox                           0x911eac2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
9   HIToolbox                           0x911e9ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
10  HIToolbox                           0x911e9d55 SendEventToEventTargetWithOptions + 58
11  HIToolbox                           0x9121ea24 _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 3006
12  HIToolbox                           0x911eb080 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 2672
13  HIToolbox                           0x911e9ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
14  HIToolbox                           0x9120c7f3 SendEventToEventTarget + 52
15  HIToolbox                           0x91395c17 ToolboxEventDispatcher + 86
16  HIToolbox                           0x91395d4f RunApplicationEventLoop + 243
17  Squeak                              0x00040e61 RunApplicationEventLoopWithSqueak + 185
18  Squeak                              0x0004de37 main + 1079
19  Squeak                              0x000027be start + 54


Smalltalk stack dump:
0xbffeb058 M Array(SequenceableCollection)>select: 0x13fe1d04: a(n) Array
0xbffeb074 M MCFileRepositoryInspector>versionNamesForSelectedPackage 0x135d28b0: a(n) MCFileRepositoryInspector
0xbffeb094 M MCFileRepositoryInspector(MCRepositoryInspector)>versionList 0x135d28b0: a(n) MCFileRepositoryInspector

Squeak stack has no importance, I just clicked somewhere in a MC trunk repo inspector...

It sounds like memory corruption...

What it interesting is that loading this mcz also blow a 4.10.10 interpreter VM...

I just fail to see what could cause such a violent ... Ah WAIT WAIT WAIT:

MCPackageLoader>>basicLoad invoke RecentMessages default suspendWhile: [ ]
suspendWhile is using the last instance variable... which is being shifted inside the suspendWhile: []...
So when we're back from the block, it's not long before die...

At least i'm happy it's not related to CharacterScanner stuff.



2013/10/16 Nicolas Cellier <[hidden email]>
Ah, interesting, but MorphicExtras-nice.125.mcz is changing a class that is essentially unused, and I'm sure it was possible to update before...


2013/10/16 Bob Arning <[hidden email]>
FWIW, after it starts loading System-cmm.602, it starts reshaping MorphicExtras-nice.125. Then it dies.

Cheers,
Bob

On 10/15/13 5:05 PM, Frank Shearar wrote:
On 15 October 2013 21:30, Frank Shearar [hidden email] wrote:
On 15 October 2013 19:45,  [hidden email] wrote:
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.602.mcz

==================== Summary ====================

Name: System-cmm.602
Author: cmm
Time: 15 October 2013, 1:45:33.881 pm
UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
Ancestors: System-eem.601

- Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
- Convenience method for checking for any of the various headless VM  options.
- API consistency for accessing command-line arguments.
- Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
- RecentMessages simplifications, fixes and cleanups.

=============== Diff against System-eem.601 ===============
This might be temporal, or temperamental, coincidence but
http://build.squeak.org/job/SqueakTrunk/561/console shows a segfault
while updating to this commit.

I'm going to rerun the build, just in case it was a once-off. I'll
report back when it's done.

Here's the top part of the stack; see the URL for full details:
http://build.squeak.org/job/SqueakTrunk/562/console shows it happening
again. So either something's very badly wrong, or something's very
badly wrong just on that slave. (But you'll see in its history that it
can run builds.)

frank











Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Chris Muller-3
In reply to this post by Nicolas Cellier
On Wed, Oct 16, 2013 at 4:07 PM, Nicolas Cellier
<[hidden email]> wrote:

> To reproduce, just load System-cmm.602 from a MC browser and it quits quite
> fast...
> From assert cog vm, here is the end of the report:
>
> **IncrementalGC**
> **FullGC**
>
> stack page bytes 2048 available headroom 1252 minimum unused headroom 724
>
>     (sweep failed to find exact end of memory)
> Abort trap
>
> and the beginning is:
>
> sweep failed to find exact end of memory
>
> Squeak VM version: 4.0 4.0.2778 Mac OS X built on Aug  8 2013 07:43:35
> Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) [Assert VM]
> Built from: CoInterpreter * VMMaker.oscog-nice.336 uuid:
> 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
> With: StackToRegisterMappingCogit * VMMaker.oscog-nice.336 uuid:
> 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
> Revision: VM: r2778 http://squeakvm.org/svn/squeak/branches/Cog
> Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
>
>
> C stack backtrace:
> 0   Squeak                              0x0004deec reportStackState + 147
> 1   Squeak                              0x0004e26b error + 31
> 2   Squeak                              0x000b43ec fullGC + 897
> 3   Squeak                              0x000b4cd5 sufficientSpaceAfterGC +
> 64
> 4   Squeak                              0x000b6094 primitiveNewWithArg + 147
> 5   ???                                 0x11acc789 0x0 + 296535945
> 6   Squeak                              0x000c9795 interpret + 32627
> 7   Squeak                              0x000429dd EventLoopEventHandler +
> 28
> 8   HIToolbox                           0x911eac2f
> _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec
> + 1567
> 9   HIToolbox                           0x911e9ef6
> _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
> + 411
> 10  HIToolbox                           0x911e9d55
> SendEventToEventTargetWithOptions + 58
> 11  HIToolbox                           0x9121ea24
> _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv
> + 3006
> 12  HIToolbox                           0x911eb080
> _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec
> + 2672
> 13  HIToolbox                           0x911e9ef6
> _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
> + 411
> 14  HIToolbox                           0x9120c7f3 SendEventToEventTarget +
> 52
> 15  HIToolbox                           0x91395c17 ToolboxEventDispatcher +
> 86
> 16  HIToolbox                           0x91395d4f RunApplicationEventLoop +
> 243
> 17  Squeak                              0x00040e61
> RunApplicationEventLoopWithSqueak + 185
> 18  Squeak                              0x0004de37 main + 1079
> 19  Squeak                              0x000027be start + 54
>
>
> Smalltalk stack dump:
> 0xbffeb058 M Array(SequenceableCollection)>select: 0x13fe1d04: a(n) Array
> 0xbffeb074 M MCFileRepositoryInspector>versionNamesForSelectedPackage
> 0x135d28b0: a(n) MCFileRepositoryInspector
> 0xbffeb094 M MCFileRepositoryInspector(MCRepositoryInspector)>versionList
> 0x135d28b0: a(n) MCFileRepositoryInspector
>
> Squeak stack has no importance, I just clicked somewhere in a MC trunk repo
> inspector...
>
> It sounds like memory corruption...
>
> What it interesting is that loading this mcz also blow a 4.10.10 interpreter
> VM...
>
> I just fail to see what could cause such a violent ... Ah WAIT WAIT WAIT:
>
> MCPackageLoader>>basicLoad invoke RecentMessages default suspendWhile: [ ]
> suspendWhile is using the last instance variable... which is being shifted
> inside the suspendWhile: []...
> So when we're back from the block, it's not long before die...

Ahh!!  THANK YOU and compliments for an awesome diagnosis!  I was
leisurely digging for a couple of hours today, I was stuck thinking my
changes were benign.  My image updated fine after I committed it.

I guess I found a tricky land mine!

> At least i'm happy it's not related to CharacterScanner stuff.

My bad.  :)  I'll post a fix.

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Frank Shearar-3
Hooray for Chris and Nicolas!

frank

On 17 October 2013 01:45, Chris Muller <[hidden email]> wrote:

> On Wed, Oct 16, 2013 at 4:07 PM, Nicolas Cellier
> <[hidden email]> wrote:
>> To reproduce, just load System-cmm.602 from a MC browser and it quits quite
>> fast...
>> From assert cog vm, here is the end of the report:
>>
>> **IncrementalGC**
>> **FullGC**
>>
>> stack page bytes 2048 available headroom 1252 minimum unused headroom 724
>>
>>     (sweep failed to find exact end of memory)
>> Abort trap
>>
>> and the beginning is:
>>
>> sweep failed to find exact end of memory
>>
>> Squeak VM version: 4.0 4.0.2778 Mac OS X built on Aug  8 2013 07:43:35
>> Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) [Assert VM]
>> Built from: CoInterpreter * VMMaker.oscog-nice.336 uuid:
>> 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
>> With: StackToRegisterMappingCogit * VMMaker.oscog-nice.336 uuid:
>> 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
>> Revision: VM: r2778 http://squeakvm.org/svn/squeak/branches/Cog
>> Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
>>
>>
>> C stack backtrace:
>> 0   Squeak                              0x0004deec reportStackState + 147
>> 1   Squeak                              0x0004e26b error + 31
>> 2   Squeak                              0x000b43ec fullGC + 897
>> 3   Squeak                              0x000b4cd5 sufficientSpaceAfterGC +
>> 64
>> 4   Squeak                              0x000b6094 primitiveNewWithArg + 147
>> 5   ???                                 0x11acc789 0x0 + 296535945
>> 6   Squeak                              0x000c9795 interpret + 32627
>> 7   Squeak                              0x000429dd EventLoopEventHandler +
>> 28
>> 8   HIToolbox                           0x911eac2f
>> _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec
>> + 1567
>> 9   HIToolbox                           0x911e9ef6
>> _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
>> + 411
>> 10  HIToolbox                           0x911e9d55
>> SendEventToEventTargetWithOptions + 58
>> 11  HIToolbox                           0x9121ea24
>> _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv
>> + 3006
>> 12  HIToolbox                           0x911eb080
>> _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec
>> + 2672
>> 13  HIToolbox                           0x911e9ef6
>> _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
>> + 411
>> 14  HIToolbox                           0x9120c7f3 SendEventToEventTarget +
>> 52
>> 15  HIToolbox                           0x91395c17 ToolboxEventDispatcher +
>> 86
>> 16  HIToolbox                           0x91395d4f RunApplicationEventLoop +
>> 243
>> 17  Squeak                              0x00040e61
>> RunApplicationEventLoopWithSqueak + 185
>> 18  Squeak                              0x0004de37 main + 1079
>> 19  Squeak                              0x000027be start + 54
>>
>>
>> Smalltalk stack dump:
>> 0xbffeb058 M Array(SequenceableCollection)>select: 0x13fe1d04: a(n) Array
>> 0xbffeb074 M MCFileRepositoryInspector>versionNamesForSelectedPackage
>> 0x135d28b0: a(n) MCFileRepositoryInspector
>> 0xbffeb094 M MCFileRepositoryInspector(MCRepositoryInspector)>versionList
>> 0x135d28b0: a(n) MCFileRepositoryInspector
>>
>> Squeak stack has no importance, I just clicked somewhere in a MC trunk repo
>> inspector...
>>
>> It sounds like memory corruption...
>>
>> What it interesting is that loading this mcz also blow a 4.10.10 interpreter
>> VM...
>>
>> I just fail to see what could cause such a violent ... Ah WAIT WAIT WAIT:
>>
>> MCPackageLoader>>basicLoad invoke RecentMessages default suspendWhile: [ ]
>> suspendWhile is using the last instance variable... which is being shifted
>> inside the suspendWhile: []...
>> So when we're back from the block, it's not long before die...
>
> Ahh!!  THANK YOU and compliments for an awesome diagnosis!  I was
> leisurely digging for a couple of hours today, I was stuck thinking my
> changes were benign.  My image updated fine after I committed it.
>
> I guess I found a tricky land mine!
>
>> At least i'm happy it's not related to CharacterScanner stuff.
>
> My bad.  :)  I'll post a fix.
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Nicolas Cellier
Note that the inst var swapping is a dirty hack...
The obsolete CompiledMethod on the stack will index the wrong inst. var. after the swapping, but since size was unused and nil, and since the code was robust to such nil, it worked.
But don't take this hack for a general recipe!


2013/10/18 Frank Shearar <[hidden email]>
Hooray for Chris and Nicolas!

frank

On 17 October 2013 01:45, Chris Muller <[hidden email]> wrote:
> On Wed, Oct 16, 2013 at 4:07 PM, Nicolas Cellier
> <[hidden email]> wrote:
>> To reproduce, just load System-cmm.602 from a MC browser and it quits quite
>> fast...
>> From assert cog vm, here is the end of the report:
>>
>> **IncrementalGC**
>> **FullGC**
>>
>> stack page bytes 2048 available headroom 1252 minimum unused headroom 724
>>
>>     (sweep failed to find exact end of memory)
>> Abort trap
>>
>> and the beginning is:
>>
>> sweep failed to find exact end of memory
>>
>> Squeak VM version: 4.0 4.0.2778 Mac OS X built on Aug  8 2013 07:43:35
>> Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) [Assert VM]
>> Built from: CoInterpreter * VMMaker.oscog-nice.336 uuid:
>> 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
>> With: StackToRegisterMappingCogit * VMMaker.oscog-nice.336 uuid:
>> 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013
>> Revision: VM: r2778 http://squeakvm.org/svn/squeak/branches/Cog
>> Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
>>
>>
>> C stack backtrace:
>> 0   Squeak                              0x0004deec reportStackState + 147
>> 1   Squeak                              0x0004e26b error + 31
>> 2   Squeak                              0x000b43ec fullGC + 897
>> 3   Squeak                              0x000b4cd5 sufficientSpaceAfterGC +
>> 64
>> 4   Squeak                              0x000b6094 primitiveNewWithArg + 147
>> 5   ???                                 0x11acc789 0x0 + 296535945
>> 6   Squeak                              0x000c9795 interpret + 32627
>> 7   Squeak                              0x000429dd EventLoopEventHandler +
>> 28
>> 8   HIToolbox                           0x911eac2f
>> _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec
>> + 1567
>> 9   HIToolbox                           0x911e9ef6
>> _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
>> + 411
>> 10  HIToolbox                           0x911e9d55
>> SendEventToEventTargetWithOptions + 58
>> 11  HIToolbox                           0x9121ea24
>> _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv
>> + 3006
>> 12  HIToolbox                           0x911eb080
>> _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec
>> + 2672
>> 13  HIToolbox                           0x911e9ef6
>> _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
>> + 411
>> 14  HIToolbox                           0x9120c7f3 SendEventToEventTarget +
>> 52
>> 15  HIToolbox                           0x91395c17 ToolboxEventDispatcher +
>> 86
>> 16  HIToolbox                           0x91395d4f RunApplicationEventLoop +
>> 243
>> 17  Squeak                              0x00040e61
>> RunApplicationEventLoopWithSqueak + 185
>> 18  Squeak                              0x0004de37 main + 1079
>> 19  Squeak                              0x000027be start + 54
>>
>>
>> Smalltalk stack dump:
>> 0xbffeb058 M Array(SequenceableCollection)>select: 0x13fe1d04: a(n) Array
>> 0xbffeb074 M MCFileRepositoryInspector>versionNamesForSelectedPackage
>> 0x135d28b0: a(n) MCFileRepositoryInspector
>> 0xbffeb094 M MCFileRepositoryInspector(MCRepositoryInspector)>versionList
>> 0x135d28b0: a(n) MCFileRepositoryInspector
>>
>> Squeak stack has no importance, I just clicked somewhere in a MC trunk repo
>> inspector...
>>
>> It sounds like memory corruption...
>>
>> What it interesting is that loading this mcz also blow a 4.10.10 interpreter
>> VM...
>>
>> I just fail to see what could cause such a violent ... Ah WAIT WAIT WAIT:
>>
>> MCPackageLoader>>basicLoad invoke RecentMessages default suspendWhile: [ ]
>> suspendWhile is using the last instance variable... which is being shifted
>> inside the suspendWhile: []...
>> So when we're back from the block, it's not long before die...
>
> Ahh!!  THANK YOU and compliments for an awesome diagnosis!  I was
> leisurely digging for a couple of hours today, I was stuck thinking my
> changes were benign.  My image updated fine after I committed it.
>
> I guess I found a tricky land mine!
>
>> At least i'm happy it's not related to CharacterScanner stuff.
>
> My bad.  :)  I'll post a fix.
>




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-cmm.602.mcz

Levente Uzonyi-2
In reply to this post by commits-2
On Tue, 15 Oct 2013, [hidden email] wrote:

> Chris Muller uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-cmm.602.mcz
>
> ==================== Summary ====================
>
> Name: System-cmm.602
> Author: cmm
> Time: 15 October 2013, 1:45:33.881 pm
> UUID: 7a452144-3c88-4726-9692-a6afa93ef46e
> Ancestors: System-eem.601
>
> - Support Preferences class>>#readDocumentAtStartup: false, so that Squeak can accept arbitrary arguments without requiring the first one to be a document URL.
> - Convenience method for checking for any of the various headless VM  options.
> - API consistency for accessing command-line arguments.
> - Remove duplicate code (#extractParameters).  Bid to remove apparently-unused code.
> - RecentMessages simplifications, fixes and cleanups.

I get 13 errors, and 2 failures from RecentMessagesTest after these
changes. 10 of them are related to the fact, that #initialize doesn't
initialize all instance variables.
Some of the tests got broken earlier in System-cmm.600.

I think that the CI should send emails to this list (preferrably when a
test starts failing which wasn't failing before), because it seems like
nobody is running the tests in the image anymore, using the (weak)
excuse that the CI will do it anyway. But nobody checks the CI either.

Another option is to go back to our previous policy "run all the tests
before you commit". But it didn't work, and that's one of the reasons why
the CI was created.


Levente