[SRU] rabbitmq-server does not properly shutdown
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
rabbitmq-server (Debian) |
Fix Released
|
Unknown
|
|||
rabbitmq-server (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Sergio Durigan Junior | ||
Cosmic |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
[Impact]
The systemd file rabbitmq-
[Test Case]
Although I was able to reproduce this almost 100% of the time, there were rare occasions when the restart procedure finished normally. I was also only able to reproduce it using a bionic VM, not a container. If you have multipass or lxd configured to launch VMs, that should be easy.
The steps are:
$ lxc launch ubuntu-daily:bionic --vm bug1784757-rabbitmq-server # or use multipass
$ lxc shell bug1784757-rabbitmq-server
# apt update
# apt install rabbitmq-server -y
# systemctl restart rabbitmq-
In a normal scenario, the restart should take around 3 seconds or less. With the bug, it takes around 90 seconds. If you can't reproduce it, try running "systemctl restart" again. A quick way to trigger it is to run a for loop like:
# for i in $(seq 10); do time systemctl restart rabbitmq-
[Regression Potential]
* Because rabbitmq-server implements systemd's "Type=notify" using socat to communicate with systemd-notify over a socket, we will be introducing another point of failure (socat) in the mix.
* So, albeit unlikely, there may be a problem when using socat. That would not be a regression, though, since the outcome would be the same as we have today: "systemctl restart" would not properly work, even though the service did restart.
[Original Report]
When I run `systemctl restart rabbitmq-server` it waits for 90 seconds then systemd sends SIGKILL to it.
Presumably the `epmd` process does not receive SIGTERM, since if I run `kill 1493` (or whatever pid it currently is) then restart happens straight after that successfully
● rabbitmq-
Loaded: loaded (/lib/systemd/
Active: deactivating (final-sigterm) since Wed 2018-08-01 01:17:04 UTC; 7s ago
Process: 1183 ExecStop=
Process: 178 ExecStartPost=
Process: 177 ExecStart=
Main PID: 177 (code=killed, signal=TERM)
Tasks: 1 (limit: 4915)
CGroup: /system.
└─1493 /usr/lib/
Aug 01 01:11:20 rmq-1 systemd[1]: rabbitmq-
Aug 01 01:11:20 rmq-1 systemd[1]: Starting RabbitMQ Messaging Server...
Aug 01 01:11:25 rmq-1 rabbitmq[178]: Waiting for 'rabbit@rmq-1'
Aug 01 01:11:25 rmq-1 rabbitmq[178]: pid is 204
Aug 01 01:11:30 rmq-1 systemd[1]: Started RabbitMQ Messaging Server.
Aug 01 01:17:04 rmq-1 systemd[1]: Stopping RabbitMQ Messaging Server...
Aug 01 01:17:06 rmq-1 rabbitmq[1183]: Stopping and halting node 'rabbit@rmq-1'
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
-
Diff: 58 lines (+17/-3)3 files modifieddebian/changelog (+11/-0)
debian/control (+1/-0)
debian/rabbitmq-server.service (+5/-3)
description: | updated |
Changed in rabbitmq-server (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in rabbitmq-server (Ubuntu Cosmic): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in rabbitmq-server (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in rabbitmq-server (Ubuntu): | |
status: | Triaged → Fix Released |
summary: |
- rabbitmq-server does not properly shutdown + [SRU] rabbitmq-server does not properly shutdown |
Changed in rabbitmq-server (Debian): | |
status: | Unknown → Fix Released |
Changed in rabbitmq-server (Ubuntu Cosmic): | |
status: | Triaged → Won't Fix |
Changed in rabbitmq-server (Ubuntu Bionic): | |
assignee: | nobody → Sergio Durigan Junior (sergiodj) |
description: | updated |
Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:
apport-collect 1784757
When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https:/ /wiki.ubuntu. com/ReportingBu gs.