New version available here: vedabase.io

Bg 17.19

mūḍha-grāheṇātmano yat
pīḍayā kriyate tapaḥ
parasyotsādanārthaṁ vā
tat tāmasam udāhṛtam
Synonyms: 
mūḍha — foolish; grāheṇa — with endeavor; ātmanaḥ — of one’s own self; yat — which; pīḍayā — by torture; kriyate — is performed; tapaḥ — penance; parasya — to others; utsādana-artham — for the sake of causing annihilation; — or; tat — that; tāmasam — in the mode of darkness; udāhṛtam — is said to be.
Translation: 
Penance performed out of foolishness, with self-torture or to destroy or injure others, is said to be in the mode of ignorance.
Purport: 

There are instances of foolish penance undertaken by demons like Hiraṇyakaśipu, who performed austere penances to become immortal and kill the demigods. He prayed to Brahmā for such things, but ultimately he was killed by the Supreme Personality of Godhead. To undergo penances for something which is impossible is certainly in the mode of ignorance.