Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1512968

Summary: Clean up UDS threads when removing last vdo.
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Krysl <jkrysl>
Component: vdoAssignee: Thomas Jaskiewicz <tjaskiew>
Status: CLOSED ERRATA QA Contact: Jakub Krysl <jkrysl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: awalsh, bgurney, jkrysl, limershe, lmiksik
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 6.1.0.102 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 15:48:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jakub Krysl 2017-11-14 14:21:05 UTC
Description of problem:
Creating VDO starts UDS thread '[uds:callbackW]', but removing the VDO does not stop this thread. AFAIK this thread should be persistent as it is shared between all VDO volumes, but the last VDO volume should clean up.

# ps aux | grep uds
root     17864  0.0  0.0 112704   980 pts/0    S+   14:14   0:00 grep --color=auto uds
# vdo create --name vdo --device /dev/sda3
Creating VDO vdo
Starting VDO vdo
Starting compression on VDO vdo
VDO instance 2 volume is ready at /dev/mapper/vdo
# ps aux | grep uds
root     17936  0.0  0.0      0     0 ?        S    14:14   0:00 [uds:callbackW]
root     17958  0.0  0.0 112704   980 pts/0    S+   14:14   0:00 grep --color=auto uds
# vdo remove --all
Removing VDO vdo
Stopping VDO vdo
# ps aux | grep uds
root     17936  0.0  0.0      0     0 ?        S    14:14   0:00 [uds:callbackW]
root     17981  0.0  0.0 112704   980 pts/0    S+   14:15   0:00 grep --color=auto uds

This thread is removed at this point when uds module is unloaded from kernel. As this thread is related to VDO, I cannot see any point of it running when there are no existing VDO.

Note: using VDO component as this RFE is for 'vdo remove'.

Version-Release number of selected component (if applicable):
vdo-6.1.0.46-9

How reproducible:
100%

Steps to Reproduce:
0. check if any UDS threads are running 
1. create vdo
2. remove vdo
3. check again if any UDS threads are running

Actual results:
[uds:callbackW] is running

Expected results:
no UDS threads are running

Additional info:

Comment 3 Jakub Krysl 2017-12-14 15:12:38 UTC
Removing RFE as there should be no threads left running when no VDOs are running.

Comment 4 Thomas Jaskiewicz 2017-12-18 21:53:48 UTC
We have given each VDO instance its own UDS callback worker, which will go away when the VDO device is removed.

Comment 6 Jakub Krysl 2018-01-02 09:06:32 UTC
[uds:callbackW] got changed to [kvdo:callbackW]:

# ps -ef | grep kvdo
root     14585     2  0 04:04 ?        00:00:00 [kvdo4:dedupeQ]
root     14586     2  1 04:04 ?        00:00:00 [kvdo4:journalQ]
root     14587     2  0 04:04 ?        00:00:00 [kvdo4:packerQ]
root     14588     2  0 04:04 ?        00:00:00 [kvdo4:logQ0]
root     14589     2  0 04:04 ?        00:00:00 [kvdo4:physQ0]
root     14590     2  0 04:04 ?        00:00:00 [kvdo4:hashQ0]
root     14591     2  0 04:04 ?        00:00:00 [kvdo4:bioQ0]
root     14592     2  0 04:04 ?        00:00:00 [kvdo4:bioQ1]
root     14593     2  0 04:04 ?        00:00:00 [kvdo4:bioQ2]
root     14594     2  0 04:04 ?        00:00:00 [kvdo4:bioQ3]
root     14595     2  0 04:04 ?        00:00:00 [kvdo4:ackQ]
root     14596     2  0 04:04 ?        00:00:00 [kvdo4:cpuQ0]
root     14597     2  0 04:04 ?        00:00:00 [kvdo4:cpuQ1]
root     14598     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14599     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14600     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14601     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14602     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14603     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14604     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14605     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14606     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14607     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14608     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14609     2  0 04:04 ?        00:00:00 [kvdo4:indexW]
root     14610     2  0 04:04 ?        00:00:00 [kvdo4:reader]
root     14611     2  0 04:04 ?        00:00:00 [kvdo4:reader]
root     14612     2  0 04:04 ?        00:00:00 [kvdo4:writer]
root     14613     2  0 04:04 ?        00:00:00 [kvdo4:callbackW]
root     14623  2149  0 04:05 pts/0    00:00:00 grep --color=auto kvdo

It no longer persists:
# vdo remove --all
Removing VDO vdo_test
Stopping VDO vdo_test
# ps -ef | grep kvdo
root     14638  2149  0 04:06 pts/0    00:00:00 grep --color=auto kvdo

Comment 9 errata-xmlrpc 2018-04-10 15:48:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0871