[MDEV-2358] LP:782269 - xt_xn_init_db() locks are initialized twice, leaking resources Created: 2011-05-13 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Vladislav Vaintroub | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The loop below is run twice in xt_xn_init_db() . It initialized the same pthread_cond structures each time. It leaks events on Windows (since each pthread_cond contains 3 events that would be created with CreateEvent) Moreover, it creates problems (i.e debug exceptions) when mysqld is run under application verifier. Problematic code : for (u_int i=0; i<XT_XN_NO_OF_SEGMENTS; i++) { seg = &db->db_xn_idx[i]; XT_XACT_INIT_LOCK(self, &seg->xs_tab_lock); ... } |
| Comments |
| Comment by Vladislav Vaintroub [ 2011-05-13 ] |
|
Re: xt_xn_init_db() locks are initialized twice, leaking resources |
| Comment by Vladislav Vaintroub [ 2011-05-13 ] |
|
Re: xt_xn_init_db() locks are initialized twice, leaking resources |
| Comment by Vladislav Vaintroub [ 2011-05-13 ] |
|
application verifier stops |
| Comment by Vladimir Kolesnikov (Inactive) [ 2011-06-14 ] |
|
Re: xt_xn_init_db() locks are initialized twice, leaking resources thanks for the report. I was not able to reproduce the problem on MariaDB 5.1/Linux. I also added a simple test which didn't discover any problems. Could this be a MariaDB 5.2-specific problem? I will try MariaDB 5.2/Win7x64 once maria pull completes... Do you know if the problem happens because the xt_xn_init_db() called twice or because the loop re-inits the same segment twice? |
| Comment by Vladislav Vaintroub [ 2011-06-14 ] |
|
Re: xt_xn_init_db() locks are initialized twice, leaking resources |
| Comment by Vladislav Vaintroub [ 2011-06-14 ] |
|
Re: xt_xn_init_db() locks are initialized twice, leaking resources |
| Comment by Vladimir Kolesnikov (Inactive) [ 2011-06-14 ] |
|
Re: xt_xn_init_db() locks are initialized twice, leaking resources |
| Comment by Vladislav Vaintroub [ 2011-06-14 ] |
|
Re: xt_xn_init_db() locks are initialized twice, leaking resources |
| Comment by Rasmus Johansson (Inactive) [ 2011-06-15 ] |
|
Launchpad bug id: 782269 |