[MXS-1785] request 16M-1 normal sql + 'select 1' core dump with debug mode Created: 2018-04-12  Updated: 2018-04-13  Resolved: 2018-04-13

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.2
Fix Version/s: 2.2.5

Type: Bug Priority: Major
Reporter: xiangzhong Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

linux + make with -DCMAKE_BUILD_TYPE=Debug



 Description   

we run one case
1. select 'fff..'; this packet size 16M-1, not include header; this is real packet size and sql size
2. select 1;.

core dump now.

PS: we code make with debug.

bt:
#0 0x00007f9e1ea986ab in raise () from /lib64/libpthread.so.0
#1 0x00007f9e1a58ed5d in handle_got_target (inst=0x910680, rses=0x7f9df8023610, querybuf=0x7f9df80141a0, target=std::tr1::shared_ptr (count 3) 0x7f9df8024240, store=false)
at /home/xiangzhong.wxd/gitlab/MaxScale/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc:1195
#2 0x00007f9e1a58b4f1 in route_single_stmt (inst=0x910680, rses=0x7f9df8023610, querybuf=0x7f9df80141a0, info=...)
at /home/xiangzhong.wxd/gitlab/MaxScale/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc:264
#3 0x00007f9e1a582581 in routeQuery (instance=0x910680, router_session=0x7f9df8023610, querybuf=0x7f9df80141a0)
at /home/xiangzhong.wxd/gitlab/MaxScale/server/modules/routing/readwritesplit/readwritesplit.cc:938
#4 0x00007f9e18cc4809 in route_by_statement (session=0x7f9df8012580, capabilities=4294967431, p_readbuf=0x7f9e157ca560)
at /home/xiangzhong.wxd/gitlab/MaxScale/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc:1564
#5 0x00007f9e18cc2ed3 in gw_read_finish_processing (dcb=0x7f9df8013e90, read_buffer=0x0, capabilities=4294967431)
at /home/xiangzhong.wxd/gitlab/MaxScale/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc:1063
#6 0x00007f9e18cc2c74 in gw_read_normal_data (dcb=0x7f9df8013e90, read_buffer=0x7f9df90396c0, nbytes_read=13)
at /home/xiangzhong.wxd/gitlab/MaxScale/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc:1005
#7 0x00007f9e18cc1399 in gw_read_client_event (dcb=0x7f9df8013e90) at /home/xiangzhong.wxd/gitlab/MaxScale/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc:520
#8 0x00007f9e1efab6c5 in dcb_process_poll_events (dcb=0x7f9df8013e90, events=5) at /home/xiangzhong.wxd/gitlab/MaxScale/server/core/dcb.cc:3102
#9 0x00007f9e1efaba86 in dcb_handler (dcb=0x7f9df8013e90, events=5) at /home/xiangzhong.wxd/gitlab/MaxScale/server/core/dcb.cc:3187
#10 0x00007f9e1efabb43 in dcb_poll_handler (data=0x7f9df8013e90, thread_id=3, events=5) at /home/xiangzhong.wxd/gitlab/MaxScale/server/core/dcb.cc:3223
#11 0x00007f9e1f00cffd in maxscale::Worker::poll_waitevents (this=0x8e0470) at /home/xiangzhong.wxd/gitlab/MaxScale/server/core/worker.cc:1205
#12 0x00007f9e1f00c190 in maxscale::Worker::run (this=0x8e0470) at /home/xiangzhong.wxd/gitlab/MaxScale/server/core/worker.cc:885
#13 0x00007f9e1f00cc14 in maxscale::Worker::thread_main (pArg=0x8e0470) at /home/xiangzhong.wxd/gitlab/MaxScale/server/core/worker.cc:1106



 Comments   
Comment by markus makela [ 2018-04-12 ]

The empty packet that is send when exactly 0xffffff bytes are sent was confused for the empty packet sent when the LOAD DATA LOCAL INFILE ends.

Comment by markus makela [ 2018-04-13 ]

The empty packet is now properly handled.

Generated at Thu Feb 08 04:09:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.