Skip to content

roachtest: fix panic when tests fail using an existing cluster#41086

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
ajwerner:ajwerner/fix-nil-pointer-panic-on-test-failures-with-existing-clusters
Sep 25, 2019
Merged

roachtest: fix panic when tests fail using an existing cluster#41086
craig[bot] merged 1 commit intocockroachdb:masterfrom
ajwerner:ajwerner/fix-nil-pointer-panic-on-test-failures-with-existing-clusters

Conversation

@ajwerner
Copy link
Copy Markdown
Contributor

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

goroutine 67 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc0000e9560, 0x7942500, 0xc0005beb10)
    /Users/lucy/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:181 +0x121
panic(0x6ce8ee0, 0x9b12c10)
    /usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/cockroachdb/cockroach/pkg/util/quotapool.(*IntAlloc).Freeze(0x0)

Release justification: Not production code.

Release note: None

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @andreimatei)


pkg/cmd/roachtest/cluster.go, line 1074 at r1 (raw file):

	l.PrintfCtx(ctx, "saving cluster %s for debugging (--debug specified)", c)
	// TODO(andrei): should we extend the cluster here? For how long?
	if c.destroyState.owned { // we won't have an alloc for an existing cluster

nit: s/existing/unowned

```
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x61498e6]

goroutine 67 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc0000e9560, 0x7942500, 0xc0005beb10)
    /Users/lucy/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:181 +0x121
panic(0x6ce8ee0, 0x9b12c10)
    /usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/cockroachdb/cockroach/pkg/util/quotapool.(*IntAlloc).Freeze(0x0)
```

Release justification: Not production code.

Release note: None
@ajwerner ajwerner force-pushed the ajwerner/fix-nil-pointer-panic-on-test-failures-with-existing-clusters branch from d386073 to 05c8a9e Compare September 25, 2019 18:32
@ajwerner
Copy link
Copy Markdown
Contributor Author

TFTR!

bors r=andreimatei

craig bot pushed a commit that referenced this pull request Sep 25, 2019
41086: roachtest: fix panic when tests fail using an existing cluster r=andreimatei a=ajwerner

```
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x61498e6]

goroutine 67 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc0000e9560, 0x7942500, 0xc0005beb10)
    /Users/lucy/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:181 +0x121
panic(0x6ce8ee0, 0x9b12c10)
    /usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/cockroachdb/cockroach/pkg/util/quotapool.(*IntAlloc).Freeze(0x0)
```

Release justification: Not production code.

Release note: None

Co-authored-by: Andrew Werner <ajwerner@cockroachlabs.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Sep 25, 2019

Build succeeded

@craig craig bot merged commit 05c8a9e into cockroachdb:master Sep 25, 2019
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

Successfully merging this pull request may close these issues.

3 participants