OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Andi B. on July 06, 2020, 03:03:12 pm

Title: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Andi B. on July 06, 2020, 03:03:12 pm
Occasionally I use AOO writer for some documents. When I open a document and try to save it with a new file name the whole system hangs. No CAD screen only a reboot when doing CAD two times. Ping from another system still works but f.i. ftpd does not. Wonder if it is only on my system or if this is a bug of our OS/2 version.

I've installed current libraries from netlabs standard repository. I can't remember if older versions behave the same way. I don't use AOO very much. But wonder if no one else sees this.

I usually have auto save enabled every 10 minutes and enabled make backup copy (translated, options menu, Load/Save settings). Wonder if it makes a difference.

Before I open a ticket I wanted to ask here if someone can replicate this.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Mike Kölling on July 06, 2020, 05:08:09 pm
Hi Andy,
I had similar problems in the past. Here is my solution:

Check if the IP address of your computer is listed in the "hosts" file (e.g. C:\MPTN\ETC\hosts).
Example of hosts:
127.0.0.1             localhost                 
192.168.1.46       CPName

Take also care that the name used in the hosts file is same as set in your config.sys (e.g. "SET HOSTNAME=CPName").

Otherwise you have to wait 2 minutes before your computer becomes available again.

Greetings,
Mike
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: ivan on July 06, 2020, 05:24:16 pm
Hi Andy,

Have you used the yum package manager before the trouble started?  The only time AOO acted up on me was when of the needed DLLs got updated.  Since that time all the DLLs needed by the program are in the AOO program directory and the program object points to that directory - no more problems.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Andi B. on July 06, 2020, 06:30:46 pm
@Mike - thanks for your answer. But I'm pretty sure my network setup is okay. I've localhost and my computers name in the hosts file. My hosts file is quite long, I've a lot of computers listed there. Ping works and my network with fixed IPs works too.

@Ivan - thanks too. Now I remember I had to downgrade libicu (?) otherwise AOO does not work anymore. But beside that I keep my system up to date as this is what the developers of current applications do too. I don't like the idea to have different versions of dlls in use by different programs. Our OS is not capable to deal with this very good. Especially with newer applications which needs a lot of memory. Sooner or later you run out of memory when you work with libpathstrict and you'll also may see strange kernel crashes.

Question, does it work for you when you open a file and immediately do a 'Save as'?

Additional info, I'm using 4.1.7 since a few months only. The years before I used an older 4.1.x. But since the old days a lot has changed. So no clue if this is a feature of 4.1.7 or something which started witch some libc(x) update.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Dariusz Piatkowski on July 06, 2020, 09:43:54 pm
Hi Andi,

Wow, sounds awfully like an issue I have had on my machine when SMP is running (still have this issue with only a sub-set of apps, never figured out what causes it though)...but in my case I am not seeing this with AOO. In fact I went through your use-case, repeated with a NEW file first, followed by an existing file re-save with a different name. Both worked successfully.

Just on a chance, if you are running SMP, can you shut off all but a single core and repeat this?
-Dariusz
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Dave Yeo on July 06, 2020, 11:49:05 pm
Hi Andi, rather then downgrading libicu, you should install the icu-legacy package,forget the exact name.
There'll be more legacy packages coming from looking at exp, unluckily YUM doesn't always seem to properly handle them.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: ivan on July 07, 2020, 02:01:42 am
Hi Andy,

My main use of AOO is to open documents that friends can't on their windows machines.  The usual procedure is they send me the doc, I open it and then  save it as a new file name, that stops the auto save from messing with the original doc.  I have not had any problems doing this.

The only difference to your case is that I am using AOO 4.1.2 because it opens the problem win docs.

Since you didn't used to have this problem I still think it is a newer DLL that doesn't work with AOO.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Andi B. on July 07, 2020, 08:42:09 am
Hi Andi, rather then downgrading libicu, you should install the icu-legacy package,forget the exact name.
There'll be more legacy packages coming from looking at exp, unluckily YUM doesn't always seem to properly handle them.
I tried that without success. Only downgrade worked. Have to check again with a clean installation. Unfortunately I need this system for 'corona home office' work. Not much room to play with it at the moment.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Neil Waldhauer on July 07, 2020, 04:00:52 pm
I've been using OpenOffice 4.1.7 since it came out. I'm not seeing any such problem. What I do see, that might be relevent, is that the OS/2 File System dies after prolonged use of Mozilla. This shows up on my machine with the following symptom.

