[CONC-649] Segfault with LOAD DATA INFILE on an Xpand node Created: 2023-06-07  Updated: 2023-06-07

Status: Open
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: 3.1.22, 3.3.6

Type: Bug Priority: Major
Reporter: markus makela Assignee: Georg Richter
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File capture.pcapng    

 Description   

Executing the following on an Xpand node will result in a segfault:

load data infile 'file://my-bucket/data.csv' into table t1;

Here's a GDB stacktrace of it happening:

MySQL [test]> load data infile 'file://my-bucket/data.csv' into table t1;
Program received signal SIGSEGV, Segmentation fault.
0x00005555555ce6c0 in mysql_client_find_plugin ()
(gdb) bt
#0  0x00005555555ce6c0 in mysql_client_find_plugin ()
#1  0x00005555555ce7f3 in ma_open ()
#2  0x00005555555c744b in mysql_local_infile_init ()
#3  0x00005555555c7649 in mysql_handle_local_infile ()
#4  0x00005555555bf9e1 in mthd_my_read_query_result ()
#5  0x00005555555ae223 in mysql_real_query_for_lazy(char const*, unsigned long) ()
#6  0x00005555555b0f7d in com_go(String*, char*) ()
#7  0x00005555555b2e62 in read_and_execute(bool) ()
#8  0x00005555555a8c28 in main ()

I've attached a network capture of this happening with a Xpand 6.1 docker container. The reason appears to be an unexpected LOAD DATA LOCAL INFILE request that the connector is not ready to handle. I believe this should also be reproducible with any database proxy (e.g. MaxScale) that would convert a LOAD DATA INFILE request into a LOAD DATA LOCAL INFILE without the connector knowing of it.


Generated at Thu Feb 08 03:06:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.