scylladb / scylla-bench

43 stars 36 forks source link

fix: avoid getting panic in the '(mr *MergedResult) AddResult(...)' #109

Closed vponomaryov closed 1 year ago

vponomaryov commented 2 years ago

Check for the nil-state of the 'result.RawLatency' attribute before processing it to avoid following panic:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x5fb33c]

goroutine 1 [running]:
github.com/HdrHistogram/hdrhistogram-go.(*iterator).next(0xc000171448)
    .../github.com/!hdr!histogram/hdrhistogram-go@v1.1.2/hdr.go:670 +0x1c
github.com/HdrHistogram/hdrhistogram-go.(*rIterator).next(...)
    .../github.com/!hdr!histogram/hdrhistogram-go@v1.1.2/hdr.go:683
github.com/HdrHistogram/hdrhistogram-go.(*Histogram).Merge(
        0xf0000000e?, 0x4000000000a?)
    .../github.com/!hdr!histogram/hdrhistogram-go@v1.1.2/hdr.go:177 +0x8d
%s-b%/pkg/results.(*MergedResult).AddResult(
        0xc2abffef60, {0x0, 0x0, 0x0, 0x0, 0x0, {0x0, 0x0, 0x0}, 0x0, ...})
    .../pkg/results/merged_result.go:53 +0x1b0
%s-b%/pkg/results.(*TestResults).GetResultsFromThreadsAndMerge(0xc000691380)
    .../pkg/results/thread_results.go:60 +0x89
%s-b%/pkg/results.(*TestResults).GetTotalResults(0xc000691380)
    .../pkg/results/thread_results.go:82 +0xcc
main.main()
    .../main.go:596 +0x355d
roydahan commented 2 years ago

@vponomaryov / @fruch what should be done now in order to get s-b version and test it in SCT? Do we need to build a docker image with this new version?

roydahan commented 2 years ago

Never mind, I saw you provided @yarongilor an image from your branch and he already tested it. It would have help if @yarongilor updated here....

fruch commented 2 years ago

Never mind, I saw you provided @yarongilor an image from your branch and he already tested it. It would have help if @yarongilor updated here....

Last week I know he run into kernel panic related to XFS on the runner, but we still don't know the root cause if it. and if he was able to collect more information information