To be on the rack

to suffer torture, physical or mental.

See also: Rack