[Seaside] VM freezes; how to find the cause?

Tobias Pape Das.Linux at gmx.de
Mon May 27 12:56:48 UTC 2013


Am 27.05.2013 um 06:13 schrieb Bahman Movaqar <Bahman at BahmanM.com>:

> On 2013-05-27 08:00, Bahman Movaqar wrote:
>> On 2013-05-26 14:30, Bahman Movaqar wrote:
>>> Hi all,
>>> First of all, I'm new to Smalltalk and Seaside so please bear with if
>>> I've got a naive problem.
>>> I'm following Seaside tutorial
>>> (http://www.hpi.uni-potsdam.de/hirschfeld/seaside/tutorial) on Pharo. 
>>> At the end of chapter 4
>>> (http://www.hpi.uni-potsdam.de/hirschfeld/seaside/tutorial?_s=AUBiOz9XdOrP9E6O&_k=KG-uwEpv1DslDNOD),
>>> whenever I try to visit the `/todo' URL the whole VM freezes leaving me
>>> with force-close'ing as the only way.
>>> I have two questions:
>>> 1.  Obviously I'm doing something wrong in the code.  Is there any
>>> profiler tool that I can use to trace the problem?  With current
>>> situation there's absolutely no way (that I'm aware of) to find out the
>>> bad code.
>>> 2.  Is it normal that the whole VM becomes unresponsive?  I wonder how
>>> to prevent this in a production environment?
>> I have attached the full stack trace of the frozen VM (Oops! Image :-)
>> ).  Please note that `StRootComponent' is the component I've coded and
>> most probably the root of all evil.
> Finally!  At last the page is showing up.  I'm not sure how but the only
> things I did to code were Chris' suggestion and some cleanup.
> And, as far as I could understand, `OrderedCollection' doesn't provide
> `sortBy:' (which is used in the tutorial) anymore as it is `sort:' now.

Please note that the tutorial is written with Squeak as the platform in mind.
Hence, when you try it on Pharo, in one or two places you will need to adapt 
the code :)

> Thank you all for your help.  Much appreciated.
> Now the only thing that is occupying my mind is the whole image freeze.
> It's not good at all for a production environment where one website
> should *not* bring down 10 other websites because it can make the image
> freeze.
> Is there any way to prevent that?  Or at least limit the freeze to a
> thread or a process instead of whole image.

As Chris (?) figured out, your freeze was because of an infinite recursion,
and those things are very hard to catch; it is actually no freeze but continuing
execution. It is near impossible to catch that with the current architecture
of either Squeak or Pharo.


More information about the seaside mailing list