The shadows could be soot from burning candles. I have done a few jobs where it was dark around joists and every nail in the ceiling. In all cases people burned candles all the time. Good primer and paint took care of it.
Good luck, Mike
Good luck, Mike