I try to reboot, and the system hangs on Shutting down Filesystems. If I hit control alt delete at that point, the screen turns into a candy-cane display. This could be due to something overwriting Kernel memory. My experience is that many limits in the Kernel are not enforced, and there isn't any memory protection in Ring 0, so this is a typical situation.

I have written test programs that exhaust Kernel resources. It's best if application programs play nice with OS/2 System calls.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Lars on July 07, 2020, 05:12:03 pm
1) if you use JFS, make sure that you force a real chkdsk, including a proper scan of all files and directories and not just a check of the transaction log
2) I think the "candy cane" display happens because there is a video mode switch. Whatever is in video memory is "reinterpreted" for the new video mode and may lead to a funny display. I have this effect from time to time on a Ctrl-Alt-Del but it never leads to a system hang.
3) Mozilla crashes very often on my system. From what I can say from the trap info, I suspect it almost always has to do with accessing data.
4) What leads to a complete freeze on my system is to use a "hosts" file that has very many entries (like those that block unwanted sites). I am also using Injoy Firewall (which uses FXWRAP.SYS driver to filter the data stream) and maybe the combination is the problem. The effect is as if all interrupts are disabled: I can only hit the power switch. Removing the "hosts" file fixes the problem.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Pete on July 07, 2020, 05:46:56 pm
Hi All

I've had problems with AOO 4.1.7 not starting and contacted Silvan about them.

His response was:-

"...it seems you have netlabs-exp repository enabled as well. Thats not a real good
idea with AOO, as we know one libc which is not compatlibe with AOO.
So it might well be you screwed it up with netlabs-exp."

In the above the culprit is libicu 65.1-1 which I downgraded/backlevelled to 56.1.2

Possibly of interest: Silvan did not suggest installing a libicu legacy package...


That has almost resolved the problem: AOO now mainly works. However, every now and again I get the same problem with AOO unable to start as it cannot find it's own support files eg SWOO.DLL

This can happen when just booted or after the system has been in  use for a while; I have run AOO successfully prior to a sudden failure to start due to "missing" DLL file when trying to start AOO later - same problem as in this discussion https://www.os2world.com/forum/index.php?topic=2435

Of interest is that the error message about the missing DLL file is suspect.
The message that AOO displays:-

Title
Critical error: DosLoadModule failed

Message
Module: J:\PROGRAMS\AOO4\PROGRAM\..\program\swoo.dll;
error: dlopen rc=8 extra=J:\PROGRAMS\AOO4\PROGRAM\SWOO.DLL;


I wonder if a clue is in this line "Module: J:\PROGRAMS\AOO4\PROGRAM\..\program\swoo.dll;"
Reason: I would have expected the line to read "Module: J:\PROGRAMS\AOO4\PROGRAM\swoo.dll;"


I've reported this problem to Silvan and hope that he can spot the problem.


Regards

Pete



Regards

