[MCOL-4364] LOAD DATA crashes mariadb process Created: 2020-10-16 Updated: 2021-04-19 Resolved: 2020-11-02 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MariaDB Server |
| Affects Version/s: | 1.4.4 |
| Fix Version/s: | 5.4.3 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Rick Pizzi | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Inserting one line of data with load data causes mariadb server to crash with the below stacktrace.
Command used:
Table structure:
Data row that makes it crash:
The customer is unable to load data from application because of this bug, hence a blocker. cpimport can't be used because requires data to be on CS server. |
| Comments |
| Comment by Rick Pizzi [ 2020-10-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Additional information: The customer says that wrapping the LOAD DATA inside a transaction avoids the crash (although this doesn't make sense) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2020-10-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
What is LINES TERMINATED BY ''? How can you terminate with nothing? Might have confused it. Not saying this is the problem, it's just something to investigate. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2020-10-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Transactional LDI treats the data as a series of transactional inserts, while non-transactional LDI uses bulk insert. The two are different code paths, so that explains the discrepancy. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Rick Pizzi [ 2020-10-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Actual load data statement is
| ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2020-10-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
As a workaround, assign an explicit length to text fields (something less than 21845). | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Rick Pizzi [ 2020-10-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Don't think that is a proper workaround. A TEXT can be much longer than 21845 or whatever value we assign, so this workaround kinda defeats the purpose of a TEXT column IMHO. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2020-10-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Well, another option is (size > 65536 AND < 5592405) OR size > 16777216. Or, don't use UTF8, if possible. Then the bug goes away. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Rick Pizzi [ 2020-10-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
All these workarounds are unapplicable. Customer can't control content of source data. And cannot avoid UTF8, which is today's de facto standard. It has been suggested by PS to go to Columnstore 5, is this fixed in that release? | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Gagan Goel (Inactive) [ 2020-10-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
For QA: Steps to reproduce and ensure the crash is fixed:
| ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2020-11-02 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
While not identical, the cause is similar enough to | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-11-02 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.5.1-1 (Drone #1036) Reproduced the issue in release 5.4.1-1 MariaDB [mytest]> LOAD DATA LOCAL INFILE '/tmp/t.txt' INTO TABLE mcol4364_cs FIELDS TERMINATED BY ',' ENCLOSED BY '"'; Verified the issue in 5.5.1-1 MariaDB [mytest]> LOAD DATA LOCAL INFILE '/tmp/t.txt' INTO TABLE mcol4364_cs FIELDS TERMINATED BY ',' ENCLOSED BY '"'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-11-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.4.2-1 hot fix (Enterprise Jenkins build #523) Server version: 10.5.6-4.5.4.2-MariaDB-enterprise MariaDB Enterprise Server | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-11-09 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.4.3-1 hot fix (Enterprise Jenkins build #854) |