镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

basic clone crash on 10.7.2 #74

Open

Description

@edhemphill

Maybe I am missing something here but... this is using npm install 0.17.2

$ cat clone.js 

var gitteh = require("gitteh");
var path = require("path");
var temp = require("temp");

var repoPath = temp.mkdirSync();
var repo = "https://github.com/libgit2/node-gitteh.git";

console.log("Cloning " + repo + " into " + repoPath);
var clone = gitteh.clone(repo, repoPath);

clone.on("status", function(bytes, total, done) {
    var updateString = "Transferred " + bytes + " bytes.";
    if(done > 0) updateString += " (" + done + "/" + total + " objects )"
    process.stdout.write("\r" + updateString);
});

clone.on("complete", function(repo) {
    console.log("\n... Complete!");
    console.log(repo);
});

clone.on("error", function(err) {
    console.log("\n... Error during clone!");
    console.error(err);
});

and then:

$ node -v
v0.10.24

$ gdb --args node clone.js 
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/local/bin/node...done.
(gdb) r
Starting program: /usr/local/bin/node clone.js
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7ff7700 (LWP 58687)]
Cloning https://github.com/libgit2/node-gitteh.git into /tmp/d-11478-58684-n7qwrr
[New Thread 0x7ffff653f700 (LWP 58688)]
[New Thread 0x7ffff5d3e700 (LWP 58689)]
[New Thread 0x7ffff553d700 (LWP 58690)]
[New Thread 0x7ffff4d3c700 (LWP 58691)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff553d700 (LWP 58690)]
0x00007ffff69d35a0 in gitteh::Baton::setError(git_error const*) () from /home/ed/work/testnodegit.orig/node_modules/gitteh/build/Release/gitteh.node
(gdb) bt
#0  0x00007ffff69d35a0 in gitteh::Baton::setError(git_error const*) () from /home/ed/work/testnodegit.orig/node_modules/gitteh/build/Release/gitteh.node
#1  0x00000000009652bd in worker (arg=arg@entry=0x0) at ../deps/uv/src/unix/threadpool.c:74
#2  0x000000000095aa52 in uv__thread_start (ctx_v=<optimized out>) at ../deps/uv/src/uv-common.c:322
#3  0x00007ffff6fa2e9a in start_thread (arg=0x7ffff553d700) at pthread_create.c:308
#4  0x00007ffff6ccf3fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()
(gdb) 

Any ideas? Maybe it's something really obvious. I am having trouble doing basic cloning with 'nodegit' also...

Activity

  1. samcday commented on Aug 25, 2014

    @samcday
    Contributor

    Hmm. That does look weird. @deepak1556 any ideas?

  2. deepak1556 commented on Aug 27, 2014

    @deepak1556
    Member

    hey sry for the slow response, i couldnt reproduce this with v0.17.2 but there is problem with src attribute of fetchspec not being set. We need to update to latest libgit2 api , will work over this weekend hopefully fixing this problem..

    codio@everest-sample:~/workspace$ node examples/clone.js                                                                                                                                                                                          
    Cloning https://github.com/libgit2/node-gitteh.git into /tmp/d-11473-1494-1i7tmfy                                                                                                                                                                 
    { fetchSpecs: [ '+refs/heads/*:refs/remotes/origin/*' ],                                                                                                                                                                                          
      pushSpecs: [],                                                                                                                                                                                                                                  
      name: 'origin',                                                                                                                                                                                                                                 
      url: 'https://github.com/libgit2/node-gitteh.git' }                                                                                                                                                                                             
    
    /home/codio/workspace/lib/gitteh.js:142                                                                                                                                                                                                           
          if (refName.length <= _priv.srcRoot.length) {                                                                                                                                                                                               
                                             ^                                                                                                                                                                                                        
    TypeError: Cannot read property 'length' of undefined                                                                                                                                                                                             
        at Refspec.Gitteh.Refspec.Refspec.matchesSrc (/home/codio/workspace/lib/gitteh.js:142:42)                                                                                                                                                     
        at Refspec.Gitteh.Refspec.Refspec.transformTo (/home/codio/workspace/lib/gitteh.js:168:17)                                                                                                                                                    
        at /home/codio/workspace/lib/gitteh.js:396:41                                                                                                                                                                                                 
        at /home/codio/workspace/lib/gitteh.js:62:17 
    
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