pīḍayā kriyate tapaḥ
tat tāmasam udāhṛtam
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ādanārtham—causing annihilation; vā—or; tat—that; tāmasam—in the mode of darkness; udāhṛtam—is said to be.
And those penances and austerities which are performed foolishly by means of obstinant self-torture, or to destroy or injure others, are said to be in the mode of ignorance.
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.
Link to this page: https://prabhupadabooks.com/bg/17/19