Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Talisman scan brings to OOM on large repository #181

Open
mefistofeel opened this issue Feb 13, 2020 · 1 comment
Open

Talisman scan brings to OOM on large repository #181

mefistofeel opened this issue Feb 13, 2020 · 1 comment

Comments

@mefistofeel
Copy link

mefistofeel commented Feb 13, 2020

Describe the bug
I have a large Repo (607.7 MiB /.git), if I run a Talisman scan on this repo, it's exit with code 2 and following error:

`14:24:12 fatal error: runtime: out of memory

14:24:12 runtime stack:

14:24:12 runtime.throw(0x8b562a, 0x16)

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/panic.go:774 +0x72

14:24:12 runtime.sysMap(0xc0c0000000, 0x4000000, 0xed93f8)

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/mem_linux.go:169+0xc5

14:24:12 runtime.(*mheap).sysAlloc(0xec0f80, 0xd50000, 0x79f380, 0x1280023b177)

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/malloc.go:701 +0x1cd

14:24:12 runtime.(*mheap).grow(0xec0f80, 0x6a8, 0xffffffff)

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/mheap.go:1255 +0xa3

14:24:12 runtime.(*mheap).allocSpanLocked(0xec0f80, 0x6a8, 0xed9408, 0x41f495)

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/mheap.go:1170 +0x266

14:24:12 runtime.(*mheap).alloc_m(0xec0f80, 0x6a8, 0x7f4256a20101, 0x7f4256a2d918)

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/mheap.go:1022 +0xc2

14:24:12 runtime.(*mheap).alloc.func1()

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/mheap.go:1093 +0x4c

14:24:12 runtime.(*mheap).alloc(0xec0f80, 0x6a8, 0x7f4284010101, 0x7f42842543a8)

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/mheap.go:1092 +0x8a

14:24:12 runtime.largeAlloc(0xd4e6fe, 0x830101, 0x833380)

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/malloc.go:1138 +0x97

14:24:12 runtime.mallocgc.func1()

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/malloc.go:1033 +0x46

14:24:12 runtime.systemstack(0x0)

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/asm_amd64.s:370 +0x66

14:24:12 runtime.mstart()

14:24:12 /home/travis/.gimme/versions/go1.13.4.linux.amd64/src/runtime/proc.go:1146`

Machine on which I run a scan have 4*3.2GHz and 8Gb of RAM.

@mefistofeel
Copy link
Author

as a workaround I have changed git option at scanner.go

out, err := exec.Command("git", "log", "--all", "--pretty=%H").CombinedOutput()
from "--all" to "--max-count=10", its scan only last 10 commits.

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

No branches or pull requests

2 participants