You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "benj (JIRA)" <ji...@apache.org> on 2019/02/12 12:33:00 UTC

[jira] [Comment Edited] (DRILL-7034) Window function over a malformed CSV file crashes the JVM

    [ https://issues.apache.org/jira/browse/DRILL-7034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765973#comment-16765973 ] 

benj edited comment on DRILL-7034 at 2/12/19 12:32 PM:
-------------------------------------------------------

Maybe it's not only a problem of windows function. (Edit OK missed the SIGSEGV)

A _java.lang.NegativeArraySizeException_ appear with
{code:java}
SELECT `amount` FROM dfs.`/data/a.csvh`;
java.lang.NegativeArraySizeException
    at org.apache.drill.exec.vector.VarCharVector$Accessor.get(VarCharVector.java:479)
    at org.apache.drill.exec.vector.accessor.VarCharAccessor.getBytes(VarCharAccessor.java:110)
    at org.apache.drill.exec.vector.accessor.VarCharAccessor.getString(VarCharAccessor.java:131)
    at org.apache.drill.exec.vector.accessor.BoundCheckingAccessor.getString(BoundCheckingAccessor.java:124){code}

It's problematic in the sense that the result is not the same with :
- extractHeader => false, skipFirstLine => true *(ok)*
- extractHeader => true *(error)*
And a blank line may be valid for a csv. Maybe to avoid confusion a new option like +skipBlankLine+ may be useful but it's another subject to create.




was (Author: benj641):
Maybe it's not a problem of windows function.

A _java.lang.NegativeArraySizeException_ appear with
{code:java}
SELECT `amount` FROM dfs.`/data/a.csvh`;
java.lang.NegativeArraySizeException
    at org.apache.drill.exec.vector.VarCharVector$Accessor.get(VarCharVector.java:479)
    at org.apache.drill.exec.vector.accessor.VarCharAccessor.getBytes(VarCharAccessor.java:110)
    at org.apache.drill.exec.vector.accessor.VarCharAccessor.getString(VarCharAccessor.java:131)
    at org.apache.drill.exec.vector.accessor.BoundCheckingAccessor.getString(BoundCheckingAccessor.java:124){code}

> Window function over a malformed CSV file crashes the JVM 
> ----------------------------------------------------------
>
>                 Key: DRILL-7034
>                 URL: https://issues.apache.org/jira/browse/DRILL-7034
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>    Affects Versions: 1.15.0
>            Reporter: Boaz Ben-Zvi
>            Priority: Major
>         Attachments: hs_err_pid23450.log, janino8470007454663483217.java
>
>
> The JVM crashes executing window functions over (an ordered) CSV file with a small format issue - an empty line.
> To create: Take the following simple `a.csvh` file:
> {noformat}
> amount
> 10
> 11
> {noformat}
> And execute a simple window function like
> {code:sql}
> select max(amount) over(order by amount) FROM dfs.`/data/a.csvh`;
> {code}
> Then add an empty line between the `10` and the `11`:
> {noformat}
> amount
> 10
> 11
> {noformat}
>  and try again:
> {noformat}
> 0: jdbc:drill:zk=local> select max(amount) over(order by amount) FROM dfs.`/data/a.csvh`;
> +---------+
> | EXPR$0  |
> +---------+
> | 10      |
> | 11      |
> +---------+
> 2 rows selected (3.554 seconds)
> 0: jdbc:drill:zk=local> select max(amount) over(order by amount) FROM dfs.`/data/a.csvh`;
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGSEGV (0xb) at pc=0x00000001064aeae7, pid=23450, tid=0x0000000000006103
> #
> # JRE version: Java(TM) SE Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.181-b13 mixed mode bsd-amd64 compressed oops)
> # Problematic frame:
> # J 6719% C2 org.apache.drill.exec.expr.fn.impl.ByteFunctionHelpers.memcmp(JIIJII)I (188 bytes) @ 0x00000001064aeae7 [0x00000001064ae920+0x1c7]
> #
> # Core dump written. Default location: /cores/core or core.23450
> #
> # An error report file with more information is saved as:
> # /Users/boazben-zvi/IdeaProjects/drill/hs_err_pid23450.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://bugreport.java.com/bugreport/crash.jsp
> #
> Abort trap: 6 (core dumped)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)