Hadithcore
Sahih Muslim, 2915 a
sahih

Abu Sa`id Khudri reported:

One who is better than I informed me, that Allah's Messenger (ﷺ) said to `Ammar as he was digging the ditch (on the ocassion of the Battle of the Ditch) wiping over his head: O son of Summayya, you will be involved in trouble and a group of the rebels would kill you.

حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَابْنُ، بَشَّارٍ - وَاللَّفْظُ لاِبْنِ الْمُثَنَّى - قَالاَ حَدَّثَنَا مُحَمَّدُ، بْنُ جَعْفَرٍ حَدَّثَنَا شُعْبَةُ، عَنْ أَبِي مَسْلَمَةَ، قَالَ سَمِعْتُ أَبَا نَضْرَةَ، يُحَدِّثُ عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ، قَالَ أَخْبَرَنِي مَنْ، هُوَ خَيْرٌ مِنِّي أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ لِعَمَّارٍ حِينَ جَعَلَ يَحْفِرُ الْخَنْدَقَ وَجَعَلَ يَمْسَحُ رَأْسَهُ وَيَقُولُ ‏

‏ بُؤْسَ ابْنِ سُمَيَّةَ تَقْتُلُكَ فِئَةٌ بَاغِيةٌ ‏

‏ ‏.‏

References2 variants
In-Book Reference
Book 54, Hadith 86
USC-MSA web (English) reference
Book 41, Hadith 6966 (deprecated numbering scheme)