[Bug 1226067] [NEW] ifquery fails with bad file descriptor

Scott Moser smoser at ubuntu.com
Mon Sep 16 14:08:53 UTC 2013


Public bug reported:

$ sudo ifquery --list --allow auto; echo $?;
ifquery: failed to lock lockfile /run/network/.ifstate.lock: Bad file descriptor
1

This seems possibly quite serious as /etc/network/if-up.d/upstart uses
this program to determine the "auto" interfaces and then emits static-
network-up.

This reproduces on a fresh saucy image with serial=20130916.

Also interesting, possibly related and possibly a bug in and of itself:
$ cp /etc/network/interfaces /tmp/interfaces
$ sudo ifquery --interfaces /tmp/interfaces  --list --allow=auto
ifquery: failed to lock lockfile /run/network/.ifstate.lock: Bad file descriptor

Seems odd that it would do anything with /run/network/.ifstate.lock in
this case since, by doing so, it means i'd have to have privilege to
read that file in order to have it parse my provided --interfaces= file.

For reference, on raring instance as non-root:
$ ifquery --list --allow auto
lo
eth0


ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: ifupdown 0.7.44ubuntu2
ProcVersionSignature: User Name 3.11.0-7.13-generic 3.11.0
Uname: Linux 3.11.0-7-generic x86_64
ApportVersion: 2.12.1-0ubuntu4
Architecture: amd64
Date: Mon Sep 16 14:02:41 2013
Ec2AMI: ami-000004dd
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.tiny
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
MarkForUpload: True
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ifupdown
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: ifupdown (Ubuntu)
     Importance: Medium
         Status: New


** Tags: amd64 apport-bug ec2-images regression-release saucy

** Description changed:

  $ sudo ifquery --list --allow auto; echo $?;
  ifquery: failed to lock lockfile /run/network/.ifstate.lock: Bad file descriptor
  1
  
- This seems possibly quite serious as /etc/network/if-up.d/upstart uses
- this program to determine the "auto" interfaces and then emits static-
- network-up.
+ 
+ This seems possibly quite serious as /etc/network/if-up.d/upstart uses this program to determine the "auto" interfaces and then emits static-network-up.
+ 
+ 
+ Also interesting, possibly related and possibly a bug in and of itself:
+ $ cp /etc/network/interfaces /tmp/interfaces
+ $ sudo ifquery --interfaces /tmp/interfaces  --list --allow=auto 
+ ifquery: failed to lock lockfile /run/network/.ifstate.lock: Bad file descriptor
+ 
+ Seems odd that it would do anything with /run/network/.ifstate.lock in
+ this case since, by doing so, it means i'd have to have privilege to
+ read that file in order to have it parse my provided --interfaces= file.
+ 
  
  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: ifupdown 0.7.44ubuntu2
  ProcVersionSignature: User Name 3.11.0-7.13-generic 3.11.0
  Uname: Linux 3.11.0-7-generic x86_64
  ApportVersion: 2.12.1-0ubuntu4
  Architecture: amd64
  Date: Mon Sep 16 14:02:41 2013
  Ec2AMI: ami-000004dd
  Ec2AMIManifest: FIXME
  Ec2AvailabilityZone: nova
  Ec2InstanceType: m1.tiny
  Ec2Kernel: unavailable
  Ec2Ramdisk: unavailable
  MarkForUpload: True
  ProcEnviron:
-  TERM=screen
-  PATH=(custom, no user)
-  XDG_RUNTIME_DIR=<set>
-  LANG=en_US.UTF-8
-  SHELL=/bin/bash
+  TERM=screen
+  PATH=(custom, no user)
+  XDG_RUNTIME_DIR=<set>
+  LANG=en_US.UTF-8
+  SHELL=/bin/bash
  SourcePackage: ifupdown
  UpgradeStatus: No upgrade log present (probably fresh install)

** Description changed:

  $ sudo ifquery --list --allow auto; echo $?;
  ifquery: failed to lock lockfile /run/network/.ifstate.lock: Bad file descriptor
  1
  
+ This seems possibly quite serious as /etc/network/if-up.d/upstart uses
+ this program to determine the "auto" interfaces and then emits static-
+ network-up.
  
- This seems possibly quite serious as /etc/network/if-up.d/upstart uses this program to determine the "auto" interfaces and then emits static-network-up.
- 
+ This reproduces on a fresh saucy image with serial=20130916.
  
  Also interesting, possibly related and possibly a bug in and of itself:
  $ cp /etc/network/interfaces /tmp/interfaces
- $ sudo ifquery --interfaces /tmp/interfaces  --list --allow=auto 
+ $ sudo ifquery --interfaces /tmp/interfaces  --list --allow=auto
  ifquery: failed to lock lockfile /run/network/.ifstate.lock: Bad file descriptor
  
  Seems odd that it would do anything with /run/network/.ifstate.lock in
  this case since, by doing so, it means i'd have to have privilege to
  read that file in order to have it parse my provided --interfaces= file.
+ 
+ For reference, on raring instance as non-root:
+ $ ifquery --list --allow auto
+ lo
+ eth0
  
  
  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: ifupdown 0.7.44ubuntu2
  ProcVersionSignature: User Name 3.11.0-7.13-generic 3.11.0
  Uname: Linux 3.11.0-7-generic x86_64
  ApportVersion: 2.12.1-0ubuntu4
  Architecture: amd64
  Date: Mon Sep 16 14:02:41 2013
  Ec2AMI: ami-000004dd
  Ec2AMIManifest: FIXME
  Ec2AvailabilityZone: nova
  Ec2InstanceType: m1.tiny
  Ec2Kernel: unavailable
  Ec2Ramdisk: unavailable
  MarkForUpload: True
  ProcEnviron:
   TERM=screen
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: ifupdown
  UpgradeStatus: No upgrade log present (probably fresh install)

** Changed in: ifupdown (Ubuntu)
   Importance: Undecided => Medium

** Tags added: regression-release

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ifupdown in Ubuntu.
https://bugs.launchpad.net/bugs/1226067

Title:
  ifquery fails with bad file descriptor

Status in “ifupdown” package in Ubuntu:
  New

Bug description:
  $ sudo ifquery --list --allow auto; echo $?;
  ifquery: failed to lock lockfile /run/network/.ifstate.lock: Bad file descriptor
  1

  This seems possibly quite serious as /etc/network/if-up.d/upstart uses
  this program to determine the "auto" interfaces and then emits static-
  network-up.

  This reproduces on a fresh saucy image with serial=20130916.

  Also interesting, possibly related and possibly a bug in and of itself:
  $ cp /etc/network/interfaces /tmp/interfaces
  $ sudo ifquery --interfaces /tmp/interfaces  --list --allow=auto
  ifquery: failed to lock lockfile /run/network/.ifstate.lock: Bad file descriptor

  Seems odd that it would do anything with /run/network/.ifstate.lock in
  this case since, by doing so, it means i'd have to have privilege to
  read that file in order to have it parse my provided --interfaces=
  file.

  For reference, on raring instance as non-root:
  $ ifquery --list --allow auto
  lo
  eth0


  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: ifupdown 0.7.44ubuntu2
  ProcVersionSignature: User Name 3.11.0-7.13-generic 3.11.0
  Uname: Linux 3.11.0-7-generic x86_64
  ApportVersion: 2.12.1-0ubuntu4
  Architecture: amd64
  Date: Mon Sep 16 14:02:41 2013
  Ec2AMI: ami-000004dd
  Ec2AMIManifest: FIXME
  Ec2AvailabilityZone: nova
  Ec2InstanceType: m1.tiny
  Ec2Kernel: unavailable
  Ec2Ramdisk: unavailable
  MarkForUpload: True
  ProcEnviron:
   TERM=screen
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: ifupdown
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1226067/+subscriptions




More information about the foundations-bugs mailing list