You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by kunal642 <gi...@git.apache.org> on 2018/11/23 05:49:31 UTC

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

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 <ku...@...>
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.

----


---

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

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

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

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

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

Posted by kunal642 <gi...@git.apache.org>.
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


---

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

Posted by ravipesala <gi...@git.apache.org>.
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.


---

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

Posted by xubo245 <gi...@git.apache.org>.
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?


---

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

Posted by xubo245 <gi...@git.apache.org>.
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.


---

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

Posted by xubo245 <gi...@git.apache.org>.
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...



---

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

Posted by kunal642 <gi...@git.apache.org>.
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


---

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

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

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

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on the issue:

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


---

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

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

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

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

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


---

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

Posted by xubo245 <gi...@git.apache.org>.
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?


---

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

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

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

Posted by xubo245 <gi...@git.apache.org>.
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?


---

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

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

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

Posted by kunal642 <gi...@git.apache.org>.
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.


---

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

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---