microsoft / mssql-docker

Official Microsoft repository for SQL Server in Docker resources
MIT License
1.74k stars 760 forks source link

Receiving "Non-yielding Scheduler " errors when running with Rosetta emulation, MSSQL-2022:latest, MacOS Sonoma 14.5, M3 #882

Open alexdecoder opened 6 months ago

alexdecoder commented 6 months ago

Hello all,

After updating to MacOS Ventura 14.5, I am receiving the below errors when importing a .bacpac into my dockerized SQL instance.

2024-05-21 20:03:56.16 Server Process 88:0:0 (0x344) Worker 0x0000000F004B4180 appears to be non-yielding on Scheduler 1. Thread creation time: 13360794223764. Approx Thread CPU Used: kernel 470 ms, user 335120 ms. Process Utilization 20%. System Idle 0%. Interval: 1104732 ms.

I was not seeing this issue prior to updating. The image I am using to replicate this concern was working and uploading prior to the update.

Any help is appreciated. Thank you!

henry-bettany commented 6 months ago

I'm seeing a similar issue having updated to macOS 14.5 on an M1 MacBook Pro. The same script that restored a known-good .bacpac file on macOS 14.4.1 no longer works on 14.5.

alexdecoder commented 6 months ago

I'm seeing a similar issue having updated to macOS 14.5 on an M1 MacBook Pro. The same script that restored a known-good .bacpac file on macOS 14.4.1 no longer works on 14.5.

Exact same situation I am in. Hopefully this will be resolved soon because it yields my Mac unusable as a dev machine.

danieldrave-tixtrack commented 5 months ago

I am also experiencing these issues and have been since upgrading to 14.5.

Importing a .bacpac file will hang very early on if my Docker Desktop is configured to 8GB CPU Limit. I can get a little further in my import script if I limit CPUs to 2 but still experience the hanging script later on in the process.

Has anyone heard of any potential solutions yet? I am surprised this thread isn't busier!

gran0123 commented 5 months ago

This is not only the problem me and my colleague have been getting. We are having issues where the same query can run 1-5 times (yes it's random) until MSSQL server crashes together with the container after 14.5 update. Anyone else experience this issue?

Error that occurs is this: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-3624-database-engine-error?view=sql-server-ver16

gran0123 commented 5 months ago

This is not only the problem me and my colleague have been getting. We are having issues where the same query can run 1-5 times (yes it's random) until MSSQL server crashes together with the container after 14.5 update. Anyone else experience this issue?

Error that occurs is this: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-3624-database-engine-error?view=sql-server-ver16

@alexdecoder What Docker desktop version are u running or which docker version? From my conclusion this seems to have with Docker to do. Read my comment below.

Update: From my further investigation, I know that I've upgraded Docker desktop to latest version 4.30.0 (docker engine 26.1.1) when this occurred as well. Decided to kept the latest version on my macOS(Sonoma 14.5), created a VM with Parallels and ran Ubuntu 22.04.2 (x86_64 emulation) image. This image is running docker version 24.0.4. The database was running fine and I could spam heavy queries without any problem and the problem above was gone. So what now? I decided to uninstall Docker desktop from macOS and installed an older version 4.26.1 running Docker version 24.0.7. I ran the same queries with no issues. Everything is working, time to confirm? I upgraded once again Docker Desktop to 4.30.0 and ran the same queries. Even restored the database in-between and ran into zero issues.

Conclusion: A big confusion

Update 2:

Reinstalled Docker desktop version to 4.26.1 once again. Now it seems to work again with a longer run.

alexdecoder commented 5 months ago

This is not only the problem me and my colleague have been getting. We are having issues where the same query can run 1-5 times (yes it's random) until MSSQL server crashes together with the container after 14.5 update. Anyone else experience this issue? Error that occurs is this: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-3624-database-engine-error?view=sql-server-ver16

@alexdecoder What Docker desktop version are u running or which docker version? From my conclusion this seems to have with Docker to do. Read my comment below.

Update: From my further investigation, I know that I've upgraded Docker desktop to latest version 4.30.0 (docker engine 26.1.1) when this occurred as well. Decided to kept the latest version on my macOS, created a VM with Parallels and ran Ubuntu 22.04.2 (x86_64 emulation) image. This image is running docker version 24.0.4. The database was running fine and I could spam heavy queries without any problem and the problem above was gone. So what now? I decided to uninstall Docker desktop from macOS and installed an older version 4.26.1 running Docker version 24.0.7. I ran the same queries with no issues. Everything is working, time to confirm? I upgraded once again Docker Desktop to 4.30.0 and ran the same queries. Even restored the database in-between and ran into zero issues.

Conclusion: A big confusion

@gran0123, I have been unable to resolve this at all. For me, issues have occurred, regardless of which Docker version I am using. When I updated to 14.5, I only then started experiencing issues. Prior, everything had been running smoothly. I was on Docker 4.29.0 prior to the update. After noticing issues post update, I attempted to upgrade to no avail.

Tl;dr: issues occurred after MacOS upgrade, regardless of my Docker version (even tried downgrading as some people in a different thread mentioned). I have heard some people downgrade MacOS with success, but I'd rather not crack open that can of worms. I am hoping Apple resolves this next update.

pedrocarloto commented 4 months ago

Hello! I am having the same issues with Sonoma 14.5 and with docker 4.28.0 (139021).

Are there known workarounds for this problem?

Thank you.

alexdecoder commented 4 months ago

Hello! I am having the same issues with Sonoma 14.5 and with docker 4.28.0 (139021).

Are there known workarounds for this problem?

Thank you.

@pedrocarloto, I have been able to successfully utilize Orbstack to run this image. All of my issues that I was having are resolved. Orbstack works as a drop in replacement... Unfortunately, the Docker team hasn't been able to resolve this issue in a very timely manner. https://orbstack.dev/

danieldrave-tixtrack commented 4 months ago

I was also able to run my local environment successfully using Orbstack (on Sonoma 14.5) Thanks for the recommendation @alexdecoder, much appreciated!

pedrocarloto commented 4 months ago

Thanks for this tip. In the meantime I opened a ticket with Docker, and I am waiting on more info. I will keep you posted.

image

pedrocarloto commented 4 months ago

So, finally some good news with this issue.

It is now solved with the latest docker version: 4.32.0 (157355) I am using Mac OS Sonoma 14.5

I hope it works for everyone now.