You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observing a panic in the go client when it errors out during file submission.
When using the v1.0.0 go client function SubmitSampleFile to submit a file, the following error is returned to the caller:
triage: Post "https://private.tria.ge/api/v0/samples": dial tcp 51.15.123.173:443: i/o timeout
Then a panic occurs in sample.go:
Failed to submit file
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x666965]
goroutine 60344 [running]:
github.com/hatching/triage/go.(*Client).SubmitSampleFile.func1()
/go/pkg/mod/github.com/hatching/[email protected]/go/sample.go:108 +0xe5
created by github.com/hatching/triage/go.(*Client).SubmitSampleFile
/go/pkg/mod/github.com/hatching/[email protected]/go/sample.go:101 +0x3f2
The trace seems a bit confusing that it would fail on those lines (vs say in the defer or somewhere else). So probably needs a bit more digging to see whats going on and how to recover cleanly.
The text was updated successfully, but these errors were encountered:
Seeing another spate of these. Based on the trace, I suspect its due to unchecked errors in the multipart calls, but I don't have a good way to consistently reproduce:
// samples.go
jsonField, _ := mw.CreateFormField("_json")
jsonField.Write(request) // jsonField can be nil
fileField, _ := mw.CreateFormFile("file", filename)
io.Copy(fileField, file) // fileField can be nil
Observing a panic in the go client when it errors out during file submission.
When using the v1.0.0 go client function
SubmitSampleFile
to submit a file, the following error is returned to the caller:Then a panic occurs in sample.go:
The trace seems a bit confusing that it would fail on those lines (vs say in the defer or somewhere else). So probably needs a bit more digging to see whats going on and how to recover cleanly.
The text was updated successfully, but these errors were encountered: