Can Two blocks pushed against the wall with horizontal force be in equilibrium? 
I have seen a question in the forum with title Two blocks pushed against the wall where it supposed the blocks are in equilibrium under the force F, and the forces of A to B and Wall to B asked for.
My question is: Can such a configuration be in equilibrium? What about torque say on A?
 A: We tend to assume that contact forces act as though they are concentrated at the centre of the area of contact, perhaps because we can treat the gravitational force on an object as though it is concentrated at the centre of mass. This assumption for the contact forces is not always correct, but it often goes unnoticed when the assumption does not apply. This is one situation when the assumption is not correct.
In diagram (a) there is no net force on block A. However, if the applied force $F$ and the normal force $N$ both act through the centre of block A, then you are correct in deducing that there is a net torque, so the block should rotate anti-clockwise.

Either $F$ or $N$ or both must be offset from the centre - as in diagram (b) - in order to create a clockwise counter-torque, thus keeping the block in equilibrium. You have perhaps noticed when performing this trick with blocks that if you apply the force $F$ too far down then block A does rotate anti-clockwise. And conversely if you apply $F$ too far up then it rotates clockwise.
The centre of force does not have to be the same as the centre of area. The contact force is the result of a contact pressure across the area of contact between two solid surfaces. This pressure does not have to be distributed uniformly. In many situations such as this one, in which toppling or turning is about to occur, the contact pressure increases toward the pivot point. See How is normal force distributed along the surface of contact?
A: Is it possible? Can you place a book on a book and press them against the wall without them falling? 
Yes you can, so that configuration is possible. 
Regarding torque on block A:
Weight pulls it down and friction holds  it up. Friction is not in the center, so that will indeed cause a torque. But the block can't rotate - it's bottom corner collides with the other block's corner. Here a horizontal normal force arises who's torque balances the friction torque. 
