Have you attached the required capacitor with a value of 10 microfarads between the RESET pin of the MEGA2560 and GND on the Mega? Without this capacitor, the MEGA2560 does a reset if you want to flash something in the Atmega328 and interrupts the connection to the Atmega328. As a result, reading of the processor signature then fails.