Author Topic: FF and TB not running at the same time.  (Read 28332 times)

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: FF and TB not running at the same time.
« Reply #30 on: August 02, 2016, 04:28:42 am »
Quote
I REMed that, and now loading Firefox DLLs high doesn't seem to crash at close (at least not as often, I have only done it half a dozen times).

Well, it is a little better, but still not useable. It would be good, if it wouldn't crash when I close it. When it does crash, it seems to mess up my profile. I cannot run FF, loaded low, at all, without DLLBASING=OFF. T'Bird is even worse, but that is probably why Above512, and Free Shared Mem don't show the memory being returned to the pool. FF, and TB, may not be able to load XUL.DLL because there is no contiguous area of memory to put it in. Unfortunately, I seem to have run out of things to remove, to free up more shared memory.

Quote
Don't use any of Doodles Cairo screensavers. Really they need to be updated to use current Cairo as the early versions of Cairo were buggy.

First I have heard of that. I did have one problem with DSS, where it would go to the screen saver, and it was impossible to wake it up again (the system was running fine, in the background). That happened when I happened to move the mouse, or press a key, just as it would start saving. I turned DSS off because of that. In this case, it doesn't seem to make any difference if it is turned off, or not. Just having the Cairo clock selected seems to eat up some shared memory space (not a lot, but some). I am going to leave DSS enabled, with the blank screen saver, and see if that happens again. If it does, I will probably uninstall DSS, since it really doesn't do anything useful anyway.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: FF and TB not running at the same time.
« Reply #31 on: August 03, 2016, 09:38:17 pm »
I have found another major user of low shared memory space. E.EXE (actually AE.EXE). I tried to load a 160 MB log file, and watched as Above512Watch stepped down to 64K, when E.EXE popped up an error message. I was able to terminate the program, and that immediately returned the low shared memory. At least E.EXE handles the problem correctly, but if some other program had tried to get some low shared memory at the same time, and did not handle it properly, I expect that some sort of crash would have occurred.

Why would something like E.EXE use shared memory (low or high) for data?

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: FF and TB not running at the same time.
« Reply #32 on: August 16, 2016, 10:40:22 pm »
Interesting...

I finally got around to properly configuring eCS 2.2b2 on my main machine. Now, it should be set up exactly like eCS 2.1. There is one major difference though, Above512Watch shows that about 20 meg of something moved from lower shared memory space to upper shared memory space. That does leave more room for other things (like Firefox).

Is there some way to know what is loaded in upper, and lower, memory space, and how much space they are actually using?

I do have a record of Firefox using about 700 meg of shared memory space (from Theseus).

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: FF and TB not running at the same time.
« Reply #33 on: August 17, 2016, 03:10:32 am »
Use Theseus. Highlight a process such as Firefox, then go to Process-->Shared Object Summary. Then scroll down on Shared Object Summary window until the left column shows the high memory. Low memory ends at 1FFF0000 and high start at B49C000 here. Then you have to read the other columns and perhaps use a calculator to convert from hex to decimal.
Perhaps try other processes.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: FF and TB not running at the same time.
« Reply #34 on: August 17, 2016, 07:04:15 am »
Use Theseus. Highlight a process such as Firefox, then go to Process-->Shared Object Summary. Then scroll down on Shared Object Summary window until the left column shows the high memory. Low memory ends at 1FFF0000 and high start at B49C000 here. Then you have to read the other columns and perhaps use a calculator to convert from hex to decimal.
Perhaps try other processes.

It seems that I have the same addresses. It will take some study to understand what it is trying to say.

Thanks...

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: FF and TB not running at the same time.
« Reply #35 on: August 23, 2016, 10:40:34 pm »
Today, Theseus shows Firefox using 1222.152 MB of space, and Above512Watch says I still have 154752 KB of lower shared memory available. It also shows that something has used about 30 MB of upper shared memory space, that wasn't used earlier.

Very strange.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: FF and TB not running at the same time.
« Reply #36 on: August 24, 2016, 01:05:12 am »
Remember that Firefox, being built with -Zhigh-mem, will generally allocate memory from the high arena, eg open a new tab and FF will ask the system for more memory, preferring high memory. The exception is memory that needs to be accessible by 16 bit code, which can't access high memory. There are also places in the code that directly attempt to allocate high memory such as in the JavaScript engine.
This is besides marking the DLLs to load the code (about 31MBs for xul) and/or data high. I believe the data is static variables, constants and such.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: FF and TB not running at the same time.
« Reply #37 on: August 24, 2016, 05:31:58 am »
None of FF has been marked to load high (at least not by me). The usage seems to have been very sudden, and for no reason, that I know about.

As I said, "very strange". At least it didn't crash.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: FF and TB not running at the same time.
« Reply #38 on: August 24, 2016, 07:04:29 am »
Going by memory as I can't find the original discussion.
At some point the JavaScript garbage collection (moving unused chunks of memory and compacting it, sorta a defrag for memory) needed some specifically aligned memory which is unsupported on OS/2. Rich solved it by allocating larger and larger blocks 16 times and testing for alignment and if that failed due to fragmented memory, allocating a large block and returning an aligned address in this block.
I tested quite a bit with some debugging printf's added and usually it succeeded in a couple of recursions. You've probably hit the rare instance where it didn't succeed and allocated a large block.
Note that this is independent of whether the DLLs are marked high, the code first tries to allocate in high memory and then falls back to low memory.
There are other places where it'll first try to allocate high memory and without doing that, FF (or the system) will crash after opening a couple of tabs.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: FF and TB not running at the same time.
« Reply #39 on: August 24, 2016, 06:30:09 pm »
That probably explains a lot of it. It doesn't matter if it uses upper shared memory (I still had more than 1.5 GB left), but it would be instant death if it ever tried that with lower shared memory, and didn't do the proper checking. Even more likely to cause a problem, would be a second program trying to allocate more lower shared memory, without checking to see if it is really available.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: FF and TB not running at the same time.
« Reply #40 on: August 30, 2016, 07:25:45 pm »
Looking in ABOUT:CONFIG, I found "browser. cache. memory. enable", and set it to false. Firefox seems to be much more stable, although it consistently uses more upper shared memory (for some unknown reason, but it doesn't seem to cause a problem). Closing, and opening, Firefox does consistently use more lower shared memory, but it is not enough to cause a problem, for a couple of days. If I watch lower shared memory usage, and reboot when it gets below 100 meg, my system seems to be pretty stable.

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: FF and TB not running at the same time.
« Reply #41 on: September 03, 2016, 01:25:53 am »
On my machine if firefox has been running for a while things get tricky with memory too, even though there is plenty of free shared upper memory. Fragmentation is the cause. It doesn't only happen with FF. Other applications have a similar effect. Opening a lot of pictures with PMView (over a few hundred) will also lead to memory shortage, even though freesharedmem shows plenty of free memory. Closing all apps and doing a WPS restart does not resolve it. A reboot is the only way to return to a stable working system. I do not have the knowledge to figure out the why's and how's but I did use theseus and it does show fragmented memory.