First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 75668
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Sparc Porters <sparc@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: John Jaeger <billybobsa@the-hobbit.net>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
posted-rules.txt IPTables Rule set requested by weeve@gentoo.org text/plain John Jaeger 2005-06-19 21:24 0000 276.38 KB Details
iptables.zip Results of tests... application/octet-stream John Jaeger 2005-08-21 15:32 0000 124.75 KB Details
2.4-sparc64-netfilter-ioctl32.patch Fix for kmalloc ioctl32 netfilter b0rkedness on sparc64 patch Gustavo Zacarias (RETIRED) 2005-08-22 08:49 0000 1.22 KB Details | Diff
2.4-netfilter-ioctl32.patch Proper and nice patch patch Gustavo Zacarias (RETIRED) 2005-08-22 10:19 0000 1.40 KB Details | Diff
iptables.txt Iptables listing - Sparc64 Kernel 2.4.31 text/plain John Jaeger 2005-08-22 21:26 0000 401.21 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 75668 depends on: Show dependency tree
Bug 75668 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-12-25 19:08 0000
When loading a previously useful firewall script (Used on lots of x86 boxen),
after loading 857 lines, I receive memory allocation errors.  It doesn't matter
if I load the 857 lines in the INPUT or OUTPUT chain.  I can get 428 in one,
and that leaves 429 for the other.  Or 857 in one chain, either INPUT or
OUTPUT.

Reproducible: Always
Steps to Reproduce:
1. Set up a ruleset with 900 rules.
2. iptables-restore < rule-set
3. Or, script it with a shell script

Actual Results:  
iptables-restore --> failed
Scripting --> iptables - Memory Allocation error  <- for each rule after 857.

Expected Results:  
Inserted the rules with no errors.

uname -a
Linux sparky 2.4.27-sparc #2 Thu Oct 7 10:49:35 MDT 2004 sparc64 sun4u TI
UltraSparc IIi (Sabre) GNU/Linux
512Mbyte RAM.  1Gig Swap, ~swap usage = 20M Actual Free Mem ~ 6-10M at most all
times.
iptables v1.2.11
Kernel has most items compiled in except for iptable_mangle & ipt_state.

------- Comment #1 From Robin Johnson 2005-05-03 02:32:45 0000 -------
billybobsa: is this still applicable?

------- Comment #2 From John Jaeger 2005-05-03 05:43:12 0000 -------
Yes it is...

Thanks.

------- Comment #3 From Jason Wever (RETIRED) 2005-05-06 19:49:18 0000 -------
So I tried testing this on a Blade 1000 running a vanilla 2.6.12-rc3 kernel and
was able to load 20,000 rules in before I stopped (probably could have taken a
lot more, memory wasn't taxed that much).  After talking it over with a fellow
SPARC developer (Gustavo), we're thinking it's something to do with the 2.4
kernel.

As 2.6 kernels aren't always overly stable on SPARC64, it's probably not
recommended to try using them for now until the lockup issues subside.  However
if you are daring, 2.6.12-rc3 isn't a bad one to try, especially on an IDE
based SPARC64 system.

------- Comment #4 From John Jaeger 2005-05-06 21:02:22 0000 -------
I am running this in production machines at an ISP...  At the moment, I have no
interest in the 2.6 series kernels.  I'd just like to see it fixed in the 2.4.x
 None of the x86 kernels exibit this issue...

These are SCSI machines to boot <G>

------- Comment #5 From Jason Wever (RETIRED) 2005-06-19 19:25:55 0000 -------
Would it be possible for you to post your ruleset here?

------- Comment #6 From John Jaeger 2005-06-19 21:24:42 0000 -------
Created an attachment (id=61546) [edit]
IPTables Rule set requested by weeve@gentoo.org

Sure.  Here ya go...

Also, I have tried this up to a 2.4.30 kernel with the same result (broken). 
However, I have brought that T1 105 Netra up on a 2.6.11-r8 kernel, and the
problem is not present.  Works like one would expect it to <G>

If this isn't what you need, drop me a note...

------- Comment #7 From SpanKY 2005-07-11 19:43:47 0000 -------
what prints out the error ?  iptables ?  kernel ?

------- Comment #8 From SpanKY 2005-07-11 19:50:37 0000 -------
btw, what version of iptables showed this error ?  does 1.3.2 work properly ?

------- Comment #9 From Jason Wever (RETIRED) 2005-07-11 20:03:14 0000 -------
This seems to be present in all versions in the portage tree currently.  I
asked
Dave Miller, SPARC64 kernel maintainer and networking kernel hacker, about this
recently and he said;

"He could be hitting the kmalloc() limit via the netfilter
32-bit userland compat code in:

       arch/sparc64/kernel/sys_sparc32.c:do_netfilter_replace()"

------- Comment #10 From SpanKY 2005-07-11 20:31:15 0000 -------
so does that mean we can dump this bug onto the sparc team ? ;)

------- Comment #11 From John Jaeger 2005-07-11 21:23:59 0000 -------
They are kernel errors.  Also, a bit more on the issue that I just uncovered.

Running the same kernel on a Sparc E220, with NFS running, when the NetApp got
busy with other functions, I would also get Memory Allocation errors if the 220
got put on hold for a extended period of time.  With a 2.6.8 kernel, the
allocation errors went away...  This HAS to be a kernel issue, not an iptables
issue...

------- Comment #12 From John Jaeger 2005-07-11 21:34:49 0000 -------
See my comments just posted earlier this evening.  I do believe, now that I had
the issue with the E220 and the same 2.4 kernel and NFS lengthly waits, that is
IS a Sparc 2.4 kernel memory issue on the 2.4.x, not an iptables issue.

I am not having any allocation error issues with the 2.6.x series kernel on
Sparc... (yet!) [Knock on wood]

I wish I could help further, but I have removed all the 2.4.x kernels from my
Sparc boxes due to this Mem Alocation error, so have really nothing to test
with.  Although, I do have one Netra here at home that if it was absolutly
necessary, I could fire it up on a different HD and conduct directed testing.

I am not a C guy, so cannot do much more tha do what I am asked...

------- Comment #13 From Josh Grebe (RETIRED) 2005-08-16 18:30:21 0000 -------
This appears to be caused by the 32 bit interfaces into the kernel, as hinted
by
Dave Miller on sparc-linux mailing list.  I've compiled a static 64 bit
iptables
and iptables-restore that you can try:
http://dev.gentoo.org/~squash/iptables.gz
http://dev.gentoo.org/~squash/iptables-restore.gz
md5sums:
2ddb82a400c06fed40f9b20b4b30d7a4  iptables-restore.gz
3ace295c062385dc794453b2400c9ba0  iptables.gz

Please try these.

------- Comment #14 From John Jaeger 2005-08-21 15:32:29 0000 -------
Created an attachment (id=66506) [edit]
Results of tests...

Okay,

Tried your programs with success (sort of).

I booted my Netra here at home with a 2.4.30 kernel for this test.  I have
attaced a zip file that contains some results.	I tried it two different ways.

1) Moved your iptables and iptables-restore in to /sbin after saving the
originals in /root/save.  I have a /etc/firewall/current-iptables which holds
the entire firewall as a duplicate as it is loaded with my firewall program.  I
used iptables-restore < /etc/firewall/current-iptables and it loaded without a
hitch.	Some 6000+ lines.  There is a iptables.lst in the zip that contains the
output of:
iptables -L -n -v.  Looks good and seems to function correctly.

2) Let the system reboot with the 2.4.30 kernel and let my firewall program
load the firewall as I usually do under the 2.6 kernel.  Encluded in the zip is
a bootup-screen txt file that is a copy/paste of the boot from the start.  I
had a lot of seg faults as you can see on some of the initial commands, however
most of the firewall loaded except those commands that seg faulted.

Synopsis:  You static binaries appear to be the answer.  Why they seg faulted
on those rules is beyound me at this point in time.

Loading with iptables-restore functions flawlessly.

Also included in the zip is a tarball of my /etc/firewall/* and
/etc/init.d/firewall <- the program that runs in the default run level for you
to look at.  The /etc/firewall/firewall.conf.iptables is sourced by
/etc/init.d/firewall during boot.

Hope this helps.

------- Comment #15 From Josh Grebe (RETIRED) 2005-08-21 18:36:47 0000 -------
We have verified the cause of the issue, and it is with the 32 bit interfaces
into the 64 bit kernel.  However, there is little to no effort to repair it
(unless one of use does it ourselves), so realisticly here are your choices:
1. Broaden your rules so that you don't actually need to have 900 lines of them
2. Use the 64 bit binaries until 2.6 is stable
3. Rewrite the 32 bit interface

Not necessarily in that order! Unless someone has something to contribute, I'll
close this bug as UPSTREAM in a couple days.


------- Comment #16 From John Jaeger 2005-08-21 21:32:37 0000 -------
Well, as I mentioned previously, I have migrated to the 2.6 on my production
box.

[22:21][root@sparky:~]# uname -a
Linux sparky 2.6.11-gentoo-r8 #1 Sat May 14 16:10:48 MDT 2005 sparc64 sun4u TI
UltraSparc IIi (Sabre) GNU/Linux

[22:21][root@sparky:~]# uptime
 22:21:46 up 71 days,  8:53,  1 user,  load average: 0.00, 0.00, 0.00
[22:21][root@sparky:~]#

So far, so good (Knock on wood).  Seems they hit a good one on
2.6.11-gentoo-r8.
 At least as far as I am concerned.  Sparky's running just about everything
usable from the outside.  HTTP, Sendmail, MD & Clam, MySql, Proftp, Webmail
with
Imap (Horde/Imp) etc., etc.  Served up well over 60Gig of data last month.  At
about 25Gig as if this month so far.  Totals:

          RX packets:129815397 errors:0 dropped:0 overruns:0 frame:0
          TX packets:209871646 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:28617070835 (27291.3 Mb)  TX bytes:288836810034 (275456.2
Mb)

Since bootup on this kernel 71 days ago.  Not too shabby.

So, I can let this go as the 2.6 seems to be up to snuff so far.

Thanks for all your assistance...

------- Comment #17 From Gustavo Zacarias (RETIRED) 2005-08-22 08:49:05 0000 -------
Created an attachment (id=66557) [edit]
Fix for kmalloc ioctl32 netfilter b0rkedness on sparc64

Please try this attached patch, from preliminary tests it should fix this
issue.

------- Comment #18 From John Jaeger 2005-08-22 10:11:49 0000 -------
I will try this, however, it will be (probably) this weekend unless I get some
free time to re-do a kernel (2.4.31) as I am running 2.4.30.

Thanks...

------- Comment #19 From Gustavo Zacarias (RETIRED) 2005-08-22 10:19:53 0000 -------
Created an attachment (id=66570) [edit]
Proper and nice patch

Silly kmalloc versus vfree fix0red.

------- Comment #20 From John Jaeger 2005-08-22 21:26:56 0000 -------
Created an attachment (id=66615) [edit]
Iptables listing - Sparc64 Kernel 2.4.31

Congratulations, it worked.

Attached is my list of rules and all 6082 of them are present...

Thanks a bunch.  Think it will make the .32 kernel? <G>

------- Comment #21 From Gustavo Zacarias (RETIRED) 2005-08-23 13:19:03 0000 -------
This was sent upstream to the sparc kernel maintainer (davem) and accepted, so
i
guess so.
If 2.4.32 takes long (it's currently in the -pre3 iteration) Joker may be able
to spin a newer sparc-sources with the fix.

------- Comment #22 From Gustavo Zacarias (RETIRED) 2005-09-06 15:20:17 0000 -------
In portage as sparc-sources-2.4.31-r1 (currently ~sparc) which also includes
the
bzero_noasi gcc 3.4.x build fix.
The patchset may take a couple of hours to hit the mirrors.

------- Comment #23 From Gustavo Zacarias (RETIRED) 2005-10-05 13:08:22 0000 -------
sparc-sources-2.4.31-r2 stable, this bug is gone.


First Last Prev Next    No search results available      Search page      Enter new bug