[MXS-195] maxscaled.c ineffective DCB disposal Created: 2015-06-15 Updated: 2015-07-07 Resolved: 2015-07-07 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 1.1.1 |
| Fix Version/s: | 1.3.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | martin brampton (Inactive) | Assignee: | martin brampton (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
All |
||
| Description |
|
The function maxscaled_accept makes two calls to dcb_add_to_zombieslist. The first will be ineffective - if debug is enabled the system will crash, otherwise it will do nothing but the DCB will be left allocated. The reason for this is that on creation the state of a DCB is DCB_STATE_ALLOCATED but the function dcb_add_to_zombieslist will only process a DCB that is in the state DCB_STATE_NOPOLLING. What will happen on the second call is more obscure. However, it would be preferable for there to be a single DCB disposal function available from outside dcb.c that makes its own decisions on how to deal with a DCB in any state. There are similar problems with telnetd.c |
| Comments |
| Comment by Dipti Joshi (Inactive) [ 2015-06-15 ] |
|
martin brampton, markus makela Can you please discuss this and propose a solution to fix this bug ? maxscaled is higher priority for fixing in 1.2. Telnetd fix can come after 1.2 |
| Comment by martin brampton (Inactive) [ 2015-06-15 ] |
|
It makes no sense to fix the problem in maxscaled.c without fixing the identical problem in telnetd.c. The problem is exactly the same in both cases. |
| Comment by markus makela [ 2015-06-15 ] |
|
dcb_close should be used instead and if the dcb is in DCB_STATE_ALLOC then the protocol should be manually freed. |
| Comment by Dipti Joshi (Inactive) [ 2015-06-15 ] |
|
martin brampton - If it is exactly same, problem - fix it in both places - But given 1.2 priority, if testing effort needs prioritization maxscaled changes should be first tested. |
| Comment by martin brampton (Inactive) [ 2015-06-16 ] |
|
This really needed careful review before any code changes. I'm not sure it is wise to commit to fixing it for any specific release. |
| Comment by markus makela [ 2015-06-16 ] |
|
The proposed changes in this task only solve the symptoms of the problem but not the root cause. |
| Comment by martin brampton (Inactive) [ 2015-07-07 ] |
|
Passed to Markus for review. |
| Comment by markus makela [ 2015-07-07 ] |
|
Review done. |