Bug 5651 - Error message for networking on some hardware boards when booting: "ip: RTNETLINK answers: File exists"
Summary: Error message for networking on some hardware boards when booting: "ip: RTNET...
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: connectivity (show other bugs)
Version: 1.6
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.6 M2
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-12-10 07:50 UTC by Yi Zhao
Modified: 2014-01-10 03:30 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2013-12-10 07:50:05 UTC
Image location: http://autobuilder.yoctoproject.org/pub/releases/1.6_M1.rc1/
Git rev: master/c51730aaa91066cfb51ad6ec2920fb4f9d9ea94c

If I used disk boot or mmc boot (not nfs boot) on some hardware boards (mpc8315e and beagleboard), there was an error message for networking when boot the system:

########################
Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
udhcpc (v1.21.1) started
Sending discover...
libphy: mdio@e0024520:00 - Link is Up - 100/Full
Sending discover...
Sending select for 128.224.178.252...
Lease of 128.224.178.252 obtained, lease time 600
ip: RTNETLINK answers: File exists
#######################

Then the system would freeze for a long time.

This issue is introduced by commit: dc80eea725906f394469b867edc1a8c72be87ad8 
This patch moves networking script from rcS.d to rcX.d, but has a wrong sequence:
########################
root@mpc8315e-rdb:~# ls /etc/rc5.d/
S02dbus-1        S10networking   S20hwclock.sh    S99oprofileui-server
S05connman       S12rpcbind      S20syslog        S99rmnologin.sh
S09sshd          S15mountnfs.sh  S21avahi-daemon  S99stop-bootlogd
S09xserver-nodm  S20distcc       S22ofono         S99tcf-agent
root@mpc8315e-rdb:~# 
########################

It seems the networking should startup before the connman and sshd.

I also found some other issues for the networking when using disk boot:

1. Even if I set a static ip address in kernel boot parameter in u-boot:
###############
hdboot=setenv bootargs root=/dev/sda2 rw ip=128.224.178.141:128.224.165.20:128.224.178.1:255.255.254.0::eth0:off console=ttyS0,115200 ;tftp 1000000 vlm-boards/17652/kernel;tftp a00000 vlm-boards/17652/dtb;bootm 1000000 - a00000
################

The networking still use dhcp to get a new ip address when booting:
################
root@mpc8315e-rdb:~# ifconfig 
eth0      Link encap:Ethernet  HWaddr 04:00:00:00:00:0A  
          inet addr:128.224.178.252  Bcast:128.224.179.255  Mask:255.255.254.0
          inet6 addr: fe80::600:ff:fe00:a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:395 errors:0 dropped:0 overruns:0 frame:0
          TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:77380 (75.5 KiB)  TX bytes:12372 (12.0 KiB)
          Base address:0xa000 
###################

In /var/log/message:
###################
Jan  1 00:00:00 mpc8315e-rdb user.notice kernel: Kernel command line: root=/dev/sda2 rw ip=128.224.178.141:128.224.178.20:128.224.178.1:::eth0:off console=ttyS0,115200
...
...
Jan  1 00:00:00 mpc8315e-rdb user.info kernel: libphy: mdio@e0024520:00 - Link is Up - 100/Full
Jan  1 00:00:00 mpc8315e-rdb user.info kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jan  1 00:00:00 mpc8315e-rdb user.warn kernel: IP-Config: Guessing netmask 255.255.0.0
Jan  1 00:00:00 mpc8315e-rdb user.info kernel: IP-Config: Complete:
Jan  1 00:00:00 mpc8315e-rdb user.info kernel:      device=eth0, hwaddr=04:00:00:00:00:0a, ipaddr=128.224.178.141, mask=255.255.0.0, gw=128.224.178.1
Jan  1 00:00:00 mpc8315e-rdb user.info kernel:      host=128.224.178.141, domain=, nis-domain=(none)
Jan  1 00:00:00 mpc8315e-rdb user.info kernel:      bootserver=128.224.178.20, rootserver=128.224.178.20, rootpath=
...
...
Jun  4 15:02:08 mpc8315e-rdb daemon.info avahi-daemon[536]: Found user 'avahi' (UID 998) and group 'avahi' (GID 998).
Jan  1 00:00:00 mpc8315e-rdb daemon.info avahi-daemon[536]: Successfully dropped root privileges.
Jan  1 00:00:00 mpc8315e-rdb daemon.info avahi-daemon[536]: avahi-daemon 0.6.31 starting up. 
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Successfully called chroot().
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Successfully dropped remaining capabilities.
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Loading service file /services/sftp-ssh.service.
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Loading service file /services/ssh.service.
Jan  1 00:00:11 mpc8315e-rdb daemon.info avahi-daemon[536]: Joining mDNS multicast group on interface eth0.IPv4 with address 128.224.178.252.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: New relevant interface eth0.IPv4 for mDNS.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: Network interface enumeration completed.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: Registering new address record for fe80::600:ff:fe00:a on eth0.*.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: Registering new address record for 128.224.178.252 on eth0.IPv4.
Jan  1 00:01:39 mpc8315e-rdb daemon.info avahi-daemon[536]: Registering HINFO record with values 'PPC'/'LINUX'.
##########################


2. The connman creates a tun6to4 virtual network device by default:
#########################
tun6to4   Link encap:IPv6-in-IPv4  
          inet6 addr: 2002:80e0:b2fc::1/64 Scope:Global
          inet6 addr: ::128.224.178.252/128 Scope:Compat
          UP RUNNING NOARP  MTU:1472  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:2 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:480 (480.0 B)
#########################

Can we disable it ?
Comment 1 Chen Qi 2013-12-18 08:18:49 UTC
Module: openembedded-core.git
Branch: master-next
Commit: d518892d38ac399c091ff509a9fd90fc00d71224
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d518892d38ac399c091ff509a9fd90fc00d71224

//Chen Qi
Comment 2 Yi Zhao 2014-01-10 03:30:39 UTC
Verified with master/e93a345fae7c21652547bec501fcb1f3b6c6427d