Skip to content

Commit 194ff94

Browse files
Ole-Hjalmar KristensenOle-Hjalmar Kristensen
authored andcommitted
Bug #25892493 GR XCOM SERVICE SEGFAULTS WHEN MORE THAN 1024 FILE DESCRIPTORS ARE IN USE
Switched from select to poll in task.c and inlined functions in xdr_utils. The polling code now dynamically allocates as space for new file descriptors, so the number is now in principle only limited by the available memory. Added deinit functions. Fixed bugs in unpoll and wake_all_io that caused task waiting for IO to not terminate because the reference count never went to 0. Added interface to WSAPoll on Windows.
1 parent 775fdf1 commit 194ff94

File tree

10 files changed

+251
-248
lines changed

10 files changed

+251
-248
lines changed

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/app_data.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -33,8 +33,11 @@
3333
#include "node_list.h"
3434
#include "xcom_vp_str.h"
3535

36+
define_xdr_funcs(synode_no)
37+
define_xdr_funcs(app_data_ptr)
3638

3739
static app_data_list nextp(app_data_list l);
40+
static unsigned long msg_count(app_data_ptr a);
3841

3942
/**
4043
Debug a single app_data struct.
@@ -370,8 +373,7 @@ void follow(app_data_list l, app_data_ptr p)
370373
/**
371374
Count the number of messages in a list.
372375
*/
373-
unsigned long msg_count(app_data_ptr a)
374-
{
376+
static unsigned long msg_count(app_data_ptr a) {
375377
unsigned long n = 0;
376378
while(a){
377379
n++;
@@ -380,7 +382,6 @@ unsigned long msg_count(app_data_ptr a)
380382
return n;
381383
}
382384

383-
define_xdr_funcs(app_data_ptr)
384385

385386
/* {{{ Message constructors */
386387

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/app_data.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -34,8 +34,6 @@ app_data_ptr new_exit();
3434
app_data_ptr new_nodes(u_int n, node_address *names, cargo_type cargo);
3535
app_data_ptr new_reset(cargo_type type);
3636

37-
d_xdr_funcs(app_data_ptr)
38-
unsigned long msg_count(app_data_ptr a);
3937
void _replace_app_data_list(app_data_list target, app_data_ptr source);
4038
char *dbg_app_data(app_data_ptr a);
4139
void follow(app_data_list l, app_data_ptr p);

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/synode_no.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -28,8 +28,6 @@ extern "C" {
2828
#define SY_FMT_DEF "%x %llu %u"
2929
#define SY_MEM(s) (s).group_id, (long long unsigned int)(s).msgno, (s).node
3030

31-
d_xdr_funcs(synode_no)
32-
3331
int synode_eq(synode_no x, synode_no y);
3432
int synode_gt(synode_no x, synode_no y);
3533
int synode_lt(synode_no x, synode_no y);

0 commit comments

Comments
 (0)