[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
GitHub user kunal642 opened a pull request:

    https://github.com/apache/carbondata/pull/2945

    [CARBONDATA-3123] Fixed JVM crash issue with CarbonRecordReader(SDK Reader).

    **Problem:**
    As CarbonReaderBuilder is executed on the main thread therefore while Reader creation we are setting TaskId to threadlocal. When multiple readers are created using the split API then the TaskID for the last initialized reader would be overridden and all the readers will use the same TaskID.
    Due to this when one reader is reading and the other reader is freeing memory after its task completion the same memory block would be cleared and read at the same time causing SIGSEGV error.
   
    **Solution:**
    Do not set TaskID to thread local while Reader Initialization. ThreadLocalTaskInfo.getCarbonTaskInfo will take care of assigning new TaskID if not already present.
   
    Be sure to do all of the following checklist to help us incorporate
    your contribution quickly and easily:
   
     - [ ] Any interfaces changed?
     
     - [ ] Any backward compatibility impacted?
     
     - [ ] Document update required?
   
     - [ ] Testing done
            Please provide details on
            - Whether new unit test cases have been added or why no new tests are required?
            - How it is tested? Please attach test report.
            - Is it a performance related change? Please attach the performance test report.
            - Any additional information to help reviewers in testing this change.
           
     - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kunal642/carbondata bug/CARBONDATA-3123

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/2945.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2945
   
----
commit cce1811fa518545b6b31246efd5668048e7d24ea
Author: kunal642 <kunalkapoor642@...>
Date:   2018-11-23T05:41:44Z

    [CARBONDATA-3123] Fixed JVM crash issue with CarbonRecordReader(SDK Reader).
   
    **Problem:**
    As CarbonReaderBuilder is executed on the main thread therefore while Reader creation we are setting TaskId to threadlocal. When multiple readers are created using the split API then the TaskID for the last initialized reader would be overridden and all the readers will use the same TaskID.
    Due to this when one reader is reading and the other reader is freeing memory after its task completion the same memory block would be cleared and read at the same time causing SIGSEGV error.
   
    **Solution:**
    Do not set TaskID to thread local while Reader Initialization. ThreadLocalTaskInfo.getCarbonTaskInfo will take care of assigning new TaskID if not already present.

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2945: [CARBONDATA-3123] Fixed JVM crash issue with CarbonR...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2945
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1518/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2945: [CARBONDATA-3123] Fixed JVM crash issue with CarbonR...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2945
 
    Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1728/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2945: [CARBONDATA-3123] Fixed JVM crash issue with CarbonR...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2945
 
    Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9776/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2945: [CARBONDATA-3123] Fixed JVM crash issue with CarbonR...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kunal642 commented on the issue:

    https://github.com/apache/carbondata/pull/2945
 
    retest this please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2945: [CARBONDATA-3123] Fixed JVM crash issue with CarbonR...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2945
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1520/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2945: [CARBONDATA-3123] Fixed JVM crash issue with CarbonR...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2945
 
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1730/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2945: [CARBONDATA-3123] Fixed JVM crash issue with CarbonR...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2945
 
    Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9778/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2945: [CARBONDATA-3123] Fixed JVM crash issue with CarbonR...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2945
 
    LGTM


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2945#discussion_r235890834
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -66,9 +63,6 @@
         this.readers = readers;
         this.index = 0;
         this.currentReader = readers.get(0);
    -    CarbonTaskInfo carbonTaskInfo = new CarbonTaskInfo();
    --- End diff --
   
    Whether will it affect CSDK?


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2945#discussion_r235891858
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -66,9 +63,6 @@
         this.readers = readers;
         this.index = 0;
         this.currentReader = readers.get(0);
    -    CarbonTaskInfo carbonTaskInfo = new CarbonTaskInfo();
    --- End diff --
   
    The same issue would be there in CSDK as well as this would be called internally.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2945#discussion_r235892016
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -66,9 +63,6 @@
         this.readers = readers;
         this.index = 0;
         this.currentReader = readers.get(0);
    -    CarbonTaskInfo carbonTaskInfo = new CarbonTaskInfo();
    --- End diff --
   
    I am testing.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2945#discussion_r235892400
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -66,9 +63,6 @@
         this.readers = readers;
         this.index = 0;
         this.currentReader = readers.get(0);
    -    CarbonTaskInfo carbonTaskInfo = new CarbonTaskInfo();
    --- End diff --
   
    ok


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2945#discussion_r236182445
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -66,9 +63,6 @@
         this.readers = readers;
         this.index = 0;
         this.currentReader = readers.get(0);
    -    CarbonTaskInfo carbonTaskInfo = new CarbonTaskInfo();
    --- End diff --
   
    I also can't reproduce in local, my laptop has 8 cores and add
    ```
        CarbonProperties.getInstance().addProperty("enable.unsafe.in.query.processing","true");```
   
     But SDK is run in single machine, so how to reproduce it?
   
    Can you write the error in JIRA or this PR?


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2945#discussion_r236531750
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -66,9 +63,6 @@
         this.readers = readers;
         this.index = 0;
         this.currentReader = readers.get(0);
    -    CarbonTaskInfo carbonTaskInfo = new CarbonTaskInfo();
    --- End diff --
   
    @xubo245 i have update the JIRA. Please check


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

    https://github.com/apache/carbondata/pull/2945


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2945#discussion_r236538137
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -66,9 +63,6 @@
         this.readers = readers;
         this.index = 0;
         this.currentReader = readers.get(0);
    -    CarbonTaskInfo carbonTaskInfo = new CarbonTaskInfo();
    --- End diff --
   
    so how to reproduce it?


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2945#discussion_r236538593
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -66,9 +63,6 @@
         this.readers = readers;
         this.index = 0;
         this.currentReader = readers.get(0);
    -    CarbonTaskInfo carbonTaskInfo = new CarbonTaskInfo();
    --- End diff --
   
    @xubo245 Please continue conversation on Jira.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2945: [CARBONDATA-3123] Fixed JVM crash issue with ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2945#discussion_r236539095
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
    @@ -66,9 +63,6 @@
         this.readers = readers;
         this.index = 0;
         this.currentReader = readers.get(0);
    -    CarbonTaskInfo carbonTaskInfo = new CarbonTaskInfo();
    --- End diff --
   
    I tried the JIRA code in my laptop, JVM don‘'t crash...



---