Re: 2.6.18-rc4-mm[1,2,3] -- Network card not getting assigned an eth device name

2006-08-29 Thread David Miller
From: Miles Lane [EMAIL PROTECTED]
Date: Tue, 29 Aug 2006 01:43:48 -0700

 Then, when I testing running NetworkManager.bak, I got:
 
 [NetworkManager.:6078]: Changing netdevice name from [eth1] to 
 [`$,3u=(B$,3u=(B]
 [NetworkManager.:6078]: Changing netdevice name from [eth0] to 
 [`$,3u=(B$,3u=(B]

Someone who can debug NetworkManager with gdb or similar needs
to step through it and figure out why it wants to use this
crazy garbage string as the name.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.18-rc4-mm[1,2,3] -- Network card not getting assigned an eth device name

2006-08-28 Thread Benoit Boissinot

On 8/27/06, Jeremy Fitzhardinge [EMAIL PROTECTED] wrote:

Andrew Morton wrote:
 Jeremy reported that a while back too.  I do not know what is causing it
 and as far as I know no net developers have yet looked into it.


It went away with -rc4-mm[23] for me...


I just reproduced it with rc4-mm3, ipw2200 after coming out of
suspend. I'll apply the patch from David Miller and see if anything
shows out in the log.

regards,

Benoit
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.18-rc4-mm[1,2,3] -- Network card not getting assigned an eth device name

2006-08-28 Thread Miles Lane

On 8/27/06, David Miller [EMAIL PROTECTED] wrote:

From: Andrew Morton [EMAIL PROTECTED]
Date: Sun, 27 Aug 2006 00:19:43 -0700

 Jeremy reported that a while back too.  I do not know what is causing it
 and as far as I know no net developers have yet looked into it.

A debugging patch like this one should help figure out the culprit.

If we don't see the gibberish netdevice name printed in the kernel
logs, then likely something is corrupting the netdevice structure or
the memory holding the name.

diff --git a/net/core/dev.c b/net/core/dev.c
index d4a1ec3..45f9b19 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -738,6 +738,11 @@ int dev_change_name(struct net_device *d

if (!dev_valid_name(newname))
return -EINVAL;
+#if 1
+   printk([%s:%d]: Changing netdevice name from [%s] to [%s]\n,
+  current-comm, current-pid,
+  dev-name, newname);
+#endif

if (strchr(newname, '%')) {
err = dev_alloc_name(dev, newname);



Dan, do you have any idea why NetworkManager from Ubuntu 6.06.1
would be corrupting network device names on recent MM kernels?
I haven't seen this happening with Ubuntu's kernels.  If you like, I can
send you my kernel .config file.

Here's what I get:

[NetworkManager:5399]: Changing netdevice name from [eth0] to [��]
��: link down
ADDRCONF(NETDEV_UP): ��: link is not ready
[NetworkManager:5399]: Changing netdevice name from [eth1] to [7G*e]
7G*e: no IPv6 routers present

Here's the result of strace -f -F -v -a50 NetworkManager:

execve(./NetworkManager.bak, [./NetworkManager.bak],
[TERM=linux, SHELL=/bin/bash, HUSHLOGIN=FALSE,
OLDPWD=/home/miles, USER=root,
LS_COLORS=no=00:fi=00:di=01;34:l..., SUDO_USER=miles,
SUDO_UID=1000, PATH=/usr/local/sbin:/usr/local/...,
MAIL=/var/mail/miles, PWD=/usr/sbin, LANG=en_US.UTF-8,
HISTCONTROL=ignoredups, SUDO_COMMAND=/bin/bash,
HOME=/home/miles, SHLVL=2, LANGUAGE=en_US:en_GB:en,
LOGNAME=root, LESSOPEN=| /usr/bin/lesspipe %s, SUDO_GID=1000,
LESSCLOSE=/usr/bin/lesspipe %s %..., _=/usr/bin/strace]) = 0
uname({sysname=Linux, nodename=Dumbleedor,
release=2.6.18-rc4-mm3, version=#32 Sun Aug 27 01:01:35 PDT 2006,
machine=i686}) = 0
brk(0)= 0x808b000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7f8a000
access(/etc/ld.so.nohwcap, F_OK)= -1 ENOENT (No such
file or directory)
old_mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7f88000
access(/etc/ld.so.preload, R_OK)= -1 ENOENT (No such
file or directory)
open(/etc/ld.so.cache, O_RDONLY)= 3
fstat64(3, {st_dev=makedev(3, 10), st_ino=195836,
st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096,
st_blocks=216, st_size=102666, st_atime=2006/08/28-00:34:02,
st_mtime=2006/08/25-22:58:56, st_ctime=2006/08/25-22:58:56}) = 0
old_mmap(NULL, 102666, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f6e000
close(3)  = 0
access(/etc/ld.so.nohwcap, F_OK)= -1 ENOENT (No such
file or directory)
open(/usr/lib/libhal.so.1, O_RDONLY)= 3
read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\\36\0..., 512) = 512
fstat64(3, {st_dev=makedev(3, 10), st_ino=830757,
st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096,
st_blocks=64, st_size=30448, st_atime=2006/08/28-00:34:02,
st_mtime=2006/05/22-08:09:25, st_ctime=2006/07/05-21:10:31}) = 0
old_mmap(NULL, 33464, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xb7f65000
old_mmap(0xb7f6d000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0xb7f6d000
close(3)  = 0
access(/etc/ld.so.nohwcap, F_OK)= -1 ENOENT (No such
file or directory)
open(/lib/libiw.so.28, O_RDONLY)= 3
read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\25..., 512) = 512
fstat64(3, {st_dev=makedev(3, 10), st_ino=814477,
st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096,
st_blocks=48, st_size=23228, st_atime=2006/08/28-00:34:02,
st_mtime=2006/02/09-15:38:09, st_ctime=2006/07/05-21:19:53}) = 0
old_mmap(NULL, 26188, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xb7f5e000
old_mmap(0xb7f64000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0xb7f64000
close(3)  = 0
access(/etc/ld.so.nohwcap, F_OK)= -1 ENOENT (No such
file or directory)
open(/usr/lib/libnl.so.1, O_RDONLY) = 3
read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\\236..., 512) = 512
fstat64(3, {st_dev=makedev(3, 10), st_ino=831039,
st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096,
st_blocks=368, st_size=180452, st_atime=2006/08/28-00:34:03,
st_mtime=2006/03/22-05:46:12, st_ctime=2006/03/29-09:41:12}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, 

Re: 2.6.18-rc4-mm[1,2,3] -- Network card not getting assigned an eth device name

2006-08-28 Thread Andrew Morton
On Mon, 28 Aug 2006 08:52:02 -0700
Miles Lane [EMAIL PROTECTED] wrote:

 On 8/27/06, David Miller [EMAIL PROTECTED] wrote:
  From: Andrew Morton [EMAIL PROTECTED]
  Date: Sun, 27 Aug 2006 00:19:43 -0700
 
   Jeremy reported that a while back too.  I do not know what is causing it
   and as far as I know no net developers have yet looked into it.
 
  A debugging patch like this one should help figure out the culprit.
 
  If we don't see the gibberish netdevice name printed in the kernel
  logs, then likely something is corrupting the netdevice structure or
  the memory holding the name.
 
  diff --git a/net/core/dev.c b/net/core/dev.c
  index d4a1ec3..45f9b19 100644
  --- a/net/core/dev.c
  +++ b/net/core/dev.c
  @@ -738,6 +738,11 @@ int dev_change_name(struct net_device *d
 
  if (!dev_valid_name(newname))
  return -EINVAL;
  +#if 1
  +   printk([%s:%d]: Changing netdevice name from [%s] to [%s]\n,
  +  current-comm, current-pid,
  +  dev-name, newname);
  +#endif
 
  if (strchr(newname, '%')) {
  err = dev_alloc_name(dev, newname);
 
 
 Dan, do you have any idea why NetworkManager from Ubuntu 6.06.1
 would be corrupting network device names on recent MM kernels?
 I haven't seen this happening with Ubuntu's kernels.  If you like, I can
 send you my kernel .config file.
 
 Here's what I get:
 

grepping for `ioctl' gives:

ioctl(9, SIOCGIWNAME, 0xbfe38d8c) = -1 EINVAL (Invalid argument)
ioctl(9, SIOCETHTOOL, 0xbfe38d2c) = 0
ioctl(11, SIOCGIFHWADDR, {ifr_name=eth0, ???})  = -1 ENODEV (No such device)
ioctl(11, SIOCGIFFLAGS, {ifr_name=eth0, ???})   = -1 ENODEV (No such device)

Perhaps you could generate the strace output for 2.6.18-rc5, grep that for
ioctl, look for differences?  That initial SIOCGIWNAME failure is fishy.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.18-rc4-mm[1,2,3] -- Network card not getting assigned an eth device name

2006-08-28 Thread David Miller
From: Andrew Morton [EMAIL PROTECTED]
Date: Mon, 28 Aug 2006 12:03:28 -0700

 grepping for `ioctl' gives:
 
 ioctl(9, SIOCGIWNAME, 0xbfe38d8c) = -1 EINVAL (Invalid 
 argument)
 ioctl(9, SIOCETHTOOL, 0xbfe38d2c) = 0
 ioctl(11, SIOCGIFHWADDR, {ifr_name=eth0, ???})  = -1 ENODEV (No such device)
 ioctl(11, SIOCGIFFLAGS, {ifr_name=eth0, ???})   = -1 ENODEV (No such device)
 
 Perhaps you could generate the strace output for 2.6.18-rc5, grep that for
 ioctl, look for differences?  That initial SIOCGIWNAME failure is fishy.

That might help, but SIOCGIWNAME just gets a string that
says what wireless mode the device is in, not the device
name.  Althought NetworkManager might use this for something
interesting.

All of the interesting config calls are probably happening
via netlink, which doesn't get decoded by strace.

But changes via netlink can get traced by using ip in monitor mode,
try ip monitor all as root during such a NetworkManager run.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.18-rc4-mm[1,2,3] -- Network card not getting assigned an eth device name

2006-08-27 Thread David Miller
From: Andrew Morton [EMAIL PROTECTED]
Date: Sun, 27 Aug 2006 00:19:43 -0700

 Jeremy reported that a while back too.  I do not know what is causing it
 and as far as I know no net developers have yet looked into it.

A debugging patch like this one should help figure out the culprit.

If we don't see the gibberish netdevice name printed in the kernel
logs, then likely something is corrupting the netdevice structure or
the memory holding the name.

diff --git a/net/core/dev.c b/net/core/dev.c
index d4a1ec3..45f9b19 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -738,6 +738,11 @@ int dev_change_name(struct net_device *d
 
if (!dev_valid_name(newname))
return -EINVAL;
+#if 1
+   printk([%s:%d]: Changing netdevice name from [%s] to [%s]\n,
+  current-comm, current-pid,
+  dev-name, newname);
+#endif
 
if (strchr(newname, '%')) {
err = dev_alloc_name(dev, newname);
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.18-rc4-mm[1,2,3] -- Network card not getting assigned an eth device name

2006-08-27 Thread Jeremy Fitzhardinge

Andrew Morton wrote:

Jeremy reported that a while back too.  I do not know what is causing it
and as far as I know no net developers have yet looked into it.
  


It went away with -rc4-mm[23] for me...

   J
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html