FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Malloc bug with fetchAll and ssh. · Issue #907 · nodegit/nodegit · GitHub

Repository navigation

Malloc bug with fetchAll and ssh. #907

Description

Hi,

I have a bug with fetchAll action.

I make this simple code for testing this bugs:

'use strict';
var path = require('path');
var Git = require('nodegit');

var fetchOpts = {
  callbacks: {
    certificateCheck: function() { return 1; },
    credentials: function(url, userName) {
      return Git.Cred.sshKeyNew('git', path.resolve('/Users/holblin/.ssh/id_rsa.pub'), path.resolve('/Users/holblin/.ssh/id_rsa'), '');
    }
  }
};

Promise.resolve()
.then(function() {
  var all =[];
  for (var i = 0; i < 2; i++) {
    all.push(updateIt('repo_'+i));
  }
  return Promise.all(all);
})

function updateIt(i) {
  var repository, localHeadCommit;
  var dir = 'tests/'+i;

  return Git.Repository.open(dir)
    .then((repo) => repository = repo) // save the reference for futur use
    .then(() => console.log('['+i+'] openRepo'))
    .then(() => repository.fetchAll(fetchOpts)) // fetch all data from all remotes
    .then(() => console.log('['+i+'] fetchAll'))
}

For use it, make this commands first:

npm -i path nodegit
mkdir tests
cd tests
git clone git@<repository1_git_url>.git repo_0
git clone git@<repository2_git_url>.git repo_1
cd ..

I have a Mac os, X yosemite version 10.10.5. I use nvm with node v5.5.0.
My uname -a is Darwin zolesio 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64.
The nodegit version is: nodegit@0.11.1

Sometimes, it finished with:

[repo_0] openRepo
[repo_1] openRepo
node(5166,0x1026cd000) malloc: *** error for object 0x102303d00: pointer being realloc'd was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

Sometimes with:

[repo_0] openRepo
[repo_1] openRepo
node(5058,0x105087000) malloc: *** error for object 0x10170e960: double free
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

Sometimes with:

[repo_0] openRepo
[repo_1] openRepo
Bus error: 10

Sometimes with getting stuck and use 200% of my CPU.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL