in the barrel

Etymology
Attested 1950s. Presumably from a bawdy military joke, featuring a barrel with a glory hole, whose punchline is “It’s your turn in the barrel.”

The joke has many variants and embellishments, but the kernel is: a new sailor is being given a tour of the boat, and is shown a barrel with a glory hole, which they are able to use any time, except Tuesdays. When he asks why not Tuesdays, he is told: “Because it’s your turn in the barrel.”

Other hypotheses is that it is derived from, or that it referred to a form of punishment in which the malefactor was confined within a barrel.

Prepositional phrase

 * 1)  In an unpleasant or dangerous situation.

Usage notes
Frequently used in the form “your turn in the barrel”, as in the form in the joke. Despite the presumed vulgar origins, the phrase is in common use without this intention, though this can have vulgar connotations to some listeners.