Spawning spiders in a 2x2 space causes them to suffocate
Using spider spawn eggs in a 2x2 confined space (I used hardened clay at the time), whether you rightclick on the walls or the floor, causes the spider to suffocate in the wall until it either dies or walks through the wall and out of the structure.