Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Go][FlightRPC] Client middleware causes a crash under certain error conditions #35240

Closed
lidavidm opened this issue Apr 20, 2023 · 0 comments · Fixed by #35241
Closed

[Go][FlightRPC] Client middleware causes a crash under certain error conditions #35240

lidavidm opened this issue Apr 20, 2023 · 0 comments · Fixed by #35241

Comments

@lidavidm
Copy link
Member

Describe the bug, including details regarding any error messages, version, and platform.

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

goroutine 593 [running]:
github.com/apache/arrow/go/v12/arrow/flight.CreateClientMiddleware.func2({0x7f84abd594d0, 0x10c0000f9840}, 0x7f84ac222240, 0x10c00037ec08?, {0x7f84abad55a2, 0x2a}, 0x10c0000c1da0, {0x10c0000c0e70, 0x3, 0x3})
	/home/runner/go/pkg/mod/github.com/apache/arrow/go/v12@v12.0.0-20230307201612-6fdf1e520a76/arrow/flight/client.go:124 +0x1b2
google.golang.org/grpc.chainStreamClientInterceptors.func1({0x7f84abd594d0, 0x10c0000f9840}, 0x7f84ab409212?, 0x0?, {0x7f84abad55a2, 0x2a}, 0x10c00037ecd0?, {0x10c0000c0e70, 0x3, 0x3})
	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.53.0/clientconn.go:380 +0xd6
google.golang.org/grpc.(*ClientConn).NewStream(0x10c0003faa80?, {0x7f84abd594d0?, 0x10c0000f9840?}, 0x7f847f100a0f?, {0x7f84abad55a2?, 0x2a?}, {0x10c0000351e0?, 0x1?, 0x7f84aba81be9?})
	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.53.0/stream.go:160 +0x187
github.com/apache/arrow/go/v12/arrow/flight/internal/flight.(*flightServiceClient).DoGet(0x7f84abc4a680?, {0x7f84abd594d0?, 0x10c0000f9840?}, 0x10c000274dc0?, {0x10c0000351e0?, 0x10c000327930?, 0x10c0000e9280?})
	/home/runner/go/pkg/mod/github.com/apache/arrow/go/v12@v12.0.0-20230307201612-6fdf1e520a76/arrow/flight/internal/flight/Flight_grpc.pb.go:183 +0x77
github.com/apache/arrow/go/v12/arrow/flight/flightsql.(*Client).DoGet(0x10c00007e860, {0x7f84abd594d0?, 0x10c0000f9840?}, 0x7f84ab40452c?, {0x10c0000351e0?, 0x0?, 0x10c000312e78?})
	/home/runner/go/pkg/mod/github.com/apache/arrow/go/v12@v12.0.0-20230307201612-6fdf1e520a76/arrow/flight/flightsql/client.go:255 +0x42
github.com/apache/arrow-adbc/go/adbc/driver/flightsql.doGet({0x7f84abd594d0, 0x10c0000f9840}, 0x10c000312e78?, 0x10c0000fd180, {0x7f84abd5f5d0, 0x10c000274dc0}, {0x10c0000351e0, 0x1, 0x1})
	/home/runner/work/arrow-adbc/arrow-adbc/go/adbc/driver/flightsql/flightsql_adbc.go:700 +0x199
github.com/apache/arrow-adbc/go/adbc/driver/flightsql.newRecordReader.func3()

Component(s)

FlightRPC, Go

lidavidm added a commit to lidavidm/arrow that referenced this issue Apr 20, 2023
lidavidm added a commit to lidavidm/arrow that referenced this issue Apr 20, 2023
lidavidm added a commit that referenced this issue Apr 20, 2023
### Rationale for this change

The Go interceptor API includes a provision for errors from trying to start an RPC. The handler for this in the Flight code was trying to use a nil pointer as a result.

### What changes are included in this PR?

Fix a crash when those errors are encountered.

### Are these changes tested?

New tests were added.

### Are there any user-facing changes?

There are no user-facing changes.
* Closes: #35240

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
@lidavidm lidavidm added this to the 13.0.0 milestone Apr 20, 2023
liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this issue May 11, 2023
…e#35241)

### Rationale for this change

The Go interceptor API includes a provision for errors from trying to start an RPC. The handler for this in the Flight code was trying to use a nil pointer as a result.

### What changes are included in this PR?

Fix a crash when those errors are encountered.

### Are these changes tested?

New tests were added.

### Are there any user-facing changes?

There are no user-facing changes.
* Closes: apache#35240

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this issue May 15, 2023
…e#35241)

### Rationale for this change

The Go interceptor API includes a provision for errors from trying to start an RPC. The handler for this in the Flight code was trying to use a nil pointer as a result.

### What changes are included in this PR?

Fix a crash when those errors are encountered.

### Are these changes tested?

New tests were added.

### Are there any user-facing changes?

There are no user-facing changes.
* Closes: apache#35240

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
rtpsw pushed a commit to rtpsw/arrow that referenced this issue May 16, 2023
…e#35241)

### Rationale for this change

The Go interceptor API includes a provision for errors from trying to start an RPC. The handler for this in the Flight code was trying to use a nil pointer as a result.

### What changes are included in this PR?

Fix a crash when those errors are encountered.

### Are these changes tested?

New tests were added.

### Are there any user-facing changes?

There are no user-facing changes.
* Closes: apache#35240

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant