Yes packets can be lost during spanning tree election. If the discarding port status is bouncing between the two ports, packets in transmit can be lost. If you want to try and leave it this way and always have 1 port discarding, you can try change the port priority on 1 of the ports so that it is most likely to be the port to be discarding.  The following example configures a port to be least likely to be selected for forwarding to the root bridge, even if the host begins to send BPDUs. console(config-if-Gi1/0/17)#spanning-tree port-priority 240 console(config-if-Gi1/0/17)#spanning-tree vlan 15 port-priority 240
I seriously cannot get STP to work between these two for the life of me, any help would be appreciated. Everything will connect and be fine for a while, but then I miss 10-20 pings for some reason. I am having a hard time even finding anything to work from in the logs/debugs. So if there is any suggestions for logs/debugs I need to turn on please let me know.  I have tried general ports vs trunk ports, trunking and not trunking specific vlans, even using RSTP instead of pvst but I still get the same issues. Here is relevant configs from each switch  N4032 interface vlan 15 2ip address 10.22.15.250 255.255.255.0  spanning-tree priority 28672spanning-tree mode rapid-pvstspanning-tree vlan 1 priority 36864spanning-tree vlan 15 priority 36864spanning-tree vlan 16 priority 36864 interface Te1/0/17switchport mode trunkswitchport general pvid 15switchport general allowed vlan add 15,16 tagged switchport general allowed vlan add 1 taggedexit interface Te2/0/17switchport mode trunkswitchport general pvid 15switchport general allowed vlan add 15,16 taggedswitchport general allowed vlan add 1 taggedexit MXL 10/40gbE protocol spanning-tree pvst  no disable  vlan 1-16 bridge-priority 61440 interface TenGigabitEthernet 0/51 no ip address portmode hybrid switchport no spanning-tree pvst err-dis cause invalid-pvst-bpdu  no shutdown!interface TenGigabitEthernet 0/52 no ip address portmode hybrid switchport no spanning-tree pvst err-dis cause invalid-pvst-bpdu  no shutdown  interface Vlan 15 ip address 10.22.15.122/24 tagged TenGigabitEthernet 0/1-5,51-52 no shutdown!interface Vlan 16 no ip address tagged TenGigabitEthernet 0/1-5,51-52 no shutdown    Please Help!
Help with STP mxl 10/40gbe and N4032