[MDEV-33075] Sending TERM to mariadb no longer gracefully terminates the process Created: 2023-12-19  Updated: 2024-02-02  Resolved: 2024-02-02

Status: Closed
Project: MariaDB Server
Component/s: Platform FreeBSD, Server
Affects Version/s: 11.4
Fix Version/s: 11.4.2

Type: Bug Priority: Major
Reporter: Dave Gosselin Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None
Environment:

macOS 13.6.3 aarch64 apple silicon


Issue Links:
Duplicate
is duplicated by MDEV-33060 mtr appears to hang at start on macOS... Closed

 Description   

As of 11.4 git sha 70de4075a18c12ed7e55db9a49e66eb6cff308b2 (but not necessarily due to this commit), sending the TERM signal to mariadb on macOS no longer gracefully terminates mariadb. In fact, nothing appears to happen from the perspective of the console (running mariadb in the foreground rather than as a daemon).



 Comments   
Comment by Dave Gosselin [ 2024-01-31 ]

I'm starting this now because it's starting to annoy me.

Comment by Dave Gosselin [ 2024-01-31 ]

013fc02a23e7861dfb879e4bea5cf02d0562a509 is the git commit that introduces this problem. The commit immediately preceding, 3424ed7d428b604616fabd2c73620a49348baa21 works as expected.

Comment by Vladislav Vaintroub [ 2024-01-31 ]

that's probably about waking main thread, something pthread_kill did in the past, can't think about anything else. I was not sure socket shutdown would work, yet neither buildbot, nor our macOS folks would complain. There is already some `termination_event_fd` for Linux for systemd by Daniel Black, to avoid socket shutdowns (bad for systemd "socket activation") . that thing works with eventfd. I think it is more portable way would be good old Unix self-pipe.

Generated at Thu Feb 08 10:36:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.