XXXTentacion got sucker punched onstage and knocked out cold during his show in San Diego ... which turned into an all-out brawl that left one person stabbed.
The video of the attack is insane -- XXX was up on the mic performing Wednesday night when the attacker socked him out of nowhere. Security scrambled and beat the piss out of the unidentified puncher.
Law enforcement sources tell us the stabbing happened backstage after the initial punch.
XXX was eventually carried offstage. One of his tour managers tells us he was unconscious for at least 2 minutes. We're also told XXX and his camp believe the attacker was hiding backstage.
Cops say another fight broke out later in the parking lot as well. Fans at the venue seemed to blame rapper Rob Stone for the melee -- they chanted his name as soon as the fight started, but it's unclear if he's really involved.
No arrests have been made. We're also told cops wanna talk to XXX for a statement.
Meanwhile, XXX posted a video afterward blaming the venue and security for setting him up, and he's threatening to sue.