You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Neal Richardson (Jira)" <ji...@apache.org> on 2021/08/31 12:55:00 UTC
[jira] [Commented] (ARROW-13803) [C++] Segfault on filtering taxi
dataset
[ https://issues.apache.org/jira/browse/ARROW-13803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17407321#comment-17407321 ]
Neal Richardson commented on ARROW-13803:
-----------------------------------------
Some more investigation: the {{kleene_and}} does seem to be involved, and it seems it crashes if you {{&}} together two filter expressions where at least one of them is a float type. I made several queries with &ed filters on integer and string types and they did not crash.
{code}
> ds %>% filter(passenger_count > 0 & passenger_count < 4) %>% summarize(n = n()) %>% collect()
# A tibble: 1 × 1
n
<int>
1 1373176060
> ds %>% filter(payment_type == "CAS" & payment_type != "CRD") %>% summarize(n=n()) %>% collect()
# A tibble: 1 × 1
n
<int>
1 26876825
> ds %>% filter(total_amount > 0 & total_amount < 4) %>% summarize(n = n()) %>% collect()
*** caught bus error ***
address 0x139448000, cause 'invalid alignment'
> ds %>% filter(trip_distance > 0 & trip_distance < 4) %>% summarize(n=n()) %>% collect()
*** caught segfault ***
address 0x120e3c000, cause 'invalid permissions'
{code}
> [C++] Segfault on filtering taxi dataset
> ----------------------------------------
>
> Key: ARROW-13803
> URL: https://issues.apache.org/jira/browse/ARROW-13803
> Project: Apache Arrow
> Issue Type: New Feature
> Components: C++
> Environment: macOS 11.2.1, MacBook Pro (13-inch, M1, 2020)
> Reporter: Neal Richardson
> Priority: Major
> Labels: query-engine
> Fix For: 6.0.0
>
>
> Found this while testing ARROW-13740. Using the nyc-taxi dataset:
> {code}
> ds %>%
> filter(total_amount > 0, passenger_count > 0) %>%
> summarise(n = n()) %>%
> collect()
> {code}
> {code}
> *** caught segfault ***
> address 0x161784000, cause 'invalid permissions'
> Traceback:
> 1: .Call(`_arrow_ExecPlan_run`, plan, final_node, sort_options)
> ...
> {code}
> lldb shows
> {code}
> * thread #11, stop reason = EXC_BAD_ACCESS (code=1, address=0x1631a8000)
> frame #0: 0x000000013a79d9cc libarrow.600.dylib`arrow::BitUtil::SetBitmap(unsigned char*, long long, long long) + 296
> libarrow.600.dylib`arrow::BitUtil::SetBitmap:
> -> 0x13a79d9cc <+296>: ldrb w10, [x8]
> 0x13a79d9d0 <+300>: cmp w9, #0x8 ; =0x8
> 0x13a79d9d4 <+304>: cset w11, lo
> 0x13a79d9d8 <+308>: and w9, w9, #0x7
> Target 0: (R) stopped.
> (lldb)
> {code}
> Interestingly, I can evaluate those filter expressions just fine, and it only seems to crash if both are provided. And I can count over the data with both:
> {code}
> ds %>%
> group_by(total_amount > 0, passenger_count > 0) %>%
> summarize(n=n()) %>%
> collect()
> # A tibble: 4 × 3
> `total_amount > 0` `passenger_count > 0` n
> <lgl> <lgl> <int>
> 1 FALSE FALSE 805
> 2 FALSE TRUE 368680
> 3 TRUE FALSE 5810556
> 4 TRUE TRUE 1541561340
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)