In this case, it won’t harm if you post the exactly problem:
ashMaiSv.exe is the avast Mail service.
But in the name of the thread you wrote ashserv.exe (the resident on-access module).
In any case, seems that avast is scanning something while you’re shutting down.
Is your email client opened and downloading messages at that time?