So this is a really weird bug. Let's say you make or place a "barrel", and you have two buckets of water with fish on it (i haven't tried if the others do the same thing, as i have only tried with the tropical fish water bucket) and you put the first bucket on the barrel. Everything normal, the barrel with water and the little fish, but the randomness starts when begin clicking several times right click on the barrel with the other bucket in hand, sneaking. It begins to spawn a ton of fish and after that, all the generated mobs start to be launched randomly. If you don't know what i'm talking about, i'll leave 2 parts of a video of said bug.
PS: At the point of generating too much fish, they begin to die, leaving as a drop fish, that you can eat.
Does MC-127045 describe your issue?