[MCOL-1995] javamcsapi - MillionRow test fails on Ubuntu 16.04 and 18.04 Created: 2018-11-30 Updated: 2023-10-26 Resolved: 2019-03-21 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | 1.2.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jens Röwekamp (Inactive) | Assignee: | Andrew Hutchings (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 16.04, Ubuntu 18.04 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Sprint: | 2018-21, 2019-01, 2019-02, 2019-03 | ||||||||
| Description |
|
Javamcsapi's MillionRow test fails consistently on Ubuntu operating systems. Debian, CentOS and Windows don't have that issue. I assume some kind of premature garbage collection as it appears around the same number of writeRows() on different Ubuntus. See attached detailed test execution log from Ubuntu 18.04.
It is strange though, that a manually compiled million row test with following example succeeds without errors on the Ubuntus':
|
| Comments |
| Comment by Jens Röwekamp (Inactive) [ 2019-01-04 ] |
|
I was able to identify the root-cause of the bug. It is not very severe as it's not caused by premature garbage collection as in With In particular it's the test ``java/src/test/java/com/mariadb/columnstore/api/LockTest.java`` testClearTableLock() that is responsible. This test checks if the clearTableLock() function works properly. It therefore initializes two ColumnStoreBulkInsert objects b1, b2 and the ColumnStoreDriver d. The tests works more or less in four steps:
This works fine on its own, as the test is small enough to don't trigger the garbage collector. But as Gradle executes the tests sequentially in one JVM based on the file order determined by the operating system, the MillionRowTest can be executed after the testClearTableLock() test. In this case the MillionRowTests executes long enough to trigger Java's garabage collector and the bug occurres. The garbage collector collects former b1 and therefore triggers its C++ destructor. As b1 already wrote some data to the table and didn't commit, it tries to roll it back. But, as d already performed the rollback and cleared b1's lock on the table the error occures and the test crashes ungracefully. To deal with this bug, we have a couple of possibilities.
|
| Comment by Jens Röwekamp (Inactive) [ 2019-01-07 ] |
|
Outsourced the Java test LockTest.java testClearTableLock() into a separate Gradle test so that its first ColumnStoreBulkInsert object won't automatically be garbage collected and triggers an error later on. Further added debug printouts for constructor and destructor calls for ColumnStoreDriver and ColumnStoreBulkInsert, so that this kind of errors can be detected more easily from a debug log. Java test suite successfully executed on CentOS 7 and Windows 10. For QA
|