You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "lidavidm (via GitHub)" <gi...@apache.org> on 2023/01/25 12:47:16 UTC

[GitHub] [arrow] lidavidm opened a new issue, #33864: [Go] Exported ArrowArray may panic with "misuse of an invalid handle"

lidavidm opened a new issue, #33864:
URL: https://github.com/apache/arrow/issues/33864

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   ```
   panic: runtime/cgo: misuse of an invalid Handle
   
   goroutine 17 [running, locked to thread]:
   runtime/cgo.Handle.Value(...)
   	/usr/local/go/src/runtime/cgo/handle.go:124
   github.com/apache/arrow/go/v11/arrow/cdata.releaseExportedArray(0x55889925b4d0)
   	/root/go/pkg/mod/github.com/apache/arrow/go/v11@v11.0.0-20230123220137-8449c553710a/arrow/cdata/exports.go:104 +0x1b8
   ```
   
   We saw this in ADBC as well: https://github.com/apache/arrow-adbc/commit/5029f7b8ed1e60dd7d41f175af0abee6ccadb02e Experimentally, heap-allocating the Go Handle would avoid this at the cost of an extra indirection. That makes sense; the documentation for Handle states:
   
   ```go
   // Some C functions accept a void* argument that points to an arbitrary
   // data value supplied by the caller. It is not safe to coerce a cgo.Handle
   // (an integer) to a Go unsafe.Pointer, but instead we can pass the address
   // of the cgo.Handle to the void* parameter, as in this variant of the
   // previous example:
   ```
   
   (https://github.com/golang/go/blob/master/src/runtime/cgo/handle.go)
   
   ### Component(s)
   
   Go


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zeroshade closed issue #33864: [Go] Exported ArrowArray may panic with "misuse of an invalid handle"

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade closed issue #33864: [Go] Exported ArrowArray may panic with "misuse of an invalid handle"
URL: https://github.com/apache/arrow/issues/33864


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org