Recent

Author Topic: IDE freezing the OS  (Read 8900 times)

Ariador

  • Newbie
  • Posts: 2
Re: IDE freezing the OS
« Reply #30 on: November 03, 2019, 08:40:04 pm »
Absolutely the same problem with Lazarus 2.0.2 under Ubuntu 19.10...
And as for the latest Lazarus 2.0.6 - it hangs the desktop right immediately, before even showing the welcome picture :(
Had to switch to another desktop with Ctrl-Alt-F8 and then press Ctrl-Alt-Del.

MarkMLl

  • Hero Member
  • *****
  • Posts: 924
Re: IDE freezing the OS
« Reply #31 on: November 03, 2019, 08:51:38 pm »
Remember that you can go to a text console using <Crtl><Alt><F1> and use the kill or killall command to be a bit more selective.

MarkMLl


Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

Zvoni

  • Sr. Member
  • ****
  • Posts: 369
Re: IDE freezing the OS
« Reply #32 on: November 04, 2019, 11:37:40 am »
OK, I can confirm this freeze up happens on a VM running 19.10. But not every time I start Lazarus, sometimes it starts and continues to run normally. My rough guess is that it fails, for me, on a Virtual Box allocated 4G ram one in four times. Using Lazarus 2.0.6 debs from sourceforge.

I have seen four such freezups now, in each case an initial startup, have not seen it happen in a restart. I blow away the config files between tries to ensure an initial start.

(I have been running Fedora 30 in a VM for a week now without any sign of this issue, about the same level of gnome and release time, that may indicate the freeze up is a Ubuntu only thing ?)

Davo

Davo, exactly my thoughts. I think it's an Ubuntu 19.10-thing, since i had freeze-ups that had nothing to do with Lazarus, but with trying to open files with the Texteditor

EDIT: Just found something suggesting it's a swap-Problem.
https://askubuntu.com/questions/1185491/ubuntu-19-10-freezes-and-lags-reguarly?noredirect=1&lq=1
The last 4 answers
« Last Edit: November 04, 2019, 11:48:03 am by Zvoni »
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircrafts

dbannon

  • Hero Member
  • *****
  • Posts: 1070
    • tomboy-ng, a rewrite of the classic Tomboy
Re: IDE freezing the OS
« Reply #33 on: November 04, 2019, 12:06:41 pm »
EDIT: Just found something suggesting it's a swap-Problem.
https://askubuntu.com/questions/1185491/ubuntu-19-10-freezes-and-lags-reguarly?noredirect=1&lq=1
The last 4 answers
Yes, looks an interesting read, well spotted !  My test u1910 is a VirtualBox VM, fresh install, no extensions. I have given it 4G of ram and, at first though giving it an 8G instead eliminated the problem. But going back to 4G also seemed to 'fix' it  :(

Thats when I realised it was erratic, needed losts of tests to get some valid statistics.

So, swap could indeed do just that, my VM has only 800M swap, thats plainly not enough. Although I do feel with 4G ram it should not really poke much into swap anyway doing what we have been doing. But  I will have a go at those suggestions tomorrow ....

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

Zvoni

  • Sr. Member
  • ****
  • Posts: 369
Re: IDE freezing the OS
« Reply #34 on: November 04, 2019, 12:08:00 pm »
EDIT: Just found something suggesting it's a swap-Problem.
https://askubuntu.com/questions/1185491/ubuntu-19-10-freezes-and-lags-reguarly?noredirect=1&lq=1
The last 4 answers
Yes, looks an interesting read, well spotted !  My test u1910 is a VirtualBox VM, fresh install, no extensions. I have given it 4G of ram and, at first though giving it an 8G instead eliminated the problem. But going back to 4G also seemed to 'fix' it  :(

Thats when I realised it was erratic, needed losts of tests to get some valid statistics.

So, swap could indeed do just that, my VM has only 800M swap, thats plainly not enough. Although I do feel with 4G ram it should not really poke much into swap anyway doing what we have been doing. But  I will have a go at those suggestions tomorrow ....

Davo
Check your swappiness-value
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircrafts

dbannon

  • Hero Member
  • *****
  • Posts: 1070
    • tomboy-ng, a rewrite of the classic Tomboy
Re: IDE freezing the OS
« Reply #35 on: November 05, 2019, 04:48:25 am »
OK, some results.  Firstly, I am somewhat surprised to find that my (testing) VMs don't have a swap partition, instead depending on a /swapfile. Thats poor IMHO, dedicated partions were once considered the only worthwhile way to swap. But I just realized that my host machine is setup the same way. The host has 16G ram and a 1.4G swapfile, that also offends the old sysadmin in me.  Sigh.

Now, my results may not be directly related to the original question asker because my test machine is a VM but it sure is worth looking into.

'swapiness', its a measure of when, as we run out of ram, the system starts using swap. Ubuntu's default is apparently 60, it will use swap when 60 of ram is left. Now, my VMs get 4G ram, that 'should' be heaps (if you forgive the pun) so, I will set swappiness to 20 instead.

sudo sysctl vm.swappiness=20 <enter>

Note, that won't stick around after a boot. First two starts of Lazarus resulted in a lockup that required a reboot. So, I increased the swapfile size to 2G, See https://askubuntu.com/questions/927854/how-do-i-increase-the-size-of-swapfile-without-removing-it-in-the-terminal

Like this, I  repeatably started Lazarus and closed without saving config 11 out of 15 times. Four times I experienced a delay of maybe 30 seconds and then either things resumed  eventually, maybe a dialog would pop up saying Lazarus was not responding  and sometimes it needed a reset.

During these bad starts, the VM's cpu might go to 100%, gnome-shell was often reported to  be using most of that.

The extra swap space and lower swappiness certainly helped but did not solve the problem !

Similar results running Ubuntu on Wayland  and even Mate (but no so many tests done). Seems clear its a Ubuntu 1910 problem, not just Ubuntu Gnome.

Davo






Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

Thaddy

  • Hero Member
  • *****
  • Posts: 10186
Re: IDE freezing the OS
« Reply #36 on: November 05, 2019, 06:02:02 am »
Well, I am old school and that is probably not relevant anymore with 16 or 32 GB desktop but I still always have a swap at least 1:1 with physical memory. 800MB is way too small.
Swap space will not be used if not necessary, but when necessary you will never know if the whole lot needs to be swapped. With VM's this is always the case anyway.
« Last Edit: November 05, 2019, 06:22:45 am by Thaddy »
I am more like donkey than shrek

dbannon

  • Hero Member
  • *****
  • Posts: 1070
    • tomboy-ng, a rewrite of the classic Tomboy
Re: IDE freezing the OS
« Reply #37 on: November 05, 2019, 07:16:22 am »
Yes, I agree a reasonable swap space is important but I don't think its core to this problem. I can still see the problem if I give the VM 8G !

I'll pull down Lazarus source and build that way, see if it still does it, maybe I can do some debugging.....

(Recent advise does not seem to be the 1:1 swap ratio, Ubuntu talks about the sqr root of your ram (in Gigs) when more than 4 (?) is available.  Clearly is all lazy swap these days ....

Davo 
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

440bx

  • Hero Member
  • *****
  • Posts: 1876
Re: IDE freezing the OS
« Reply #38 on: November 05, 2019, 07:35:22 am »
(Recent advise does not seem to be the 1:1 swap ratio, Ubuntu talks about the sqr root of your ram (in Gigs) when more than 4 (?) is available.  Clearly is all lazy swap these days ....

Davo
Mark Russinovich has a series of excellent articles (as is most everything he does) about memory management and in one them, he addresses the advice given on pagefile size (among other things.)

The article is found at https://blogs.technet.microsoft.com/markrussinovich/2008/11/17/pushing-the-limits-of-windows-virtual-memory/  and while it is Windows specific, what he says about the size of the pagefile is applicable to just about any virtual memory based OS.

If more people read Mark's blog, they would probably give better advice concerning what a "recommended" size of the pagefile should be ;)


FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

dbannon

  • Hero Member
  • *****
  • Posts: 1070
    • tomboy-ng, a rewrite of the classic Tomboy
Re: IDE freezing the OS
« Reply #39 on: November 05, 2019, 08:57:48 am »
Now I am, sort of, starting to think this is a dbus issue.  There are some reports of delays starting app in U1910 and the delay is believed to be the dbus timeout.

I found starting lazarus with its own dbus daemon seems to help -

dbus-run-session startlazarus <enter>

That started the deb installed lazarus 15 time in a row without incident.  I did the same with a locally built lazarus, again, 15 times without incident. 

I am not suggesting this is a fix, but maybe it will help someone who understand what lazarus is doing over dbus to identify the issue ??

Davo

PS 440bx, thanks for that link, I notice its a 2008 release, I will have a read but I do suspect the relative cheapness of ram these days and the follow on of people having so much more may date it a bit ?  When I was running HPC systems, if we saw a user's job running into swap, we'd consider killing in, certainly suggest to them they need to have a little think ....

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

440bx

  • Hero Member
  • *****
  • Posts: 1876
Re: IDE freezing the OS
« Reply #40 on: November 05, 2019, 09:28:20 am »
PS 440bx, thanks for that link, I notice its a 2008 release, I will have a read but I do suspect the relative cheapness of ram these days and the follow on of people having so much more may date it a bit ?  When I was running HPC systems, if we saw a user's job running into swap, we'd consider killing in, certainly suggest to them they need to have a little think ....

Davo
You're welcome and your point that the article is "a bit old" is valid but, my own experience is that what he states about the page file remains and, has remained true throughout the years.  Specifically, the more RAM we put in our machines the more programs we feel free to run simultaneously.  For instance, most of the time, I'm running three (3) VMs, each consumes more memory than what my 2008 machine had in total.  It seems that, no matter how much RAM we have, we'll always consume more than what's available, in part because the programs we use keep getting bigger and bigger, most development environments are good examples of that and, more and more "utility" type programs are needed/useful to get the job done, e.g, text editors, debuggers, hex editors, CLIs, file explorers, internet browsers (which consume ever more memory, mine is consuming 1.5GB as I type this!), etc, etc.

Basically, the pagefile is a binary credit card, don't compute without it. !! ;) 
FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

Zvoni

  • Sr. Member
  • ****
  • Posts: 369
Re: IDE freezing the OS
« Reply #41 on: November 05, 2019, 05:26:48 pm »
LOL, just did a update-check on my U1910, and there are 6 updates, ALL for problem reporting, crash reporting etc.
BRUAHAHAHA
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircrafts

Zvoni

  • Sr. Member
  • ****
  • Posts: 369
Re: IDE freezing the OS
« Reply #42 on: November 06, 2019, 09:32:05 am »
OK Folks.
I'm pretty sure now, that the freezing of Ubuntu19.10 on Gnome has nothing to do with Lazarus.
I wanted to test Lubuntu in a VirtualBox yesterday.
The only thing running on my Ubuntu19.10/Gnome was VirtualBox.
8GB RAM/16GB swap/swappiness=30
When i tried installing Lubuntu (assigned: 4GB RAM, 1 CPU, 50GB VDI) from a mounted ISO inside the VirtualBox = FREEZE!
So, apparently, there is nothing wrong with FPC/Lazarus, but definitely something with U1910/Gnome
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircrafts

dbannon

  • Hero Member
  • *****
  • Posts: 1070
    • tomboy-ng, a rewrite of the classic Tomboy
Re: IDE freezing the OS
« Reply #43 on: November 06, 2019, 10:40:40 am »
Well, those updates make no difference.  I'd like to see some updates that mention DBUS....

I wonder if the problem relates to apps using GTK2, may explain why not all apps are a problem ?  Just speculation I'm afraid.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

Zvoni

  • Sr. Member
  • ****
  • Posts: 369
Re: IDE freezing the OS
« Reply #44 on: November 06, 2019, 12:23:01 pm »
Well, those updates make no difference.  I'd like to see some updates that mention DBUS....

I wonder if the problem relates to apps using GTK2, may explain why not all apps are a problem ?  Just speculation I'm afraid.

Davo

Davo, coud you take a look here?
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1834583
Starting from Post #16 could you check out, if it applies to you?
I'll be able to check it myself on Thursday evening.
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircrafts

 

TinyPortal © 2005-2018