Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Possibly doesn't work with large responses? #17

Open
tboerger opened this issue Sep 11, 2019 · 4 comments
Open

Possibly doesn't work with large responses? #17

tboerger opened this issue Sep 11, 2019 · 4 comments
Labels

Comments

@tboerger
Copy link

If I try to run audit for the owncloud GitHub org it results in an seg fault because of an invalid memory address or nil pointer dereference issue. That's what I get from audit:

# audit -d --orgs owncloud
DEBU[0000] Getting current user...
DEBU[0000] current user is tboerger
DEBU[0000] Setting affiliations to OWNER,COLLABORATOR,ORGANIZATION_MEMBER
DEBU[0000] Getting repositories for org owncloud...
DEBU[0000] Executing GraphQL query to fetch repos under org owncloud
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x126ac1d]

goroutine 1 [running]:
main.(*GQLClient).Execute(0xc0000dfdb0, 0xc000458800, 0x71c, 0xc0004bcbd0, 0x1295a00, 0xc00041a7d0, 0x12922c0, 0xc000473920, 0x0, 0x0)
	/Users/thomas/Golang/src/github.com/genuinetools/audit/graphql.go:83 +0x43d
main.getRepositories(0x137a280, 0xc0000b6040, 0xc000128000, 0xc0000dfdb0, 0xc0004bcba0, 0x3, 0x3, 0x0, 0x0, 0x7ffeefbfe988, ...)
	/Users/thomas/Golang/src/github.com/genuinetools/audit/main.go:179 +0x32e
main.main.func2(0x137a280, 0xc0000b6040, 0xc0000120f0, 0x0, 0x0, 0x0, 0x0)
	/Users/thomas/Golang/src/github.com/genuinetools/audit/main.go:135 +0x826
github.com/genuinetools/audit/vendor/github.com/genuinetools/pkg/cli.(*Program).run(0xc000112000, 0x137a340, 0xc0000beb70, 0xc0000120c0, 0x4, 0x4, 0x10ad9fd, 0x13134b4)
	/Users/thomas/Golang/src/github.com/genuinetools/audit/vendor/github.com/genuinetools/pkg/cli/cli.go:179 +0x253
github.com/genuinetools/audit/vendor/github.com/genuinetools/pkg/cli.(*Program).Run(0xc000112000)
	/Users/thomas/Golang/src/github.com/genuinetools/audit/vendor/github.com/genuinetools/pkg/cli/cli.go:89 +0x61
main.main()
	/Users/thomas/Golang/src/github.com/genuinetools/audit/main.go:153 +0x3f2

After that I tried to find more information, I moved the errors parsing above the data parsing, and found this error message via Printf:

Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `E7C0:116E:271B82:432CFE:5D78ACF1` when reporting this issue.

So far for my debugging, but I have no idea how this issue could be resolved. Maybe somebody of you got an idea?

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.98. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the bug label Sep 11, 2019
@ryjones
Copy link
Contributor

ryjones commented Sep 15, 2019

@tboerger The issue is near line 72 here:

if err != nil {

the issue is the response object returns contains a "502 Bad Gateway" Status and a 502 StatusCode, but the err is void.

Screen Shot 2019-09-15 at 10 35 35 AM

I suspect this is a bug in how net handles this case. I set up a debugging environment but I couldn't get the breakpoint to fire and I stopped digging in

@ryjones
Copy link
Contributor

ryjones commented Sep 16, 2019

@shahidhk opinons? is this a bug in graphql.go, or in the underlying code?

@tboerger
Copy link
Author

I can audit all my other orgs, but especially the one I want to fix and cleanup doesn't work. Hopefully you can fix this issue :)

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

No branches or pull requests

2 participants