[Cuis-dev] Remote Debugging

Gerald Klix cuis.01 at klix.ch
Mon Feb 28 01:50:03 PST 2022


Hi Nicola,

thanks for your advice.

I am aware that I can mail arbitrary files or content
to myself. Alas the problem was a bit different:

1.) The server process consumed 100% CPU, but did not fail as such.
It just became slower and slower.
2.) In this particular case sending diagnostic information by
e-mail was and is a bad idea, because I implemented an e-mail-forwarder
in Smalltalk, that implements load balancing and stuttering.
Obviously using the same communication channel to deliver
dignostic inforamtion is

Luckily I could track the problem down to some clients
checking the service's availability by opening a TCP-connection
sending some non-conforming messages and close the connection.

Once I had formed the right hypothesis it was easy
to recreate the problem with 15 lines of python code.

It turned out that using SocketStream>>#atEnd is a really bad
idea to determine whether the other peer closed a TCP
connection. SocketStream>>#nextLineCrLf will be caught
in a tight loop while the socket is already closed
and #atEnd still answering false.

The right thing to do is to use #isConnected.

One final note:
I had to adjust the priorities of several forwarding
processes below the UI-Process' priority, before
the debugger stayed responsive.

I hope this information helps others with similar
problems, issues, challenges...


Best Regards,

Gerald



On 2/27/22 11:37, Nicola Mingotti via Cuis-dev wrote:
> Hi guys, excuse my reply delay i am overloaded and I have
> difficulties even keeping up with emails.
>  
> Gerald, yes, can develop & debug Cuis remotely. I do it all the time.
> Almost all my software run in remote machines.
>  
> For example, last week I have implemented a snippet that if the
> debugger opens in a specific service I will receive a mail (Cuis send the
> mail).
> This is absolutely great, first time I have a service that warns me
> when it is fallen, usually users do or automatic service checkers.
>  
> So, the VNC, package, It is on my wishlist, but at the moment it is not
> working.
> I added a bit more info to the github page:
> https://github.com/nmingotti/Cuis-Smalltalk-VNC/blob/main/README.md
>  
> There are 2 ways to do this.
>  
> Does you remote machine have real screen ? Does Cuis run on the main screen
> ?
> If so it is trivial in Windows with VNC, in Linux not trivial at all with
> VNC, I use a combination
> of x11vnc, xinetd and lightdm, it is the only mix that works, i have
> tried many variants, all fail, I lost a lot of time to have this working
> reliably.
> => If you want to do some experiments fast use AnyDesk, NoMachine or
> similar products.
>     For uniformity I use VNC to control all machienes but it costed me
> dozens if
>     not about a hundred experiments along 1.5 years to find the thing that
> works reliably (no joke).
>  
> If your Cuis runs in Linux headless it is a lot easier, run a X session
> on the vncserver with window manager etc. then run your Cuis there.
> This is standard procedure, easy to have it working well.
>  
> If you have difficulties i can send you may configuration files, but
> this i will do only in private communication;)
>  
> bye
> Nicola
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> On Tue, Feb 22, 2022, 11:37 PM Gerald Klix <cuis.01 at klix.ch> wrote:
>  
>> Thanks, I noticed. Nicola started to port it to Cuis, but I did not
>> succeed in getting it working
>> https://github.com/nmingotti/Cuis-Smalltalk-VNC
>>
>> Thanks,
>>
>> Gerald
>>
>> On Feb 22 2022, at 9:52 pm, Hernan Wilkinson via Cuis-dev <
>> cuis-dev at lists.cuis.st> wrote:
>>
>> Squeak used to have an implementation to remotely access it (like a VNC
>> client) but that is not in Cuis.
>>
>> On Tue, Feb 22, 2022 at 5:31 PM Juan Vuletich via Cuis-dev <
>> cuis-dev at lists.cuis.st> wrote:
>>
>> On 2/22/2022 12:03 PM, Gerald Klix via Cuis-dev wrote:
>>> Hi all,
>>>
>>> Is there a way to debug running Cuis images remotely?
>>>
>>>
>>> Thanks and Best Regards,
>>>
>>> Gerald
>>>
>>
>> The only easy one I can think about is VNC or similar.
>>
>> Cheers,
>>
>> --
>> Juan Vuletich
>> www.cuis-smalltalk.org
>> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
>> https://github.com/jvuletich
>> https://www.linkedin.com/in/juan-vuletich-75611b3
>> https://independent.academia.edu/JuanVuletich
>> https://www.researchgate.net/profile/Juan-Vuletich
>> https://patents.justia.com/inventor/juan-manuel-vuletich
>> @JuanVuletich
>>
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>>
>>
>> --
>> Hernán WilkinsonSoftware Developer & Coach
>> Alem 896, Floor 6, Buenos Aires, Argentina
>> +54 11 6091 3125
>> @HernanWilkinson
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>>
>  
>  



More information about the Cuis-dev mailing list