[squeak-dev] JNIPort preview for Squeak and Pharo available on SqueakSource

Joachim Geidel joachim.geidel at onlinehome.de
Wed Jun 9 14:52:35 UTC 2010


Am 09.06.10 16:11 schrieb Levente Uzonyi:
>> * Starting a JVM seems to lead to a deadlock in Squeak 4.1, but not in
>> Pharo. When you start a JVM, nothing happens until you hit command-. (on a
>> Mac), wait until a notifier for the user interrupt appears, and proceed. The
>> problem seems to be somewhere in WeakRegistry; it disappears when you
>> replace Squeak?s WeakRegistry by the WeakRegistry class from a Pharo image.
> 
> That's really interesting. I tried to reproduce it on windows without
> success, the jvm just failed to start, then alien crashed the image. Can
> you send a stack trace of the deadlock?
> 
> 
> Levente

The attachment contains a stack trace of the place where a user interrupt
has always interrupted the stuck process so far. I suspect that the
finalization process somehow interferes with the registration of new objects
in the WeakRegistry. The problem is in a loop which creates wrapper methods
for each of the Java classes found so far. It does not always happen at the
same iteration, I have seen it happen for the first and for the fourth class
in the list (I checked this only twice so far).

What do you mean by "the jvm just failed to start"? Does it mean that the
jvm.dll could not be found, i.e. the JNIPortJNIInterface could not load the
library?

HTH,
Joachim

-------------- next part --------------
VM: Mac OS - Smalltalk
Image: Squeak4.1 [latest update: #9957]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /Users/joachim/Entwicklung/Squeak/Squeak4.1-mac
Trusted Dir /foobar/tooBar/forSqueak/bogus
Untrusted Dir /Users/joachim/Library/Preferences/Squeak/Internet/My Squeak

[] in Semaphore>>critical:
	Receiver: a Semaphore()
	Arguments and temporary variables: 
		mutuallyExcludedBlock: 	[closure] in Semaphore>>critical:ifError:
		caught: 	#(true)
	Receiver's instance variables: 
		firstLink: 	nil
		lastLink: 	nil
		excessSignals: 	0

BlockClosure>>ensure:
	Receiver: [closure] in Semaphore>>critical:
	Arguments and temporary variables: 
		aBlock: 	[closure] in Semaphore>>critical:
		complete: 	nil
		returnValue: 	nil
	Receiver's instance variables: 
		outerContext: 	Semaphore>>critical:
		startpc: 	38
		numArgs: 	0

Semaphore>>critical:
	Receiver: a Semaphore()
	Arguments and temporary variables: 
		mutuallyExcludedBlock: 	[closure] in Semaphore>>critical:ifError:
		caught: 	#(true)
	Receiver's instance variables: 
		firstLink: 	nil
		lastLink: 	nil
		excessSignals: 	0

Semaphore>>critical:ifError:
	Receiver: a Semaphore()
	Arguments and temporary variables: 
<<error during printing>
	Receiver's instance variables: 
		firstLink: 	nil
		lastLink: 	nil
		excessSignals: 	0


--- The full stack ---
[] in Semaphore>>critical:
BlockClosure>>ensure:
Semaphore>>critical:
Semaphore>>critical:ifError:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
JNIPortWeakRegistry(WeakRegistry)>>protected:
JNIPortWeakRegistry(WeakRegistry)>>add:executor:
JNIPortWeakRegistry(WeakRegistry)>>add:
JNIPortWeakRegistry>>registerValueOf:
JVMWithoutCallbacks(JVM)>>own:
JavaLangReflectMethod(JavaClassInstance)>>jniObject:static:
JavaLangReflectMethod class(JavaClassInstance class)>>jniObject:static:
StaticJavaLangObject(JavaClassStatic)>>basicWrapJNIObject:
[] in StaticJavaLangObject(JavaClassStatic)>>wrapJNIObject:
JavaObjectRegistry>>basicFindOrRelease:ifAbsentPut:
[] in JavaObjectRegistry>>findOrRelease:ifAbsentPut:
BlockClosure>>ensure:
[] in Mutex>>critical:
[] in Semaphore>>critical:
BlockClosure>>ensure:
Semaphore>>critical:
Mutex>>critical:
JavaObjectRegistry>>findOrRelease:ifAbsentPut:
StaticJavaLangObject(JavaClassStatic)>>wrapJNIObject:
JavaObjectArray>>at:wrapper:
JavaObjectArray>>at:
ArrayAdaptor>>at:
ArrayAdaptor(SequenceableCollection)>>select:
StaticJavaLangObject(JavaStatic)>>methods
StaticJavaLangObject(JavaStatic)>>allMethods
StaticJavaLangThrowable(JavaStatic)>>allMethods
java.lang.Error.static(JavaStatic)>>allMethods
JavaStaticWrapperGenerator>>wrappers
JavaStaticWrapperGenerator(JavaClassWrapperGenerator)>>memberMethodGenerators
JavaStaticWrapperGenerator(JavaClassWrapperGenerator)>>methodGenerators
JavaGhostClassInstaller(JavaClassWrapperInstaller)>>methodGenerators
[] in JavaGhostClassInstaller(JavaClassWrapperInstaller)>>install
BlockClosure>>ensure:
JavaGhostClassInstaller(JavaClassWrapperInstaller)>>install
java.lang.Error.static(JavaStatic)>>useGhostClasses
JVMGhostClassMaker>>enghost:
[] in JVMGhostClassMaker>>enghostAll:
OrderedCollection>>do:
JVMGhostClassMaker>>enghostAll:
JVMGhostClassMaker>>onJmvInitialized:
[] in JVMWithoutCallbacks(JVM)>>notifyLive
OrderedCollection>>do:
JVMWithoutCallbacks(JVM)>>notifyLive
JVMWithoutCallbacks(JVM)>>initializeFromSettings:
JVM class>>newWithSettings:
[] in UndefinedObject>>DoIt
BlockClosure>>ensure:
CursorWithMask(Cursor)>>showWhile:
UndefinedObject>>DoIt
Compiler>>evaluate:in:to:notifying:ifFail:logged:
[] in SmalltalkEditor(TextEditor)>>evaluateSelection
BlockClosure>>on:do:
SmalltalkEditor(TextEditor)>>evaluateSelection
[] in PluggableTextMorphPlus(PluggableTextMorph)>>doIt
TextMorphForEditView(TextMorph)>>handleEdit:
PluggableTextMorphPlus(PluggableTextMorph)>>handleEdit:
PluggableTextMorphPlus(PluggableTextMorph)>>doIt
-- and more not shown --


More information about the Squeak-dev mailing list