xtstat crashes with segmentation fault on startup if max_pbxt_threads exceeded

Bug #441000 reported by Elena Stepanova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBXT
Fix Committed
High
Paul McCullagh

Bug Description

PBXT 1.0.09d

#0 0x00002b5223337d75 in mysql_fetch_row (res=0x0) at client.c:2905
#1 0x0000000000403157 in main (argc=4, argv=0x7fff877f7158)
    at xtstat_xt.cc:685

It happens if xtstat is started without --database option or with --database=information_schema. If it is run with --database=pbxt, it gets stuck at
Got error -1 from storage engine
Reconnecting...

but does not crash.

The behavior changed from the previous 1.0.09, where xtstat would always end up in the 'Reconnecting' state.
Note: there was an apparently related fix for bug:431240.

To reproduce:

- start MySQL server with pbxt_max_threads=20 or less;
- from a client connection, run

set global event_scheduler=ON;
use test;
drop table if exists t1;
drop event if exists ev1;
drop event if exists ev2;
drop event if exists ev3;
drop event if exists ev4;
drop event if exists ev5;
create table t1 ( i int ) engine = pbxt;
drop event if exists ev;
delimiter |
create event ev1 on schedule every 1 second do begin insert into test.t1 values (1); end|
create event ev2 on schedule every 1 second do begin insert into test.t1 values (2); end|
create event ev3 on schedule every 1 second do begin insert into test.t1 values (3); end|
create event ev4 on schedule every 1 second do begin insert into test.t1 values (4); end|
create event ev5 on schedule every 1 second do begin insert into test.t1 values (5); end|
delimiter ;
lock tables t1 write;
select sleep(5);

- do not close client connection;
- attempt to start xtstat without --database option or with --database=information_schema

Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

Hi Elana,

Thanks for the bug report. We'll check this out right away.

Changed in pbxt:
assignee: nobody → Paul McCullagh (paul-mccullagh)
importance: Undecided → High
Changed in pbxt:
status: New → In Progress
Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

I noticed that this same tests causes an assertion failure in MySQL, in net_end_statement() file: protocol.cc, line 416 (in MySQL 5.1.35):

  case Diagnostics_area::DA_EMPTY:
  default:
    DBUG_ASSERT(0);
    net_send_ok(thd, thd->server_status, thd->total_warn_count,
                0, 0, NULL);
    break;
  }

Changed in pbxt:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.