[JIRA] [multi-branch-project-plugin] (JENKINS-35460) Multibranch Plugin: branch indexing causes java heap out of space error

1 view
Skip to first unread message

itaisanders@gmail.com (JIRA)

unread,
Jun 8, 2016, 5:03:01 AM6/8/16
to jenkinsc...@googlegroups.com
Itai Sanders created an issue
 
Jenkins / Bug JENKINS-35460
Multibranch Plugin: branch indexing causes java heap out of space error
Issue Type: Bug Bug
Assignee: Matthew DeTullio
Components: multi-branch-project-plugin
Created: 2016/Jun/08 9:02 AM
Environment: master runs on Windows Server 2012
Jenkins 2.8
Priority: Major Major
Reporter: Itai Sanders

we are migrating our jobs to the multibranch pipelines, about a dozen or more.
all of them work fine, but one repository wouldn't pass the branch indexing process. the process gets stuck and eventually fails with the following log message:
??Setting origin to https://git.....
Fetching origin...
Finished: NOT_BUILT??

after double and triple checking all our configurations and repositories, we couldn't find any difference between this repository and the others. I went through the Jenkins Log and found out that whenever this particular branch indexing fails the log prints out a java heap out of memory error.
it doesn't show the full message on every such error, so I can only assume the first one of those is the relevant full stack trace:

Jun 08, 2016 11:31:22 AM SEVERE hudson.model.Executor finish1
Executor threw an exception
java.lang.OutOfMemoryError: Java heap space
	at org.eclipse.jgit.internal.storage.pack.BinaryDelta.apply(BinaryDelta.java:163)
	at org.eclipse.jgit.internal.storage.pack.BinaryDelta.apply(BinaryDelta.java:118)
	at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:610)
	at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:587)
	at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:550)
	at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:507)
	at org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:194)
	at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:448)
	at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:762)
	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:363)
	at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(TransportHttp.java:783)
	at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:301)
	at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:291)
	at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:247)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:160)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:678)
	at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:174)
	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:146)
	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:157)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)

again - we have no idea what makes the difference. the repository itself isn't bigger than the others, we don't have special characters in our branch names (only alphanomerics . - _ and such. no spaces and no escaped chars) and all the repositories are hosted in Assembla.

running this same job as a regular pipeline job works. it's only the branch indexing that causes this problem. so my guess is that the heap space should be sufficient, but something somehow throws the indexing process into an infinite recursion (or something of the kind).

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

itaisanders@gmail.com (JIRA)

unread,
Jun 8, 2016, 5:04:05 AM6/8/16
to jenkinsc...@googlegroups.com
Itai Sanders updated an issue
Change By: Itai Sanders
we are migrating our jobs to the multibranch pipelines, about a dozen or more.
all of them work fine, but one repository wouldn't pass the branch indexing process. the process gets stuck and eventually fails with the following log message:
?? {noformat}
Setting origin to https://git.....
Fetching origin...
Finished: NOT_BUILT
??
{noformat}


after double and triple checking all our configurations and repositories, we couldn't find any difference between this repository and the others. I went through the Jenkins Log and found out that whenever this particular branch indexing fails the log prints out a java heap out of memory error.
it doesn't show the full message on every such error, so I can only assume the first one of those is the relevant full stack trace:


{noformat}
{noformat}


again - we have no idea what makes the difference. the repository itself isn't bigger than the others, we don't have special characters in our branch names (only alphanomerics . - _ and such. no spaces and no escaped chars) and all the repositories are hosted in Assembla.

running this same job as a regular pipeline job works. it's only the branch indexing that causes this problem. so my guess is that the heap space should be sufficient, but something somehow throws the indexing process into an infinite recursion (or something of the kind).

itaisanders@gmail.com (JIRA)

unread,
Jun 8, 2016, 7:36:01 AM6/8/16
to jenkinsc...@googlegroups.com
Itai Sanders commented on Bug JENKINS-35460
 
Re: Multibranch Plugin: branch indexing causes java heap out of space error

just an update on our situation that might shed some light on this:

I went to the .git dirs inside the cache dir and compared the on of the problematic repo to one of the others. I found that some files were missing, probably files that should be created in the initial fetch that was broken in mid process. I copied FETCH_HEAD, logs/, objects/ and refs/ from my own local (working copy) .git of the same repo into the jenkins cache one and ran another branch indexing. I guess it recognized the files and skipped the initial fetch straight to the update process since everything seems to work now.
I made sure that it now recognizes new branches and everything seems to work fine.

to validate this I the deleted the cached dir and the branch indexing indeed crashed again like before, leaving behind a half built dir. I copied back the above file and dirs and everything started working normally again.

mjdetullio@gmail.com (JIRA)

unread,
Jun 8, 2016, 10:26:02 AM6/8/16
to jenkinsc...@googlegroups.com
Matthew DeTullio updated an issue
 
Change By: Matthew DeTullio
Component/s: workflow-multibranch-plugin
Component/s: multi-branch-project-plugin

mjdetullio@gmail.com (JIRA)

unread,
Jun 8, 2016, 10:26:02 AM6/8/16
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Feb 6, 2017, 2:15:02 PM2/6/17
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Mark Waite
Change By: Jesse Glick
Component/s: git-plugin
Component/s: workflow-multibranch-plugin
Labels: multibranch
Assignee: Manuel Recena Soto Mark Waite
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 6, 2017, 5:50:01 PM2/6/17
to jenkinsc...@googlegroups.com

stephen.alan.connolly@gmail.com (JIRA)

unread,
Mar 1, 2017, 5:03:03 AM3/1/17
to jenkinsc...@googlegroups.com

stephen.alan.connolly@gmail.com (JIRA)

unread,
Mar 1, 2017, 11:55:04 AM3/1/17
to jenkinsc...@googlegroups.com
Stephen Connolly resolved as Incomplete
 

WIthout either a heap dump or a sample repo to reproduce with, it is unclear how we can progress this issue further

Change By: Stephen Connolly
Status: Open Resolved
Resolution: Incomplete

stephen.alan.connolly@gmail.com (JIRA)

unread,
Mar 1, 2017, 11:55:05 AM3/1/17
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 22, 2019, 9:34:07 PM10/22/19
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Incomplete
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages