Not knowing anything beyond your statement it sounds like your dungeon needs a Nav Mesh... without one NPC's can basically do absolutely nothing within interiors -> IE: they spot you, go into combat stance but can not Path to you so they do nothing else. There are a few other reasons that this behavior can occur but missing/broken Nav Mesh is almost always the cause.
Thank you, I will try this out. I'm still trying to learn how to mod Skyrim properly - I used to mod Morrowind and then Oblivion but it seems there's a big difference between modding Skyrim and them. Many things (especially scripts) which I want to put in my mods I know immediately how to do them in Oblivion but with Skyrim I need hours to figure out how to get them working. This troll issue have been there for weeks but I have let it wait again and again when I have been working on other issues but now it bothers me too much.