Drawing a blank studying last minute for an exam:

when does a piston cylinder not follow the 2nd law of thermodynamics!!!!

dQ/T is negative for part of the cycle and positive for another. Of course if you include the surroundings overall entropy shows its usual tendency to increase :)