When we search information about Abu Mansur Ghalib ibn Jabroil Khartangi Samarkandi from historical sources, we come across information that about Imam Bukhari came to the village of Khartang and spent the last days of his life here.
So that, it is impossible to study Ghalib ibn Jabroil without information about the days that Imam Bukhari spent in this village.
When Imam Bukhari left Bukhara, the people of Samarkand wrote him a inviting letter him to Samarkand. Alloma set out for this city. When they reached the village of Khartang, three miles from Samarkand, there was a report of a quarrel between the people of Samarkand. He had relatives in this village. So he stayed with them.
Abu Mansur Ghalib ibn Jabroil Khartangi was one of the relatives of Imam Bukhari.
Ibn Adi said: I heard ‘Abd al-Quddus ibn’ Abdujabbar Samarkandi say: “When Muhammad (ibn Ismail Bukhari) came to his relatives in Khartang, he prayed one night and said, ‘O Allah! The wide land was too narrow for me. Take my soul and bring it to You.” He died less than a month later. His grave is in Khartang.” 
It can be assumed that when Imam Bukhari came to the village of Khartang, he was a guest in the house of his relative Abu Mansur and lived there for at least a month. Khatib Baghdadi gave a biography of Abu Mansur in his book of “Al-Muttafiq wal Muftariq”. Al-Khatib al-Baghdadi narrated that al-Azhari said, “Abu Sa’d al-Idrisi told us.” “The ibn Jabroil Khartangi Samarkandi was a shaykh with the nickname Abu Mansur. Muhammad ibn Ismail came as a guest to the house of ibn Abu Mansur Ghalib and died in his house. The ibn Abu Mansur Ghalib held his funeral. Abu Ja’far Muhammad ibn Abu Hatim Varrokh Bukhari, the calligrapher of Muhammad ibn Isma’il Al Bukhari, narrated it from Galib ibn Jabroil.
Idrisi said, “I do not know that he has a musnad hadith. It is said that he was a scholar. From him were narrated stories about the virtues of Muhammad ibn Ismail. I was told that Ghalib ibn Jabroil died shortly after Imam Bukhari and was bequeathed beside him to be buried.” 
Abdulkarim Samani says in Ansob: “Khartang is a village three fars away from Samarkand. Imam Abu Abdullah Muhammad ibn Ismail Bukhari died here. I went there four times to visit. One of the famous people attributed to this village is Abu Mansur Ghalib ibn Gabriel Hartangi. When Muhammad ibn Ismail Bukhari came to Khartang, he went to his house and died in his house. He held the funeral of Imam Bukhari. It is said that he (Abu Mansur Ghalib ibn Gabriel Hartangi) was a scholar. Narrations about the virtues of Imam Bukhari were narrated by him. I was told that Ghalib ibn Jabroil died shortly after Imam Bukhari and was bequeathed beside him to be buried.” 
Muhammad ibn Abu Hatim al-Warraq al-Bukhari said: I heard Abu Mansur al-Ghalib ibn Jabroil say: “He lived with us for a few days.
Then he became ill and his condition worsened. An envoy was even sent to Samarkand to take Muhammad ibn Ismail Bukhari away. With the arrival of the ambassador, preparations for the trip began. He puts on two footwear and wraps his turban. I grabbed one of his hands (from the shoulder to the elbow) and we led him to ride with the man holding the other hand. He walked twenty paces or so in my trunk. He (may Allah have mercy on him) said, “Leave me alone, I am weak.” He prayed several times. Then his weakness intensified, and he lay on his back on the ground.
There was so much sweat coming out of his body that it was impossible to describe. That sweat didn’t stop until we had shrouded him. He bequeathed to us, “Shroud me with three white shirts without a turban.” We did as he was told us. When we buried him, a pungent odor as musk began to spread from the grave, and this continued for several days. Then a white circle rose in the sky over the tomb of Imam Bukhari. People were surprised. Unfortunately, they began to take away the grave soil. Although we tried to guard the tomb, we were unable to do so.
Then we set up a wooden fence around the tomb so that no one would touch it. The smell of the scent lingered for a long time. The townspeople were surprised and did not stop talking about it. His position became clear even to his enemies after his death. Some of his enemies came to his grave, expressed their remorse, and repented. Muhammad ibn Abu Hatim al-Warraq al-Bukhari said: Abu Mansur al-Ghalib ibn Jabroil al-Khartangiy lived a very short life after al-Bukhari. After his death, he had bequeathed himself to be buried next to Imam Bukhari.” 
From this information, it can be seen that Abu Ja’far Varraq, the secretary and special student of Imam Bukhari, did not come to Samarkand with his teacher.
Because he narrated from Ghalib ibn Jabroil that Imam Bukhari came to the village of Khartang, stayed with his relatives, fell ill and died there, and the wonderful events that took place after that.
We can conclude the following from the information mentioned in the history books: