Multirotor aircraft cannot lock heading

We recently conducted a flight test for our own Octo-copter, but it could not lock the heading and would continue to deflect counterclockwise when it is in loiter mode. Here is the log file. Please help. thank you!

How sure are you that all motors are operating correctly?

Please update to ArduCopter 4.0.7 and setup the system again.

if you use pwm for the motors, calibrate the ESCs and make sure all of the motors are straight and there are no trims.