I'm running RSTP on a stack consisting of 2 WS-C3750G-24TS-1U switches.
Recently I discovered spanning tree running on one of the stackwise ports of the stack:
VLAN0001 is executing the rstp compatible Spanning Tree protocol
Bridge Identifier has priority 24576, sysid 1, address 001a.xxxx.xxxx
Configured hello time 2, max age 20, forward delay 15, transmit hold-count 6
We are the root of the spanning tree
Topology change flag not set, detected flag not set
Number of topology changes 46 last change occurred 2d21h ago
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300
Port 1001 (StackPort2) of VLAN0001 is backup blocking
Port path cost 100, Port priority 128, Port Identifier 128.1001.
Designated root has priority 24577, address 001a.xxxx.xxxx
Designated bridge has priority 24577, address 001a.xxxx.xxxx
Designated port id is 128.1000, designated path cost 0
Timers: message age 15, forward delay 0, hold 0
Number of transitions to forwarding state: 2
Link type is point-to-point
BPDU: sent 0, received 137308
As far as I understand, spanning tree is not supposed to be running on stackwise ports.
Is this normal or some sort of failure?
The spanning tree cannot be run independently on each stack member. There has to be some kind of internal messaging between the members so that the stack looks like a single bridge. This inter-member communication could have been implemented in several ways. In the current stacking architecture, members are communicating by sending BPDUs on the stack ports, which are virtual ports representing the connection to a kind of shared segment (a ring in fact) linking all the members together. As a result of this implementation choice, the stack ports are seen by STP (but STP is not really running on them). Note that the stack ports only appear in your show span output because you must have "debug spanning-tree events" configured on your switch. It would be hidden otherwise. The information displayed for the stack ports is to be considered as internal. For instance, stack ports are never blocking, even if in your example STP can show them as "backup blocking". Basically, forget about the output of this command for stack port, they don't have much meaning for the user.
All that you see is perfectly healthy and normal.