Description of problem: Sometimes the following message appears when trying to set up the eth0 device: [root@bofh /tmp]# ifconfig eth0 up SIOCSIFFLAGS: Cannot allocate memory [root@bofh /tmp]# ifconfig eth0 192.168.2.2 SIOCSIFFLAGS: Cannot allocate memory This only happens with the primary interface, a b44 ethernet controller. Wireless and a second usb nic do not show these problems. The nic in question: 01:0e.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02) Subsystem: Hewlett-Packard Company: Unknown device 08bc Flags: bus master, fast devsel, latency 64, IRQ 11 Memory at 90080000 (32-bit, non-prefetchable) [size=8K] Capabilities: [40] Power Management version 2 The installed kernel is 2.6.9-11EL, but this problem happened with earlier kernels as well.
Created attachment 116027 [details] strace showing the offending ifconfig call
Pretty much the only way this can happen is if the open routine for the b44 driver is unable to allocate memory that it needs to function. Is your system running low on memory? If you really think there is some other issue, then please start by attaching the output of sysreport.
[root@bofh /root]# free total used free shared buffers cached Mem: 507864 492620 15244 0 13724 144892 -/+ buffers/cache: 334004 173860 Swap: 1048568 51792 996776 [root@bofh /root]# ifconfig eth0 up SIOCSIFFLAGS: Cannot allocate memory [root@bofh /root]# Shouldn't be low on memory. Sysreport output will follow shortly.
Created attachment 116091 [details] sysreport output
Created attachment 116140 [details] jwltest-b44-alloc.patch Yet another hack related to the b44 device's DMA mask...
Created attachment 116141 [details] jwltest-b44-alloc.patch Ooops...use this one instead...
Test kernels w/ above patch are available here: http://people.redhat.com/linville/kernels/rhel4/ Please give them a try to see if it fixes the issue you are seeing. Please post the results of your testing here. I can't promise that this patch will ever be accepted, but if it is known to work then it has a better chance... :-)
will do. I just don't know how to make sure that the problem really disappeared. I'm not sure how to reproduce that issue.
The issue was caused by a quirk regarding the b44 hardware and the implementation of some memory management in the kernel. Basically, the b44 driver ends-up needing to allocate memory from out of the first 16MB of physical memory. This space gets eaten-up pretty quickly. Since you are using nearly all of your 512MB, it is extremely likely that the first 16MB has been depleted already. This is why you are getting the "Cannot allocate memory" messages. To recreate, you probably need to make sure that you open a lot of apps and/or keep running for a while. My guess is that this is what you were doing before you saw those messages previously. If you can find a scenario that always fails, then try that w/ the test kernels and see if it goes away. Otherwise, just hit the test kernels as hard as possible for as long as possible to see if it happens.
Yeah. That sounds pretty close. Now that I'm thinking about it, this issue only appeared after having run the notebook for a day or two with lots of applications. I'll try the new kernel then with a bit of workload...
Setting back to NEEDINFO pending test results...
Hmmm. After about 8 hours of use with a similar workload to before, the system does not appear to suffer this issue anymore. [root@bofh /root]# free total used free shared buffers cached Mem: 507832 504680 3152 0 62260 159608 -/+ buffers/cache: 282812 225020 Swap: 1048568 30728 1017840 Thus I'd appreciate it if this patch could make it into a future kernel.
Andreas, it probably goes without saying, but...is the b44 device still able to pass traffic after the ifup? :-)
Hey John, what a question. ;) Of course: [root@bofh /root]# route del default [root@bofh /root]# ifdown eth0 [root@bofh /root]# ifup eth0 Determining IP information for eth0... done. [root@bofh /root]# ping www.bawue.de PING bender.bawue.de (193.7.176.20) 56(84) bytes of data. 64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=0 ttl=58 time=63.0 ms 64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=1 ttl=58 time=63.0 ms 64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=2 ttl=58 time=65.3 ms 64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=3 ttl=58 time=62.1 ms 64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=4 ttl=58 time=63.4 ms --- bender.bawue.de ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 5628ms rtt min/avg/max/mdev = 62.187/63.420/65.386/1.069 ms, pipe 2 [root@bofh /root]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 default rtr.bb.dicp.net 0.0.0.0 UG 0 0 0 eth1
Created attachment 118173 [details] jwltest-b44-alloc.patch Better implementation...
Test kernels w/ above version of patch available here: http://people.redhat.com/linville/kernels/rhel4/ Please give them a try to see if you can recreate the problem. I don't believe you should see the problem anymore on any box with <= 1GB of memory. Please post your results here...thanks!
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2006-0132.html