Public bug reported:
This is very similar to bug #268084 except that I get the following
trace:
remote: Traceback (most recent call last):
remote: File "/usr/sbin/ufw", line 111, in <module>
remote: res = ui.do_action(pr.action, "", "", pr.force)
remote: File "/usr/lib/python2.7/dist-packages/ufw/frontend.py", line 576, in
do_action
remote: res = self.reset(force)
remote: File "/usr/lib/python2.7/dist-packages/ufw/frontend.py", line 842, in
reset
remote: if self.backend.do_checks and ufw.util.under_ssh():
remote: File "/usr/lib/python2.7/dist-packages/ufw/util.py", line 411, in
under_ssh
remote: return under_ssh(ppid)
remote: File "/usr/lib/python2.7/dist-packages/ufw/util.py", line 411, in
under_ssh
remote: return under_ssh(ppid)
remote: File "/usr/lib/python2.7/dist-packages/ufw/util.py", line 411, in
under_ssh
remote: return under_ssh(ppid)
remote: File "/usr/lib/python2.7/dist-packages/ufw/util.py", line 411, in
under_ssh
remote: return under_ssh(ppid)
remote: File "/usr/lib/python2.7/dist-packages/ufw/util.py", line 389, in
under_ssh
remote: raise ValueError(err_msg)
remote: ValueError: Couldn't find parent pid for '16072'
Looking at the code, I found the cause of the error.
The file /proc/16072/stat contains:
16072 (redo-ifchange a) S 16060 15734 15734 0 -1 4202496 1463 0 0 0 2 0
0 0 20 0 1 0 77092203 9498624 1113 4294967295 134512640 136961996
3219574064 3219534684 4118799382 0 0 16781318 0 0 0 0 17 2 0 0 0 0 0
And the code contains in ufw/util.py line 372:
ppid = file(name).readlines()[0].split()[3]
Of course the index [3] fails in this case because of the space in
"(redo-ifchange a)". I believe this is the argv[0] of the program,
modified using the setproctitle python module. This is clearly a parsing
error and should be fixed.
Alternatively, I used the --force option, so I don't even know why this
was checked.
** Affects: ufw (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1101304
Title:
ufw 0.31.1-1 fails when one of its parent processes has space in
argv[0]
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ufw/+bug/1101304/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs