I just installed SQL Server 2017 EVAL in a Windows Server 2012 R2 VM. Most default options.
Default installation folder. SYSTEM databases in default folder. User databases in the D:\ drive. Created some databases, some users, installed Brent Ozar and Ola Hallengren scripts. Next thing I was configuring the backups on the E:\ and getting an error. So i tried to run manually:
BACKUP DATABASE [DABOL12] TO DISK = N'E:\BACKUP\teste.bak' WITH NOFORMAT, NOINIT, NAME = N'DABOL12-Completo Banco de Dados Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO
and getting this error:
Location: mediaWrite.cpp:603 Expression: (m_pWriteBuffer->GetCurrentSize ()% GetBlockSize ()) == 0 SPID: 56 Process ID: 1104 Mensagem 3013, Nível 16, Estado 1, Linha 1 BACKUP DATABASE está sendo encerrado de forma anormal. Mensagem 3624, Nível 20, Estado 1, Linha 1 Falha em uma verificação de asserção do sistema. Verifique o log de erros do SQL Server para obter detalhes. Em geral, uma falha de asserção é causada por bug do software ou danos nos dados. Para procurar danos no banco de dados, considere a execução de DBCC CHECKDB. Se você concordou em enviar despejos à Microsoft durante a instalação, um minidespejo será enviado. Uma atualização poderá ser disponibilizada pela Microsoft no último Service Pack ou em um Hotfix do Suporte Técnico. Horário de conclusão: 2020-08-13T21:57:22.6904999-03:00
Is in Portuguese, and telling me to check the SQL Server logs, which point me to this dump file  where it have the same message but in english:
2020-08-13 19:07:27.81 spid54 Erro: 17066, Gravidade: 16, Estado: 1. 2020-08-13 19:07:27.81 spid54 SQL Server Assertion: File: <mediaWrite.cpp>, line=603 Failed Assertion = '(m_pWriteBuffer->GetCurrentSize ()% GetBlockSize ()) == 0'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted. 2020-08-13 19:07:27.81 spid54 Erro: 3624, Gravidade: 20, Estado: 1. 2020-08-13 19:07:27.81 spid54 A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support. 2020-08-13 19:07:27.81 Backup Erro: 3041, Gravidade: 16, Estado: 1. 2020-08-13 19:07:27.81 Backup BACKUP failed to complete the command BACKUP DATABASE DABOL12. Check the backup application log for detailed messages. 2020-08-13 19:13:11.98 spid54 **Dump thread - spid = 54, EC = 0x000000D63F84C160 2020-08-13 19:13:11.98 spid54 ***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\LOG\SQLDump0035.txt
If I try to run this same command on the D:\ drive, it runs without any problems.
- After getting the errors a few times, I installed CU21, but the error persist.
- Both SQL Server and SQL Agent account have full control over E:\ drive. I went nuts and granted full control to everyone for the sake of testing.
- I was pretty sure that the databases weren’t corrupt, since I don’t get the same error when backuping to another drive and had just created them), but I run the DBCC CHECK anyway, and it’s everything ok.
This VM is hosted on a XenServer, which I’m not a admin nor thus have any access. After finding out that I can successfully perform the backup to drives C: and D:, but could not perform to E:, I decided to check the devices.
Drive C: XENSRC PVDISK SCSI Disk Device
Drive D: XENSRC PVDISK SCSI Disk Device
Drive E: FreeNAS iSCSI Disk SCSI Disk Device
Searching a bit more a found this reddit post  with the same problem as I, shedding some light on the problem.
This is a SQL Server Bug, a Windows bug, a Xensrv bug or a FreeNAS bug?