Bug 12511 - ctdb_takeover_helper crashes with SEGV
ctdb_takeover_helper crashes with SEGV
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB
4.6.0rc1
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-11 06:59 UTC by Amitay Isaacs
Modified: 2017-01-27 05:14 UTC (History)
3 users (show)

See Also:


Attachments
Patches for v4-6 (5.91 KB, patch)
2017-01-12 23:19 UTC, Amitay Isaacs
martins: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amitay Isaacs 2017-01-11 06:59:22 UTC
In populate_bitmap(),  if there are no available IP addresses, then the loop should be skipped. 

		for (i = 0; i < ipalloc_state->num; i++) {
			struct ctdb_public_ip_list *avail =
				&ipalloc_state->available_public_ips[i];

			/* Check to see if "ip" is available on node "i" */
			for (j = 0; j < avail->num; j++) {
				if (ctdb_sock_addr_same_ip(
					    &ip->addr, &avail->ip[j].addr)) {
					ip->available_on[i] = true;
					break;
				}
			}
		}
Comment 1 Amitay Isaacs 2017-01-11 23:57:58 UTC
The calculation of known and available IPs in ctdb_takeover_helper is wrong.  Both the ip lists should be the same size as the nodemap.
Comment 2 Amitay Isaacs 2017-01-12 23:19:46 UTC
Created attachment 12825 [details]
Patches for v4-6
Comment 3 Martin Schwenke 2017-01-15 04:27:02 UTC
Hi Karolin,

This is ready for 4.6.

Thanks...
Comment 4 Karolin Seeger 2017-01-24 20:07:35 UTC
Pushed to autobuild-v4-6-test.
Comment 5 Karolin Seeger 2017-01-27 05:14:23 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to v4-6-test.
Closing out bug report.

Thanks!