A resident of a block of flats feared for his life when another tenant shouted threats outside his door while armed with a knife.