From owner-freebsd-amd64@freebsd.org Wed Feb 10 15:54:20 2016 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73FACAA39A7 for ; Wed, 10 Feb 2016 15:54:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 594FADE8 for ; Wed, 10 Feb 2016 15:54:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1AFsKhE094654 for ; Wed, 10 Feb 2016 15:54:20 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 207080] pfctl crash when load pf.conf, libc/resolv problem ? Date: Wed, 10 Feb 2016 15:54:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 9.3-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: fabrice.bruel@orange.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 10 Feb 2016 17:18:47 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 15:54:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207080 Bug ID: 207080 Summary: pfctl crash when load pf.conf, libc/resolv problem ? Product: Base System Version: 9.3-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: fabrice.bruel@orange.com CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org Created attachment 166833 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D166833&action= =3Dedit pf.conf file Hello I'using FreeBSD 9_STABLE to do firewall with pf. # uname -a FreeBSD FreeBSD 9.3 9.3-STABLE FreeBSD 9.3-STABLE #0 r294729: Tue Jan 26 22:00:32 CET 2016 root@9_STABLE:/usr/obj/usr/src/sys/FBSD9PF amd64 With a specific pf.conf file (join with this message), in some case pftcl -f pf.conf crash with : pfctl: failed to create table __automatic_4130873d_220 in : Cannot allocate memory Segmentation fault: 11 (core dumped) Ok my pf.conf file is bad and not optimize, but syntax is ok. To be sure to reproduce the bug, just do with attach pf.conf : while true;do pftcl -f pf.conf;done=20 and wait a few minutes. I've tried to understand the core file, but I'm a newbie in gdb usage, so I reproduce here what I've done : # gdb GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd". (gdb) core pfctl.core Core was generated by `pfctl'. Program terminated with signal 11, Segmentation fault. #0 0x0000000800cfe6e6 in ?? () (gdb) add-symbol-file /usr/lib/debug/lib/libc.so.7.debug 0x0000000800cfe6e6 add symbol table from file "/usr/lib/debug/lib/libc.so.7.debug" at .text_addr =3D 0x800cfe6e6 (y or n) y Reading symbols from /usr/lib/debug/lib/libc.so.7.debug...done. (gdb) bt #0 0x0000000800cfe6e6 in .text () #1 0x0000000000000001 in ?? () #2 0x0000000000639668 in ?? () #3 0x00007fffffffd870 in ?? () #4 0x0000000801400000 in ?? () #5 0x0000000800000001 in ?? () #6 0x00000008018009d0 in ?? () #7 0x00000000ffffffff in ?? () #8 0x00000008014045d0 in ?? () #9 0x00000000ffffffff in ?? () #10 0x0000000801402ad0 in ?? () #11 0x00000008ffffffff in ?? () #12 0x00000008014024d0 in ?? () #13 0x00000008ffffffff in ?? () #14 0x00000008014021d0 in ?? () #15 0x00000000ffffffff in ?? () #16 0x0000000801401ed0 in ?? () #17 0x00007fffffffffff in ?? () #18 0x0000000801401a50 in ?? () #19 0x0000000800000001 in ?? () #20 0x0000000801401a50 in ?? () #21 0x0000000000000017 in ?? () #22 0x00007fffffffd5e0 in ?? () #23 0x0000000800d6dc29 in __printf_render_int (io=3D0x7, pi=3D0x6394b0, arg= =3D) at /usr/src/lib/libc/stdio/xprintf_int.c:422 #24 0x0000000800faab40 in ?? () #25 0x00007fffffffd33b in ?? () #26 0x0000000800d06eca in files_rpcent (retval=3D0x800cfc36f, mdata=3D, ap=3D) at /usr/src/lib/libc/rpc/getrpcent.c:317 #27 0x65726168732f6c61 in ?? () #28 0x62696c2f736c6e2f in ?? () #29 0x0074616300432f63 in ?? () #30 0x00007fffffffd400 in ?? () #31 0x0000000800652c00 in ?? () #32 0x00007fffffffd410 in ?? () #33 0x00007fffffffd3b0 in ?? () #34 0x0000000000000000 in ?? () (gdb) add-symbol-file /usr/lib/debug/lib/libc.so.7.debug 0x00007fffffffd3b0 add symbol table from file "/usr/lib/debug/lib/libc.so.7.debug" at .text_addr =3D 0x7fffffffd3b0 (y or n) y Reading symbols from /usr/lib/debug/lib/libc.so.7.debug...done. (gdb) bt #0 0x0000000800cfe6e6 in .text () #1 0x0000000000000001 in ?? () #2 0x0000000000639668 in ?? () #3 0x00007fffffffd870 in wcsxfrm_l (dest=3D0x7fffffffd0b0, src=3D0x7ffffff= fd0d0, len=3D6526232, locale=3D) at /usr/src/lib/libc/string/wcsxfrm.c:126 #4 0x0000000000000002 in ?? () #5 0x0000000000000002 in ?? () #6 0x0000000800faab40 in ?? () #7 0x0000000800faab40 in ?? () #8 0x0000000800faab40 in ?? () #9 0x00007fffffffd33b in ?? () #10 0x0000000800d06eca in files_rpcent (retval=3D0x800d06eca, mdata=3D, ap=3D) at /usr/src/lib/libc/rpc/getrpcent.c:317 #11 0x0000000800d83e3e in __res_pquery (statp=3D0x7fffffffd320, msg=3D, len=3D, file=3D0x800cfc11a) at /usr/src/lib/libc/resolv/res_debug.c:305 #12 0x0000000000000000 in ?? () (gdb)=20 If my use of gdb is correct, it seems to be a problem in /usr/src/lib/libc/resolv/res_debug.c ? I can send the core file but 14Mo ... Thanks for your help Fabrice --=20 You are receiving this mail because: You are on the CC list for the bug.=