I have a hanging bulb holder near my bunk bed and I sometimes accidentally hit this holder when sleeping on the top bunk. Unfortunately, the holder is now detached from the ceiling due to the occasional hits. It was attached with some kind of threaded base but I am not sure what this kind of holder is called and I can not find any resources about repairing it. The tension to keep the bulb hanging is now on the wire itself instead of the threaded attachment it had previously.
The fixture has been like this for a while and bulbs does not show signs or flickering. However, I am not sure how dangerous this kinds of breakage is and the risks of repairing it myself. I tried reattaching the treads but the threads attached on the ceiling does not seem to stay in place. The base thread also rotates when I try to rotate the holder's thread to affix it. Below are some photos of the holder's attachment.