ufw fails badly during installation/upgrade if proc is not mounted

Bug #268084 reported by Cesare Tirabassi on 2008-09-09
2
Affects Status Importance Assigned to Milestone
ufw (Ubuntu)
Undecided
Jamie Strandboge

Bug Description

Binary package hint: ufw

  File "/usr/sbin/ufw", line 99, in <module>
    res = ui.do_application_action(action, profile)
  File "/usr/lib/python2.5/site-packages/ufw/frontend.py", line 734, in do_application_action
    res = self.application_update(profile)
  File "/usr/lib/python2.5/site-packages/ufw/frontend.py", line 658, in application_update
    if self.backend.do_checks and ufw.util.under_ssh():
  File "/usr/lib/python2.5/site-packages/ufw/util.py", line 344, in under_ssh
    raise ValueError(err_msg)
ValueError: Couldn't find parent pid for '9989'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 73, in apport_excepthook
    pr.add_proc_info()
  File "/usr/lib/python2.5/site-packages/apport/report.py", line 349, in add_proc_info
    self['ExecutablePath'] = os.readlink('/proc/' + pid + '/exe')
OSError: [Errno 2] No such file or directory: '/proc/9989/exe'

Original exception was:
Traceback (most recent call last):
  File "/usr/sbin/ufw", line 99, in <module>
    res = ui.do_application_action(action, profile)
  File "/usr/lib/python2.5/site-packages/ufw/frontend.py", line 734, in do_application_action
    res = self.application_update(profile)
  File "/usr/lib/python2.5/site-packages/ufw/frontend.py", line 658, in application_update
    if self.backend.do_checks and ufw.util.under_ssh():
  File "/usr/lib/python2.5/site-packages/ufw/util.py", line 344, in under_ssh
    raise ValueError(err_msg)
ValueError: Couldn't find parent pid for '9989'
dpkg: subprocess post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (2)

Related branches

Cesare Tirabassi (norsetto) wrote :

This case should be handled more gracefully that by an hard crash and dpkg failing to configure.

Changed in ufw:
assignee: nobody → jdstrand
status: New → Triaged
Jamie Strandboge (jdstrand) wrote :

Thanks for your bug report. The fix is committed in bzr and will be uploaded later today.

Changed in ufw:
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ufw - 0.22

---------------
ufw (0.22) intrepid; urgency=low

  * fix confusing output of 'app update' command (LP: #261932)
  * only reload during 'app update' if the profile name is used in
    the current ruleset (LP: #261323)
  * don't reload user rules if not enabled and don't toggle ENABLED=yes if
    failure in starting the firewall (LP: #262451)
  * don't traceback if /proc not mounted (LP: #268084)

 -- Jamie Strandboge <email address hidden> Wed, 27 Aug 2008 11:51:14 -0500

Changed in ufw:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers