@xiaopangoo, this looks to be an issue with the joint orientations not matching between the skeletons. This is the orientation of the upper arm from the broken skeleton with Y down the bone:
And this is the orientation of the working skeleton with X down the bone:
If you are trying to retarget animation or skeletons between meshes, the skeletons need to be identical down to the rotation of the individual joints. I hope this helps!