Skip to content

Panic in go client when submission request fails / times out #29

@gregtws

Description

@gregtws

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/triage@v1.0.0/go/sample.go:108 +0xe5
created by github.com/hatching/triage/go.(*Client).SubmitSampleFile
/go/pkg/mod/github.com/hatching/triage@v1.0.0/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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions