# Network slowdown after moving 2.6.10 -> 2.6.11 [solved]

## pmn

Hiya fellow Gentooers,

I got few nasty problems after updating my kernel into 2.6.11, but the only one that I have not fully solved is related to forcedeth network-driver. After reading some kernel changelogs I found that there was some updating for this driver. In 2.6.10 there is forcedeth 0.30 and in 2.6.11 there is 0.31.

The problem is that my network has really slowed down after this upgrade. With simple scp transfer I can get full ~10MBytes/sec from my other machine when I use 2.6.10(-r7) kernel. 

After reboot and changing into 2.6.11(-r5, revision doesn't really matter in this case) the same scp transfer gives me only ~60KBytes/sec. I am not getting any error-output to dmesg or /var/log/messages. The /sbin/ifconfig eth0 reports occassionally errors on TX errors and on carrior fields (same amount on both). Really bothering... but there is a trick (All the following done on 2.6.11):

- move into root (su)

- unload module forcedeth (rmmod forcedeth)

- load module forcedeth (modprobe forcedeth)

- back to normal user (exit)

And the scp transfer gives me full speed, yay!

Okay... I know you all must be really excited and yet there is more to come:

- move again into root (su)

- restart eth0 (/etc/init.d/net.eth0 restart)

- back to normal user (exit)

Guess what... scp is slow again...  :Shocked: 

I have tried my best (search engine) friend, Google, on this, but haven't really got anywhere. Seems that I am only one who is dealing with this problem  :Crying or Very sad:  .

And here if some relevant information of my system (growing my virtual p...s oh well):

MB: Epox 8rga+

CPU: Amd Athlon XP 2500+

VGA: ATI Radeon X800XT

MEM: 1024 MB

LAN: Integrated on MB, which uses NForce2

Any firewire-eths are not loaded, the only ethernet adapter is the eth0 (forcedeth).

On my second machine (firewall/nat machine with gentoo stable, 2.4.26-r9) has two NICs... both 3com 3c905B.

Now I am asking you guys, should I report a bugreport (gentoo or linux-kernel)? 

Or can we try to solve my problem here?  :Smile: 

And here is mine /etc/conf.d/net parts that matters (not # in front of line):

```
ifconfig_eth0=(

        "192.168.0.2 netmask 255.255.255.0"

)

routes_eth0=(

        "default gw 192.168.0.1"

)
```

Sorry for bad english... :Embarassed: 

- Pmn -

P.S.

Updating the MB bios didn't get me anything.

P.P.S. 

(The problem exists on ftp, http... the scp was only used to test the speed.)Last edited by pmn on Sun Jul 24, 2005 5:57 pm; edited 1 time in total

----------

## jjlit

I am also expierincing this.  I went from 2.6.3 -> 2.6.11 over the weekend.  Did you ever resolve this? 

Thank.

----------

## pmn

Hello,

Sorry to disappoint, but I am still experiencing the problem. Homewer a temporary fix to make network work fullspeed is to remove forcedeth module from kernel and load it back there. (Sometimes I have to do this twice... not sure about this, but it seems to be so sometimes.)

```
$ su

# rmmod forcedeth

# modprobe forcedeth
```

I even compiled forcedeth with debug enabled (/usr/src/linux/drivers/net/forcedeth.c, line ~118), but I just had some IRQ debug messages which didn't seem to be fatal. Also I have tried two different gcc's (i686-pc-linux-gnu-3.3.5 and i686-pc-linux-gnu-3.4.3-20050110)... nothing new (obvious wasn't it).

This problem was even in vanilla-kernel 2.6.11, so I think this is not a gentoo issue. We could try find reason for that the running ifconfig down and up for nic makes network slow. In order to find the reason I need help of gurus' guidance.  :Embarassed: 

Well... hopefully someone read this  :Smile: 

- Pmn -

Edit: I need to get some sleep... fixed typos, etc...

----------

## darkweaseljedi

Same here, though I always had my forcedeth as part of the kernel, not a module.

I have read people have solved this by making the module part of the kernel, but as I experience the issue with it in the kernel, that won't help me.  I'm going to give 2.6.12 a shot, but if that doens't work I'm going back to 2.6.10.

----------

## Purrkur

Hoho!

I had the same problem (terribly slow networking after upgrading my kernel from 2.6.9 to 2.6.11). I found this post when trying to find a solution. However, this post only verified the problem so I decided to e-mail the forcedeth maintainer and ask him about it. I gave him a description of what is going on (along with a reference to this particular page) and this is the response I got:

 *Quote:*   

> Could you try a newer forcedeth version? We have fixed one bug that
> 
> matches your description: The bug was fixed in forcedeth version 0.34.
> 
> Forcedeth doesn't support miitools, you must use ethtool instead.

 

(I had also asked him about the possibility of querying forcedeth driver with a tool like mii-tool)

So there you have it. The problem is known and some sort of solution is found in 0.34 or higher. What surprises me is that the version of forcedeth in the new kernels is pretty low! I checked out the sources I got on my Linux machine and found that Kernel version 2.6.12.1 uses forcedeth version 0.32 but the latest 2.6.13-rc3 uses 0.35! I think I will go ahead and try out the lastest even though it is only an -rc version just to see if this fixes my problem (and I am sure it will). 

pmn: I think it would be a good idea to set [solved] into the subject on this one...

----------

## darkweaseljedi

Let me know if it works.  I tried 2.6.12_rc?(not sure) at the time and it had the same issue.  I gave up and went back to 2.6.10.  If 2.6.13 works I'll move to that.

----------

## pmn

Hello again,

I am gonna try out now the 2.6.13_rcX -kernel (vanilla). I'll post the results here soon.

----------

## Purrkur

 *pmn wrote:*   

> Hello again,
> 
> I am gonna try out now the 2.6.13_rcX -kernel (vanilla). I'll post the results here soon.

 

Just watch it. I tried the same thing and I ended up with troubles because devfs isn't supported anymore out of the box. So you need to know how to activate devfs or have fixed udev on your box before you try the rc3 kernel.

My problem now is that my computer boots up (with the old 2.6.11 kernel), it stops short at sshd and then I get nothing at all. No prompt or nothing. I have no idea why either  :Sad:  I can log onto the machine remotely and everything seems fine and dandy (logs don't show anything out of the ordinary) but no prompt. 

What I was going to do was to replace the forcedeth code in the 2.6.11 kernel with the 2.6.13-rc3 forcedeth code. However, I this has gone down on my priority list now that I can't pysically log onto the machine  :Sad: 

----------

## pmn

Well I am happy to say that 2.6.13_rc3 fixed the speeddown bug in forcedeth. However the speed is only 7.7 MBytes/s between my machines (2 x 100Mbit/s NIC + Twisted pair RJ45). Well personally I think forcedeth still has some issues but the bug that was introduced in forcedeth 0.31 is fixed so I think we'll close this thread.

Purrkur: I have used udev since it replaced devfs on official kernel-tree, so the upgrade went well.  Hope you get your system working soon.  I have had some issue that may match your description. It related to networkconnection, some service (can't remember what it was) that was about to start was not able to make dns query and jammed whole init.

----------

## Purrkur

 *pmn wrote:*   

> Well I am happy to say that 2.6.13_rc3 fixed the speeddown bug in forcedeth. However the speed is only 7.7 MBytes/s between my machines (2 x 100Mbit/s NIC + Twisted pair RJ45). Well personally I think forcedeth still has some issues but the bug that was introduced in forcedeth 0.31 is fixed so I think we'll close this thread.

 

When you measured 7.7MBytes/s, was that with scp or sftp? If so then that produces an overhead that could mean that you are not getting full throughput, but I would still say that it is pretty good.

 *pmn wrote:*   

> Purrkur: I have used udev since it replaced devfs on official kernel-tree, so the upgrade went well.  Hope you get your system working soon.  I have had some issue that may match your description. It related to networkconnection, some service (can't remember what it was) that was about to start was not able to make dns query and jammed whole init.

 

Thanks for the tip! I am going to go through my /etc/init.d with a magnifying glass to see what I can find that could fit your description. It could very well be the issue that I am seeing. Thanks again!

----------

## pmn

This 7.7 MBytes/s speed was measured by scp as it was on initial post of this thread. With broken forcedeth I managed to get over 10 MBytes/s (after reloading the module couple times) with same computer-setup.

Well I just realised that this your problem might not relate to making dns-query because by being able to log remotely you must have networkconnection  :Smile: . And if it would relate to making some query or something then after the timeout init should continue normally. 

Did this problem came up by changing/upgrading kernel?

----------

## Purrkur

 *pmn wrote:*   

> Well I just realised that this your problem might not relate to making dns-query because by being able to log remotely you must have networkconnection . And if it would relate to making some query or something then after the timeout init should continue normally. 
> 
> Did this problem came up by changing/upgrading kernel?

 

Well, I thought the issue in my case could have something to do with filesystems so I have been rooting out things like hddtemp (the first time I saw this issue the computer stopped booting at "loading hddtemp". So I disabled that and then it went on to mounting NFS partitions so I disabled that. After that it would get to sshd and then stop so I could log on and work on it remotely. 

I did some changes again which didn't work and then changed this back the way they were when I could log onto the machine with SSH but now it is stopping at the point where it sets up the network (no sshd!). I am truly baffled by this. It says it enters init stage 3 and then it goes on to set the ip address, gateway and then it says something like "selecting eth" and there it hangs. 

I have no idea what might be causing this issue, if it was something that happened when I set up the 2.6.13-rc3 kernel (although that seems unlikely) or if something happened that didn't catch my attention when updating world which I do about 1-3 times a week. I don't reboot my computer that often (only when recompiling kernels) so uptimes of 60-100 days is not uncommon. Lot of things can change in that time period. 

I could add that when the computer got as far as loading sshd and I could work on it, everything looked fine and dandy. Logs and everything was clean from problematic issues. 

Do you know exactly how I can find out exactly what it loads under runlevel 3? I have tried posting about this on the forums but I am getting no help.

----------

## pmn

 *Quote:*   

> 
> 
> Do you know exactly how I can find out exactly what it loads under runlevel 3? I have tried posting about this on the forums but I am getting no help.
> 
> 

 

Well all I know is that the symlinks to services in /etc/runlevels/default are started. (This is if default is set as runlevel 3 in /etc/inittab). Executing /bin/rc-status you know state of runlevel services. Comparing the states and symlinks should point out problem starting a service.

And about issues when I was not able get login screen: I think my distro back then was Debian... and the problem related to /etc/issue which defines the login's greeting message (This is hostname.domainname.tld). There I used some NIS domainname that was not specified properly. So when init tried to launch login screen... it tried to look for computer's domainname without success and there was no login screen.

----------

## Purrkur

OK. I have done some more checks. I reverted all changes to the boot process back to the way they were (using knoppix). I then rebooted to see what would happen. Indeed, the boot process stops at loading network support. here is the last few lines written:

```

ERROR: Some services needed are missing. Run './syslog-ng broken' for a list of those services. "Syslog-ng was not started

Starting eth0

bringing up eth0

192.168.1.2

adding routes

default gw 192.168.1.1

selecting best interface: eth0

```

That is where it stops. Mind you, the computer is not frozen, it just seems to be waiting on something. The error message says I am missing services but as I can't log on then I can't run that command to see if that would help. I checked the contents of /etc/runlevels/default and found the following links:

domainname

hddtemp

hotplug

lm_sensors

local

net.eth0

netmount

sshd

syslog-ng

vixie-cron

xfs

So what am I missing??

----------

## pmn

Just a thought... if the netmount tries to mount something that doesn't exist or connection is broken. Are you loading the portmap service because that's kinda depedency for mounting nfs (netmount). So you can try adding portmap to this runlevel or try removing netmount.

Have you done /usr/sbin/etc-update lately? Just wondering.

Check also /etc/fstab for any network-mounts, comment 'em out if any.

And you can also try pressing CTRL+C when hang occurs. It should omit the process that is taking all the attention.

```
barton root # ls -la /etc/runlevels/default/

total 0

drwxr-xr-x  2 root root 288 Jul 20 18:04 .

drwxr-xr-x  7 root root 184 Jan 16  2005 ..

-rw-r--r--  1 root root   0 Oct 28  2004 .keep

lrwxrwxrwx  1 root root  22 Jan  2  2005 domainname -> /etc/init.d/domainname

lrwxrwxrwx  1 root root  17 Jan  2  2005 local -> /etc/init.d/local

lrwxrwxrwx  1 root root  20 Apr  6 20:57 net.eth0 -> /etc/init.d/net.eth0

lrwxrwxrwx  1 root root  22 Jul 20 18:04 ntp-client -> /etc/init.d/ntp-client

lrwxrwxrwx  1 root root  19 Jun 12 19:29 portmap -> /etc/init.d/portmap

lrwxrwxrwx  1 root root  16 Jun 12 17:46 sshd -> /etc/init.d/sshd

lrwxrwxrwx  1 root root  20 Jan  2  2005 sysklogd -> /etc/init.d/sysklogd

lrwxrwxrwx  1 root root  22 Jan  2  2005 vixie-cron -> /etc/init.d/vixie-cron
```

----------

## Purrkur

 *pmn wrote:*   

> Just a thought... if the netmount tries to mount something that doesn't exist or connection is broken. Are you loading the portmap service because that's kinda depedency for mounting nfs (netmount). So you can try adding portmap to this runlevel or try removing netmount.

 

Netmount was one of the services I removed. I am not doing any network mounts these days. I can try to add portmap though just to see if it would make a difference.

 *pmn wrote:*   

> Have you done /usr/sbin/etc-update lately? Just wondering.

 

Yep, I run that every once in a while after I hand-pick the ones that I edit manually. I am usually very careful with doing this but it is possible that something passed me by...

 *pmn wrote:*   

> Check also /etc/fstab for any network-mounts, comment 'em out if any.

 

Yep, I am not using any at the moment (they have been commented out for quite some time).

 *pmn wrote:*   

> And you can also try pressing CTRL+C when hang occurs. It should omit the process that is taking all the attention.

 

Hmmm. Didn't know that. I learn something new every day. I'll definitely try that. I'll get back to you.

----------

## Purrkur

I doubled checked my /etc/fstab which was clean of any potential problems, I added support for portmap in /etc/runlevels/default and I tried ctrl-c once the computer came to a stop but it didn't work  :Sad: 

There is one thing I remember that I did which I haven't restored because I don't remember the details of it, but it has to do with the network. I remember a while back I booted the machine and there was a reminder there somewhere that said that /etc/domainname (or something like that) was depreciated in favour of /etc/conf.d/domainname. I thought it meant that I could remove the /etc/domainname (or if it was dnsdomainname, I can't remember) so I did. I don't use a domainname at the moment and even if there was a domainname in the old file and nothing in the new file (under conf.d) then that shouldn't really matter, right? What is your take on that one?

----------

## Purrkur

Stupid me. My old /etc/domainname or whatever it was called did include an entry "homenetwork". I had also set a "domain homenetwork" into my resolv.conf. So I removed the domain entry from resolv.conf and rebooted. Still not working. So I knoppixed it again and set up the domain homenetwork entry into resolv.conf and also into /etc/conf.d/domainname as a DNSentry in that file. I am still not getting past the "selecting best interface: eth0" line.

I am totally baffled by this. 

I am beginning to think that it must be that something is wrong with syslog-ng on my computer. I found this link on the forums which deals with vixie-cron but the error message looks the same. Of course my problem is that I can't do an "emerge -u syslog-ng". I am actually not sure anymore on how to continue here.

----------

## Purrkur

Another slight surprise. I was checking my messages log again and I found an entry where it said "/etc/init.d/domainname has syntax errors in it. 

Can you post your /etc/init.d/domainname so I can compare it to mine? It should be the same.

----------

## pmn

```
barton ~ # cat /etc/init.d/domainname

#!/sbin/runscript

# Copyright 1999-2005 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

depend() {

        need checkroot hostname

        before bootmisc

}

checkconfig_nis() {

        if [[ -f /etc/nisdomainname ]] ; then

                ewarn "You should stop using /etc/nisdomainname and use /etc/conf.d/domainname"

                export NISDOMAIN=$(</etc/nisdomainname)

                return 0

        fi

        [[ -n ${NISDOMAIN} ]]

}

checkconfig_dns() {

        if [[ -f /etc/dnsdomainname ]] ; then

                ewarn "You should stop using /etc/dnsdomainname and use /etc/conf.d/domainname"

                export DNSDOMAIN=$(</etc/dnsdomainname)

        fi

        [[ -z ${DNSDOMAIN} ]] && return 1

        if ! touch /etc/resolv.conf 2> /dev/null ; then

                ewarn "Unable to set domain in resolv.conf (ro root?)"

                return 1

        else

                return 0

        fi

}

start() {

        local retval=0

        local retval2=0

        if checkconfig_nis ; then

                ebegin "Setting NIS domainname to ${NISDOMAIN}"

                /bin/domainname "${NISDOMAIN}"

                retval=$?

                eend ${retval} "Failed to set the NIS domainname"

        fi

        if checkconfig_dns ; then

                ebegin "Setting DNS domainname to ${DNSDOMAIN}"

                resolv=$(grep -v '^[[:space:]]*domain' /etc/resolv.conf)

                [[ ${OVERRIDE} == "1" ]] \

                        && resolv="${resolv}"$'\n'"domain ${DNSDOMAIN}" \

                        || resolv="domain ${DNSDOMAIN}"$'\n'"${resolv}"

                echo "${resolv}" > /etc/resolv.conf

                retval2=$?

                eend ${retval2} "Failed to set the DNS domainname"

        fi

        return $((retval + retval2))

}

# vim:ts=4

barton ~ #
```

And:

```
barton ~ # cat /etc/conf.d/domainname

# /etc/conf.d/domainname

# When setting up resolv.conf, what should take precedence?

# If you wish to always override DHCP/whatever, set this to 1.

OVERRIDE=1

# To have a proper FQDN, you need to setup /etc/hosts and /etc/resolv.conf

# properly (domain entry in /etc/resolv.conf, and FQDN in /etc/hosts).

#

DNSDOMAIN="koti.fi"

# This only set what /bin/hostname returns.  If you need to setup NIS, meaning

# what /bin/domainname returns, please see:

#

#   http://www.linux-nis.org/nis-howto/HOWTO/

#

#NISDOMAIN=""

barton ~ #
```

I am running Gentoo ~x86 on this machine. On other machine there is stable (x86) Gentoo. Checking /etc/init.d/domainname on both machines and there is no difference.

----------

## pmn

As knoppix has booted just mount your gentoo partition as /mnt/gentoo (or similiar). Then chroot there and source /etc/profile and other stuff and you are in your system. Now you should be able to re-emerge stuff.

In other words: do it like you did install gentoo. In Knoppix (as root):

```
mkdir /mnt/gentoo

mount /dev/hdaX /mnt/gentoo

mount /dev/hdaY /mnt/gentoo/boot

mount -t proc none /mnt/gentoo/proc

chroot /mnt/gentoo /bin/bash

env-update

source /etc/profile

emerge -q sync

emerge something-nice

```

 This is a nice way to emerge stuff without booting in gentoo. After your done, just exit the chroot and unmount /mnt/gentoo/boot and /mnt/gentoo and reboot.

----------

## Purrkur

Update: Thanks for the info on chroot trick. I had forgotten all about that! I emerged syslog-ng and I got further but I am still not getting a prompt. However, I can log in remotely again via ssh so that is a good thing since rebooting allt the time (and setting up Knoppix) takes such a long time!

UPDATE! I had made some changes to my default processes (removed portmap which wasn't there to begin with and xfs which was giving me boot errors). I rebooted as I wrote the above and I got a login prompt! Excellent! Thanks for your help pmn! It is very valuable to have a speaking partner when everything goes wrong like this! Thanks again!

----------

