Skip to content

lfs is not tracking any files and sometimes crashes #794

@N-Coder

Description

@N-Coder

Even though I tracked a whole directory with "git lfs track resources", new or changed files in that directory don't show up.
Running "git reset HEAD '*' && git add -A" sometimes seems to refresh the lfs status so that it is displayed correctly, but that doesn't work reliably.
Sometimes when running git lfs status I get the following error:

$ git lfs status
fatal error: bad map state

goroutine 6 [running]:
runtime.throw(0x895db0, 0xd)
    /usr/local/go/src/runtime/panic.go:527 +0x90 fp=0xc82003ec70 sp=0xc82003ec58
runtime.evacuate(0x755f20, 0xc8200b60c0, 0x1)
    /usr/local/go/src/runtime/hashmap.go:825 +0x3b1 fp=0xc82003ed30 sp=0xc82003ec70
runtime.growWork(0x755f20, 0xc8200b60c0, 0x0)
    /usr/local/go/src/runtime/hashmap.go:795 +0x83 fp=0xc82003ed50 sp=0xc82003ed30
runtime.mapassign1(0x755f20, 0xc8200b60c0, 0xc82003eec0, 0xc82003ee48)
    /usr/local/go/src/runtime/hashmap.go:433 +0x176 fp=0xc82003edf8 sp=0xc82003ed50
github.com/github/git-lfs/lfs.revListIndex.func1(0xc82000b960, 0xc8200b60c0, 0xc820020f60)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:300 +0x493 fp=0xc82003ef98 sp=0xc82003edf8
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82003efa0 sp=0xc82003ef98
created by github.com/github/git-lfs/lfs.revListIndex
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:305 +0x20c

goroutine 1 [runnable]:
syscall.Syscall(0x3, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.Close(0xd, 0x0, 0x0)
    /usr/local/go/src/syscall/zsyscall_linux_amd64.go:296 +0x4a
syscall.forkExec(0xc8200c4460, 0x19, 0xc8200b67b0, 0x3, 0x3, 0xc820053530, 0x5de9, 0x0, 0x0)
    /usr/local/go/src/syscall/exec_unix.go:203 +0x59c
syscall.StartProcess(0xc8200c4460, 0x19, 0xc8200b67b0, 0x3, 0x3, 0xc820053530, 0x2, 0x4, 0x0, 0x0)
    /usr/local/go/src/syscall/exec_unix.go:240 +0x6b
os.startProcess(0xc8200c4460, 0x19, 0xc8200b67b0, 0x3, 0x3, 0xc820053768, 0xc82000dc00, 0x0, 0x0)
    /usr/local/go/src/os/exec_posix.go:45 +0x33c
os.StartProcess(0xc8200c4460, 0x19, 0xc8200b67b0, 0x3, 0x3, 0xc820053768, 0x0, 0x0, 0x0)
    /usr/local/go/src/os/doc.go:24 +0x69
os/exec.(*Cmd).Start(0xc8200a0f00, 0x0, 0x0)
    /usr/local/go/src/os/exec/exec.go:328 +0x767
github.com/github/git-lfs/lfs.startCommand(0x88c420, 0x3, 0xc8200539e8, 0x2, 0x2, 0xc8200c4440, 0x0, 0x0)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:433 +0x325
github.com/github/git-lfs/lfs.catFileBatch(0xc820021200, 0xc820021200, 0x0, 0x0)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:359 +0xa6
github.com/github/git-lfs/lfs.ScanIndex(0x0, 0x0, 0x0, 0x0, 0x0)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:187 +0x290
github.com/github/git-lfs/commands.statusCommand(0xab4220, 0xadd610, 0x0, 0x0)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/commands/command_status.go:27 +0xbd
github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).execute(0xab4220, 0xadd610, 0x0, 0x0, 0x0, 0x0)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra/command.go:477 +0x403
github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).Execute(0xab4d80, 0x0, 0x0)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra/command.go:551 +0x46a
github.com/github/git-lfs/commands.Run()
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/commands/commands.go:88 +0x23
main.main()
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/git-lfs.go:9 +0x14

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 8 [chan send]:
github.com/github/git-lfs/lfs.ScanIndex.func2(0xc820020f60, 0xc8200210e0, 0xc820021080)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:171 +0x19c
created by github.com/github/git-lfs/lfs.ScanIndex
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:180 +0x219

goroutine 9 [syscall]:
syscall.Syscall(0x0, 0x6, 0xc8200d6000, 0x4000, 0x0, 0x0, 0x0)
    /usr/local/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0x6, 0xc8200d6000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
    /usr/local/go/src/syscall/zsyscall_linux_amd64.go:783 +0x5f
syscall.Read(0x6, 0xc8200d6000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
    /usr/local/go/src/syscall/syscall_unix.go:160 +0x4d
os.(*File).read(0xc820032158, 0xc8200d6000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
    /usr/local/go/src/os/file_unix.go:211 +0x53
os.(*File).Read(0xc820032158, 0xc8200d6000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
    /usr/local/go/src/os/file.go:95 +0x8a
bufio.(*Reader).fill(0xc8200211a0)
    /usr/local/go/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Read(0xc8200211a0, 0xc8200dc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/go/src/bufio/bufio.go:207 +0x260
bufio.(*Scanner).Scan(0xc820043f20, 0x1000)
    /usr/local/go/src/bufio/scan.go:180 +0x877
github.com/github/git-lfs/lfs.catFileBatchCheck.func1(0xc8200c4440, 0xc820021200)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:325 +0x101
created by github.com/github/git-lfs/lfs.catFileBatchCheck
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:342 +0x138

goroutine 10 [runnable]:
github.com/github/git-lfs/lfs.catFileBatchCheck.func2(0xc8200210e0, 0xc8200c4440)
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:345 +0x65
created by github.com/github/git-lfs/lfs.catFileBatchCheck
    /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.0.0/src/github.com/github/git-lfs/lfs/scanner.go:349 +0x167

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions