"TEST A" verification was done following steps from bug #1927745, where the lack of the restart was first found, and that fix is included in this upload as well.
Problem quickly reproduced:
ubuntu@b-gssd-restart-1928259-1927745-a:~$ sudo ./bz1419280_test_threads
Iter 1
calling stat on '/mnt/test_krb5/foo' with uids 9995 through 10035
reproduced the bug after 1 iterations
ubuntu@b-gssd-restart-1928259-1927745-a:~$ ps axw|grep stat_as
8012 pts/0 D 0:00 ./stat_as /mnt/test_krb5/foo 9995 10035
8036 pts/0 D 0:00 ./stat_as /mnt/test_krb5/foo 9995 10035
8091 pts/0 S+ 0:00 grep --color=auto stat_as
In this state, I installed the fixed packages from proposed. But first, let's
get the rpc.gssd pid:
ubuntu@b-gssd-restart-1928259-1927745-a:~$ ps axw | grep rpc\\.gssd
7854 ? Ss 0:00 /usr/sbin/rpc.gssd
Now upgrade:
ubuntu@b-gssd-restart-1928259-1927745-a:~$ sudo apt install nfs-common
Reading package lists... Done
(...)
Do you want to continue? [Y/n]
Get:1 http://br.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 nfs-common amd64 1:1.3.4-2.1ubuntu5.5 [206 kB]
Get:2 http://br.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 nfs-kernel-server amd64 1:1.3.4-2.1ubuntu5.5 [93.8 kB]
Fetched 299 kB in 0s (1479 kB/s)
(Reading database ... 64831 files and directories currently installed.)
Preparing to unpack .../nfs-common_1%3a1.3.4-2.1ubuntu5.5_amd64.deb ...
Unpacking nfs-common (1:1.3.4-2.1ubuntu5.5) over (1:1.3.4-2.1ubuntu5.3) ...
Preparing to unpack .../nfs-kernel-server_1%3a1.3.4-2.1ubuntu5.5_amd64.deb ...
Unpacking nfs-kernel-server (1:1.3.4-2.1ubuntu5.5) over (1:1.3.4-2.1ubuntu5.3) ...
Setting up nfs-common (1:1.3.4-2.1ubuntu5.5) ...
Setting up nfs-kernel-server (1:1.3.4-2.1ubuntu5.5) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.47) ...
Not only was rpc.gssd restarted automatically (see new pid):
ubuntu@b-gssd-restart-1928259-1927745-a:~$ ps axw | grep rpc\\.gssd
8886 ? Ss 0:00 /usr/sbin/rpc.gssd
We also got rid of the stuck stat_as processes:
ubuntu@b-gssd-restart-1928259-1927745-a:~$ ps axw|grep stat_as
9550 pts/0 S+ 0:00 grep --color=auto stat_as
I then ran the reproducer script one more time but aborted it manually after over 4min without hitting the bug:
ubuntu@b-gssd-restart-1928259-1927745-a:~$ time sudo ./bz1419280_test_threads
(...)
Iter 249
calling stat on '/mnt/test_krb5/foo' with uids 9995 through 10035
^C
real 4m18.536s
user 0m2.783s
sys 0m5.950s
Bionic verification
"TEST A" verification was done following steps from bug #1927745, where the lack of the restart was first found, and that fix is included in this upload as well.
ubuntu@ b-gssd- restart- 1928259- 1927745- A:~$ apt-cache policy nfs-common 2.1ubuntu5. 3 2.1ubuntu5. 3 2.1ubuntu5. 3 500 br.archive. ubuntu. com/ubuntu bionic-updates/main amd64 Packages br.archive. ubuntu. com/ubuntu bionic- security/ main amd64 Packages dpkg/status 1.3.4-2. 1ubuntu5 500 br.archive. ubuntu. com/ubuntu bionic/main amd64 Packages
nfs-common:
Installed: 1:1.3.4-
Candidate: 1:1.3.4-
Version table:
*** 1:1.3.4-
500 http://
500 http://
100 /var/lib/
1:
500 http://
Problem quickly reproduced: b-gssd- restart- 1928259- 1927745- a:~$ sudo ./bz1419280_ test_threads krb5/foo' with uids 9995 through 10035 b-gssd- restart- 1928259- 1927745- a:~$ ps axw|grep stat_as
ubuntu@
Iter 1
calling stat on '/mnt/test_
reproduced the bug after 1 iterations
ubuntu@
8012 pts/0 D 0:00 ./stat_as /mnt/test_krb5/foo 9995 10035
8036 pts/0 D 0:00 ./stat_as /mnt/test_krb5/foo 9995 10035
8091 pts/0 S+ 0:00 grep --color=auto stat_as
In this state, I installed the fixed packages from proposed. But first, let's b-gssd- restart- 1928259- 1927745- a:~$ ps axw | grep rpc\\.gssd
get the rpc.gssd pid:
ubuntu@
7854 ? Ss 0:00 /usr/sbin/rpc.gssd
Now upgrade: b-gssd- restart- 1928259- 1927745- a:~$ sudo apt install nfs-common br.archive. ubuntu. com/ubuntu bionic- proposed/ main amd64 nfs-common amd64 1:1.3.4- 2.1ubuntu5. 5 [206 kB] br.archive. ubuntu. com/ubuntu bionic- proposed/ main amd64 nfs-kernel-server amd64 1:1.3.4- 2.1ubuntu5. 5 [93.8 kB] common_ 1%3a1.3. 4-2.1ubuntu5. 5_amd64. deb ... 4-2.1ubuntu5. 5) over (1:1.3. 4-2.1ubuntu5. 3) ... kernel- server_ 1%3a1.3. 4-2.1ubuntu5. 5_amd64. deb ... 4-2.1ubuntu5. 5) over (1:1.3. 4-2.1ubuntu5. 3) ... 4-2.1ubuntu5. 5) ... 4-2.1ubuntu5. 5) ...
ubuntu@
Reading package lists... Done
(...)
Do you want to continue? [Y/n]
Get:1 http://
Get:2 http://
Fetched 299 kB in 0s (1479 kB/s)
(Reading database ... 64831 files and directories currently installed.)
Preparing to unpack .../nfs-
Unpacking nfs-common (1:1.3.
Preparing to unpack .../nfs-
Unpacking nfs-kernel-server (1:1.3.
Setting up nfs-common (1:1.3.
Setting up nfs-kernel-server (1:1.3.
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.47) ...
Not only was rpc.gssd restarted automatically (see new pid): b-gssd- restart- 1928259- 1927745- a:~$ ps axw | grep rpc\\.gssd
ubuntu@
8886 ? Ss 0:00 /usr/sbin/rpc.gssd
We also got rid of the stuck stat_as processes: b-gssd- restart- 1928259- 1927745- a:~$ ps axw|grep stat_as
ubuntu@
9550 pts/0 S+ 0:00 grep --color=auto stat_as
I then ran the reproducer script one more time but aborted it manually after over 4min without hitting the bug: b-gssd- restart- 1928259- 1927745- a:~$ time sudo ./bz1419280_ test_threads krb5/foo' with uids 9995 through 10035
ubuntu@
(...)
Iter 249
calling stat on '/mnt/test_
^C
real 4m18.536s
user 0m2.783s
sys 0m5.950s
TEST B
ubuntu@ b-gssd- restart- 1928259- 1927745- b:~$ diff -u pstree.old pstree.new b-gssd- restart- 1928259- 1927745- b:~$ l pstree.* b-gssd- restart- 1928259- 1927745- b:~$ apt-cache policy nfs-common 2.1ubuntu5. 5 2.1ubuntu5. 5 2.1ubuntu5. 5 500 br.archive. ubuntu. com/ubuntu bionic- proposed/ main amd64 Packages dpkg/status 1.3.4-2. 1ubuntu5. 3 500 br.archive. ubuntu. com/ubuntu bionic-updates/main amd64 Packages br.archive. ubuntu. com/ubuntu bionic- security/ main amd64 Packages 1.3.4-2. 1ubuntu5 500 br.archive. ubuntu. com/ubuntu bionic/main amd64 Packages
ubuntu@
-rw-rw-r-- 1 ubuntu ubuntu 633 Jun 11 20:55 pstree.new
-rw-rw-r-- 1 ubuntu ubuntu 633 Jun 11 20:55 pstree.old
ubuntu@
nfs-common:
Installed: 1:1.3.4-
Candidate: 1:1.3.4-
Version table:
*** 1:1.3.4-
500 http://
100 /var/lib/
1:
500 http://
500 http://
1:
500 http://
Bionic verification succeeded.