wicd RenameProcess function results in rename failed

Bug #806381 reported by Yusseri Yusoff on 2011-07-06
This bug affects 7 people
Affects Status Importance Assigned to Milestone
wicd (Ubuntu)

Bug Description

Running any instance of wicd, wicd-client, wicd-curse, wicd-gtk will result in a line output to stdout as so:

# sudo wicd --version
rename failed

wicd 1.7.0 (bzr-r552)
wireless (and wired) connection daemon.

 -a --no-autoconnect Don't auto-scan/auto-connect.
 -f --no-daemon Don't daemonize (run in foreground).
 -e --no-stderr Don't redirect stderr.
 -n --no-poll Don't monitor network status.
 -o --no-stdout Don't redirect stdout.
 -h --help Print this help.

The "rename failed" exception is consistent, on both 32-bit and 64-bit, whether run sudo or as user.

I have traced the problem to the function RenameProcess(new_name) in the file /usr/share/pyshared/wicd/misc.py.

The function does a test for the existence of the libc.so.6 library, by first trying to determine whether it's on a 64-bit or a 32-bit system. Depending on which arch is found, the function then sets the path to the lib.

This path is now wrong for 11.04.

Original function is:

def RenameProcess(new_name):
    """ Renames the process calling the function to the given name. """
    if sys.platform != 'linux2':
        print 'Unsupported platform'
        return False
        import ctypes
        is_64 = os.path.exists('/lib64/libc.so.6')
        if is_64:
            libc = ctypes.CDLL('/lib64/libc.so.6')
            libc = ctypes.CDLL('/lib/libc.so.6')
        libc.prctl(15, new_name, 0, 0, 0)
        return True
        print "rename failed"
        return False

Actual paths within the function should be:

def RenameProcess(new_name):
    """ Renames the process calling the function to the given name. """
    if sys.platform != 'linux2':
        print 'Unsupported platform'
        return False
        import ctypes
        is_64 = os.path.exists('/lib64/x86_64-linux-gnu/libc.so.6')
        if is_64:
            libc = ctypes.CDLL('/lib64/x86_64-linux-gnu/libc.so.6')
            libc = ctypes.CDLL('/lib/i386-linux-gnu/libc.so.6')
        libc.prctl(15, new_name, 0, 0, 0)
        return True
        print "rename failed"
        return False

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: wicd 1.7.0+ds1-6
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
Date: Wed Jul 6 17:10:09 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
PackageArchitecture: all
SourcePackage: wicd
UpgradeStatus: No upgrade log present (probably fresh install)

Yusseri Yusoff (yusseri-yusoff) wrote :
Changed in wicd (Ubuntu):
status: New → Confirmed
Yuv (yuv) wrote :

I can confirm the bug and the fix (thank you Yusseri!)

I had to re-install Kubuntu Natty on my notebook this week following a HDD crash.

On the old system (started its life as a Natty beta in January 2011) wicd worked flawlessly and was my sole connection to the outer world because the default network manager would not show any WLAN.

Following the same installation protocol when starting from scratch in August 2011, wicd exhibit the bug. Editing /usr/lib/python2.7/wicd/misc.py according to the above instructions fix the bug.

Mitigating factor: In the process I found out that the WLAN interface is now displayed properly in the default network manager. So personally I have no more reason to run wicd.

eoranged (eoranged) wrote :

The bug is still actual and not fixed in Ubuntu 11.04.
The fix in bug description helped. Thanks, Yusseri Yusoff and shame on maintainers.

Ryan Kitty (gothickitty93) wrote :

I just experienced this on a fresh install of Oneiric, too.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers