Headless Image: a Riddle

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

Headless Image: a Riddle

Mircea Filip Lungu-2
 
Here is a quick riddle for you:

The Context:
- os: debian
- vm: cog
- image: the image from the pier site, in which I updated to the
latest version of the pier packages. Pier runs on port 8087.

If I run the following line:

~/coglinux/bin/squeak x.image

the image starts with no error and port 8087 is open.

If I run the following line:

~/coglinux/bin/squeak -nodisplay -nosound x.image

the image just blocks and the port 8087 is not open.

do you have any idea what could be the reason? I tried with all the
possible parameter combinations: (-headless, -vm-display-none)

Thanks,
M.
Reply | Threaded
Open this post in threaded view
|

Re: Headless Image: a Riddle

Igor Stasenko
 
On 21 September 2011 14:22, Mircea Filip Lungu <[hidden email]> wrote:

>
> Here is a quick riddle for you:
>
> The Context:
> - os: debian
> - vm: cog
> - image: the image from the pier site, in which I updated to the
> latest version of the pier packages. Pier runs on port 8087.
>
> If I run the following line:
>
> ~/coglinux/bin/squeak x.image
>
> the image starts with no error and port 8087 is open.
>
> If I run the following line:
>
> ~/coglinux/bin/squeak -nodisplay -nosound x.image
>
> the image just blocks and the port 8087 is not open.
>
> do you have any idea what could be the reason? I tried with all the
> possible parameter combinations: (-headless, -vm-display-none)
>

If pier image is pharo based, which starting from version 1.3
introducing a logic around headless mode.
It could be that something wrong there.
But actually, it was introduced to prevent the situations as you
describing (just hanging and doing nothing),
so i cannot tell, what exactly may be wrong there. But most probably
it is something wrong with startup code,
which might rely on having UI, which is not there in headless mode.

> Thanks,
> M.
>



--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: Headless Image: a Riddle

Levente Uzonyi-2
 
On Wed, 21 Sep 2011, Igor Stasenko wrote:

>
> On 21 September 2011 14:22, Mircea Filip Lungu <[hidden email]> wrote:
>>
>> Here is a quick riddle for you:
>>
>> The Context:
>> - os: debian
>> - vm: cog
>> - image: the image from the pier site, in which I updated to the
>> latest version of the pier packages. Pier runs on port 8087.
>>
>> If I run the following line:
>>
>> ~/coglinux/bin/squeak x.image
>>
>> the image starts with no error and port 8087 is open.
>>
>> If I run the following line:
>>
>> ~/coglinux/bin/squeak -nodisplay -nosound x.image
>>
>> the image just blocks and the port 8087 is not open.
>>
>> do you have any idea what could be the reason? I tried with all the
>> possible parameter combinations: (-headless, -vm-display-none)
>>
>
> If pier image is pharo based, which starting from version 1.3
> introducing a logic around headless mode.
> It could be that something wrong there.
> But actually, it was introduced to prevent the situations as you
> describing (just hanging and doing nothing),
> so i cannot tell, what exactly may be wrong there. But most probably
> it is something wrong with startup code,
> which might rely on having UI, which is not there in headless mode.

It's pretty likely that the issue is with Pharo's non-interactive mode vs
Pier. Since you're using Cog, you can easily find out where the problem is, by
using kill -USR1 <pid> which prints the content of all stacks to stdout.


Levente

>
>> Thanks,
>> M.
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>
Reply | Threaded
Open this post in threaded view
|

Re: Headless Image: a Riddle

stephane ducasse-2


Thanks levente,

We should add that to the FAQ because this is cool to know it.

Stef

>>
>
> It's pretty likely that the issue is with Pharo's non-interactive mode vs Pier. Since you're using Cog, you can easily find out where the problem is, by using kill -USR1 <pid> which prints the content of all stacks to stdout.
>
>
> Levente
>
>>
>>> Thanks,
>>> M.
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>

Reply | Threaded
Open this post in threaded view
|

Re: Headless Image: a Riddle

Mircea Filip Lungu
In reply to this post by Levente Uzonyi-2
 
Hi Levente!

Thanks! I couldn't see anything wrong with the attached log though :(
Is there any hint that you can recognize?

Thanks,
M.

On Wed, Sep 21, 2011 at 3:27 PM, Levente Uzonyi <[hidden email]> wrote:

>
> On Wed, 21 Sep 2011, Igor Stasenko wrote:
>
>>
>> On 21 September 2011 14:22, Mircea Filip Lungu <[hidden email]>
>> wrote:
>>>
>>> Here is a quick riddle for you:
>>>
>>> The Context:
>>> - os: debian
>>> - vm: cog
>>> - image: the image from the pier site, in which I updated to the
>>> latest version of the pier packages. Pier runs on port 8087.
>>>
>>> If I run the following line:
>>>
>>> ~/coglinux/bin/squeak x.image
>>>
>>> the image starts with no error and port 8087 is open.
>>>
>>> If I run the following line:
>>>
>>> ~/coglinux/bin/squeak -nodisplay -nosound x.image
>>>
>>> the image just blocks and the port 8087 is not open.
>>>
>>> do you have any idea what could be the reason? I tried with all the
>>> possible parameter combinations: (-headless, -vm-display-none)
>>>
>>
>> If pier image is pharo based, which starting from version 1.3
>> introducing a logic around headless mode.
>> It could be that something wrong there.
>> But actually, it was introduced to prevent the situations as you
>> describing (just hanging and doing nothing),
>> so i cannot tell, what exactly may be wrong there. But most probably
>> it is something wrong with startup code,
>> which might rely on having UI, which is not there in headless mode.
>
> It's pretty likely that the issue is with Pharo's non-interactive mode vs
> Pier. Since you're using Cog, you can easily find out where the problem is,
> by using kill -USR1 <pid> which prints the content of all stacks to stdout.
>
>
> Levente
>
>>
>>> Thanks,
>>> M.
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>


--
Mircea Lungu
Researcher
Software Composition Group
University of Bern
http://lungu.org/mircea

pier-stacks.log (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Headless Image: a Riddle

Levente Uzonyi-2
 
On Wed, 21 Sep 2011, Mircea Filip Lungu wrote:

No quotes for gmail, sorry.

The log looks ok and the listener process seems to be running. Does lsof
-p <pid> show that the process is listening? Did you try running the
image with RFB installed?


Levente
Reply | Threaded
Open this post in threaded view
|

Re: Headless Image: a Riddle

K K Subbu
In reply to this post by Mircea Filip Lungu-2
 
On Wednesday 21 Sep 2011 5:52:47 PM Mircea Filip Lungu wrote:
> If I run the following line:
>
> ~/coglinux/bin/squeak -nodisplay -nosound x.image
>
> the image just blocks and the port 8087 is not open.
>
> do you have any idea what could be the reason? I tried with all the
> possible parameter combinations: (-headless, -vm-display-none)
Have you tried to use strace(1)? The trace of syscalls may give you a clue.

Subbu