Weird mesh twisting in wrong way when bone associated to it is rotated, help please?

I came across a strange twisting behavior of mesh as I was rigging a dog’s tail when the bone associated with it is rotated, can u guys help me? I am pretty new to blender

Hello, please share your file: https://pasteall.org/blend/

here you go, https://pasteall.org/media/b/d/bd820f75d4aa8d4aacee640015d08d57.blend

I don’t understand why it’s happening, also you have 3 huge bones on 3 different layers, and I can’t select them, not sure about their purpose, I hope someone will be able to help you

My bad, i was trying make it work, i really did a botched up job of rigging this dog, i had to re do the rig again properly, but weight painting should not be this unpredictable. Thanks anyways.