The effect of microscopic voids on the failure mechanism of a ductile material is investigated by considering an elastic-plastic medium containing a doubly periodic array of circular cylindrical voids. For this voided material under uniaxial or biaxial plane strain tension the state of stresses and deformations is determined numerically. Bifurcation away from the fundamental state of deformation is analysed with special interest in a repetitive pattern that represents the state of deformation inside a shear band. Both in the fundamental state and in the bifurcation analysis the interaction between voids and the details of the stress distribution around voids are fully accounted for. Comparison is made with the shear band instabilities predicted by a continuum model of a ductile porous medium. Based on the numerical results an adjustment is suggested for the approximate yield condition in this model of dilatant, pressure sensitive plastic behaviour.