talisman icon indicating copy to clipboard operation
talisman copied to clipboard

Stack trace when pushing repo

Open cburgmer opened this issue 7 years ago • 6 comments

I've tried to push 3 commits, which failed with the following error.

There's nothing really irregular in particular which is causing this. My changeset included a package-lock.json file with others that are called out in .talismanignore.

goroutine 1 [running]:
runtime.Gosched()
    /opt/golang/src/runtime/proc.go:166 +0x14 fp=0xc820043638 sp=0xc820043628
runtime.gcAssistAlloc(0x10000, 0xc81ffdab01)
    /opt/golang/src/runtime/mgcmark.go:277 +0x204 fp=0xc820043698 sp=0xc820043638
runtime.mallocgc(0x10000, 0x1422e0, 0x1, 0x12c31)
    /opt/golang/src/runtime/malloc.go:711 +0x535 fp=0xc820043768 sp=0xc820043698
runtime.newarray(0x1422e0, 0xff82, 0x12d0b)
    /opt/golang/src/runtime/malloc.go:777 +0xc9 fp=0xc8200437a8 sp=0xc820043768
runtime.makeslice(0x13a300, 0x0, 0xff82, 0x0, 0x0, 0x0)
    /opt/golang/src/runtime/slice.go:32 +0x165 fp=0xc8200437f8 sp=0xc8200437a8
io/ioutil.readAll(0x4b4388, 0xc8204a2010, 0xff82, 0x0, 0x0, 0x0, 0x0, 0x0)
    /opt/golang/src/io/ioutil/ioutil.go:19 +0x9d fp=0xc8200438f0 sp=0xc8200437f8
io/ioutil.ReadFile(0xc82049e200, 0x3d, 0x0, 0x0, 0x0, 0x0, 0x0)
    /opt/golang/src/io/ioutil/ioutil.go:70 +0x19f fp=0xc8200439b8 sp=0xc8200438f0
