You don't say your database platform nor the database release. Anyhow, on Metalink you can find some bug descriptions that result in ORA-600 [2865]. One of them (bug no. 1530519) is directly related to global temporary tables and affects release between 8.1.5 and 8.1.7.0. It is supposed to be fixed in 8.1.7.1 and above.