bug in cpmHandleGroupInformation

Submitted by edrt on Thu, 2007-02-08 00:34.

Hi all,

There are some problems found during debugging.

#1

In cpmHandleGroupInformation, I think the following code should be changed to

/* Was active but no longer an ACTIVE */
- if(gpClCpm->haState == CL_AMS_HA_STATE_ACTIVE &&
- notificationBuffer->leader != gpClCpm->pCpmLocalInfo->nodeId)
+ if(gpClCpm->haState == CL_AMS_HA_STATE_ACTIVE &&
+ notificationBuffer->leader != gpClCpm->pCpmLocalInfo->nodeId &&
+ notificationBuffer->deputy == gpClCpm->pCpmLocalInfo->nodeId)

#2

After node change from leader-->deputy, or leader-->none, cpm should clAmsDbTerminate. But if it's done in cpmHandleGroupInformation. Cpm may still visit ClAmsT::db after that. The code has no mechanism to protect from this kind of race condition currently. You might reproduce the problem by place some time delay in etc/init.d/sisp, between send sisp_amf SIGINT and forcibly kill all components when stop sisp.

Can anyone confirm these?

Thanks
Eddy