Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFCore.SqlServer.FunctionalTest hanging on Linux VM (Ubuntu 16.04 LTS and 18.10) #15333

Closed
Gary-Zh opened this issue Apr 11, 2019 · 14 comments
Closed

Comments

@Gary-Zh
Copy link

Gary-Zh commented Apr 11, 2019

When I was running EFCore.SqlServer.FunctionalTest on Linux VM, the test hangs frequently.
The test runs but does not finish. dotnet process looks hanging as well, it consumes 0 CPU usage but does not terminate.
When it doesn't hang, the test finishes within 10 mins on my VM, but it could hang hours and I had to manually terminate the test execution.

Here's what I did:
Create a completely clean Ubuntu VM (I've tried version 18.10 and 16.04).
Install git and clone EFCore repo.
Go to EFCore root folder and run ./build.sh -c Release -v d

export Test__SqlServer__DefaultConnection="Data Source=192.xxx.xxx.xxx;DataBase=master;UID={id};PWD={pwd};Connect Timeout=60;ConnectRetryCount=0;" (in order not to skip tests)

./test.sh -projects /test/EFCore.SqlServer.FunctionalTests/EFCore.SqlServer.FunctionalTests.csproj -configuration Release -v d

Sometimes the test finishes successfully and gives me the test result file. Sometimes it just hangs.
Here's the log file being generated when it hangs:
EFCore.SqlServer.FunctionalTests_netcoreapp3.0_x64.log

The screenshot shows the dotnet process is hanging:
EFCore_Test

Further technical details

EF Core version: latest in master branch
Operating system: Ubuntu 16.04 LTS and 18.0.

@Gary-Zh
Copy link
Author

Gary-Zh commented Apr 11, 2019

It does not hang on Windows

@ajcvickers
Copy link
Member

@Gary-Zh How many logical CPUs are you using when you run the tests on Linux?

@Gary-Zh
Copy link
Author

Gary-Zh commented Apr 15, 2019

@ajcvickers I have 3 logical CPUs on my VM.
image

@ajcvickers
Copy link
Member

@roji to try running locally on Linux.

@roji
Copy link
Member

roji commented Apr 29, 2019

Tested locally - everything seems OK, no deadlocks...

(ran tests on daeb665, on Ubuntu 19.04, against SQL Server running locally, 6 physical cores).

@smitpatel
Copy link
Contributor

It does not hang on Windows

@Gary-Zh - How many logical CPUs on your windows machine? The current implementation on query translation and concurrent running on tests can cause deadlock on machines with low number of cores regardless of OS.

@Gary-Zh
Copy link
Author

Gary-Zh commented Apr 29, 2019

@smitpatel I have 8 logical CPUs on my windows machine.
image

Do you suggest me to add more cores to the VM and try reproducing the issue again?

@divega
Copy link
Contributor

divega commented Apr 29, 2019

@Gary-Zh yes, that is something we believe is worth trying.

@ajcvickers
Copy link
Member

Closing this as we have been able to run on Linux without issues, and until the known deadlock issues in query are fixed there is nothing more to try here for now.

@Gary-Zh
Copy link
Author

Gary-Zh commented May 22, 2019

Hi @divega , it's been a while since we last time running EFCore tests.
So I've tried to increase the core number to 6 this time, same thing happens, please see the pictures below:
EFCore_Test1
EFCore_Test2

It still hangs on my Linux VM.

@Gary-Zh
Copy link
Author

Gary-Zh commented May 22, 2019

Can we re-open this issue and investigate more?

@roji
Copy link
Member

roji commented May 23, 2019

@Gary-Zh the problem is that this occurs neither in our continuous builds (which run all the time), nor on my personal build machine. So whatever issue you're running into seems to be somehow tied to your specific environment...

Any chance you could try on a physical Linux box (non-VM) and report?

@divega
Copy link
Contributor

divega commented May 28, 2019

@roji would it possible to break into the running tests with a debugger to figure out where the execution is at then the tests stall?

@roji
Copy link
Member

roji commented May 28, 2019

Sure, but I haven't actually seen the tests stall on my Linux machine at any point... I just ran the SqlServer functional test suite, once on 2.2.5 and once on master and everything was fine.

@Gary-Zh have you had a chance to try on a physical Linux box, ideally against the same SQL Server instance?

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants