Debuggers are fun! "<span class="Apple-style-span" style="font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); ">Just play it grand." :)</span><div><font class="Apple-style-span" color="#333333" face="Trebuchet, 'Trebuchet MS', Arial, sans-serif"><br>
</font></div><div><font class="Apple-style-span" color="#333333" face="Trebuchet, 'Trebuchet MS', Arial, sans-serif">Seriously if I get a handle on my new job fast enough, I'm gonna beat you to it. Go!<br></font><br>
<div class="gmail_quote">On Wed, Jul 14, 2010 at 8:27 PM, Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">On Wed, Jul 14, 2010 at 7:04 PM, Chris Muller <span dir="ltr"><<a href="mailto:ma.chris.m@gmail.com" target="_blank">ma.chris.m@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Eliot, if I came across as having any expectations of you<br>
specifically, then I do apologize. My intent was to only to solicit<br>
help from any willing party with my immediate problem. It had looked<br>
like it might have just a simple or obvious issue, but perhaps not..<br></blockquote><div><br></div></div><div>That's OK. I'm just trying to bully you into gdb ;)</div><div><br></div><div>best</div><div>Eliot </div>
<div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div><br>
<br>
On Wed, Jul 14, 2010 at 3:55 PM, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
><br>
> On Wed, Jul 14, 2010 at 11:23 AM, Chris Muller <<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>> wrote:<br>
>><br>
>> Hi Eliot, if you replied to my original post under a different<br>
>> subject, I must have missed it:<br>
>><br>
>><br>
>> <a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-June/151522.html" target="_blank">http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-June/151522.html</a><br>
>><br>
>> I do not have adequate C or C++ experience to even run the debugger.<br>
>> I really just want to _get_ a Cog VM so I can be more productive in<br>
>> getting my work done so I can then work on things like learning new<br>
>> langauges and tools... :)<br>
><br>
> If you can compile the VM you can surely learn to use gdb. Its only a<br>
> debugger. break foo. step. etc. etc. It would really help (yourself and<br>
> others) if you'd take this next step. You might be the only one trying too<br>
> build and run on your particular distro. So you might be the only one who<br>
> can diagnose the problem. Look on it as a learning experience.<br>
> BTW, I have work to do also. I don't get paid to provide the open-source<br>
> Cog. I get paid to keep Teleplace working. You're potentially going to<br>
> benefit a lot by using a faster VM. You might view putting in a little time<br>
> now as payback. It'd be appreciated.<br>
> best<br>
> Eliot<br>
>><br>
>> I had hoped, given that the problem seems to be exposed (the<br>
>> double-slash) that the cause and solution would be obvious to<br>
>> someone..<br>
>><br>
>><br>
>><br>
>><br>
>> On Wed, Jul 14, 2010 at 12:58 PM, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>><br>
>> wrote:<br>
>> ><br>
>> ><br>
>> > On Wed, Jul 14, 2010 at 10:22 AM, Chris Muller <<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> I followed these instructions to the letter, and get the same result I<br>
>> >> got a few weeks ago. I posted a question then, but no responses. May<br>
>> >> I try again?<br>
>> ><br>
>> > Chris, I believe I replied suggesting you step though the dynamic<br>
>> > loading<br>
>> > code to get more information.<br>
>> > I think everything starts from loadModules in<br>
>> > platforms/unix/vm/sqUnixMain.c.<br>
>> > I suggest you rerun the configure command to eliminate all optimization<br>
>> > (including deleting any -fomit-frame-pointer) and then step from<br>
>> > loadModules<br>
>> > and see why you don't get to a functional dlopen call<br>
>> > in platforms/unix/vm/sqUnixExternalPrims.c.<br>
>> > HTH<br>
>> > Eliot<br>
>> ><br>
>> >><br>
>> >> Everything seems to go just fine throughout these build instructions.<br>
>> >> For the final step, I put it in /usr/local/lib.<br>
>> >><br>
>> >> make install prefix=/usr/local/lib/squeak<br>
>> >><br>
>> >> and I made sure /usr/local/lib/squeak exists before doing the make<br>
>> >> install.<br>
>> >><br>
>> >> The make install appears to work fine, and I am able to see squeak<br>
>> >> -version:<br>
>> >><br>
>> >> $ squeak -version<br>
>> >> 3.9-7 #1 Wed Jul 14 12:07:56 CDT 2010 gcc 4.3.3<br>
>> >> Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.20]<br>
>> >> Linux chrisT60p 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59<br>
>> >> UTC 2009 i686 GNU/Linux<br>
>> >> plugin path: /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/ [default:<br>
>> >> /opt/4dst/thirdparty/squeak/lib/squeak/3.9-7/]<br>
>> >><br>
>> >> However, when I try to launch an image:<br>
>> >><br>
>> >> squeak my.image<br>
>> >><br>
>> >> The image does not launch and I get the following:<br>
>> >><br>
>> >> could not find display driver vm-display-X11; either:<br>
>> >> - check that /usr/local/lib/squeak/3.9-7//vm-display-X11.so<br>
>> >> exists, or<br>
>> >> - use the '-plugins <path>' option to tell me where it is, or<br>
>> >> - remove DISPLAY from your environment.<br>
>> >><br>
>> >> notice the double-slash in reference to the plugins location. Perhaps<br>
>> >> that's the problem, but what's the correct solution?<br>
>> >><br>
>> >> Any advice is greatly appreciated..<br>
>> >><br>
>> >> - Chris<br>
>> >><br>
>> >><br>
>> >><br>
>> >> On Tue, Jul 13, 2010 at 4:04 PM, Levente Uzonyi <<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>> wrote:<br>
>> >> > On Tue, 13 Jul 2010, Rob Withers wrote:<br>
>> >> ><br>
>> >> >> Thanks Levente. Unfortunately it did not work:<br>
>> >> >><br>
>> >> >> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not<br>
>> >> >> found<br>
>> >> >> (required by ./lib/squeak/3.9-7/squeak)<br>
>> >> ><br>
>> >> > Seems like you have to build it yourself. Fortunately it's very easy,<br>
>> >> > since<br>
>> >> > Eliot commits the generated sources to the svn repo. So you can build<br>
>> >> > a<br>
>> >> > CogVM/StackVM without VMMaker. Here is how:<br>
>> >> ><br>
>> >> > "How to build the Cog Croquet VM on Unix<br>
>> >> > -------------------------------<br>
>> >> > 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 &<br>
>> >> > libxt<br>
>> >> > source))<br>
>> >> > 2. Check out the following sources from svn (if you haven't already -<br>
>> >> > if<br>
>> >> > you're<br>
>> >> > reading this in unixbuild its likely you've already got the<br>
>> >> > sources)<br>
>> >> > svn co <a href="http://www.squeakvm.org/svn/squeak/branches/Cog/platforms" target="_blank">http://www.squeakvm.org/svn/squeak/branches/Cog/platforms</a><br>
>> >> > svn co <a href="http://www.squeakvm.org/svn/squeak/branches/Cog/src" target="_blank">http://www.squeakvm.org/svn/squeak/branches/Cog/src</a><br>
>> >> > svn co <a href="http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild" target="_blank">http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild</a><br>
>> >> > 3. Open a shell, cd into the unixbuild/bld directory and execute<br>
>> >> > ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2<br>
>> >> > -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1<br>
>> >> > -DCOGMTVM=0"<br>
>> >> > LIBS=-lpthread<br>
>> >> > make install prefix=WhereYouWantTheVmToGo<br>
>> >> > 4. At the end of it you'll get a new VM in the path provided via<br>
>> >> > -prefix"<br>
>> >> ><br>
>> >> ><br>
>> >> > Levente<br>
>> >> ><br>
>> >> >><br>
>> >> >> Rob<br>
>> >> >><br>
>> >> >><br>
>> >> >><br>
>> >> >> ________________________________<br>
>> >> >> From: Levente Uzonyi <<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>><br>
>> >> >> To: The general-purpose Squeak developers list<br>
>> >> >> <<a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>><br>
>> >> >> Sent: Tue, July 13, 2010 3:21:43 PM<br>
>> >> >> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in<br>
>> >> >> Squeak<br>
>> >> >> 4.1)<br>
>> >> >><br>
>> >> >> On Tue, 13 Jul 2010, Rob Withers wrote:<br>
>> >> >><br>
>> >> >>> --------------------------------------------------<br>
>> >> >>> From: "Levente Uzonyi" <<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>><br>
>> >> >>> Sent: Tuesday, July 13, 2010 12:46 PM<br>
>> >> >>> To: "The general-purpose Squeak developers list"<br>
>> >> >>> <<a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>><br>
>> >> >>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in<br>
>> >> >>> Squeak<br>
>> >> >>> 4.1)<br>
>> >> >>><br>
>> >> >>>> On Tue, 13 Jul 2010, Rob Withers wrote:<br>
>> >> >>>><br>
>> >> >>>>><br>
>> >> >>>>> --------------------------------------------------<br>
>> >> >>>>> From: "Andreas Raab" <<a href="mailto:andreas.raab@gmx.de" target="_blank">andreas.raab@gmx.de</a>><br>
>> >> >>>>> Sent: Tuesday, July 13, 2010 11:29 AM<br>
>> >> >>>>> To: "The general-purpose Squeak developers list"<br>
>> >> >>>>> <<a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>><br>
>> >> >>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1<br>
>> >> >>>>><br>
>> >> >>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote:<br>
>> >> >>>>>>><br>
>> >> >>>>>>> The low-space watcher is running, at least before the problem<br>
>> >> >>>>>>> starts.<br>
>> >> >>>>>>> I<br>
>> >> >>>>>>> do eventually run out of memory, but the uninterruptable state<br>
>> >> >>>>>>> happens<br>
>> >> >>>>>>> before this.<br>
>> >> >>>>>><br>
>> >> >>>>>> In which case you want to do the following:<br>
>> >> >>>>>> * Launch your app and wait until it's in the "growing state"<br>
>> >> >>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and<br>
>> >> >>>>>> then<br>
>> >> >>>>>> "Print all processes"<br>
>> >> >>>>>><br>
>> >> >>>>>> This will dump a list of all the call stacks of all processes.<br>
>> >> >>>>>> One<br>
>> >> >>>>>> of<br>
>> >> >>>>>> them is the culprit consuming memory and you'll probably be able<br>
>> >> >>>>>> to<br>
>> >> >>>>>> tell<br>
>> >> >>>>>> quickly from just looking at it (if not, you can email the<br>
>> >> >>>>>> output<br>
>> >> >>>>>> here but<br>
>> >> >>>>>> it typically takes a domain expert to understand what's going<br>
>> >> >>>>>> wrong).<br>
>> >> >>>>>><br>
>> >> >>>>><br>
>> >> >>>>> Thanks for this pointer, Andreas.<br>
>> >> >>>>><br>
>> >> >>>>> This time it was a Cog VM which spasmed, which I use for my<br>
>> >> >>>>> client<br>
>> >> >>>>> (Squeak 4.1 for server for use with linux vm - I have no ability<br>
>> >> >>>>> to<br>
>> >> >>>>> compile<br>
>> >> >>>>> a linux Cog vm: would love if someone posted one that could be<br>
>> >> >>>>> launched<br>
>> >> >>>>> headless for my webhost).<br>
>> >> >>>><br>
>> >> >>>> Cog works, but i think you're trying to use the -headless switch,<br>
>> >> >>>> which<br>
>> >> >>>> (is deprecated) and tells the vm to use the X11 display, but with<br>
>> >> >>>> no<br>
>> >> >>>> window.<br>
>> >> >>>> Servers usually don't have X11, so it won't work. You better use<br>
>> >> >>>> -vm-display-null (and -vm-sound-null). Try squeak --help for<br>
>> >> >>>> further<br>
>> >> >>>> useful<br>
>> >> >>>> options (like tuning Cog).<br>
>> >> >>>><br>
>> >> >>><br>
>> >> >>> I am trying to use the -headless switch. Good to know it is<br>
>> >> >>> deprecated.<br>
>> >> >>> So you happen to have a Cog for linux binary (version 17 - 20),<br>
>> >> >>> which<br>
>> >> >>> I<br>
>> >> >>> could use?<br>
>> >> >><br>
>> >> >> I have one, but I'm not sure it will work on your server. You can<br>
>> >> >> find<br>
>> >> >> it<br>
>> >> >> here: <a href="http://leves.web.elte.hu/squeak/cog17.tar.gz" target="_blank">http://leves.web.elte.hu/squeak/cog17.tar.gz</a> . It's built on<br>
>> >> >> ubuntu<br>
>> >> >> 10.04 and is optimized for core2.<br>
>> >> >><br>
>> >> >><br>
>> >> >> Levente<br>
>> >> >><br>
>> >> >>><br>
>> >> >>> Thanks,<br>
>> >> >>> Rob<br>
>> >> >>><br>
>> >> >>>><br>
>> >> >>>> Levente<br>
>> >> >>>><br>
>> >> >>>>><br>
>> >> >>>>> It started running at 100% and I did your F2 -> Debug Options -><br>
>> >> >>>>> Print<br>
>> >> >>>>> all processes. It started dumping a LOT to the Debug Console,<br>
>> >> >>>>> then<br>
>> >> >>>>> it<br>
>> >> >>>>> froze, still at 100%, but no increase in memory now and it went<br>
>> >> >>>>> (Not<br>
>> >> >>>>> Responding) and greyed out the window.<br>
>> >> >>>>><br>
>> >> >>>>> Luckily, I was able to see enough of the stack that was causing<br>
>> >> >>>>> problems. It is infinitely looping in this method:<br>
>> >> >>>>><br>
>> >> >>>>> LanguageEnvironment class>>#localeID: localeID<br>
>> >> >>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID:<br>
>> >> >>>>> (LocaleID isoLanguage: 'en')]<br>
>> >> >>>>><br>
>> >> >>>>> This has nothing to do with my code, except I must be calling<br>
>> >> >>>>> something<br>
>> >> >>>>> that enters this loop. It happens in both Cog (Windows) and<br>
>> >> >>>>> Squeak4.1<br>
>> >> >>>>> (Linux <headless> and Windows).<br>
>> >> >>>>><br>
>> >> >>>>> Not sure how to fix this.<br>
>> >> >>>>><br>
>> >> >>>>> Rob<br>
>> >> >>>>><br>
>> >> >>>>>> Cheers,<br>
>> >> >>>>>> - Andreas<br>
>> >> >>>>>><br>
>> >> >>>>><br>
>> >> >>>>><br>
>> >> >>>><br>
>> >> >>><br>
>> >> >>><br>
>> >> ><br>
>> >> ><br>
>> >><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>><br>
><br>
><br>
</div></div></blockquote></div></div></div><br>
<br><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Casey Ransberger<br>
</div>