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

using --local and --csv-path leads to deadlock #72

Open
tpcgold opened this issue Nov 16, 2020 · 2 comments
Open

using --local and --csv-path leads to deadlock #72

tpcgold opened this issue Nov 16, 2020 · 2 comments

Comments

@tpcgold
Copy link

tpcgold commented Nov 16, 2020

Following command:
shhgit --config-path "G:\My Drive\Repositories\shhgit" --local "G:\My Drive\Repositories" --csv-path "G:\My Drive\Repositories"

leads to a deadlock, without using the "CSV export" it's working.
(The error occurs no matter where csv-path is located)

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [semacquire, locked to thread]:
sync.runtime_SemacquireMutex(0x140a438, 0x0, 0x1)
        c:/go/src/runtime/sema.go:71 +0x4e
sync.(*Mutex).lockSlow(0x140a434)
        c:/go/src/sync/mutex.go:138 +0x10f
sync.(*Mutex).Lock(...)
        c:/go/src/sync/mutex.go:81
sync.(*Once).doSlow(0x140a430, 0x1117320)
        c:/go/src/sync/once.go:62 +0x113
sync.(*Once).Do(...)
        c:/go/src/sync/once.go:57
github.com/eth0izzle/shhgit/core.GetSession(0x0)
        G:/My Drive/Repositories/shhgit/core/session.go:163 +0x65
github.com/eth0izzle/shhgit/core.LogIfError(0x11024a8, 0x1e, 0x117a100, 0xc0003b0120)
        G:/My Drive/Repositories/shhgit/core/util.go:39 +0x45
github.com/eth0izzle/shhgit/core.(*Session).InitCsvWriter(0xc0000cc5a0)
        G:/My Drive/Repositories/shhgit/core/session.go:144 +0xe5
github.com/eth0izzle/shhgit/core.(*Session).Start(0xc0000cc5a0)
        G:/My Drive/Repositories/shhgit/core/session.go:47 +0x126
github.com/eth0izzle/shhgit/core.GetSession.func1()
        G:/My Drive/Repositories/shhgit/core/session.go:181 +0x285
sync.(*Once).doSlow(0x140a430, 0x1117320)
        c:/go/src/sync/once.go:66 +0xf7
sync.(*Once).Do(...)
        c:/go/src/sync/once.go:57
github.com/eth0izzle/shhgit/core.GetSession(0x19)
        G:/My Drive/Repositories/shhgit/core/session.go:163 +0x65
main.init()
        G:/My Drive/Repositories/shhgit/main.go:27 +0x29
@tpcgold tpcgold changed the title using --local and --csv-path lead to deadlock using --local and --csv-path leads to deadlock Nov 16, 2020
@KrustyHack
Copy link

KrustyHack commented Jan 5, 2021

Ay,

Did you try to change CSV path outside of the app path ?

Example :

shhgit --config-path "G:\My Drive\Repositories\shhgit" --local "G:\My Drive\Repositories" --csv-path "G:\My Drive\shhgitReports"

EDIT : nevermind, I didn't saw your message : "The error occurs no matter where csv-path is located", sorry.
EDIT 2 : I tested with my Docker image and I got the same error here.

@dshockley-hippo
Copy link

dshockley-hippo commented Aug 31, 2021

i played around with it and tried to give it a file to name. it worked. you have to name the file to output it to. it doesnt output it to a directory with results for each individual repo scanned.
my example:
shhgit --config-path /opt/scripts/ --local /opt/test/ --csv-path /opt/results/stuff

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

No branches or pull requests

3 participants