In a topology like this, it's probably a good idea to set your masters as the STP primary and secondary root bridges. This will rule out any unpredictable behaviour.
i.e. on your primary
spanning-tree vlan 1-1005 root primary
and on your secondary
spanning-tree vlan 1-1005 root secondary
Once you have defined your topology, leaving nothing to chance, you can assume that the trunk between master-1 and master-2 will be forwarding, the stack links will be forwarding, and the trunk between the slaves will be blocking. I have seen some bad things happen if you don't select your STP root when scaling a network topology like this.
-HTH
Colin