Seeing `CMS: abort preclean due to time` in the gc.log; is this a cause for concern?

Solution In Progress - Updated -

Environment

  • Red Hat Enterprise Linux
    • 5.x
    • 6.x
  • Java instances using the CMS collector.

Issue

  • Seeing CMS: abort preclean due to time in the gc.log; is this a cause for concern?

Resolution

  • The CMS collector goes through the following phases, only two of which are stop-the-world:
    CMS initial mark - stop-the-world phase
    CMS marking
    CMS precleaning
    CMS abortable preclean
    CMS Remark - stop-the-world phase
    CMS sweep
    CMS reset

The error message above is printed if the abortable preclean phase exceeds the CMSMaxAbortablePrecleanTime, which defaults to 5 seconds. If this is exceeded it then aborts this phase and continues to the next, which is a stop-the-world.

  • If this message is repeatedly printed then it indicates that it is unable to complete the preclean phase in 5 seconds. Either the time needs to be increased to allow for a longer preclean phase, or the OS or heap needs to be examined to determine why this is not completing in the 5 seconds allotted.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

2 Comments

what is the impact of an aborted preclean?

The precleaning phase helps reduce the work in the next stop-the-world “remark” phase. Aborting this second precleaning phase is the expected behavior. That it was aborted is not an indication of an error. Since the remark phase is waiting, why not preclean but don't delay the remark for the sake of precleaning.