-------------------------------------------------- From: "Rob Withers" <[hidden email]> Sent: Tuesday, July 13, 2010 5:18 PM To: "The general-purpose Squeak developers list" <[hidden email]> Subject: Re: [squeak-dev] Re: UI lockup in Squeak 4.1 >> Are there any senders of knownEnvironments and removeKey: et al? Do you >> have changes to Dictionary grow code which causes a bug on rehash? >> etc... >> > > No, there is only one sender of knownEnvironments and that is localeID:. > > No, but I force rehashing when one of my ERefs becomes another ERef. I am > testing this. I do not think I have any ERef references to an Environment > or that dictionary. > My rehashing code is turned off by preference and is not getting called. |
In reply to this post by Eliot Miranda-2
I found the problem! Of course, it was my code
causing this. I was doing the equivalent of:
Object
new becomeForward: nil.
and this was nilling out the contents of that
KnownEnvironments dictionary. I tested with the above code, without my
code, and indeed it caused the problem. I am now avoiding both
SmallIntegers and nil when using #becomeForward:
Thanks for everyone's help in this
matter!
Rob
From: [hidden email]
Sent: Tuesday, July 13, 2010 5:03 PM
To: [hidden email]
Subject: Re: [squeak-dev] Re: UI lockup in Squeak 4.1 On Tue, Jul 13, 2010 at 1:53 PM, Rob Withers <[hidden email]> wrote:
LanguageEnvironment class>>#localeID:
localeID
^self knownEnvironments at: localeID ifAbsent: [self knownEnvironments
at: (LocaleID isoLanguage:
'en')
ifAbsentPut:
[Latin1Environment new
localeID: (LocaleID isoString: 'en');
yourself]]
No?
Are there any senders of knownEnvironments and removeKey: et al? Do
you have changes to Dictionary grow code which causes a bug on rehash?
etc...
|
In reply to this post by Levente Uzonyi-2
On 2010/07/13 23:04, Levente Uzonyi wrote:
> On Tue, 13 Jul 2010, Rob Withers wrote: > >> Thanks Levente. Unfortunately it did not work: >> >> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not >> found (required by ./lib/squeak/3.9-7/squeak) > > Seems like you have to build it yourself. Fortunately it's very easy, > since Eliot commits the generated sources to the svn repo. So you can > build a CogVM/StackVM without VMMaker. Here is how: > > "How to build the Cog Croquet VM on Unix > ------------------------------- > 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt > source)) > 2. Check out the following sources from svn (if you haven't already - if > you're > reading this in unixbuild its likely you've already got the sources) > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild > 3. Open a shell, cd into the unixbuild/bld directory and execute > ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 > -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 > -DCOGMTVM=0" LIBS=-lpthread > make install prefix=WhereYouWantTheVmToGo > 4. At the end of it you'll get a new VM in the path provided via -prefix" Are there any additional requirements like gcc version, for instance? I ask because I get errors on the above instructions, on FreeBSD 6.4, running gcc 3.4.6. I can attach configure's output and whatnot, if you're interested. frank > Levente > >> >> Rob >> >> >> >> ________________________________ >> From: Levente Uzonyi <[hidden email]> >> To: The general-purpose Squeak developers list >> <[hidden email]> >> Sent: Tue, July 13, 2010 3:21:43 PM >> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in >> Squeak 4.1) >> >> On Tue, 13 Jul 2010, Rob Withers wrote: >> >>> -------------------------------------------------- >>> From: "Levente Uzonyi" <[hidden email]> >>> Sent: Tuesday, July 13, 2010 12:46 PM >>> To: "The general-purpose Squeak developers list" >>> <[hidden email]> >>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak >>> 4.1) >>> >>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>> >>>>> >>>>> -------------------------------------------------- >>>>> From: "Andreas Raab" <[hidden email]> >>>>> Sent: Tuesday, July 13, 2010 11:29 AM >>>>> To: "The general-purpose Squeak developers list" >>>>> <[hidden email]> >>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >>>>> >>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >>>>>>> The low-space watcher is running, at least before the problem >>>>>>> starts. I >>>>>>> do eventually run out of memory, but the uninterruptable state >>>>>>> happens >>>>>>> before this. >>>>>> >>>>>> In which case you want to do the following: >>>>>> * Launch your app and wait until it's in the "growing state" >>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then >>>>>> "Print all processes" >>>>>> >>>>>> This will dump a list of all the call stacks of all processes. One >>>>>> of them is the culprit consuming memory and you'll probably be >>>>>> able to tell quickly from just looking at it (if not, you can >>>>>> email the output here but it typically takes a domain expert to >>>>>> understand what's going wrong). >>>>>> >>>>> >>>>> Thanks for this pointer, Andreas. >>>>> >>>>> This time it was a Cog VM which spasmed, which I use for my client >>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to >>>>> compile a linux Cog vm: would love if someone posted one that could >>>>> be launched headless for my webhost). >>>> >>>> Cog works, but i think you're trying to use the -headless switch, >>>> which (is deprecated) and tells the vm to use the X11 display, but >>>> with no window. Servers usually don't have X11, so it won't work. >>>> You better use -vm-display-null (and -vm-sound-null). Try squeak >>>> --help for further useful options (like tuning Cog). >>>> >>> >>> I am trying to use the -headless switch. Good to know it is >>> deprecated. So you happen to have a Cog for linux binary (version 17 >>> - 20), which I could use? >> >> I have one, but I'm not sure it will work on your server. You can find >> it here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on >> ubuntu 10.04 and is optimized for core2. >> >> >> Levente >> >>> >>> Thanks, >>> Rob >>> >>>> >>>> Levente >>>> >>>>> >>>>> It started running at 100% and I did your F2 -> Debug Options -> >>>>> Print all processes. It started dumping a LOT to the Debug Console, >>>>> then it froze, still at 100%, but no increase in memory now and it >>>>> went (Not Responding) and greyed out the window. >>>>> >>>>> Luckily, I was able to see enough of the stack that was causing >>>>> problems. It is infinitely looping in this method: >>>>> >>>>> LanguageEnvironment class>>#localeID: localeID >>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>>>> (LocaleID isoLanguage: 'en')] >>>>> >>>>> This has nothing to do with my code, except I must be calling >>>>> something that enters this loop. It happens in both Cog (Windows) >>>>> and Squeak4.1 (Linux <headless> and Windows). >>>>> >>>>> Not sure how to fix this. >>>>> >>>>> Rob >>>>> >>>>>> Cheers, >>>>>> - Andreas >>>>>> >>>>> >>>>> >>>> >>> >>> > > > |
In reply to this post by Rob Withers
I'm not sure if this is the same context of the issue you had, but..
this seems like a good time to reflect on #becomeForward:. Until 5 or 6 years ago, we only had Object>>#becomeForward: (and not #becomeForward:copyHash:). #becomeForward: would mutate the identityHash of the argument to be that of the receiver, causing any identity-hashed collections it might be residing in to need to be rehashed. Unfortunately, mutating the identityHash of important objects such as an important Symbol in the SymbolTable (like, #at: !!); there was no time to rehash the SymbolTable or anything else before the system needed it, couldn't find it, and locked up. So we added Object >> #becomeForward:copyHash: so that false could be passed as the second argument, causing it not to mutate the identityHash of the target. - Chris On Wed, Jul 14, 2010 at 3:31 AM, Rob Withers <[hidden email]> wrote: > I found the problem! > > Of course, it was my code causing this. I was doing the equivalent of: > > Object new becomeForward: nil. > > and this was nilling out the contents of that KnownEnvironments dictionary. > I tested with the above code, without my code, and indeed it caused the > problem. I am now avoiding both SmallIntegers and nil when using > #becomeForward: > > Thanks for everyone's help in this matter! > > Rob > From: Eliot Miranda > Sent: Tuesday, July 13, 2010 5:03 PM > To: The general-purpose Squeak developers list > Subject: Re: [squeak-dev] Re: UI lockup in Squeak 4.1 > > > On Tue, Jul 13, 2010 at 1:53 PM, Rob Withers <[hidden email]> wrote: >> >>> From: Eliot Miranda >>> Sent: Tuesday, July 13, 2010 4:11 PM >>> To: The general-purpose Squeak developers list >>> Subject: Re: [squeak-dev] Re: UI lockup in Squeak 4.1 >>> >>> >>> >>> >>> >>> > On Tue, Jul 13, 2010 at 12:59 PM, Rob Withers <[hidden email]> > >>> > wrote: >>> > >>> > Hi Eliot, >>> > >>> > >>> > I already found it. >>> > >>> >>> Doh! >>> >>> > It is this method, when the result of the dictionary lookup is nil for >>> > > 'en', and it recursively calls localeID: with 'en'. >>> > >>> > >>> > LanguageEnvironment class>>#localeID: localeID >>> > ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>> > (LocaleID >>> > isoLanguage: 'en')] >>> > >>> >>> >>> which clearly needs to read something like >>> LanguageEnvironment class>>#localeID: localeID >>> ^self knownEnvironments >>> at: localeID >>> ifAbsent: [self knownEnvironments at: (LocaleID isoLanguage: >>> 'en')] >>> >> >> The problem is that something changed the entry for 'en' from >> Latin1Environment to nil. So the absent block will still fail, although >> this time as an Error and not a recursive, memory-growing loop. >> >> I had in mind: >> LanguageEnvironment class>>#localeID: localeID >> >> ^self knownEnvironments >> at: localeID >> ifAbsent: [ >> | env id | >> env := Latin1Environment new. >> id := LocaleID isoString: 'en'. >> env localeID: id. >> self knownEnvironments at: id put: env. >> ^ env]. > > > LanguageEnvironment class>>#localeID: localeID > ^self knownEnvironments > at: localeID > ifAbsent: [self knownEnvironments > at: (LocaleID isoLanguage: 'en') > ifAbsentPut: > [Latin1Environment new > localeID: (LocaleID isoString: 'en'); > yourself]] > > No? >> >> >>> >>> > I start the image with an intact KnownEnvironments. Something somehow >>> > > nils out the entries after I > > > have run for awhile. ?????? >>> > >>> >>> So guard against resetKnownEnvironments? >> >> I had a 'self halt' and it never got called. >> >> I have no idea how it was nilling out the entries. > > Are there any senders of knownEnvironments and removeKey: et al? Do you > have changes to Dictionary grow code which causes a bug on rehash? etc... >> >> Rob >> >> >> > > ________________________________ > > > > |
In reply to this post by Levente Uzonyi-2
I followed these instructions to the letter, and get the same result I
got a few weeks ago. I posted a question then, but no responses. May I try again? Everything seems to go just fine throughout these build instructions. For the final step, I put it in /usr/local/lib. make install prefix=/usr/local/lib/squeak and I made sure /usr/local/lib/squeak exists before doing the make install. The make install appears to work fine, and I am able to see squeak -version: $ squeak -version 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] However, when I try to launch an image: squeak my.image The image does not launch and I get the following: could not find display driver vm-display-X11; either: - check that /usr/local/lib/squeak/3.9-7//vm-display-X11.so exists, or - use the '-plugins <path>' option to tell me where it is, or - remove DISPLAY from your environment. notice the double-slash in reference to the plugins location. Perhaps that's the problem, but what's the correct solution? Any advice is greatly appreciated.. - Chris On Tue, Jul 13, 2010 at 4:04 PM, Levente Uzonyi <[hidden email]> wrote: > On Tue, 13 Jul 2010, Rob Withers wrote: > >> Thanks Levente. Unfortunately it did not work: >> >> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not found >> (required by ./lib/squeak/3.9-7/squeak) > > Seems like you have to build it yourself. Fortunately it's very easy, since > Eliot commits the generated sources to the svn repo. So you can build a > CogVM/StackVM without VMMaker. Here is how: > > "How to build the Cog Croquet VM on Unix > ------------------------------- > 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt > source)) > 2. Check out the following sources from svn (if you haven't already - if > you're > reading this in unixbuild its likely you've already got the sources) > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild > 3. Open a shell, cd into the unixbuild/bld directory and execute > ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 > -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" > LIBS=-lpthread > make install prefix=WhereYouWantTheVmToGo > 4. At the end of it you'll get a new VM in the path provided via -prefix" > > > Levente > >> >> Rob >> >> >> >> ________________________________ >> From: Levente Uzonyi <[hidden email]> >> To: The general-purpose Squeak developers list >> <[hidden email]> >> Sent: Tue, July 13, 2010 3:21:43 PM >> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak >> 4.1) >> >> On Tue, 13 Jul 2010, Rob Withers wrote: >> >>> -------------------------------------------------- >>> From: "Levente Uzonyi" <[hidden email]> >>> Sent: Tuesday, July 13, 2010 12:46 PM >>> To: "The general-purpose Squeak developers list" >>> <[hidden email]> >>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak 4.1) >>> >>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>> >>>>> >>>>> -------------------------------------------------- >>>>> From: "Andreas Raab" <[hidden email]> >>>>> Sent: Tuesday, July 13, 2010 11:29 AM >>>>> To: "The general-purpose Squeak developers list" >>>>> <[hidden email]> >>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >>>>> >>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >>>>>>> >>>>>>> The low-space watcher is running, at least before the problem starts. >>>>>>> I >>>>>>> do eventually run out of memory, but the uninterruptable state >>>>>>> happens >>>>>>> before this. >>>>>> >>>>>> In which case you want to do the following: >>>>>> * Launch your app and wait until it's in the "growing state" >>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then >>>>>> "Print all processes" >>>>>> >>>>>> This will dump a list of all the call stacks of all processes. One of >>>>>> them is the culprit consuming memory and you'll probably be able to tell >>>>>> quickly from just looking at it (if not, you can email the output here but >>>>>> it typically takes a domain expert to understand what's going wrong). >>>>>> >>>>> >>>>> Thanks for this pointer, Andreas. >>>>> >>>>> This time it was a Cog VM which spasmed, which I use for my client >>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to compile >>>>> a linux Cog vm: would love if someone posted one that could be launched >>>>> headless for my webhost). >>>> >>>> Cog works, but i think you're trying to use the -headless switch, which >>>> (is deprecated) and tells the vm to use the X11 display, but with no window. >>>> Servers usually don't have X11, so it won't work. You better use >>>> -vm-display-null (and -vm-sound-null). Try squeak --help for further useful >>>> options (like tuning Cog). >>>> >>> >>> I am trying to use the -headless switch. Good to know it is deprecated. >>> So you happen to have a Cog for linux binary (version 17 - 20), which I >>> could use? >> >> I have one, but I'm not sure it will work on your server. You can find it >> here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on ubuntu >> 10.04 and is optimized for core2. >> >> >> Levente >> >>> >>> Thanks, >>> Rob >>> >>>> >>>> Levente >>>> >>>>> >>>>> It started running at 100% and I did your F2 -> Debug Options -> Print >>>>> all processes. It started dumping a LOT to the Debug Console, then it >>>>> froze, still at 100%, but no increase in memory now and it went (Not >>>>> Responding) and greyed out the window. >>>>> >>>>> Luckily, I was able to see enough of the stack that was causing >>>>> problems. It is infinitely looping in this method: >>>>> >>>>> LanguageEnvironment class>>#localeID: localeID >>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>>>> (LocaleID isoLanguage: 'en')] >>>>> >>>>> This has nothing to do with my code, except I must be calling something >>>>> that enters this loop. It happens in both Cog (Windows) and Squeak4.1 >>>>> (Linux <headless> and Windows). >>>>> >>>>> Not sure how to fix this. >>>>> >>>>> Rob >>>>> >>>>>> Cheers, >>>>>> - Andreas >>>>>> >>>>> >>>>> >>>> >>> >>> > > |
Just to avoid any confusion:
> $ squeak -version > 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 > Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] > Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 > UTC 2009 i686 GNU/Linux > plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: > /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] In my attempt to keep the discussion generic, I said I had put it in /usr/local/lib/squeak, but I actually did put it in /opt/4dst/thirdparty/squeak. But this does not change the discussion in terms of the problem I'm having.. On Wed, Jul 14, 2010 at 12:22 PM, Chris Muller <[hidden email]> wrote: > I followed these instructions to the letter, and get the same result I > got a few weeks ago. I posted a question then, but no responses. May > I try again? > > Everything seems to go just fine throughout these build instructions. > For the final step, I put it in /usr/local/lib. > > make install prefix=/usr/local/lib/squeak > > and I made sure /usr/local/lib/squeak exists before doing the make install. > > The make install appears to work fine, and I am able to see squeak -version: > > $ squeak -version > 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 > Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] > Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 > UTC 2009 i686 GNU/Linux > plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: > /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] > > However, when I try to launch an image: > > squeak my.image > > The image does not launch and I get the following: > > could not find display driver vm-display-X11; either: > - check that /usr/local/lib/squeak/3.9-7//vm-display-X11.so > exists, or > - use the '-plugins <path>' option to tell me where it is, or > - remove DISPLAY from your environment. > > notice the double-slash in reference to the plugins location. Perhaps > that's the problem, but what's the correct solution? > > Any advice is greatly appreciated.. > > - Chris > > > > On Tue, Jul 13, 2010 at 4:04 PM, Levente Uzonyi <[hidden email]> wrote: >> On Tue, 13 Jul 2010, Rob Withers wrote: >> >>> Thanks Levente. Unfortunately it did not work: >>> >>> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not found >>> (required by ./lib/squeak/3.9-7/squeak) >> >> Seems like you have to build it yourself. Fortunately it's very easy, since >> Eliot commits the generated sources to the svn repo. So you can build a >> CogVM/StackVM without VMMaker. Here is how: >> >> "How to build the Cog Croquet VM on Unix >> ------------------------------- >> 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt >> source)) >> 2. Check out the following sources from svn (if you haven't already - if >> you're >> reading this in unixbuild its likely you've already got the sources) >> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms >> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src >> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild >> 3. Open a shell, cd into the unixbuild/bld directory and execute >> ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 >> -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" >> LIBS=-lpthread >> make install prefix=WhereYouWantTheVmToGo >> 4. At the end of it you'll get a new VM in the path provided via -prefix" >> >> >> Levente >> >>> >>> Rob >>> >>> >>> >>> ________________________________ >>> From: Levente Uzonyi <[hidden email]> >>> To: The general-purpose Squeak developers list >>> <[hidden email]> >>> Sent: Tue, July 13, 2010 3:21:43 PM >>> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak >>> 4.1) >>> >>> On Tue, 13 Jul 2010, Rob Withers wrote: >>> >>>> -------------------------------------------------- >>>> From: "Levente Uzonyi" <[hidden email]> >>>> Sent: Tuesday, July 13, 2010 12:46 PM >>>> To: "The general-purpose Squeak developers list" >>>> <[hidden email]> >>>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak 4.1) >>>> >>>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>>> >>>>>> >>>>>> -------------------------------------------------- >>>>>> From: "Andreas Raab" <[hidden email]> >>>>>> Sent: Tuesday, July 13, 2010 11:29 AM >>>>>> To: "The general-purpose Squeak developers list" >>>>>> <[hidden email]> >>>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >>>>>> >>>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >>>>>>>> >>>>>>>> The low-space watcher is running, at least before the problem starts. >>>>>>>> I >>>>>>>> do eventually run out of memory, but the uninterruptable state >>>>>>>> happens >>>>>>>> before this. >>>>>>> >>>>>>> In which case you want to do the following: >>>>>>> * Launch your app and wait until it's in the "growing state" >>>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then >>>>>>> "Print all processes" >>>>>>> >>>>>>> This will dump a list of all the call stacks of all processes. One of >>>>>>> them is the culprit consuming memory and you'll probably be able to tell >>>>>>> quickly from just looking at it (if not, you can email the output here but >>>>>>> it typically takes a domain expert to understand what's going wrong). >>>>>>> >>>>>> >>>>>> Thanks for this pointer, Andreas. >>>>>> >>>>>> This time it was a Cog VM which spasmed, which I use for my client >>>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to compile >>>>>> a linux Cog vm: would love if someone posted one that could be launched >>>>>> headless for my webhost). >>>>> >>>>> Cog works, but i think you're trying to use the -headless switch, which >>>>> (is deprecated) and tells the vm to use the X11 display, but with no window. >>>>> Servers usually don't have X11, so it won't work. You better use >>>>> -vm-display-null (and -vm-sound-null). Try squeak --help for further useful >>>>> options (like tuning Cog). >>>>> >>>> >>>> I am trying to use the -headless switch. Good to know it is deprecated. >>>> So you happen to have a Cog for linux binary (version 17 - 20), which I >>>> could use? >>> >>> I have one, but I'm not sure it will work on your server. You can find it >>> here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on ubuntu >>> 10.04 and is optimized for core2. >>> >>> >>> Levente >>> >>>> >>>> Thanks, >>>> Rob >>>> >>>>> >>>>> Levente >>>>> >>>>>> >>>>>> It started running at 100% and I did your F2 -> Debug Options -> Print >>>>>> all processes. It started dumping a LOT to the Debug Console, then it >>>>>> froze, still at 100%, but no increase in memory now and it went (Not >>>>>> Responding) and greyed out the window. >>>>>> >>>>>> Luckily, I was able to see enough of the stack that was causing >>>>>> problems. It is infinitely looping in this method: >>>>>> >>>>>> LanguageEnvironment class>>#localeID: localeID >>>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>>>>> (LocaleID isoLanguage: 'en')] >>>>>> >>>>>> This has nothing to do with my code, except I must be calling something >>>>>> that enters this loop. It happens in both Cog (Windows) and Squeak4.1 >>>>>> (Linux <headless> and Windows). >>>>>> >>>>>> Not sure how to fix this. >>>>>> >>>>>> Rob >>>>>> >>>>>>> Cheers, >>>>>>> - Andreas >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >> >> > |
More information, I cannot launch even if I specify with -plugins
argument, with or without a trailing slash: (without) $ squeak -plugins /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7 deluxe.image could not find display driver vm-display-X11; either: - check that /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7//vm-display-X11.so exists, or - use the '-plugins <path>' option to tell me where it is, or - remove DISPLAY from your environment. Aborted (core dumped) (with) $ squeak -plugins /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ deluxe.image could not find display driver vm-display-X11; either: - check that /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7//vm-display-X11.so exists, or - use the '-plugins <path>' option to tell me where it is, or - remove DISPLAY from your environment. Aborted (core dumped) Make sure it exists: $ ls -l /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/vm-display-X11.so ls: cannot access /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/vm-display-X11.so: No such file or directory What?! Oh, mine doesn't have ".so" on the end: $ ls -l /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/vm-display-X11 -rwxr-xr-x 1 cmm ae 242110 2010-07-14 12:08 /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/vm-display-X11 Ok, so it's looking for it with a ".so" extension? Copy to it to .so: (in /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7): $ cp -a vm-display-X11 vm-display-X11.so Same problem.. :-( On Wed, Jul 14, 2010 at 12:26 PM, Chris Muller <[hidden email]> wrote: > Just to avoid any confusion: > >> $ squeak -version >> 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 >> Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] >> Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 >> UTC 2009 i686 GNU/Linux >> plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: >> /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] > > In my attempt to keep the discussion generic, I said I had put it in > /usr/local/lib/squeak, but I actually did put it in > /opt/4dst/thirdparty/squeak. > > But this does not change the discussion in terms of the problem I'm having.. > > > > On Wed, Jul 14, 2010 at 12:22 PM, Chris Muller <[hidden email]> wrote: >> I followed these instructions to the letter, and get the same result I >> got a few weeks ago. I posted a question then, but no responses. May >> I try again? >> >> Everything seems to go just fine throughout these build instructions. >> For the final step, I put it in /usr/local/lib. >> >> make install prefix=/usr/local/lib/squeak >> >> and I made sure /usr/local/lib/squeak exists before doing the make install. >> >> The make install appears to work fine, and I am able to see squeak -version: >> >> $ squeak -version >> 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 >> Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] >> Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 >> UTC 2009 i686 GNU/Linux >> plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: >> /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] >> >> However, when I try to launch an image: >> >> squeak my.image >> >> The image does not launch and I get the following: >> >> could not find display driver vm-display-X11; either: >> - check that /usr/local/lib/squeak/3.9-7//vm-display-X11.so >> exists, or >> - use the '-plugins <path>' option to tell me where it is, or >> - remove DISPLAY from your environment. >> >> notice the double-slash in reference to the plugins location. Perhaps >> that's the problem, but what's the correct solution? >> >> Any advice is greatly appreciated.. >> >> - Chris >> >> >> >> On Tue, Jul 13, 2010 at 4:04 PM, Levente Uzonyi <[hidden email]> wrote: >>> On Tue, 13 Jul 2010, Rob Withers wrote: >>> >>>> Thanks Levente. Unfortunately it did not work: >>>> >>>> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not found >>>> (required by ./lib/squeak/3.9-7/squeak) >>> >>> Seems like you have to build it yourself. Fortunately it's very easy, since >>> Eliot commits the generated sources to the svn repo. So you can build a >>> CogVM/StackVM without VMMaker. Here is how: >>> >>> "How to build the Cog Croquet VM on Unix >>> ------------------------------- >>> 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt >>> source)) >>> 2. Check out the following sources from svn (if you haven't already - if >>> you're >>> reading this in unixbuild its likely you've already got the sources) >>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms >>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src >>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild >>> 3. Open a shell, cd into the unixbuild/bld directory and execute >>> ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 >>> -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" >>> LIBS=-lpthread >>> make install prefix=WhereYouWantTheVmToGo >>> 4. At the end of it you'll get a new VM in the path provided via -prefix" >>> >>> >>> Levente >>> >>>> >>>> Rob >>>> >>>> >>>> >>>> ________________________________ >>>> From: Levente Uzonyi <[hidden email]> >>>> To: The general-purpose Squeak developers list >>>> <[hidden email]> >>>> Sent: Tue, July 13, 2010 3:21:43 PM >>>> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak >>>> 4.1) >>>> >>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>> >>>>> -------------------------------------------------- >>>>> From: "Levente Uzonyi" <[hidden email]> >>>>> Sent: Tuesday, July 13, 2010 12:46 PM >>>>> To: "The general-purpose Squeak developers list" >>>>> <[hidden email]> >>>>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak 4.1) >>>>> >>>>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>>>> >>>>>>> >>>>>>> -------------------------------------------------- >>>>>>> From: "Andreas Raab" <[hidden email]> >>>>>>> Sent: Tuesday, July 13, 2010 11:29 AM >>>>>>> To: "The general-purpose Squeak developers list" >>>>>>> <[hidden email]> >>>>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >>>>>>> >>>>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >>>>>>>>> >>>>>>>>> The low-space watcher is running, at least before the problem starts. >>>>>>>>> I >>>>>>>>> do eventually run out of memory, but the uninterruptable state >>>>>>>>> happens >>>>>>>>> before this. >>>>>>>> >>>>>>>> In which case you want to do the following: >>>>>>>> * Launch your app and wait until it's in the "growing state" >>>>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then >>>>>>>> "Print all processes" >>>>>>>> >>>>>>>> This will dump a list of all the call stacks of all processes. One of >>>>>>>> them is the culprit consuming memory and you'll probably be able to tell >>>>>>>> quickly from just looking at it (if not, you can email the output here but >>>>>>>> it typically takes a domain expert to understand what's going wrong). >>>>>>>> >>>>>>> >>>>>>> Thanks for this pointer, Andreas. >>>>>>> >>>>>>> This time it was a Cog VM which spasmed, which I use for my client >>>>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to compile >>>>>>> a linux Cog vm: would love if someone posted one that could be launched >>>>>>> headless for my webhost). >>>>>> >>>>>> Cog works, but i think you're trying to use the -headless switch, which >>>>>> (is deprecated) and tells the vm to use the X11 display, but with no window. >>>>>> Servers usually don't have X11, so it won't work. You better use >>>>>> -vm-display-null (and -vm-sound-null). Try squeak --help for further useful >>>>>> options (like tuning Cog). >>>>>> >>>>> >>>>> I am trying to use the -headless switch. Good to know it is deprecated. >>>>> So you happen to have a Cog for linux binary (version 17 - 20), which I >>>>> could use? >>>> >>>> I have one, but I'm not sure it will work on your server. You can find it >>>> here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on ubuntu >>>> 10.04 and is optimized for core2. >>>> >>>> >>>> Levente >>>> >>>>> >>>>> Thanks, >>>>> Rob >>>>> >>>>>> >>>>>> Levente >>>>>> >>>>>>> >>>>>>> It started running at 100% and I did your F2 -> Debug Options -> Print >>>>>>> all processes. It started dumping a LOT to the Debug Console, then it >>>>>>> froze, still at 100%, but no increase in memory now and it went (Not >>>>>>> Responding) and greyed out the window. >>>>>>> >>>>>>> Luckily, I was able to see enough of the stack that was causing >>>>>>> problems. It is infinitely looping in this method: >>>>>>> >>>>>>> LanguageEnvironment class>>#localeID: localeID >>>>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>>>>>> (LocaleID isoLanguage: 'en')] >>>>>>> >>>>>>> This has nothing to do with my code, except I must be calling something >>>>>>> that enters this loop. It happens in both Cog (Windows) and Squeak4.1 >>>>>>> (Linux <headless> and Windows). >>>>>>> >>>>>>> Not sure how to fix this. >>>>>>> >>>>>>> Rob >>>>>>> >>>>>>>> Cheers, >>>>>>>> - Andreas >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>> >>> >> > |
In reply to this post by Frank Shearar
Hi Frank,
what errors do you get? I use 4.1.x on linux and 3.4.4 under cygwin on win32 and have used gcc 4.2 on Mac. The basic requirement is support for sse2 instructions.
BTW, this really should be on vm-dev...
On Wed, Jul 14, 2010 at 5:20 AM, Frank Shearar <[hidden email]> wrote: On 2010/07/13 23:04, Levente Uzonyi wrote: |
In reply to this post by Chris Muller-3
On Wed, Jul 14, 2010 at 10:22 AM, Chris Muller <[hidden email]> wrote: I followed these instructions to the letter, and get the same result I Chris, I believe I replied suggesting you step though the dynamic loading code to get more information. I think everything starts from loadModules in platforms/unix/vm/sqUnixMain.c.
I suggest you rerun the configure command to eliminate all optimization (including deleting any -fomit-frame-pointer) and then step from loadModules and see why you don't get to a functional dlopen call in platforms/unix/vm/sqUnixExternalPrims.c.
HTH Eliot
|
Hi Eliot, if you replied to my original post under a different
subject, I must have missed it: http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-June/151522.html I do not have adequate C or C++ experience to even run the debugger. I really just want to _get_ a Cog VM so I can be more productive in getting my work done so I can then work on things like learning new langauges and tools... :) I had hoped, given that the problem seems to be exposed (the double-slash) that the cause and solution would be obvious to someone.. On Wed, Jul 14, 2010 at 12:58 PM, Eliot Miranda <[hidden email]> wrote: > > > On Wed, Jul 14, 2010 at 10:22 AM, Chris Muller <[hidden email]> wrote: >> >> I followed these instructions to the letter, and get the same result I >> got a few weeks ago. I posted a question then, but no responses. May >> I try again? > > Chris, I believe I replied suggesting you step though the dynamic loading > code to get more information. > I think everything starts from loadModules in > platforms/unix/vm/sqUnixMain.c. > I suggest you rerun the configure command to eliminate all optimization > (including deleting any -fomit-frame-pointer) and then step from loadModules > and see why you don't get to a functional dlopen call > in platforms/unix/vm/sqUnixExternalPrims.c. > HTH > Eliot > >> >> Everything seems to go just fine throughout these build instructions. >> For the final step, I put it in /usr/local/lib. >> >> make install prefix=/usr/local/lib/squeak >> >> and I made sure /usr/local/lib/squeak exists before doing the make >> install. >> >> The make install appears to work fine, and I am able to see squeak >> -version: >> >> $ squeak -version >> 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 >> Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] >> Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 >> UTC 2009 i686 GNU/Linux >> plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: >> /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] >> >> However, when I try to launch an image: >> >> squeak my.image >> >> The image does not launch and I get the following: >> >> could not find display driver vm-display-X11; either: >> - check that /usr/local/lib/squeak/3.9-7//vm-display-X11.so >> exists, or >> - use the '-plugins <path>' option to tell me where it is, or >> - remove DISPLAY from your environment. >> >> notice the double-slash in reference to the plugins location. Perhaps >> that's the problem, but what's the correct solution? >> >> Any advice is greatly appreciated.. >> >> - Chris >> >> >> >> On Tue, Jul 13, 2010 at 4:04 PM, Levente Uzonyi <[hidden email]> wrote: >> > On Tue, 13 Jul 2010, Rob Withers wrote: >> > >> >> Thanks Levente. Unfortunately it did not work: >> >> >> >> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not >> >> found >> >> (required by ./lib/squeak/3.9-7/squeak) >> > >> > Seems like you have to build it yourself. Fortunately it's very easy, >> > since >> > Eliot commits the generated sources to the svn repo. So you can build a >> > CogVM/StackVM without VMMaker. Here is how: >> > >> > "How to build the Cog Croquet VM on Unix >> > ------------------------------- >> > 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt >> > source)) >> > 2. Check out the following sources from svn (if you haven't already - if >> > you're >> > reading this in unixbuild its likely you've already got the sources) >> > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms >> > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src >> > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild >> > 3. Open a shell, cd into the unixbuild/bld directory and execute >> > ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 >> > -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 >> > -DCOGMTVM=0" >> > LIBS=-lpthread >> > make install prefix=WhereYouWantTheVmToGo >> > 4. At the end of it you'll get a new VM in the path provided via >> > -prefix" >> > >> > >> > Levente >> > >> >> >> >> Rob >> >> >> >> >> >> >> >> ________________________________ >> >> From: Levente Uzonyi <[hidden email]> >> >> To: The general-purpose Squeak developers list >> >> <[hidden email]> >> >> Sent: Tue, July 13, 2010 3:21:43 PM >> >> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in >> >> Squeak >> >> 4.1) >> >> >> >> On Tue, 13 Jul 2010, Rob Withers wrote: >> >> >> >>> -------------------------------------------------- >> >>> From: "Levente Uzonyi" <[hidden email]> >> >>> Sent: Tuesday, July 13, 2010 12:46 PM >> >>> To: "The general-purpose Squeak developers list" >> >>> <[hidden email]> >> >>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak >> >>> 4.1) >> >>> >> >>>> On Tue, 13 Jul 2010, Rob Withers wrote: >> >>>> >> >>>>> >> >>>>> -------------------------------------------------- >> >>>>> From: "Andreas Raab" <[hidden email]> >> >>>>> Sent: Tuesday, July 13, 2010 11:29 AM >> >>>>> To: "The general-purpose Squeak developers list" >> >>>>> <[hidden email]> >> >>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >> >>>>> >> >>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >> >>>>>>> >> >>>>>>> The low-space watcher is running, at least before the problem >> >>>>>>> starts. >> >>>>>>> I >> >>>>>>> do eventually run out of memory, but the uninterruptable state >> >>>>>>> happens >> >>>>>>> before this. >> >>>>>> >> >>>>>> In which case you want to do the following: >> >>>>>> * Launch your app and wait until it's in the "growing state" >> >>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then >> >>>>>> "Print all processes" >> >>>>>> >> >>>>>> This will dump a list of all the call stacks of all processes. One >> >>>>>> of >> >>>>>> them is the culprit consuming memory and you'll probably be able to >> >>>>>> tell >> >>>>>> quickly from just looking at it (if not, you can email the output >> >>>>>> here but >> >>>>>> it typically takes a domain expert to understand what's going >> >>>>>> wrong). >> >>>>>> >> >>>>> >> >>>>> Thanks for this pointer, Andreas. >> >>>>> >> >>>>> This time it was a Cog VM which spasmed, which I use for my client >> >>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to >> >>>>> compile >> >>>>> a linux Cog vm: would love if someone posted one that could be >> >>>>> launched >> >>>>> headless for my webhost). >> >>>> >> >>>> Cog works, but i think you're trying to use the -headless switch, >> >>>> which >> >>>> (is deprecated) and tells the vm to use the X11 display, but with no >> >>>> window. >> >>>> Servers usually don't have X11, so it won't work. You better use >> >>>> -vm-display-null (and -vm-sound-null). Try squeak --help for further >> >>>> useful >> >>>> options (like tuning Cog). >> >>>> >> >>> >> >>> I am trying to use the -headless switch. Good to know it is >> >>> deprecated. >> >>> So you happen to have a Cog for linux binary (version 17 - 20), which >> >>> I >> >>> could use? >> >> >> >> I have one, but I'm not sure it will work on your server. You can find >> >> it >> >> here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on >> >> ubuntu >> >> 10.04 and is optimized for core2. >> >> >> >> >> >> Levente >> >> >> >>> >> >>> Thanks, >> >>> Rob >> >>> >> >>>> >> >>>> Levente >> >>>> >> >>>>> >> >>>>> It started running at 100% and I did your F2 -> Debug Options -> >> >>>>> all processes. It started dumping a LOT to the Debug Console, then >> >>>>> it >> >>>>> froze, still at 100%, but no increase in memory now and it went (Not >> >>>>> Responding) and greyed out the window. >> >>>>> >> >>>>> Luckily, I was able to see enough of the stack that was causing >> >>>>> problems. It is infinitely looping in this method: >> >>>>> >> >>>>> LanguageEnvironment class>>#localeID: localeID >> >>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >> >>>>> (LocaleID isoLanguage: 'en')] >> >>>>> >> >>>>> This has nothing to do with my code, except I must be calling >> >>>>> something >> >>>>> that enters this loop. It happens in both Cog (Windows) and >> >>>>> Squeak4.1 >> >>>>> (Linux <headless> and Windows). >> >>>>> >> >>>>> Not sure how to fix this. >> >>>>> >> >>>>> Rob >> >>>>> >> >>>>>> Cheers, >> >>>>>> - Andreas >> >>>>>> >> >>>>> >> >>>>> >> >>>> >> >>> >> >>> >> > >> > >> > > > > > |
In reply to this post by Chris Muller-3
--------------------------------------------------
From: "Chris Muller" <[hidden email]> Sent: Wednesday, July 14, 2010 12:30 PM To: "The general-purpose Squeak developers list" <[hidden email]> Subject: Re: [squeak-dev] Re: UI lockup in Squeak 4.1 > I'm not sure if this is the same context of the issue you had, but.. > this seems like a good time to reflect on #becomeForward:. > > Until 5 or 6 years ago, we only had Object>>#becomeForward: (and not > #becomeForward:copyHash:). #becomeForward: would mutate the > identityHash of the argument to be that of the receiver, causing any > identity-hashed collections it might be residing in to need to be > rehashed. > > Unfortunately, mutating the identityHash of important objects such as > an important Symbol in the SymbolTable (like, #at: !!); there was no > time to rehash the SymbolTable or anything else before the system > needed it, couldn't find it, and locked up. > > So we added Object >> #becomeForward:copyHash: so that false could be > passed as the second argument, causing it not to mutate the > identityHash of the target. > Chris, I am using both #becomeForward: and #becomeForward:copyHash:. One thing I noted you said: "#becomeForward: would mutate the identityHash of the argument to be that of the receiver, causing any identity-hashed collections it might be residing in to need to be rehashed." The first time I read it as if you were causing the rehashing to occur, but on second reading you only said that Sets and Dictionaries are in need to be rehashed. I.e. it is up to the application programmer to cause the rehash. Mine is a slightly different situation, concerned with hashed locations where the receiver WAS, which is now the target with a different hash. Here is the appropriate code snippet in my system: rehashables := self collectRehashableCollections. context isSmallInteger ifTrue: [self becomeForward: context copyHash: false] ifFalse: [self becomeForward: context]. rehashables do: [:each | each rehash]. Therefore, I need to rehash collections holding the receiver. collectRehashableCollections | level1 level2 sets level3 dictionaries | level1 := Utilities pointersTo: self except: #(Array with: self). level2 := level1 inject: OrderedCollection new into: [:coll :elem | coll addAll: (Utilities pointersTo: elem except: #(Array with: self with: elem)). coll]. sets := level2 select: [:elem | elem isKindOf: Set]. level3 := level2 inject: OrderedCollection new into: [:coll :elem | coll addAll: (Utilities pointersTo: elem except: #(Array with: self with: elem)). coll]. dictionaries := level3 select: [:elem | elem isKindOf: Dictionary]. ^ sets, dictionaries Rob > - Chris > > On Wed, Jul 14, 2010 at 3:31 AM, Rob Withers <[hidden email]> wrote: >> I found the problem! >> >> Of course, it was my code causing this. I was doing the equivalent of: >> >> Object new becomeForward: nil. >> >> and this was nilling out the contents of that KnownEnvironments >> dictionary. >> I tested with the above code, without my code, and indeed it caused the >> problem. I am now avoiding both SmallIntegers and nil when using >> #becomeForward: >> >> Thanks for everyone's help in this matter! >> >> Rob >> From: Eliot Miranda >> Sent: Tuesday, July 13, 2010 5:03 PM >> To: The general-purpose Squeak developers list >> Subject: Re: [squeak-dev] Re: UI lockup in Squeak 4.1 >> >> >> On Tue, Jul 13, 2010 at 1:53 PM, Rob Withers <[hidden email]> wrote: >>> >>>> From: Eliot Miranda >>>> Sent: Tuesday, July 13, 2010 4:11 PM >>>> To: The general-purpose Squeak developers list >>>> Subject: Re: [squeak-dev] Re: UI lockup in Squeak 4.1 >>>> >>>> >>>> >>>> >>>> >>>> > On Tue, Jul 13, 2010 at 12:59 PM, Rob Withers <[hidden email]> > >>>> > wrote: >>>> > >>>> > Hi Eliot, >>>> > >>>> > >>>> > I already found it. >>>> > >>>> >>>> Doh! >>>> >>>> > It is this method, when the result of the dictionary lookup is nil >>>> > for >>>> > > 'en', and it recursively calls localeID: with 'en'. >>>> > >>>> > >>>> > LanguageEnvironment class>>#localeID: localeID >>>> > ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>>> > (LocaleID >>>> > isoLanguage: 'en')] >>>> > >>>> >>>> >>>> which clearly needs to read something like >>>> LanguageEnvironment class>>#localeID: localeID >>>> ^self knownEnvironments >>>> at: localeID >>>> ifAbsent: [self knownEnvironments at: (LocaleID isoLanguage: >>>> 'en')] >>>> >>> >>> The problem is that something changed the entry for 'en' from >>> Latin1Environment to nil. So the absent block will still fail, although >>> this time as an Error and not a recursive, memory-growing loop. >>> >>> I had in mind: >>> LanguageEnvironment class>>#localeID: localeID >>> >>> ^self knownEnvironments >>> at: localeID >>> ifAbsent: [ >>> | env id | >>> env := Latin1Environment new. >>> id := LocaleID isoString: 'en'. >>> env localeID: id. >>> self knownEnvironments at: id put: env. >>> ^ env]. >> >> >> LanguageEnvironment class>>#localeID: localeID >> ^self knownEnvironments >> at: localeID >> ifAbsent: [self knownEnvironments >> at: (LocaleID isoLanguage: 'en') >> ifAbsentPut: >> [Latin1Environment new >> localeID: (LocaleID isoString: 'en'); >> yourself]] >> >> No? >>> >>> >>>> >>>> > I start the image with an intact KnownEnvironments. Something >>>> > somehow >>>> > > nils out the entries after I > > > have run for awhile. ?????? >>>> > >>>> >>>> So guard against resetKnownEnvironments? >>> >>> I had a 'self halt' and it never got called. >>> >>> I have no idea how it was nilling out the entries. >> >> Are there any senders of knownEnvironments and removeKey: et al? Do you >> have changes to Dictionary grow code which causes a bug on rehash? >> etc... >>> >>> Rob >>> >>> >>> >> >> ________________________________ >> >> >> >> > |
In reply to this post by Chris Muller-3
One thing why i don't like developing on linux is
overly complicated design around dynamic linkage. With all those libraries, paths, compiler/linker options ... On 14 July 2010 21:23, Chris Muller <[hidden email]> wrote: > Hi Eliot, if you replied to my original post under a different > subject, I must have missed it: > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-June/151522.html > > I do not have adequate C or C++ experience to even run the debugger. > I really just want to _get_ a Cog VM so I can be more productive in > getting my work done so I can then work on things like learning new > langauges and tools... :) > > I had hoped, given that the problem seems to be exposed (the > double-slash) that the cause and solution would be obvious to > someone.. > > > > > On Wed, Jul 14, 2010 at 12:58 PM, Eliot Miranda <[hidden email]> wrote: >> >> >> On Wed, Jul 14, 2010 at 10:22 AM, Chris Muller <[hidden email]> wrote: >>> >>> I followed these instructions to the letter, and get the same result I >>> got a few weeks ago. I posted a question then, but no responses. May >>> I try again? >> >> Chris, I believe I replied suggesting you step though the dynamic loading >> code to get more information. >> I think everything starts from loadModules in >> platforms/unix/vm/sqUnixMain.c. >> I suggest you rerun the configure command to eliminate all optimization >> (including deleting any -fomit-frame-pointer) and then step from loadModules >> and see why you don't get to a functional dlopen call >> in platforms/unix/vm/sqUnixExternalPrims.c. >> HTH >> Eliot >> >>> >>> Everything seems to go just fine throughout these build instructions. >>> For the final step, I put it in /usr/local/lib. >>> >>> make install prefix=/usr/local/lib/squeak >>> >>> and I made sure /usr/local/lib/squeak exists before doing the make >>> install. >>> >>> The make install appears to work fine, and I am able to see squeak >>> -version: >>> >>> $ squeak -version >>> 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 >>> Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] >>> Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 >>> UTC 2009 i686 GNU/Linux >>> plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: >>> /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] >>> >>> However, when I try to launch an image: >>> >>> squeak my.image >>> >>> The image does not launch and I get the following: >>> >>> could not find display driver vm-display-X11; either: >>> - check that /usr/local/lib/squeak/3.9-7//vm-display-X11.so >>> exists, or >>> - use the '-plugins <path>' option to tell me where it is, or >>> - remove DISPLAY from your environment. >>> >>> notice the double-slash in reference to the plugins location. Perhaps >>> that's the problem, but what's the correct solution? >>> >>> Any advice is greatly appreciated.. >>> >>> - Chris >>> >>> >>> >>> On Tue, Jul 13, 2010 at 4:04 PM, Levente Uzonyi <[hidden email]> wrote: >>> > On Tue, 13 Jul 2010, Rob Withers wrote: >>> > >>> >> Thanks Levente. Unfortunately it did not work: >>> >> >>> >> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not >>> >> found >>> >> (required by ./lib/squeak/3.9-7/squeak) >>> > >>> > Seems like you have to build it yourself. Fortunately it's very easy, >>> > since >>> > Eliot commits the generated sources to the svn repo. So you can build a >>> > CogVM/StackVM without VMMaker. Here is how: >>> > >>> > "How to build the Cog Croquet VM on Unix >>> > ------------------------------- >>> > 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt >>> > source)) >>> > 2. Check out the following sources from svn (if you haven't already - if >>> > you're >>> > reading this in unixbuild its likely you've already got the sources) >>> > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms >>> > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src >>> > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild >>> > 3. Open a shell, cd into the unixbuild/bld directory and execute >>> > ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 >>> > -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 >>> > -DCOGMTVM=0" >>> > LIBS=-lpthread >>> > make install prefix=WhereYouWantTheVmToGo >>> > 4. At the end of it you'll get a new VM in the path provided via >>> > -prefix" >>> > >>> > >>> > Levente >>> > >>> >> >>> >> Rob >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> From: Levente Uzonyi <[hidden email]> >>> >> To: The general-purpose Squeak developers list >>> >> <[hidden email]> >>> >> Sent: Tue, July 13, 2010 3:21:43 PM >>> >> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in >>> >> Squeak >>> >> 4.1) >>> >> >>> >> On Tue, 13 Jul 2010, Rob Withers wrote: >>> >> >>> >>> -------------------------------------------------- >>> >>> From: "Levente Uzonyi" <[hidden email]> >>> >>> Sent: Tuesday, July 13, 2010 12:46 PM >>> >>> To: "The general-purpose Squeak developers list" >>> >>> <[hidden email]> >>> >>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak >>> >>> 4.1) >>> >>> >>> >>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>> >>>> >>> >>>>> >>> >>>>> -------------------------------------------------- >>> >>>>> From: "Andreas Raab" <[hidden email]> >>> >>>>> Sent: Tuesday, July 13, 2010 11:29 AM >>> >>>>> To: "The general-purpose Squeak developers list" >>> >>>>> <[hidden email]> >>> >>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >>> >>>>> >>> >>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >>> >>>>>>> >>> >>>>>>> The low-space watcher is running, at least before the problem >>> >>>>>>> starts. >>> >>>>>>> I >>> >>>>>>> do eventually run out of memory, but the uninterruptable state >>> >>>>>>> happens >>> >>>>>>> before this. >>> >>>>>> >>> >>>>>> In which case you want to do the following: >>> >>>>>> * Launch your app and wait until it's in the "growing state" >>> >>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then >>> >>>>>> "Print all processes" >>> >>>>>> >>> >>>>>> This will dump a list of all the call stacks of all processes. One >>> >>>>>> of >>> >>>>>> them is the culprit consuming memory and you'll probably be able to >>> >>>>>> tell >>> >>>>>> quickly from just looking at it (if not, you can email the output >>> >>>>>> here but >>> >>>>>> it typically takes a domain expert to understand what's going >>> >>>>>> wrong). >>> >>>>>> >>> >>>>> >>> >>>>> Thanks for this pointer, Andreas. >>> >>>>> >>> >>>>> This time it was a Cog VM which spasmed, which I use for my client >>> >>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to >>> >>>>> compile >>> >>>>> a linux Cog vm: would love if someone posted one that could be >>> >>>>> launched >>> >>>>> headless for my webhost). >>> >>>> >>> >>>> Cog works, but i think you're trying to use the -headless switch, >>> >>>> which >>> >>>> (is deprecated) and tells the vm to use the X11 display, but with no >>> >>>> window. >>> >>>> Servers usually don't have X11, so it won't work. You better use >>> >>>> -vm-display-null (and -vm-sound-null). Try squeak --help for further >>> >>>> useful >>> >>>> options (like tuning Cog). >>> >>>> >>> >>> >>> >>> I am trying to use the -headless switch. Good to know it is >>> >>> deprecated. >>> >>> So you happen to have a Cog for linux binary (version 17 - 20), which >>> >>> I >>> >>> could use? >>> >> >>> >> I have one, but I'm not sure it will work on your server. You can find >>> >> it >>> >> here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on >>> >> ubuntu >>> >> 10.04 and is optimized for core2. >>> >> >>> >> >>> >> Levente >>> >> >>> >>> >>> >>> Thanks, >>> >>> Rob >>> >>> >>> >>>> >>> >>>> Levente >>> >>>> >>> >>>>> >>> >>>>> It started running at 100% and I did your F2 -> Debug Options -> >>> >>>>> all processes. It started dumping a LOT to the Debug Console, then >>> >>>>> it >>> >>>>> froze, still at 100%, but no increase in memory now and it went (Not >>> >>>>> Responding) and greyed out the window. >>> >>>>> >>> >>>>> Luckily, I was able to see enough of the stack that was causing >>> >>>>> problems. It is infinitely looping in this method: >>> >>>>> >>> >>>>> LanguageEnvironment class>>#localeID: localeID >>> >>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>> >>>>> (LocaleID isoLanguage: 'en')] >>> >>>>> >>> >>>>> This has nothing to do with my code, except I must be calling >>> >>>>> something >>> >>>>> that enters this loop. It happens in both Cog (Windows) and >>> >>>>> Squeak4.1 >>> >>>>> (Linux <headless> and Windows). >>> >>>>> >>> >>>>> Not sure how to fix this. >>> >>>>> >>> >>>>> Rob >>> >>>>> >>> >>>>>> Cheers, >>> >>>>>> - Andreas >>> >>>>>> >>> >>>>> >>> >>>>> >>> >>>> >>> >>> >>> >>> >>> > >>> > >>> >> >> >> >> >> > > -- Best regards, Igor Stasenko AKA sig. |
In reply to this post by Chris Muller-3
On Wed, Jul 14, 2010 at 11:23 AM, Chris Muller <[hidden email]> wrote: Hi Eliot, if you replied to my original post under a different If you can compile the VM you can surely learn to use gdb. Its only a debugger. break foo. step. etc. etc. It would really help (yourself and others) if you'd take this next step. You might be the only one trying too build and run on your particular distro. So you might be the only one who can diagnose the problem. Look on it as a learning experience.
BTW, I have work to do also. I don't get paid to provide the open-source Cog. I get paid to keep Teleplace working. You're potentially going to benefit a lot by using a faster VM. You might view putting in a little time now as payback. It'd be appreciated.
best Eliot
|
In reply to this post by Frank Shearar
On Wed, 14 Jul 2010, Frank Shearar wrote:
> On 2010/07/13 23:04, Levente Uzonyi wrote: >> On Tue, 13 Jul 2010, Rob Withers wrote: >> >>> Thanks Levente. Unfortunately it did not work: >>> >>> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not >>> found (required by ./lib/squeak/3.9-7/squeak) >> >> Seems like you have to build it yourself. Fortunately it's very easy, >> since Eliot commits the generated sources to the svn repo. So you can >> build a CogVM/StackVM without VMMaker. Here is how: >> >> "How to build the Cog Croquet VM on Unix >> ------------------------------- >> 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt >> source)) >> 2. Check out the following sources from svn (if you haven't already - if >> you're >> reading this in unixbuild its likely you've already got the sources) >> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms >> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src >> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild >> 3. Open a shell, cd into the unixbuild/bld directory and execute >> ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 >> -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 >> -DCOGMTVM=0" LIBS=-lpthread >> make install prefix=WhereYouWantTheVmToGo >> 4. At the end of it you'll get a new VM in the path provided via -prefix" > > Are there any additional requirements like gcc version, for instance? > > I ask because I get errors on the above instructions, on FreeBSD 6.4, running > gcc 3.4.6. I can attach configure's output and whatnot, if you're interested. If configure failed, then please attach the output and continue this thread on the vm-dev list. Levente > > frank > >> Levente >> >>> >>> Rob >>> >>> >>> >>> ________________________________ >>> From: Levente Uzonyi <[hidden email]> >>> To: The general-purpose Squeak developers list >>> <[hidden email]> >>> Sent: Tue, July 13, 2010 3:21:43 PM >>> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in >>> Squeak 4.1) >>> >>> On Tue, 13 Jul 2010, Rob Withers wrote: >>> >>>> -------------------------------------------------- >>>> From: "Levente Uzonyi" <[hidden email]> >>>> Sent: Tuesday, July 13, 2010 12:46 PM >>>> To: "The general-purpose Squeak developers list" >>>> <[hidden email]> >>>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak >>>> 4.1) >>>> >>>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>>> >>>>>> >>>>>> -------------------------------------------------- >>>>>> From: "Andreas Raab" <[hidden email]> >>>>>> Sent: Tuesday, July 13, 2010 11:29 AM >>>>>> To: "The general-purpose Squeak developers list" >>>>>> <[hidden email]> >>>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >>>>>> >>>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >>>>>>>> The low-space watcher is running, at least before the problem >>>>>>>> starts. I >>>>>>>> do eventually run out of memory, but the uninterruptable state >>>>>>>> happens >>>>>>>> before this. >>>>>>> >>>>>>> In which case you want to do the following: >>>>>>> * Launch your app and wait until it's in the "growing state" >>>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then >>>>>>> "Print all processes" >>>>>>> >>>>>>> This will dump a list of all the call stacks of all processes. One >>>>>>> of them is the culprit consuming memory and you'll probably be >>>>>>> able to tell quickly from just looking at it (if not, you can >>>>>>> email the output here but it typically takes a domain expert to >>>>>>> understand what's going wrong). >>>>>>> >>>>>> >>>>>> Thanks for this pointer, Andreas. >>>>>> >>>>>> This time it was a Cog VM which spasmed, which I use for my client >>>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to >>>>>> compile a linux Cog vm: would love if someone posted one that could >>>>>> be launched headless for my webhost). >>>>> >>>>> Cog works, but i think you're trying to use the -headless switch, >>>>> which (is deprecated) and tells the vm to use the X11 display, but >>>>> with no window. Servers usually don't have X11, so it won't work. >>>>> You better use -vm-display-null (and -vm-sound-null). Try squeak >>>>> --help for further useful options (like tuning Cog). >>>>> >>>> >>>> I am trying to use the -headless switch. Good to know it is >>>> deprecated. So you happen to have a Cog for linux binary (version 17 >>>> - 20), which I could use? >>> >>> I have one, but I'm not sure it will work on your server. You can find >>> it here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on >>> ubuntu 10.04 and is optimized for core2. >>> >>> >>> Levente >>> >>>> >>>> Thanks, >>>> Rob >>>> >>>>> >>>>> Levente >>>>> >>>>>> >>>>>> It started running at 100% and I did your F2 -> Debug Options -> >>>>>> Print all processes. It started dumping a LOT to the Debug Console, >>>>>> then it froze, still at 100%, but no increase in memory now and it >>>>>> went (Not Responding) and greyed out the window. >>>>>> >>>>>> Luckily, I was able to see enough of the stack that was causing >>>>>> problems. It is infinitely looping in this method: >>>>>> >>>>>> LanguageEnvironment class>>#localeID: localeID >>>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>>>>> (LocaleID isoLanguage: 'en')] >>>>>> >>>>>> This has nothing to do with my code, except I must be calling >>>>>> something that enters this loop. It happens in both Cog (Windows) >>>>>> and Squeak4.1 (Linux <headless> and Windows). >>>>>> >>>>>> Not sure how to fix this. >>>>>> >>>>>> Rob >>>>>> >>>>>>> Cheers, >>>>>>> - Andreas >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >> >> >> > > > |
In reply to this post by Chris Muller-3
Hi Chris,
>>> could not find display driver vm-display-X11; either: - check >>> that /usr/local/lib/squeak/3.9-7//vm-display-X11.so exists, or this is just a quick fly-by suggestion. I don't think the "//" matters since I can do either of these... ls -l /usr/local/lib/squeak/3.10-3/vm-display-X11 ls -l /usr/local/lib/squeak/3.10-3//vm-display-X11 So maybe you need (on one line)... ln -s /usr/local/lib/squeak/3.9-7/vm-display-X11 /usr/local/lib/squeak/3.9-7/vm-display-X11.so Notice I'm on a different version so I can't rule out a version specific build problem. HTH -D |
In reply to this post by Eliot Miranda-2
Changing subject for sanity. Is there a place to file bugs against the open source version of Cog? (*nudge*) It might improve signal:noise in any event. I realize that OSCog is the community's responsibility! But if we're going to be responsible about shepherding it, we may as well add a category to Mantis (or something.) What do folks think about that? FWIW, I had the same symptom running Ubuntu 10.4; Eliot was kind enough to suggest some things I might explore with the debugger, but I haven't had time to drill down into it (just took a new job, ramping up on a pile of software and relational tomfoolery.) It seems like it's a distro-issue. I'm curious, and I understand that it might not be apropos to disclose, but on the off chance it is, what GNU/Linux distro has Cog seen the most testing on? This thread seems to have wandered a bit, but I'll read the whole thing and then forward his suggestions if they still seem promising and haven't been reproduced here. On Jul 14, 2010, at 1:55 PM, Eliot Miranda <[hidden email]> wrote:
|
On Wed, 14 Jul 2010, Casey Ransberger wrote:
> Changing subject for sanity. > > Is there a place to file bugs against the open source version of Cog? (*nudge*) It might improve signal:noise in any event. > > I realize that OSCog is the community's responsibility! But if we're going to be responsible about shepherding it, we may as well add a category to Mantis (or something.) What do folks think about that? > > FWIW, I had the same symptom running Ubuntu 10.4; Eliot was kind enough to suggest some things I might explore with the debugger, but I haven't had time to drill down into it (just took a new job, ramping up on a pile of software and relational tomfoolery.) > > It seems like it's a distro-issue. I'm curious, and I understand that it might not be apropos to disclose, but on the off chance it is, what GNU/Linux distro has Cog seen the most testing on? That's really strange, because I succesfully built Cog on Ubuntu 10.4 and it works fine. Today I even managed to compile the plugin for FFI and Alien (thought none of them works :)) and the UUIDPlugin. I also fixed the cryptography plugins, those work well (at least the tests pass). Back to your problem: after compiling I only have vm-display-X11, but no vm-display-X11.so. Are you sure you're not mixing the files/VMMaker of the CogVM and the SqueakVM? Levente > > This thread seems to have wandered a bit, but I'll read the whole thing and then forward his suggestions if they still seem promising and haven't been reproduced here. > > On Jul 14, 2010, at 1:55 PM, Eliot Miranda <[hidden email]> wrote: > >> >> >> On Wed, Jul 14, 2010 at 11:23 AM, Chris Muller <[hidden email]> wrote: >> Hi Eliot, if you replied to my original post under a different >> subject, I must have missed it: >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-June/151522.html >> >> I do not have adequate C or C++ experience to even run the debugger. >> I really just want to _get_ a Cog VM so I can be more productive in >> getting my work done so I can then work on things like learning new >> langauges and tools... :) >> >> If you can compile the VM you can surely learn to use gdb. Its only a debugger. break foo. step. etc. etc. It would really help (yourself and others) if you'd take this next step. You might be the only one trying too build and run on your particular distro. So you might be the only one who can diagnose the problem. Look on it as a learning experience. >> >> BTW, I have work to do also. I don't get paid to provide the open-source Cog. I get paid to keep Teleplace working. You're potentially going to benefit a lot by using a faster VM. You might view putting in a little time now as payback. It'd be appreciated. >> >> best >> Eliot >> >> >> I had hoped, given that the problem seems to be exposed (the >> double-slash) that the cause and solution would be obvious to >> someone.. >> >> >> >> >> On Wed, Jul 14, 2010 at 12:58 PM, Eliot Miranda <[hidden email]> wrote: >>> >>> >>> On Wed, Jul 14, 2010 at 10:22 AM, Chris Muller <[hidden email]> wrote: >>>> >>>> I followed these instructions to the letter, and get the same result I >>>> got a few weeks ago. I posted a question then, but no responses. May >>>> I try again? >>> >>> Chris, I believe I replied suggesting you step though the dynamic loading >>> code to get more information. >>> I think everything starts from loadModules in >>> platforms/unix/vm/sqUnixMain.c. >>> I suggest you rerun the configure command to eliminate all optimization >>> (including deleting any -fomit-frame-pointer) and then step from loadModules >>> and see why you don't get to a functional dlopen call >>> in platforms/unix/vm/sqUnixExternalPrims.c. >>> HTH >>> Eliot >>> >>>> >>>> Everything seems to go just fine throughout these build instructions. >>>> For the final step, I put it in /usr/local/lib. >>>> >>>> make install prefix=/usr/local/lib/squeak >>>> >>>> and I made sure /usr/local/lib/squeak exists before doing the make >>>> install. >>>> >>>> The make install appears to work fine, and I am able to see squeak >>>> -version: >>>> >>>> $ squeak -version >>>> 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 >>>> Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] >>>> Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 >>>> UTC 2009 i686 GNU/Linux >>>> plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: >>>> /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] >>>> >>>> However, when I try to launch an image: >>>> >>>> squeak my.image >>>> >>>> The image does not launch and I get the following: >>>> >>>> could not find display driver vm-display-X11; either: >>>> - check that /usr/local/lib/squeak/3.9-7//vm-display-X11.so >>>> exists, or >>>> - use the '-plugins <path>' option to tell me where it is, or >>>> - remove DISPLAY from your environment. >>>> >>>> notice the double-slash in reference to the plugins location. Perhaps >>>> that's the problem, but what's the correct solution? >>>> >>>> Any advice is greatly appreciated.. >>>> >>>> - Chris >>>> >>>> >>>> >>>> On Tue, Jul 13, 2010 at 4:04 PM, Levente Uzonyi <[hidden email]> wrote: >>>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>>> >>>>>> Thanks Levente. Unfortunately it did not work: >>>>>> >>>>>> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not >>>>>> found >>>>>> (required by ./lib/squeak/3.9-7/squeak) >>>>> >>>>> Seems like you have to build it yourself. Fortunately it's very easy, >>>>> since >>>>> Eliot commits the generated sources to the svn repo. So you can build a >>>>> CogVM/StackVM without VMMaker. Here is how: >>>>> >>>>> "How to build the Cog Croquet VM on Unix >>>>> ------------------------------- >>>>> 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt >>>>> source)) >>>>> 2. Check out the following sources from svn (if you haven't already - if >>>>> you're >>>>> reading this in unixbuild its likely you've already got the sources) >>>>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms >>>>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src >>>>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild >>>>> 3. Open a shell, cd into the unixbuild/bld directory and execute >>>>> ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 >>>>> -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 >>>>> -DCOGMTVM=0" >>>>> LIBS=-lpthread >>>>> make install prefix=WhereYouWantTheVmToGo >>>>> 4. At the end of it you'll get a new VM in the path provided via >>>>> -prefix" >>>>> >>>>> >>>>> Levente >>>>> >>>>>> >>>>>> Rob >>>>>> >>>>>> >>>>>> >>>>>> ________________________________ >>>>>> From: Levente Uzonyi <[hidden email]> >>>>>> To: The general-purpose Squeak developers list >>>>>> <[hidden email]> >>>>>> Sent: Tue, July 13, 2010 3:21:43 PM >>>>>> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in >>>>>> Squeak >>>>>> 4.1) >>>>>> >>>>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>>>> >>>>>>> -------------------------------------------------- >>>>>>> From: "Levente Uzonyi" <[hidden email]> >>>>>>> Sent: Tuesday, July 13, 2010 12:46 PM >>>>>>> To: "The general-purpose Squeak developers list" >>>>>>> <[hidden email]> >>>>>>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak >>>>>>> 4.1) >>>>>>> >>>>>>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> -------------------------------------------------- >>>>>>>>> From: "Andreas Raab" <[hidden email]> >>>>>>>>> Sent: Tuesday, July 13, 2010 11:29 AM >>>>>>>>> To: "The general-purpose Squeak developers list" >>>>>>>>> <[hidden email]> >>>>>>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >>>>>>>>> >>>>>>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >>>>>>>>>>> >>>>>>>>>>> The low-space watcher is running, at least before the problem >>>>>>>>>>> starts. >>>>>>>>>>> I >>>>>>>>>>> do eventually run out of memory, but the uninterruptable state >>>>>>>>>>> happens >>>>>>>>>>> before this. >>>>>>>>>> >>>>>>>>>> In which case you want to do the following: >>>>>>>>>> * Launch your app and wait until it's in the "growing state" >>>>>>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then >>>>>>>>>> "Print all processes" >>>>>>>>>> >>>>>>>>>> This will dump a list of all the call stacks of all processes. One >>>>>>>>>> of >>>>>>>>>> them is the culprit consuming memory and you'll probably be able to >>>>>>>>>> tell >>>>>>>>>> quickly from just looking at it (if not, you can email the output >>>>>>>>>> here but >>>>>>>>>> it typically takes a domain expert to understand what's going >>>>>>>>>> wrong). >>>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks for this pointer, Andreas. >>>>>>>>> >>>>>>>>> This time it was a Cog VM which spasmed, which I use for my client >>>>>>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to >>>>>>>>> compile >>>>>>>>> a linux Cog vm: would love if someone posted one that could be >>>>>>>>> launched >>>>>>>>> headless for my webhost). >>>>>>>> >>>>>>>> Cog works, but i think you're trying to use the -headless switch, >>>>>>>> which >>>>>>>> (is deprecated) and tells the vm to use the X11 display, but with no >>>>>>>> window. >>>>>>>> Servers usually don't have X11, so it won't work. You better use >>>>>>>> -vm-display-null (and -vm-sound-null). Try squeak --help for further >>>>>>>> useful >>>>>>>> options (like tuning Cog). >>>>>>>> >>>>>>> >>>>>>> I am trying to use the -headless switch. Good to know it is >>>>>>> deprecated. >>>>>>> So you happen to have a Cog for linux binary (version 17 - 20), which >>>>>>> I >>>>>>> could use? >>>>>> >>>>>> I have one, but I'm not sure it will work on your server. You can find >>>>>> it >>>>>> here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on >>>>>> ubuntu >>>>>> 10.04 and is optimized for core2. >>>>>> >>>>>> >>>>>> Levente >>>>>> >>>>>>> >>>>>>> Thanks, >>>>>>> Rob >>>>>>> >>>>>>>> >>>>>>>> Levente >>>>>>>> >>>>>>>>> >>>>>>>>> It started running at 100% and I did your F2 -> Debug Options -> >>>>>>>>> all processes. It started dumping a LOT to the Debug Console, then >>>>>>>>> it >>>>>>>>> froze, still at 100%, but no increase in memory now and it went (Not >>>>>>>>> Responding) and greyed out the window. >>>>>>>>> >>>>>>>>> Luckily, I was able to see enough of the stack that was causing >>>>>>>>> problems. It is infinitely looping in this method: >>>>>>>>> >>>>>>>>> LanguageEnvironment class>>#localeID: localeID >>>>>>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>>>>>>>> (LocaleID isoLanguage: 'en')] >>>>>>>>> >>>>>>>>> This has nothing to do with my code, except I must be calling >>>>>>>>> something >>>>>>>>> that enters this loop. It happens in both Cog (Windows) and >>>>>>>>> Squeak4.1 >>>>>>>>> (Linux <headless> and Windows). >>>>>>>>> >>>>>>>>> Not sure how to fix this. >>>>>>>>> >>>>>>>>> Rob >>>>>>>>> >>>>>>>>>> Cheers, >>>>>>>>>> - Andreas >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>> >>>>> >>>> >>> >>> >>> >>> >>> >> >> >> > |
In reply to this post by Eliot Miranda-2
Eliot, if I came across as having any expectations of you
specifically, then I do apologize. My intent was to only to solicit help from any willing party with my immediate problem. It had looked like it might have just a simple or obvious issue, but perhaps not.. On Wed, Jul 14, 2010 at 3:55 PM, Eliot Miranda <[hidden email]> wrote: > > > On Wed, Jul 14, 2010 at 11:23 AM, Chris Muller <[hidden email]> wrote: >> >> Hi Eliot, if you replied to my original post under a different >> subject, I must have missed it: >> >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-June/151522.html >> >> I do not have adequate C or C++ experience to even run the debugger. >> I really just want to _get_ a Cog VM so I can be more productive in >> getting my work done so I can then work on things like learning new >> langauges and tools... :) > > If you can compile the VM you can surely learn to use gdb. Its only a > debugger. break foo. step. etc. etc. It would really help (yourself and > others) if you'd take this next step. You might be the only one trying too > build and run on your particular distro. So you might be the only one who > can diagnose the problem. Look on it as a learning experience. > BTW, I have work to do also. I don't get paid to provide the open-source > Cog. I get paid to keep Teleplace working. You're potentially going to > benefit a lot by using a faster VM. You might view putting in a little time > now as payback. It'd be appreciated. > best > Eliot >> >> I had hoped, given that the problem seems to be exposed (the >> double-slash) that the cause and solution would be obvious to >> someone.. >> >> >> >> >> On Wed, Jul 14, 2010 at 12:58 PM, Eliot Miranda <[hidden email]> >> wrote: >> > >> > >> > On Wed, Jul 14, 2010 at 10:22 AM, Chris Muller <[hidden email]> >> > wrote: >> >> >> >> I followed these instructions to the letter, and get the same result I >> >> got a few weeks ago. I posted a question then, but no responses. May >> >> I try again? >> > >> > Chris, I believe I replied suggesting you step though the dynamic >> > loading >> > code to get more information. >> > I think everything starts from loadModules in >> > platforms/unix/vm/sqUnixMain.c. >> > I suggest you rerun the configure command to eliminate all optimization >> > (including deleting any -fomit-frame-pointer) and then step from >> > loadModules >> > and see why you don't get to a functional dlopen call >> > in platforms/unix/vm/sqUnixExternalPrims.c. >> > HTH >> > Eliot >> > >> >> >> >> Everything seems to go just fine throughout these build instructions. >> >> For the final step, I put it in /usr/local/lib. >> >> >> >> make install prefix=/usr/local/lib/squeak >> >> >> >> and I made sure /usr/local/lib/squeak exists before doing the make >> >> install. >> >> >> >> The make install appears to work fine, and I am able to see squeak >> >> -version: >> >> >> >> $ squeak -version >> >> 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 >> >> Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] >> >> Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 >> >> UTC 2009 i686 GNU/Linux >> >> plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: >> >> /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] >> >> >> >> However, when I try to launch an image: >> >> >> >> squeak my.image >> >> >> >> The image does not launch and I get the following: >> >> >> >> could not find display driver vm-display-X11; either: >> >> - check that /usr/local/lib/squeak/3.9-7//vm-display-X11.so >> >> exists, or >> >> - use the '-plugins <path>' option to tell me where it is, or >> >> - remove DISPLAY from your environment. >> >> >> >> notice the double-slash in reference to the plugins location. Perhaps >> >> that's the problem, but what's the correct solution? >> >> >> >> Any advice is greatly appreciated.. >> >> >> >> - Chris >> >> >> >> >> >> >> >> On Tue, Jul 13, 2010 at 4:04 PM, Levente Uzonyi <[hidden email]> wrote: >> >> > On Tue, 13 Jul 2010, Rob Withers wrote: >> >> > >> >> >> Thanks Levente. Unfortunately it did not work: >> >> >> >> >> >> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not >> >> >> found >> >> >> (required by ./lib/squeak/3.9-7/squeak) >> >> > >> >> > Seems like you have to build it yourself. Fortunately it's very easy, >> >> > since >> >> > Eliot commits the generated sources to the svn repo. So you can build >> >> > a >> >> > CogVM/StackVM without VMMaker. Here is how: >> >> > >> >> > "How to build the Cog Croquet VM on Unix >> >> > ------------------------------- >> >> > 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & >> >> > libxt >> >> > source)) >> >> > 2. Check out the following sources from svn (if you haven't already - >> >> > if >> >> > you're >> >> > reading this in unixbuild its likely you've already got the >> >> > sources) >> >> > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms >> >> > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src >> >> > svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild >> >> > 3. Open a shell, cd into the unixbuild/bld directory and execute >> >> > ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 >> >> > -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 >> >> > -DCOGMTVM=0" >> >> > LIBS=-lpthread >> >> > make install prefix=WhereYouWantTheVmToGo >> >> > 4. At the end of it you'll get a new VM in the path provided via >> >> > -prefix" >> >> > >> >> > >> >> > Levente >> >> > >> >> >> >> >> >> Rob >> >> >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> >> From: Levente Uzonyi <[hidden email]> >> >> >> To: The general-purpose Squeak developers list >> >> >> <[hidden email]> >> >> >> Sent: Tue, July 13, 2010 3:21:43 PM >> >> >> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in >> >> >> Squeak >> >> >> 4.1) >> >> >> >> >> >> On Tue, 13 Jul 2010, Rob Withers wrote: >> >> >> >> >> >>> -------------------------------------------------- >> >> >>> From: "Levente Uzonyi" <[hidden email]> >> >> >>> Sent: Tuesday, July 13, 2010 12:46 PM >> >> >>> To: "The general-purpose Squeak developers list" >> >> >>> <[hidden email]> >> >> >>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in >> >> >>> Squeak >> >> >>> 4.1) >> >> >>> >> >> >>>> On Tue, 13 Jul 2010, Rob Withers wrote: >> >> >>>> >> >> >>>>> >> >> >>>>> -------------------------------------------------- >> >> >>>>> From: "Andreas Raab" <[hidden email]> >> >> >>>>> Sent: Tuesday, July 13, 2010 11:29 AM >> >> >>>>> To: "The general-purpose Squeak developers list" >> >> >>>>> <[hidden email]> >> >> >>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >> >> >>>>> >> >> >>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >> >> >>>>>>> >> >> >>>>>>> The low-space watcher is running, at least before the problem >> >> >>>>>>> starts. >> >> >>>>>>> I >> >> >>>>>>> do eventually run out of memory, but the uninterruptable state >> >> >>>>>>> happens >> >> >>>>>>> before this. >> >> >>>>>> >> >> >>>>>> In which case you want to do the following: >> >> >>>>>> * Launch your app and wait until it's in the "growing state" >> >> >>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and >> >> >>>>>> then >> >> >>>>>> "Print all processes" >> >> >>>>>> >> >> >>>>>> This will dump a list of all the call stacks of all processes. >> >> >>>>>> One >> >> >>>>>> of >> >> >>>>>> them is the culprit consuming memory and you'll probably be able >> >> >>>>>> to >> >> >>>>>> tell >> >> >>>>>> quickly from just looking at it (if not, you can email the >> >> >>>>>> output >> >> >>>>>> here but >> >> >>>>>> it typically takes a domain expert to understand what's going >> >> >>>>>> wrong). >> >> >>>>>> >> >> >>>>> >> >> >>>>> Thanks for this pointer, Andreas. >> >> >>>>> >> >> >>>>> This time it was a Cog VM which spasmed, which I use for my >> >> >>>>> client >> >> >>>>> (Squeak 4.1 for server for use with linux vm - I have no ability >> >> >>>>> to >> >> >>>>> compile >> >> >>>>> a linux Cog vm: would love if someone posted one that could be >> >> >>>>> launched >> >> >>>>> headless for my webhost). >> >> >>>> >> >> >>>> Cog works, but i think you're trying to use the -headless switch, >> >> >>>> which >> >> >>>> (is deprecated) and tells the vm to use the X11 display, but with >> >> >>>> no >> >> >>>> window. >> >> >>>> Servers usually don't have X11, so it won't work. You better use >> >> >>>> -vm-display-null (and -vm-sound-null). Try squeak --help for >> >> >>>> further >> >> >>>> useful >> >> >>>> options (like tuning Cog). >> >> >>>> >> >> >>> >> >> >>> I am trying to use the -headless switch. Good to know it is >> >> >>> deprecated. >> >> >>> So you happen to have a Cog for linux binary (version 17 - 20), >> >> >>> which >> >> >>> I >> >> >>> could use? >> >> >> >> >> >> I have one, but I'm not sure it will work on your server. You can >> >> >> find >> >> >> it >> >> >> here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on >> >> >> ubuntu >> >> >> 10.04 and is optimized for core2. >> >> >> >> >> >> >> >> >> Levente >> >> >> >> >> >>> >> >> >>> Thanks, >> >> >>> Rob >> >> >>> >> >> >>>> >> >> >>>> Levente >> >> >>>> >> >> >>>>> >> >> >>>>> It started running at 100% and I did your F2 -> Debug Options -> >> >> >>>>> all processes. It started dumping a LOT to the Debug Console, >> >> >>>>> then >> >> >>>>> it >> >> >>>>> froze, still at 100%, but no increase in memory now and it went >> >> >>>>> (Not >> >> >>>>> Responding) and greyed out the window. >> >> >>>>> >> >> >>>>> Luckily, I was able to see enough of the stack that was causing >> >> >>>>> problems. It is infinitely looping in this method: >> >> >>>>> >> >> >>>>> LanguageEnvironment class>>#localeID: localeID >> >> >>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >> >> >>>>> (LocaleID isoLanguage: 'en')] >> >> >>>>> >> >> >>>>> This has nothing to do with my code, except I must be calling >> >> >>>>> something >> >> >>>>> that enters this loop. It happens in both Cog (Windows) and >> >> >>>>> Squeak4.1 >> >> >>>>> (Linux <headless> and Windows). >> >> >>>>> >> >> >>>>> Not sure how to fix this. >> >> >>>>> >> >> >>>>> Rob >> >> >>>>> >> >> >>>>>> Cheers, >> >> >>>>>> - Andreas >> >> >>>>>> >> >> >>>>> >> >> >>>>> >> >> >>>> >> >> >>> >> >> >>> >> >> > >> >> > >> >> >> > >> > >> > >> > >> > >> > > |
In reply to this post by Levente Uzonyi-2
Levente,
I suspected the same. I was running an older Ubuntu release. I thought maybe I had cruft left over from my old VM, (or from a couple of Cog builds that failed because I was missing dependencies,) and maybe that was causing my problem. So I paved the disk, installed 10.4, and built Cog w/o ever installing another VM. Same symptom, with the weird double slash in the error message. On Jul 14, 2010, at 6:53 PM, Levente Uzonyi <[hidden email]> wrote: > On Wed, 14 Jul 2010, Casey Ransberger wrote: > >> Changing subject for sanity. >> >> Is there a place to file bugs against the open source version of Cog? (*nudge*) It might improve signal:noise in any event. >> >> I realize that OSCog is the community's responsibility! But if we're going to be responsible about shepherding it, we may as well add a category to Mantis (or something.) What do folks think about that? >> >> FWIW, I had the same symptom running Ubuntu 10.4; Eliot was kind enough to suggest some things I might explore with the debugger, but I haven't had time to drill down into it (just took a new job, ramping up on a pile of software and relational tomfoolery.) >> >> It seems like it's a distro-issue. I'm curious, and I understand that it might not be apropos to disclose, but on the off chance it is, what GNU/Linux distro has Cog seen the most testing on? > > That's really strange, because I succesfully built Cog on Ubuntu 10.4 and it works fine. Today I even managed to compile the plugin for FFI and Alien (thought none of them works :)) and the UUIDPlugin. I also fixed the cryptography plugins, those work well (at least the tests pass). > Back to your problem: after compiling I only have vm-display-X11, but no vm-display-X11.so. Are you sure you're not mixing the files/VMMaker of the CogVM and the SqueakVM? > > > Levente > >> >> This thread seems to have wandered a bit, but I'll read the whole thing and then forward his suggestions if they still seem promising and haven't been reproduced here. >> >> On Jul 14, 2010, at 1:55 PM, Eliot Miranda <[hidden email]> wrote: >> >>> >>> >>> On Wed, Jul 14, 2010 at 11:23 AM, Chris Muller <[hidden email]> wrote: >>> Hi Eliot, if you replied to my original post under a different >>> subject, I must have missed it: >>> >>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-June/151522.html >>> >>> I do not have adequate C or C++ experience to even run the debugger. >>> I really just want to _get_ a Cog VM so I can be more productive in >>> getting my work done so I can then work on things like learning new >>> langauges and tools... :) >>> >>> If you can compile the VM you can surely learn to use gdb. Its only a debugger. break foo. step. etc. etc. It would really help (yourself and others) if you'd take this next step. You might be the only one trying too build and run on your particular distro. So you might be the only one who can diagnose the problem. Look on it as a learning experience. >>> >>> BTW, I have work to do also. I don't get paid to provide the open-source Cog. I get paid to keep Teleplace working. You're potentially going to benefit a lot by using a faster VM. You might view putting in a little time now as payback. It'd be appreciated. >>> >>> best >>> Eliot >>> >>> >>> I had hoped, given that the problem seems to be exposed (the >>> double-slash) that the cause and solution would be obvious to >>> someone.. >>> >>> >>> >>> >>> On Wed, Jul 14, 2010 at 12:58 PM, Eliot Miranda <[hidden email]> wrote: >>>> >>>> >>>> On Wed, Jul 14, 2010 at 10:22 AM, Chris Muller <[hidden email]> wrote: >>>>> >>>>> I followed these instructions to the letter, and get the same result I >>>>> got a few weeks ago. I posted a question then, but no responses. May >>>>> I try again? >>>> >>>> Chris, I believe I replied suggesting you step though the dynamic loading >>>> code to get more information. >>>> I think everything starts from loadModules in >>>> platforms/unix/vm/sqUnixMain.c. >>>> I suggest you rerun the configure command to eliminate all optimization >>>> (including deleting any -fomit-frame-pointer) and then step from loadModules >>>> and see why you don't get to a functional dlopen call >>>> in platforms/unix/vm/sqUnixExternalPrims.c. >>>> HTH >>>> Eliot >>>> >>>>> >>>>> Everything seems to go just fine throughout these build instructions. >>>>> For the final step, I put it in /usr/local/lib. >>>>> >>>>> make install prefix=/usr/local/lib/squeak >>>>> >>>>> and I made sure /usr/local/lib/squeak exists before doing the make >>>>> install. >>>>> >>>>> The make install appears to work fine, and I am able to see squeak >>>>> -version: >>>>> >>>>> $ squeak -version >>>>> 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3 >>>>> Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20] >>>>> Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 >>>>> UTC 2009 i686 GNU/Linux >>>>> plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default: >>>>> /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/] >>>>> >>>>> However, when I try to launch an image: >>>>> >>>>> squeak my.image >>>>> >>>>> The image does not launch and I get the following: >>>>> >>>>> could not find display driver vm-display-X11; either: >>>>> - check that /usr/local/lib/squeak/3.9-7//vm-display-X11.so >>>>> exists, or >>>>> - use the '-plugins <path>' option to tell me where it is, or >>>>> - remove DISPLAY from your environment. >>>>> >>>>> notice the double-slash in reference to the plugins location. Perhaps >>>>> that's the problem, but what's the correct solution? >>>>> >>>>> Any advice is greatly appreciated.. >>>>> >>>>> - Chris >>>>> >>>>> >>>>> >>>>> On Tue, Jul 13, 2010 at 4:04 PM, Levente Uzonyi <[hidden email]> wrote: >>>>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>>>> >>>>>>> Thanks Levente. Unfortunately it did not work: >>>>>>> >>>>>>> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not >>>>>>> found >>>>>>> (required by ./lib/squeak/3.9-7/squeak) >>>>>> >>>>>> Seems like you have to build it yourself. Fortunately it's very easy, >>>>>> since >>>>>> Eliot commits the generated sources to the svn repo. So you can build a >>>>>> CogVM/StackVM without VMMaker. Here is how: >>>>>> >>>>>> "How to build the Cog Croquet VM on Unix >>>>>> ------------------------------- >>>>>> 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt >>>>>> source)) >>>>>> 2. Check out the following sources from svn (if you haven't already - if >>>>>> you're >>>>>> reading this in unixbuild its likely you've already got the sources) >>>>>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms >>>>>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src >>>>>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild >>>>>> 3. Open a shell, cd into the unixbuild/bld directory and execute >>>>>> ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 >>>>>> -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 >>>>>> -DCOGMTVM=0" >>>>>> LIBS=-lpthread >>>>>> make install prefix=WhereYouWantTheVmToGo >>>>>> 4. At the end of it you'll get a new VM in the path provided via >>>>>> -prefix" >>>>>> >>>>>> >>>>>> Levente >>>>>> >>>>>>> >>>>>>> Rob >>>>>>> >>>>>>> >>>>>>> >>>>>>> ________________________________ >>>>>>> From: Levente Uzonyi <[hidden email]> >>>>>>> To: The general-purpose Squeak developers list >>>>>>> <[hidden email]> >>>>>>> Sent: Tue, July 13, 2010 3:21:43 PM >>>>>>> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in >>>>>>> Squeak >>>>>>> 4.1) >>>>>>> >>>>>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>>>>> >>>>>>>> -------------------------------------------------- >>>>>>>> From: "Levente Uzonyi" <[hidden email]> >>>>>>>> Sent: Tuesday, July 13, 2010 12:46 PM >>>>>>>> To: "The general-purpose Squeak developers list" >>>>>>>> <[hidden email]> >>>>>>>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak >>>>>>>> 4.1) >>>>>>>> >>>>>>>>> On Tue, 13 Jul 2010, Rob Withers wrote: >>>>>>>>> >>>>>>>>>> >>>>>>>>>> -------------------------------------------------- >>>>>>>>>> From: "Andreas Raab" <[hidden email]> >>>>>>>>>> Sent: Tuesday, July 13, 2010 11:29 AM >>>>>>>>>> To: "The general-purpose Squeak developers list" >>>>>>>>>> <[hidden email]> >>>>>>>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1 >>>>>>>>>> >>>>>>>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote: >>>>>>>>>>>> >>>>>>>>>>>> The low-space watcher is running, at least before the problem >>>>>>>>>>>> starts. >>>>>>>>>>>> I >>>>>>>>>>>> do eventually run out of memory, but the uninterruptable state >>>>>>>>>>>> happens >>>>>>>>>>>> before this. >>>>>>>>>>> >>>>>>>>>>> In which case you want to do the following: >>>>>>>>>>> * Launch your app and wait until it's in the "growing state" >>>>>>>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then >>>>>>>>>>> "Print all processes" >>>>>>>>>>> >>>>>>>>>>> This will dump a list of all the call stacks of all processes. One >>>>>>>>>>> of >>>>>>>>>>> them is the culprit consuming memory and you'll probably be able to >>>>>>>>>>> tell >>>>>>>>>>> quickly from just looking at it (if not, you can email the output >>>>>>>>>>> here but >>>>>>>>>>> it typically takes a domain expert to understand what's going >>>>>>>>>>> wrong). >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Thanks for this pointer, Andreas. >>>>>>>>>> >>>>>>>>>> This time it was a Cog VM which spasmed, which I use for my client >>>>>>>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to >>>>>>>>>> compile >>>>>>>>>> a linux Cog vm: would love if someone posted one that could be >>>>>>>>>> launched >>>>>>>>>> headless for my webhost). >>>>>>>>> >>>>>>>>> Cog works, but i think you're trying to use the -headless switch, >>>>>>>>> which >>>>>>>>> (is deprecated) and tells the vm to use the X11 display, but with no >>>>>>>>> window. >>>>>>>>> Servers usually don't have X11, so it won't work. You better use >>>>>>>>> -vm-display-null (and -vm-sound-null). Try squeak --help for further >>>>>>>>> useful >>>>>>>>> options (like tuning Cog). >>>>>>>>> >>>>>>>> >>>>>>>> I am trying to use the -headless switch. Good to know it is >>>>>>>> deprecated. >>>>>>>> So you happen to have a Cog for linux binary (version 17 - 20), which >>>>>>>> I >>>>>>>> could use? >>>>>>> >>>>>>> I have one, but I'm not sure it will work on your server. You can find >>>>>>> it >>>>>>> here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on >>>>>>> ubuntu >>>>>>> 10.04 and is optimized for core2. >>>>>>> >>>>>>> >>>>>>> Levente >>>>>>> >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Rob >>>>>>>> >>>>>>>>> >>>>>>>>> Levente >>>>>>>>> >>>>>>>>>> >>>>>>>>>> It started running at 100% and I did your F2 -> Debug Options -> >>>>>>>>>> all processes. It started dumping a LOT to the Debug Console, then >>>>>>>>>> it >>>>>>>>>> froze, still at 100%, but no increase in memory now and it went (Not >>>>>>>>>> Responding) and greyed out the window. >>>>>>>>>> >>>>>>>>>> Luckily, I was able to see enough of the stack that was causing >>>>>>>>>> problems. It is infinitely looping in this method: >>>>>>>>>> >>>>>>>>>> LanguageEnvironment class>>#localeID: localeID >>>>>>>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID: >>>>>>>>>> (LocaleID isoLanguage: 'en')] >>>>>>>>>> >>>>>>>>>> This has nothing to do with my code, except I must be calling >>>>>>>>>> something >>>>>>>>>> that enters this loop. It happens in both Cog (Windows) and >>>>>>>>>> Squeak4.1 >>>>>>>>>> (Linux <headless> and Windows). >>>>>>>>>> >>>>>>>>>> Not sure how to fix this. >>>>>>>>>> >>>>>>>>>> Rob >>>>>>>>>> >>>>>>>>>>> Cheers, >>>>>>>>>>> - Andreas >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >> > |
In reply to this post by Derek O'Connell-2
Hmm. That's an interesting try. I tried renaming vm-display-X11 to vm-display-X11.so, and that didn't help; which confounds me. Is there a reason that using a symlink would have a different effect from my rename try?
On Wed, Jul 14, 2010 at 5:49 PM, Derek O'Connell <[hidden email]> wrote: Hi Chris, -- Casey Ransberger |
Free forum by Nabble | Edit this page |