無駄骨を折る(むだぼねをおる)

Japanese vocabulary

Meaning: to waste one's efforts; to work to no (useful) effect

See it used in real works