Kernel panic with ipset 6.11
Hello,
Today i tried to rebuild ipset...
I have a version of ipset builded on 16 Jan 2012 probably with gcc 4.6. I will name it ipset-1 in this mail.
Today I builded a new binary of the same source ipset 6.11 compiled with the same options. This binary is built with gcc 4.7. It will be named as ipset-1.1
I also not the kernel ABI is different
# readelf -n ipset-1*|grep -e Linux -e File
File: ipset-1
OS: Linux, ABI: 2.6.27
File: ipset-1.1
OS: Linux, ABI: 2.6.32My host is an i686 archlinux system with 3.3 kernel
# uname -a Linux archibal 3.3.2-1-ARCH #1 SMP PREEMPT Sat Apr 14 10:08:43 UTC 2012 i686 Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz GenuineIntel GNU/Linux
When i try to restore saved sets, i got a kernel panic with ipset-1.1 but not with ipset-1.
# ./ipset-1 restore < ipset.conf.0 # ./ipset-1 x # ./ipset-1.1 restore < ipset.conf.0 Write failed: Broken pipe
I attached the kernel panic dump from netconsole, the both binary and the config file i load.
I this see 2 issues:
Firstly, i suppose kernel must not panic because i run ipset. Secondly, i wondering if gcc is cause of the bad working of the new ipset?
I also tested with an x86_64 host and ipset is only broken. No kernel panic.
# uname -a Linux archipel 3.3.2-1-ARCH #1 SMP PREEMPT Sat Apr 14 09:48:37 CEST 2012 x86_64 Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz GenuineIntel GNU/Linux # ipset restore < ipset.conf.0 ipset v6.11: Hash is full, cannot add more elements # ipset list Name: foo Type: hash:ip,port,net Header: family inet hashsize 64 maxelem 0 Size in memory: 1408 References: 0 Members:
Signature · 1 line
Sébastien Luttringer (www.seblu.net)
create foo hash:ip,port,net family inet hashsize 1024 maxelem 65536 add foo 192.168.0.1,tcp:0,10.0.0.0/24
add foo 192.168.0.2,tcp:0,10.1.0.0/16
Hi,
Quoted 27 lines · Seblu
I have a version of ipset builded on 16 Jan 2012 probably with gcc 4.6. I will name it ipset-1 in this mail.
Today I builded a new binary of the same source ipset 6.11 compiled with the same options. This binary is built with gcc 4.7. It will be named as ipset-1.1
I also not the kernel ABI is different
# readelf -n ipset-1*|grep -e Linux -e File File: ipset-1 OS: Linux, ABI: 2.6.27 File: ipset-1.1 OS: Linux, ABI: 2.6.32My host is an i686 archlinux system with 3.3 kernel
# uname -a Linux archibal 3.3.2-1-ARCH #1 SMP PREEMPT Sat Apr 14 10:08:43 UTC 2012 i686 Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz GenuineIntel GNU/LinuxWhen i try to restore saved sets, i got a kernel panic with ipset-1.1 but not with ipset-1.
# ./ipset-1 restore < ipset.conf.0 # ./ipset-1 x # ./ipset-1.1 restore < ipset.conf.0 Write failed: Broken pipe
Quoted 5 lines
I attached the kernel panic dump from netconsole, the both binary and the config file i load.
I this see 2 issues:
Firstly, i suppose kernel must not panic because i run ipset.
No, definitely not. Did you use exactly the same kernel in both cases and only the ipset binary was different?
Quoted 4 lines
Secondly, i wondering if gcc is cause of the bad working of the new ipset?
I also tested with an
x86_64host and ipset is only broken. No kernel panic.
Quoted 9 lines
# uname -a Linux archipel 3.3.2-1-ARCH #1 SMP PREEMPT Sat Apr 14 09:48:37 CEST 2012 x86_64 Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz GenuineIntel GNU/Linux # ipset restore < ipset.conf.0 ipset v6.11: Hash is full, cannot add more elements # ipset list Name: foo Type: hash:ip,port,net Header: family inet hashsize 64 maxelem 0
^^ ^???
Quoted 3 lines
Size in memory: 1408
References: 0
Members:
If ipset.conf.0 is the file you attached, then that's absolutely strange, because the set was to be created as
create foo hash:ip,port,net family inet hashsize 1024 maxelem 65536
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary
Quoted 2 lines · Jozsef Kadlecsik
No, definitely not. Did you use exactly the same kernel in both cases and only the ipset binary was different?
Same except architecture. Panic on i686 and error on x86_64.
You can find config file of i686 here:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/config?h=packages/linux&id=316a5f1f9ae26763aa1b4d4ef694c938ec974345
You can find config file of x86_64:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/config.x86_64?h=packages/linux&id=316a5f1f9ae26763aa1b4d4ef694c938ec974345
Quoted 3 lines
If ipset.conf.0 is the file you attached, then that's absolutely strange, because the set was to be created as
Yes, config file is from example in man pages.
I tested in a vm and physical host and in both case panic on i686.
I tested again with a kernel 3.3.3
# uname -a Linux archibal 3.3.3-1-ARCH #1 SMP PREEMPT Mon Apr 23 09:33:32 UTC 2012 i686 Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz GenuineIntel GNU/Linux # ipset restore < ipset/ipset.conf.0 Connection to archibal closed.
Same issue (hash is full) with x86_64.
# ipset restore < /root/ipset/ipset.conf.0 ipset v6.11: Error in line 1: Cannot open session to kernel.
I recompiled ipset 6.11 with gcc 4.6 and kernel doesn't panic anymore and works on x86_64.
It's maybe not so simple, but kernel panic with ipset builded with gcc 4.7 and works correctly with gcc 4.6.
Previous kernel panic traceback don't help you? Do you need more information?
Signature · 2 lines
Sébastien Luttringer www.seblu.net
Quoted 31 lines · Seblu
Quoted 2 lines · Jozsef Kadlecsik
No, definitely not. Did you use exactly the same kernel in both cases and only the ipset binary was different?
Same except architecture. Panic on i686 and error on
x86_64.You can find config file of i686 here:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/config?h=packages/linux&id=316a5f1f9ae26763aa1b4d4ef694c938ec974345
You can find config file ofx86_64:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/config.x86_64?h=packages/linux&id=316a5f1f9ae26763aa1b4d4ef694c938ec974345Quoted 3 lines
If ipset.conf.0 is the file you attached, then that's absolutely strange, because the set was to be created as
Yes, config file is from example in man pages.
I tested in a vm and physical host and in both case panic on i686.
I tested again with a kernel 3.3.3
# uname -a Linux archibal 3.3.3-1-ARCH #1 SMP PREEMPT Mon Apr 23 09:33:32 UTC 2012 i686 Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz GenuineIntel GNU/Linux # ipset restore < ipset/ipset.conf.0 Connection to archibal closed.Same issue (hash is full) with
x86_64.# ipset restore < /root/ipset/ipset.conf.0 ipset v6.11: Error in line 1: Cannot open session to kernel.
Quoted 6 lines
I recompiled ipset 6.11 with gcc 4.6 and kernel doesn't panic anymore and works on
x86_64.
It's maybe not so simple, but kernel panic with ipset builded with gcc 4.7 and works correctly with gcc 4.6.Previous kernel panic traceback don't help you? Do you need more information?
Could you recompile your kernel and ipset with gcc 4.7 and CFLAGS=-fno-optimize-strlen and re-run the test? Does it help?
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary
Quoted 6 lines · Jozsef Kadlecsik
Quoted 2 lines · Seblu
On Thu, Apr 19, 2012 at 9:10 AM, Jozsef Kadlecsik
Previous kernel panic traceback don't help you? Do you need more information?Could you recompile your kernel and ipset with gcc 4.7 and CFLAGS=-fno-optimize-strlen and re-run the test? Does it help?
Kernel 3.3.2 and ipset recompiled with gcc 4.7 and CFLAGS=-fno-optimize-strlen. Same panic on i686.
Signature · 2 lines
Sébastien Luttringer www.seblu.net
Quoted 11 lines · Seblu
Quoted 6 lines · Jozsef Kadlecsik
Quoted 2 lines · Seblu
On Thu, Apr 19, 2012 at 9:10 AM, Jozsef Kadlecsik
Previous kernel panic traceback don't help you? Do you need more information?Could you recompile your kernel and ipset with gcc 4.7 and CFLAGS=-fno-optimize-strlen and re-run the test? Does it help?
Kernel 3.3.2 and ipset recompiled with gcc 4.7 and CFLAGS=-fno-optimize-strlen. Same panic on i686.
Thanks - it seems I have to get gcc 4.7 installed on my machine then.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary
Quoted 8 lines · Jozsef Kadlecsik
Quoted 6 lines · Seblu
Quoted 4 lines · Jozsef Kadlecsik
Quoted 2 lines · Seblu
On Thu, Apr 19, 2012 at 9:10 AM, Jozsef Kadlecsik
Previous kernel panic traceback don't help you? Do you need more information?
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Could you recompile your kernel and ipset with gcc 4.7 and CFLAGS=-fno-optimize-strlen and re-run the test? Does it help?
Kernel 3.3.2 and ipset recompiled with gcc 4.7 and CFLAGS=-fno-optimize-strlen. Same panic on i686.
Thanks - it seems I have to get gcc 4.7 installed on my machine then.
With gcc 4.7 I was able to reproduce the problem - now what remains is to fix the issue ;-).
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary