What are the societal risks associated with AI? What are the actual risks to society associated with the widespread use of AI? Outside of the use of AI in a military context.

I am not talking about accidental risks or unintentional behaviour - eg, a driver-less car accidentally crashing.

And I am not talking about any transitional effects when we see the use of AI being widespread and popular.  For instance I have heard that the widespread use of AI will make many existing jobs redundant, putting many people out of work.  However this is true of any major leap forward in technology (for example the motor car killed off the stable/farrier industries).  The leaps forward in technology almost always end up creating more jobs than were lost in the long run.

I am interested in long term risks and adverse effects stemming directly from the widespread use of AI in a non-military sense.  Has anybody speculated on the social or psychological impacts that AI will produce once it has become popular?
The biggest risk is algorithmic bias. As more and more decision-making processes are taken on by AI systems, there will be an abdication of responsibility to the computer; people in charge will simply claim the computer did it, and they cannot change it.

The real problem is that training data for machine learning often contains bias, which is usually ignored or not recognised. There was a story on BBC Radio about someone whose passport photo was rejected by an algorithm because he supposedly had his mouth open. However, he belonged to an ethnic group which has larger lips than Caucasian whites, but the machine could not cope with that.

There is a whole raft of examples where similar things happen: if you belong to a minority group, machine learning can lead to you being excluded, just because the algorithms will have been trained on training data that was too restricted.

Update: Here is a link to a BBC News story about the example I mentioned.