github.com/thoughtworks/talisman/git_repo.GitRepo.ReadRepoFile(0xc82000a0c4, 0x1f, 0xc8200a30bc, 0x1d, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/jack/gohome/src/github.com/thoughtworks/talisman/git_repo/git_repo.go:85 +0x115 fp=0xc820043a40 sp=0xc8200439b8
github.com/thoughtworks/talisman/git_repo.GitRepo.AdditionsWithinRange(0xc82000a0c4, 0x1f, 0xc8200920cd, 0x28, 0xc820092092, 0x28, 0x0, 0x0, 0x0)
    /home/jack/gohome/src/github.com/thoughtworks/talisman/git_repo/git_repo.go:63 +0x1ac fp=0xc820043c20 sp=0xc820043a40
main.(*PrePushHook).getRepoAdditions(0xc820043ea0, 0x0, 0x0, 0x0)
    /home/jack/gohome/src/github.com/thoughtworks/talisman/pre_push_hook.go:70 +0xaf fp=0xc820043c90 sp=0xc820043c20
main.(*PrePushHook).GetRepoAdditions(0xc820043ea0, 0x0, 0x0, 0x0)
    /home/jack/gohome/src/github.com/thoughtworks/talisman/pre_push_hook.go:56 +0xc39 fp=0xc820043d38 sp=0xc820043c90
main.run(0x4b4388, 0xc820030008, 0x2c9200, 0x1c2970, 0x8, 0x1e1e80)
    /home/jack/gohome/src/github.com/thoughtworks/talisman/talisman.go:67 +0x4c7 fp=0xc820043ee8 sp=0xc820043d38
main.main()
    /home/jack/gohome/src/github.com/thoughtworks/talisman/talisman.go:45 +0x158 fp=0xc820043f50 sp=0xc820043ee8
runtime.main()
    /opt/golang/src/runtime/proc.go:111 +0x2b0 fp=0xc820043fa0 sp=0xc820043f50
runtime.goexit()
    /opt/golang/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc820043fa8 sp=0xc820043fa0
error: failed to push some refs to 'ssh://[email protected]_domain:1234/dir/my-project.git'

cburgmer avatar Nov 29 '17 13:11 cburgmer

I had exactly the same and turned out talisman doesn't handle files with hex/base64 content (at least that's what the message was). For me it was the files (vendor/* and Gopkg.*) generated by a 'dep init;dep ensure', so suspect your commit has files with that content detected. In my case, fix was to add the path and files to .talismanignore.

To the devs: if hex/base64 encoded content is an issue, then shouldn't it just be ignored and not result in failure?

jonhadfield avatar Dec 05 '17 14:12 jonhadfield

+1 same error:

runtime stack:
runtime.throw(0x1f53a0, 0x2a)
	/opt/golang/src/runtime/panic.go:527 +0x90
runtime.sigpanic()
	/opt/golang/src/runtime/sigpanic_unix.go:12 +0x5a
runtime.(*gcWork).tryGet(0xc82001e720, 0x4bc210)
	/opt/golang/src/runtime/mgcwork.go:114 +0x5e
runtime.gcDrainN(0xc82001e720, 0x1296)
	/opt/golang/src/runtime/mgcmark.go:775 +0x6b
runtime.gcAssistAlloc.func1()
	/opt/golang/src/runtime/mgcmark.go:232 +0x172
runtime.systemstack(0xc82001ea00)
	/opt/golang/src/runtime/asm_amd64.s:262 +0x79
runtime.mstart()
	/opt/golang/src/runtime/proc1.go:674

goroutine 1 [running]:
runtime.systemstack_switch()
	/opt/golang/src/runtime/asm_amd64.s:216 fp=0xc8200ff4a0 sp=0xc8200ff498
runtime.gcAssistAlloc(0x10, 0x1)
	/opt/golang/src/runtime/mgcmark.go:272 +0x1f8 fp=0xc8200ff500 sp=0xc8200ff4a0
runtime.mallocgc(0x10, 0x0, 0x3, 0x1)
	/opt/golang/src/runtime/malloc.go:711 +0x535 fp=0xc8200ff5d0 sp=0xc8200ff500
runtime.rawstring(0x4, 0x0, 0x0, 0x0, 0x0, 0x0)
	/opt/golang/src/runtime/string.go:264 +0x70 fp=0xc8200ff618 sp=0xc8200ff5d0
runtime.intstring(0x0, 0x73, 0x0, 0x0)
	/opt/golang/src/runtime/string.go:217 +0x10c fp=0xc8200ff678 sp=0xc8200ff618
github.com/thoughtworks/talisman/detector.(*Entropy).GetEntropyCandidatesWithinWord(0x2c9480, 0xc82042eeb2, 0x1a, 0x14, 0xc8200ed6b0, 0x0, 0x0, 0x0)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/detector/shannon_entropy.go:34 +0x13e fp=0xc8200ff740 sp=0xc8200ff678
github.com/thoughtworks/talisman/detector.(*Base64Detector).checkBase64Encoding(0xc820011960, 0xc82042eeb2, 0x1a, 0x0, 0x0)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/detector/base64_detector.go:29 +0x71 fp=0xc8200ff7f0 sp=0xc8200ff740
github.com/thoughtworks/talisman/detector.(*FileContentDetector).checkEachWord(0xc8201178e0, 0xc82042eea4, 0x28, 0x0, 0x0, 0x0)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/detector/filecontent_detector.go:74 +0x155 fp=0xc8200ff8c8 sp=0xc8200ff7f0
github.com/thoughtworks/talisman/detector.(*FileContentDetector).checkEachLine(0xc8201178e0, 0xc820428000, 0x100f8, 0x0, 0x0, 0x0)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/detector/filecontent_detector.go:62 +0x15f fp=0xc8200ff9c0 sp=0xc8200ff8c8
github.com/thoughtworks/talisman/detector.(*FileContentDetector).detectFile(0xc8201178e0, 0xc820098000, 0x100f8, 0x102f8, 0x0, 0x0, 0x0)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/detector/filecontent_detector.go:55 +0x7f fp=0xc8200ffa08 sp=0xc8200ff9c0
github.com/thoughtworks/talisman/detector.(*FileContentDetector).Test(0xc8201178e0, 0xc820060d00, 0x7, 0x7, 0xc8200ce200, 0x20, 0x20, 0xc820012780)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/detector/filecontent_detector.go:37 +0x789 fp=0xc8200ffc10 sp=0xc8200ffa08
github.com/thoughtworks/talisman/detector.(*Chain).Test(0xc8200105c0, 0xc820060d00, 0x7, 0x7, 0xc8200ce200, 0x20, 0x20, 0xc820012780)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/detector/detector.go:43 +0xfd fp=0xc8200ffca8 sp=0xc8200ffc10
main.(*Runner).doRun(0xc8200ffe40)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/runner.go:39 +0xa0 fp=0xc8200ffd08 sp=0xc8200ffca8
main.(*Runner).RunWithoutErrors(0xc8200ffe40, 0xc820012780)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/runner.go:32 +0x21 fp=0xc8200ffd18 sp=0xc8200ffd08
main.run(0x4b4388, 0xc820030008, 0x2c9200, 0x1c2b30, 0x8, 0x1e2060)
	/home/jack/gohome/src/github.com/thoughtworks/talisman/talisman.go:70 +0x3c0 fp=0xc8200ffec8 sp=0xc8200ffd18
main.main()
	/home/jack/gohome/src/github.com/thoughtworks/talisman/talisman.go:45 +0x158 fp=0xc8200fff30 sp=0xc8200ffec8
runtime.main()
	/opt/golang/src/runtime/proc.go:111 +0x2b0 fp=0xc8200fff80 sp=0xc8200fff30
runtime.goexit()
	/opt/golang/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc8200fff88 sp=0xc8200fff80

MrFatt avatar Dec 26 '17 01:12 MrFatt

For me this is becoming a showstopper. I can't just walk away from my desk and expect git to push once the tests are green. For now I will be removing talisman.

cburgmer avatar Jan 09 '18 06:01 cburgmer

+1 same error. Tested on High Sierra 10.13.2, talisman_darwin_amd64, v0.3.0 Sierra 10.12.x is ok.

dongyuwei avatar Jan 10 '18 06:01 dongyuwei

Any steps to reproduce this? Is this in any way similar to #10 ?

harinee avatar Oct 05 '19 21:10 harinee

For me, it was base64 encoded content.

jonhadfield avatar Oct 06 '19 06:10 jonhadfield