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

monetdb5-sql sysv init script does not wait for shutdown #6108

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

monetdb5-sql sysv init script does not wait for shutdown #6108

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal Server Tools

Comments

@monetdb-team
Copy link

Date: 2016-10-25 15:41:18 +0200
From: Richard Hughes <<richard.monetdb>>
To: Merovingian devs <>
Version: 11.23.13 (Jun2016-SP2)

Last updated: 2016-12-21 13:07:17 +0100

Comment 24627

Date: 2016-10-25 15:41:18 +0200
From: Richard Hughes <<richard.monetdb>>

Created attachment 489
Fix patch

To reproduce:

  1. service monetdb5-sql stop; pidof monetdbd

Expected result:

Actual result:

Fix attached.

This affects apt in particular, where during an apt-get upgrade the previous installation may not have stopped by the time the new installation is trying to start up, thus causing a failed start.

Attached file: synchronous-monetdbd-stop.patch (text/plain, 756 bytes)
Description: Fix patch

Comment 24628

Date: 2016-10-25 16:21:55 +0200
From: @sjoerdmullender

Is this still necessary after changesets 1024269b8b67 and c786801bc515 (the latter from Oct 18)?
The idea of those changes is that when you call monetdbd stop $DBFARM, it now waits until the monetdbd that is serving that farm has actually stopped.

Comment 24630

Date: 2016-10-25 19:53:26 +0200
From: Richard Hughes <<richard.monetdb>>

(In reply to Sjoerd Mullender from comment 1)

Is this still necessary after changesets 1024269b8b67 and c786801bc515 (the
latter from Oct 18)?
The idea of those changes is that when you call monetdbd stop $DBFARM, it
now waits until the monetdbd that is serving that farm has actually stopped.

I think it is still necessary. According to the man page, "start-stop-daemon --stop" doesn't actually execute the command with the given arguments (so that bit of the command line could be removed with the patch too), hence none of the code in argvcmds.c gets executed. Instead, it just sends SIGTERM and immediately returns (when --retry is not specified).

Comment 24632

Date: 2016-10-26 10:22:38 +0200
From: MonetDB Mercurial Repository <>

Changeset 4e7ab88f76dd made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4e7ab88f76dd

Changeset description:

Use proper way to stop daemon.

When using "monetdbd stop $FARM", the running daemon is sent a
SIGTERM, after which the sending monetdbd waits a while until the
daemon has actually stopped.  When using start-stop-daemon, we can do
the same thing: send a SIGTERM, and wait.  start-stop-daemon does not
invoke an external program to stop the daemon as the old code
apparently assumed.

This fixes bug #6108.

Comment 24649

Date: 2016-11-07 09:29:00 +0100
From: @sjoerdmullender

I have no easy way to test this, but since I followed the rlevant manual page, and my fix is basically the same as the given by Richard, I assume that this is now fixed.

Comment 24653

Date: 2016-11-07 19:57:01 +0100
From: Richard Hughes <<richard.monetdb>>

Sorry, I didn't realize you wanted me to test it: yes, it works in all the cases I've tried.

@monetdb-team monetdb-team added bug Something isn't working normal Server Tools labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal Server Tools
Projects
None yet
Development

No branches or pull requests

2 participants