job000089 #6

  • //
  • spec/
  • job/
  • job000089
  • View
  • Commits
  • Open Download .zip Download (4 KB)
# The form data below was edited by paul_allen
# Perforce Workshop Jobs
#
#  Job:           The job name. 'new' generates a sequenced job number.
#  Status:        Job status; [open/closed/suspended].  Required
#  Project:       The project this job is for. Required.
#  Severity:      [A/B/C] (A is highest)  Required.
#  ReportedBy     The user who created the job. Can be changed.
#  ReportedDate:  The date the job was created.  Automatic.
#  ModifiedBy:    The user who last modified this job. Automatic.
#  ModifiedDate:  The date this job was last modified. Automatic.
#  OwnedBy:       The owner, responsible for doing the job. Optional.
#  Description:   Description of the job.  Required.
#  DevNotes:      Developer's comments.  Optional.

Job:	job000089

Status:	closed

Project:	perforce-software-p4convert

Severity:	A

ReportedBy:	norman_morse

ReportedDate:	2014/11/05 16:41:34

ModifiedBy:	paul_allen

ModifiedDate:	2014/12/15 04:14:57

Description:
	CVS Conversion of 4GB repository in Import mode runs out of memory.
	
	In a Java VM with 2GB of memory the conversion fails with an OutOfMemoryError:  GC overhead limit exceeded.
	
	It failed in "Building a revision list" at 23%
	
	Here is the stack trace:
	
	java.lang.OutOfMemoryError: GC overhead limit exceeded
		at java.util.Arrays.copyOf(Arrays.java:2219)
		at java.util.ArrayList.toArray(ArrayList.java:358)
		at java.util.ArrayList.<init>(ArrayList.java:164)
		at com.perforce.cvs.RcsNavigator.getBranchId(RcsNavigator.java:181)
		at com.perforce.cvs.RcsNavigator.followCodeLine(RcsNavigator.java:90)
		at com.perforce.cvs.RcsNavigator.followCodeLine(RcsNavigator.java:132)
		at com.perforce.cvs.RcsNavigator.add(RcsNavigator.java:69)
		at com.perforce.cvs.process.CvsProcessChange.processChange(CvsProcessChange.java:107)
		at com.perforce.common.process.ProcessChange.runSingle(ProcessChange.java:86)
		at com.perforce.common.process.ProcessChange.call(ProcessChange.java:49)
		at com.perforce.common.process.ProcessChange.call(ProcessChange.java:19)
		at java.util.concurrent.FutureTask.run(FutureTask.java:262)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
		at java.lang.Thread.run(Thread.java:744)
	Caught EXIT shutting down ...
	
	The exception caused a heap dump to take place, and I analyzed the results with eclipse MAT
	Class Name                                                           Shallow Heap | Retained Heap | Percentage
	---------------------------------------------------------------------------------------------------------------
	java.lang.Thread @ 0x1187a66a8  pool-1-thread-1 Native Stack, Thread |        104 | 1,887,101,856 |     99.91%
	|- com.perforce.cvs.RevisionSorter @ 0x11a474f00                     |         24 | 1,822,811,856 |     96.51%
	|  '- java.util.ArrayList @ 0x11a466240                              |         24 | 1,822,811,832 |     96.51%
	|     '- java.lang.Object[4102267] @ 0x16528ff70                     | 16,409,088 | 1,822,811,808 |     96.51%
	|        |- com.perforce.cvs.RevisionEntry @ 0x1305b7e98             |         72 |        90,560 |      0.00%
	|        |- com.perforce.cvs.RevisionEntry @ 0x13054f828             |         72 |        90,552 |      0.00%
	|        |- com.perforce.cvs.RevisionEntry @ 0x130512bc0             |         72 |        90,544 |      0.00%
	|        |- com.perforce.cvs.RevisionEntry @ 0x1305ea188             |         72 |        90,544 |      0.00%
	|      <more lines like the 4 above>
	---------------------------------------------------------------------------------------------------------------
	
	It looks like 16 million discrete revisions are causing retained memory to exceed 2GB.
	Perhaps we need a way to store this information in a file or a Database.
	
	I will email the complete results to paul seperately.

DevNotes:
# Change User Description Committed
#6 default
#5 default
#4 default
#3 default
#2 default
#1 default