I was testing an old power supply(didn't work!) which have EMI filter caps on the inputs, when I disconnected the power source (220v AC), I touched the plug metal parts and I got an electric shock.so,what does that mean? Are they charged by the ac input ? Do the caps need a parallel resisor to discharge or there is a fault in the circuit that doesn't provide a path for that current?
Capacitors that are connected to AC are continuously charged and discharged with polarity reversing as the AC voltage reverses. When they are disconnected they may remain charged with one polarity or the other depending on the instant in the AC cycle that they are disconnected. Filter capacitors may have a small value of capacitance and thus not store a dangerous level of energy even though you can feel the shock. In that case, they don't require a discharge resistor.
You said that "old PS that didn't work". If the device is damaged internally, anything is possible, and not necessarily the EMI filter caps are at fault. The PS may have a half-damaged rectifier bridge that connects/leaks the main capacitor back to AC lines.