The Mahabharata and the Devi Bhagavata Purana narrate a story of the birth of Samba, Jambavati's chief son. Jambavati was unhappy when she realized that only she had not borne any children to Krishna while all other wives were blessed with many children. She approached Krishna to find a solution and to be blessed with a son like the handsome Pradyumna, Krishna's first-born son from his chief wife Rukmini. Then Krishna went to the hermitage of the sage Upamanyu in the Himalayas and as advised by the sage, he started to pray to the god Shiva. He did penance for six months in various postures; once holding a skull and a rod, then standing on one leg only in the next month and surviving on water only, during the third month he did penance standing on his toes and living on air only. Pleased with the austerities, Shiva finally appeared before Krishna as Samba, Samba, Ardhanarishvara the half-female-half-male form of the god, asked him to ask a boon. Krishna then sought a son from Jambavati, which was granted. A son was born soon thereafter who was named as Samba, the form Shiva had appeared before Krishna.