Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

mysqldadmin hangs, making the whole shutdown process hang indefinitely #192

Open
stephen-hand-RTR opened this issue May 8, 2020 · 3 comments

Comments

@stephen-hand-RTR
Copy link

Hi! We have an intermittent issue where the mysqladmin process is hanging when trying to shut down the mysql db.

Because there is no timeout waiting for this complete, it hangs indefinitely and won't move on to the other shutdown methods it should attempt in the stopInternal method.

Because the pid is hidden away, there is no alternative way to shut down the process when this happens, short of trying to identify with external processes (we are on Java 8 so no fancy process API) or use reflection hacks to try and get at the internals.

Could a shortish timeout be applied waiting for the mysqladmin process to complete so the shutdown logic can move on?

This is observed on wix-embedded-mysql 2.1.4, using MySQL version 5.6.24 on macOS Catalina 10.15.4

Alternatively, could a way be added to disable the JVM shutdown hook that stops the process? I believe the root cause of the hang is because the mysql shutdown has a race condition with logic in other shutdown hooks. If this shutdown hook could be disabled, I could eliminate the race condition in application logic

@stephen-hand-RTR
Copy link
Author

Reproduced in latest version from maven (4.6.1)

@Lincong
Copy link

Lincong commented Jun 25, 2020

I also experienced this issue in com.wix:wix-embedded-mysql:4.6.1

@stephen-hand-RTR
Copy link
Author

PR: #196

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants