You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ArrowArray::try_from_raw now uses Arc::from_raw to construct the two pointers to the C Data Interface (ArrowArray and ArrowSchema) back to the structs.
But the two pointers could be from other language runtime (e.g. JVM). We've been using the ffi API to pass Arrow Arrays from JVM to Rust. Sometimes we see fatal error reported at JVM (SIGILL). After digging it deeper, we found that sometimes Arc::from_raw on the pointers gives a Arc pointer with strong reference count reaching the maximum limit.
As the pointer is from JVM, it is not produced by Arc::into_raw, the offset calculation in Arc::from_raw simply doesn't work and can get into wrong values for the strong value in ArcInner.
I think that ArrowArray::try_from_raw should not assume the pointers are from Arc. They should be considered as just raw pointers to the C Data Interface.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
ArrowArray::try_from_raw
now usesArc::from_raw
to construct the two pointers to the C Data Interface (ArrowArray and ArrowSchema) back to the structs.But the two pointers could be from other language runtime (e.g. JVM). We've been using the ffi API to pass Arrow Arrays from JVM to Rust. Sometimes we see fatal error reported at JVM (
SIGILL
). After digging it deeper, we found that sometimesArc::from_raw
on the pointers gives aArc
pointer with strong reference count reaching the maximum limit.As the pointer is from JVM, it is not produced by
Arc::into_raw
, the offset calculation inArc::from_raw
simply doesn't work and can get into wrong values for thestrong
value inArcInner
.I think that
ArrowArray::try_from_raw
should not assume the pointers are fromArc
. They should be considered as just raw pointers to the C Data Interface.To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: