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. ---- --- |
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/ --- |
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/ --- |
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/ --- |
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 --- |
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/ --- |
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/ --- |
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/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2945 LGTM --- |
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? --- |
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. --- |
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. --- |
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 --- |
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? --- |
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 --- |
In reply to this post by 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ï¼ --- |
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. --- |
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... --- |
Free forum by Nabble | Edit this page |