Mavproxy causes pixhawk to restart itself

Hey,
Sometimes, after starting mavproxy, the pixhawk resets by the watchdog.

To reproduce this error, I start and stop mavproxy multiple times until it happens.

The relevant messages I get:
restored watchdog attitude -2 -1 -37 (the numbers are changing)
Internal error (0x800)

I’m using the latest version of mavproxy and arducopter version 4.0.7 (It also happened on 4.0.1).
I tried connecting using both USB and Telem 1/2 and it happened on both of them.
Baudrate is the default ( 57600 on telem and 115 usb if I’m not wrong).
OS is ubuntu 20.

Any ideas why it would happen?

Thanks for the reply, I edited the question.