臭い飯を食う(くさいめしをくう)

Japanese vocabulary

Meaning: to go to prison; to serve a prison term; to eat foul-smelling food

See it used in real works