Pete

Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Doug Bissett on July 07, 2020, 08:28:38 pm
It has been my experience, that AOO 4.1.7 works just fine, BUT, I do need to use the Quick Start feature, AND use Extras-> Enable High Mem code&data loading (after every update, to be sure that nothing got changed). I also need to raise the VIRTUALADDRESSLIMIT setting. 3072 is the max allowable, and 1536 is the default in ArcaOS or eCS (I think the OS/2 default is 512, or 1024, depending on what version you are using). I find that 1536 is not enough (ONE program, at a time, is usually okay, until shared memory fragments - see below), and some machines will not work with 3072, so I always use 2560 (so I don't need to figure out if the machine can use 3072). Depending on what else you use, 2560 may not be enough. Even if you are using the patched ArcaOS kernel, this is still likely to cause problems, when the program unloads. Other programs, like Firefox, can also eat large amounts of shared memory, and they work much better when set to use high shared memory (see other threads about this). The main thing, is to use upper shared memory, whenever possible, because there just isn't enough room in lower shared memory to run modern software, and modern software apparently doesn't always check to see if it got a memory allocation, before it tries to use it (very BAD programming, usually from the original, before porting).

Most of the time, when I have a problem like the one described, it is because LIBC cannot allocate shared memory, and that usually happens because there isn't enough shared memory left. One problem is that you can have 100,000,000 bytes left, and some program decides it needs 100,000,001 bytes. You are dead in the water. Another problem is that the free shared memory can fragment, and if the largest free space is 50,000,000 bytes, and a program wants 50,000,001, you are dead in the water, even if there are 20 other free spots with enough free shared memory to make up the difference. Preventing fragmentation is one of the main reasons to use a program, like AOO Quick Start, or Firefox Turbo (to keep it from unloading common DLLs, which will cause fragmentation of shared memory space).

Other things to seriously consider:

NEVER use the exp repository stuff, UNLESS you know exactly what you are doing, OR you are prepared to trouble shoot problems like you describe (certainly NEVER do a mass update from the exp repositories, unless you are really looking for trouble). Unfortunately, not enough people test what is in the exp repositories, so bad stuff gets moved to the release repositories, sometimes. If you want to test that stuff, use an alternate system, so you can still run your real system (and don't share the %UNIXROOT% when you do that). Sharing %UNIXROOT% between boot systems is possible, but you had better fully understand what that can do to you. Some things will be missed, on the "other" system, when updated, and you do need to run a Re-install of certain packages, on the "other" boot system to pick them up. Easier, and safer, to simply use a separate %UNIXROOT% (after all, disk space, and internet time, is rarely a problem any more).

ALWAYS use ANPM (RPM/YUM) to update the UNIX support. If you don't it is very easy to miss something (it can miss things, even if you do use it - one of the things that gets missed in testing). You could spend months trying to figure out that BC.EXE (for example) is at the wrong level. RPM/YUM is not just DLLs, it is PACKAGES. ANPM makes RPM/YUM usable for us mortals.

Inspect your system for stray duplicate DLLs (and other things). There should be exactly ONE copy of individual files in the Libpath (and PATH, but that isn't as critical), on any boot system, or you should know, exactly, why there is a copy somewhere other than in %UNIXROOT%, and you should understand exactly when that will be used, and what it will do to you. Also remember that you used the usr\local directory structure (if you do use it, which s NOT recommended, unless you know exactly what you are doing, and why), and manually update that, when you update the RPM/YUM stuff. Apparently, you need the full usr\local\* directory structure, or some things will get all upset. (If you don't know about that, DON'T use it).

Don't use LIBPATHSTRICT, unless you have no other option (and be sure that the program doesn't already do it for you - like later versions of Firefox). That causes even more shared memory to be used, and should not be required, unless you know exactly why it is needed.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Roderick Klein on July 07, 2020, 11:17:28 pm
Occasionally I use AOO writer for some documents. When I open a document and try to save it with a new file name the whole system hangs. No CAD screen only a reboot when doing CAD two times. Ping from another system still works but f.i. ftpd does not. Wonder if it is only on my system or if this is a bug of our OS/2 version.

I've installed current libraries from netlabs standard repository. I can't remember if older versions behave the same way. I don't use AOO very much. But wonder if no one else sees this.

I usually have auto save enabled every 10 minutes and enabled make backup copy (translated, options menu, Load/Save settings). Wonder if it makes a difference.

Before I open a ticket I wanted to ask here if someone can replicate this.

And with all options discussed. Did you take into account this could simply be a memory exhaustion issue. The fact that C-A-D no longer is able to switch text mode in my book shows a meory allocation issue. That PING works is not suprise since the TCP/IP stack is already loaded.

Did you try simply marking the code segments high of the Open Office program and see if this fixes it ?

Roderick Klein
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Dave Yeo on July 08, 2020, 03:08:50 am
I've got to agree with Doug that raising the VIRTUALADRESSLIMIT to at least 2560 is required. The Mozilla apps are really crashy with the default of 1536, even without OO running.
@Pete, that command line should be fine as it resolves correctly. I see some weird ones when building stuff.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Pete on July 10, 2020, 04:52:59 pm
Hi All

Silvan asked Yuri (AOO developer) about the rc=8 error and had this reply:-

   "rc=8 is the out of memory error. Usually quickstart fixes such kind of issues."

As I currently only have 1 of my 2 x 2Gb RAM chips being recognised and used (by both ArcaOS and Windows7, ie both OS's only "see" 2Gb RAM) that is probably the answer in my case. Currently have 2 x 2GB replacement RAM sticks on order so will see if the problem goes away with the new RAM fitted.

Will also try Daves suggestion of VIRTUALADDRESSLIMIT=2560 - I was using 2048.

@Dave
Not sure how that line resolves correctly...
Presuming the "\..\" bit means back up a directory level the line becomes
Module: J:\PROGRAMS\AOO4\PROGRAM\AOO4\program\swoo.dll


Regards

Pete


Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Andreas Schnellbacher on July 10, 2020, 05:19:59 pm
If you have only 2 GB recognized (here as well, but a different reason), then it makes no sense to set VAL to that or a higher value. You probably run out of shared lower memory first.

I have tested here 1536 and 1728. My current value is 1728, but I'm not happy with it. 2 GB is just too little for recent apps.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Mike Kölling on July 10, 2020, 05:27:34 pm
I have tested here 1536 and 1728. My current value is 1728, but I'm not happy with it. 2 GB is just too little for recent apps.

I totally agree that 2GB is to less. I have at least 4GB and 8GB in my laptops and set the address limit to 3072, which works well for me.

Greetings from Potsdam / Germany
Mike
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Dave Yeo on July 10, 2020, 05:37:41 pm
You can set VIRTUALADDRESSLIMIT higher then your RAM. With 2GBs, I had it set to 3072, then had a DIMM die giving me 1.5 GBs of real ram. Still needed VIRTUALADDRESSLIMIT=3072 to link XUL.DLL and as long as I was careful to not have SeaMonkey running, it worked fine, if slow. I did overflow the swap file once or twice with SeaMonkey running, seems the swap file has a 2GB limit.
Virtual memory is what VIRTUALADDRESSLIMIT adjusts and with 2GBs of ram and 2GB of swap, there shouldn't be any problem besides swapping and in my experience, generally things that aren't used much gets swapped out and I found running with 1.5GBs wasn't bad.
@Pete, try doing
Code: [Select]
dir  J:\PROGRAMS\AOO4\PROGRAM\..\program\swoo.dll
to test.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Doug Bissett on July 10, 2020, 06:25:53 pm
VAL has nothing, at all, to do with real memory size. I use VAL set to 2560 on my antique IBM ThinkPad A22e, and it has max memory of 256MB. I can run Firefox (probably v17.0, or so, last time I tried it), but it takes about 30 minutes to get the blank home page loaded. As long s most of the stuff gets paged out, and isn't used much, it works fine. Paging absolutely kills it. Things like Firefox, and AOO, are not written to use paging efficiently (if that was even considered, which is unlikely). My IBM ThinkPad T43 with 1.5 GB, and my antique Asus, with 1 GB, work okay with VAL set to 2560. As Dave suggests, set the swap size plus the real memory size to a total of about 4 GB (which is not necessary, but then it won't spend time trying to shrink it back to the defined size).

VAL is part of the OS/2 addressable space (something less than 4 GB, no matter how much real memory you have), and if you exceed the real memory, it uses the swap file. In fact, it takes an exceptional program to push memory into the swap file, if you have 2 GB of real memory.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Lars on July 10, 2020, 10:20:55 pm
You can set VIRTUALADDRESSLIMIT higher then your RAM. With 2GBs, I had it set to 3072, then had a DIMM die giving me 1.5 GBs of real ram. Still needed VIRTUALADDRESSLIMIT=3072 to link XUL.DLL and as long as I was careful to not have SeaMonkey running, it worked fine, if slow. I did overflow the swap file once or twice with SeaMonkey running, seems the swap file has a 2GB limit.
Virtual memory is what VIRTUALADDRESSLIMIT adjusts and with 2GBs of ram and 2GB of swap, there shouldn't be any problem besides swapping and in my experience, generally things that aren't used much gets swapped out and I found running with 1.5GBs wasn't bad.
@Pete, try doing
Code: [Select]
dir  J:\PROGRAMS\AOO4\PROGRAM\..\program\swoo.dll
to test.
Looks like the swap file has a 1 GB limit. I just specified 2 GB for initial size on SWAPPATH and it only creates a 1 GB file.
I now set it to 1 GB. Since I have 16 GB of RAM and 3 GB are visible to OS/2, it's never actually used but I have the impression that it increases system stability (before, I had set it to as low as 2 MB). I suspect that the memory management somehow tests if the in-use RAM would fit into the swap file without actually moving memory pages to the swap file or some such.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Andreas Schnellbacher on July 10, 2020, 10:29:11 pm
Thanks, makes sense. I've set now my VAL to 2560.
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Pete on July 11, 2020, 12:00:57 am
Hi Dave

@Pete, try doing
Code: [Select]
dir  J:\PROGRAMS\AOO4\PROGRAM\..\program\swoo.dll
to test.

Yes,that works fine - just looks wrong.


Regards

Pete
Title: Re: Apache OpenOffice 4.1.7 hangs whole system when 'Save as'
Post by: Dave Yeo on July 11, 2020, 02:23:13 am
@Lars, the 2 (2.1?) GB limit is how big it can grow to before crashing the system with a swap file full error. Never tried that large of an initial value, I think I was using 512MBs but it has been a while. The problem with letting it expand as needed is possible fragmentation but at the time I had lots of disk space so didn't worry about it.
With 1.5GBs of real ram, the swap file would be used a bit but never seemed to thrash.
Now back when I first used Warp V3 with 4MBs of ram, couldn't even load the WPS without the system becoming unusable.