Posts tagged "garbage collection"

What is the gray circle with an exclamation mark (or bang)?

[Note: edited 7 Jun 2012, 13 Aug 2012 to make changes based on comments that have been received]

The generic memory error icon was added in Flash Player version 10.1 and will appear within a browser when the Flash Player has been particularly abused or is running in a very low memory environment. The icon, affectionately known as the Gray Circle of Death (GCOD), is a gray circle with a white exclamation mark within it.

It is not just an icon, however. It is a sign that Flash is protecting your computer from an application that is asking for more memory than your browser has available. The browser will crash if it runs out of memory and that is a Very Bad Thing. If that happens your browser may crash or your computer may crash and need a restart. Flash now has the feature in which it shuts down an application if that application causes a memory problem.

Note: One recurring comment to this post is that one application or another created in Flash often triggers this icon to appear. “Why don’t you fix Flash?” The answer to that question is that Flash is doing exactly what it is supposed to do. It is protecting your computer.

It is possible in Flash, as with most programming languages, to create create an application that doesn’t play nice.

The Flash Player tries to shield the user from either intentional or unintentional mischief that an application can create. The GCOD is shown when Flash has stepped in and kept an application running in the Flash Player from using more memory than is available. The Flash Player stops execution of an application and displays the GCOD when an application requires more memory to continue running than is available.

It is important to point out that the Flash Player has not overrun its available memory. If it had Very Bad Things would have occurred. What did happen is that Flash Player yanked the leash of an application and shut it down when it needed more memory than the browser had available.

For that reason, the GCOD is a very good feature of the Flash Player.

Getting Rid of the GCOD

Most important to most people is not what the GCOD is, but how to make it go away. In all cases, an application does not have enough memory to run. The application could be needing a reasonable amount of memory but the browser does not have that much memory available. On the other hand, the application could also go into a death spiral because of a programming error and suck up every bit of memory available in even the heftiest computers. There are many ways for an application to overrun its memory.

When the GCOD is seen, the first course of action is to contact the developer of the Flash application. I have a decent computer and I have only seen the GCOD appear because of the coding of the application. The GCOD is not a problem Flash Player causes. You see it when the safety valve has blown.

For more:
Flash Player 11 Technical Specifications
Garbage collection internals for Flash Player and Adobe AIR
Optimizing Performance for the Adobe Flash Platform

Using the Data Store Garbage Collection in CRX and CQ

Andrew Khoury sent this information to me, basing the instructions on his solution to a customer’s problem.

I posted a solution to the problem in which the journal files for CRX grew and became a problem. The journal files are tar files in which the repository stores its information. However, items greater than 4KB are not stored in the repository tar files. Instead, CRX stores that data in a set of indexed files found within the crx-quickstart/repository/repository/datastore directory.

Like the tar journal files, these files have data appended, not rewritten. So the size of the datastore directory grows with each deployment that contains files larger than 4KB.

Just as there is a garbage collection functionality for repository tar files, there is a way to do garbage collection on the datastore. Running garbage collection removes unused items from the datastore directory and decreases the amount of its data.

Experience Services and CQ are both built using CRX as their base. So the instructions for CRX applies to the Experience Services and CQ servers, as well.

Running Datastore Garbage Collection

  1. Go to http://[server domain]:[server port]/crx and log in as administrative user
  2. Click Repository Configuration
  3. Click Datastore Garbage Collection
  4. Check all boxes and click Run (if it runs successfully then you are done)

If this process completes successfully, you are done.

If Datastore Garbage Collection fails with an error

Look at the error in the application server log and crx-quickstart/logs/crx/error.log. You may see “File not found: 123,” where 123 corresponds to the id number of a tar file. If so, first try to restore the tar file that corresponds to that id from a backup. For example, the tar file for id 123 would be crx-quickstart/workspaces/crx.default/data_00123.tar. The number in the data tar file name is always padded to five digits so add zeros before the number to make it five digits.

Next steps

If an error occurred, do the following. Do the rest of these steps even if you were not able to restore the missing tar file(s).

  1. Stop the application server or the quickstart server.
  2. If using *nix, log into the server via ssh and cd to the crx-quickstart directory. If using Windows, go to the crx-quickstart drectory.
  3. Make backups of the tar index files. Within the *nix environment use these commands:
    cd repository/version
    mkdir index_tar_backup
    mv index*.tar index_tar_backup/
    chmod 640 data*.tar
    cd ../workspaces/crx.default
    mkdir index_tar_backup
    mv index*.tar index_tar_backup/
    chmod 640 data*.tar
  4. Backup crx-quickstart/workspaces/crx.default/workspace.xml as crx-quickstart/workspaces/crx.default/workspace.xml.backup
  5.  Open crx-quickstart/workspaces/crx.default/workspace.xml in a text editor
  6. Comment out the PersistenceManagerelement:Before:
    <PersistenceManager class=""/>


    <!--PersistenceManager class=""/-->
  7. Add a new persistence manager element with the consistency check parameters set:
    <PersistenceManager class="">
    <param name="consistencyCheck" value="true" />
    <param name="consistencyFix" value="true" />
  8. Restart the application server or the quick start server
  9. Monitor start up by tailing crx-quickstart/logs/crx/error.log and watch fo any errors. In the error.log you will see something very similar to the following when the start up is complete:
     02.03.2012 15:39:52 *INFO * CRXHttpServlet: PackageShareServlet initialized. (, line 52)
     02.03.2012 15:39:52 *INFO * CRXHttpServlet: PackageManagerServlet initialized. (, line 52)
     02.03.2012 15:40:04 *INFO * TarUtils: File system status: created 200 files in 14 ms (14285 ops/sec) (, line 782)
    02.03.2012 15:40:04 *INFO * TarUtils: File system status calculated in 35 ms (, line 795)
  10. Go to http://[server domain]:[server port]/crx and log in as an administrative user
  11. Click Repository Configuration
  12. Click Datastore Garbage Collection
  13. Check all boxes and click Run
  14. Edit the file, crx-quickstart/workspaces/crx.default/workspace.xml, replacing it with the original version that was backed up.