Bug#718490: More info

2013-08-01 Thread Lars Lansink
Seems that lo0, pflog0 and pfsync0 can be checked.

I think I managed to debug some but not sure if it is useful.

$ gdb ifconfig
GNU gdb (GDB) 7.6 (Debian 7.6-5)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-kfreebsd-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /sbin/ifconfig...(no debugging symbols found)...done.
(gdb) run lo0
Starting program: /sbin/ifconfig lo0
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
inet 127.0.0.1 netmask 0xff00
inet6 ::1 prefixlen 64
nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
[Inferior 1 (process 18483) exited normally]
(gdb) run nfe0
Starting program: /sbin/ifconfig nfe0
nfe0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=82008VLAN_MTU,WOL_MAGIC,LINKSTATE

Program received signal SIGSEGV, Segmentation fault.
0x0008010c88ec in _IO_vfprintf_internal (s=optimized out,
format=optimized out, ap=ap@entry=0x7fffd148) at vfprintf.c:1649
1649vfprintf.c: No such file or directory.
(gdb) run vlan20
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /sbin/ifconfig vlan20
vlan20: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500

Program received signal SIGSEGV, Segmentation fault.
0x0008010c88ec in _IO_vfprintf_internal (s=optimized out,
format=optimized out, ap=ap@entry=0x7fffd148) at vfprintf.c:1649
1649vfprintf.c: No such file or directory.
(gdb)


Bug#718490: More info

2013-08-01 Thread Steven Chamberlain
Hi,

On 01/08/13 12:28, Lars Lansink wrote:
 Program received signal SIGSEGV, Segmentation fault.
 0x0008010c88ec in _IO_vfprintf_internal (s=optimized out,
 format=optimized out, ap=ap@entry=0x7fffd148) at vfprintf.c:1649
 1649vfprintf.c: No such file or directory.
 (gdb) 

At the gdb prompt 'bt full' might show what led to this.

On 01/08/13 13:52, Lars Lansink wrote:
 Seems similar to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696514

Yes I thought so at first, but this feature seems to be working on 8.3
and 9.0 kernels so it is likely a kernel ABI change instead.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#718490: More info

2013-08-01 Thread Petr Salinger

Seems similar to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696514


Yes I thought so at first, but this feature seems to be working on 8.3
and 9.0 kernels so it is likely a kernel ABI change instead.


But it suffices to add #include netinet/ether.h
and segfault of ifconfig is gone.

Petr


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#718490: More info

2013-08-01 Thread Lars Lansink
Starting program: /sbin/ifconfig nfe0
nfe0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=82008VLAN_MTU,WOL_MAGIC,LINKSTATE

Program received signal SIGSEGV, Segmentation fault.
0x0008010c88ec in _IO_vfprintf_internal (s=optimized out,
format=optimized out, ap=ap@entry=0x7fffd288) at vfprintf.c:1649
1649vfprintf.c: No such file or directory.
(gdb) bt full
#0  0x0008010c88ec in _IO_vfprintf_internal (s=optimized out,
format=optimized out, ap=ap@entry=0x7fffd288) at vfprintf.c:1649
len = optimized out
string_malloced = optimized out
step0_jumps = {0, -3426, -3336, -3246, -3149, -3059, -2951, -2757,
-2524, -1972, -1849, -1659, -1569, -1469, -1464, -1239, 1906, 1991, 2003,
2015, 4831, -538, 2629,
  2717, 2797, 5132, 2360, -3526, -3526, -2847}
space = 0
is_short = 0
use_outdigits = 0
step1_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, -1972, -1849, -1659,
-1569, -1469, -1464, -1239, 1906, 1991, 2003, 2015, 4831, -538, 2629, 2717,
2797, 5132, 2360, -3526,
  -3526, 0}
group = 0
prec = -1
step2_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1849, -1659, -1569,
-1469, -1464, -1239, 1906, 1991, 2003, 2015, 4831, -538, 2629, 2717, 2797,
5132, 2360, -3526,
  -3526, 0}
string = optimized out
left = 0
is_long_double = 0
width = 0
step3a_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1759, 0, 0, 0,
-1464, -1239, 1906, 1991, 2003, 0, 0, 0, 0, 2717, 0, 0, 0, 0, 0, 0}
alt = 0
showsign = 0
is_long = 0
is_char = 0
pad = 32 ' '
step3b_jumps = {0 repeats 11 times, -1569, 0, 0, -1464, -1239,
1906, 1991, 2003, 2015, 4831, -538, 2629, 2717, 2797, 5132, 2360, 0, 0, 0}
step4_jumps = {0 repeats 14 times, -1464, -1239, 1906, 1991,
2003, 2015, 4831, -538, 2629, 2717, 2797, 5132, 2360, 0, 0, 0}
is_negative = optimized out
number = optimized out
base = optimized out
the_arg = {pa_wchar = 0 L'\000', pa_int = 0, pa_long_int = 0,
pa_long_long_int = 0, pa_u_int = 0, pa_u_long_int = 0, pa_u_long_long_int =
0, pa_double = 0,
  pa_long_double = invalid float value, pa_string = 0x0,
pa_wstring = 0x0, pa_pointer = 0x0, pa_user = 0x0}
spec = 115 's'
_buffer = {__routine = 0x8010d89f0 __funlockfile, __arg =
0x8013d7100 _IO_2_1_stdout_, __canceltype = 235208928, __prev =
0x38843}
_avail = optimized out
thousands_sep = 0x0
grouping = 0x Address 0x out of
bounds
done = 7
f = 0x4177d4 s\n
lead_str_end = 0x4177d3 %s\n
end_of_spec = optimized out
work_buffer = \006\000\006\016\002\000\000\230\334\005, '\000'
repeats 15 times, \341\365\005\000\000\000\000\221?\t, '\000' repeats
13 times, \222\006\002, '\000' repeats 21 times,
R\025\253\006\000\000\000\000\261|\222\001\000\000\000\000\000\317\006\000\000\000\000\000\r,
'\000' repeats 31 times,
\001\000\000\000\000\000\000\000\345{\367Q\000\000\000\000\212\070\003\000\000\000\000\000\070\022\003\000\006\004\006\000nfe0\000\060\005\372p\024,
'\000' repeats 38 times...
workstart = 0x0
workend = optimized out
ap_save = {{gp_offset = 8, fp_offset = 48, overflow_arg_area =
0x7fffd360, reg_save_area = 0x7fffd2a0}}
nspecs_done = 0
save_errno = 22
readonly_format = 0
args_malloced = 0x0
jump_table =
\001\000\000\004\000\016\000\006\000\000\a\002\000\003\t\000\005\b\b\b\b\b\b\b\b\b\000\000\000\000\000\000\000\032\000\031\000\023\023\023\000\035\000\000\f\000\000\000\000\000\000\025\000\000\000\000\022\000\r\000\000\000\000\000\000\032\000\024\017\023\023\023\n\017\034\000\v\030\027\021\026\f\000\025\033\020\000\000\022\000\r
__PRETTY_FUNCTION__ = _IO_vfprintf_internal
#1  0x0008010ce679 in __printf (format=optimized out) at printf.c:34
arg = {{gp_offset = 16, fp_offset = 48, overflow_arg_area =
0x7fffd360, reg_save_area = 0x7fffd2a0}}
done = 0
#2  0x00402ebd in ?? ()
No symbol table info available.
#3  0x0008010a0605 in __libc_start_main (main=0x402490, argc=2,
ubp_av=0x7fffdc68, init=optimized out, fini=optimized out,
rtld_fini=optimized out,
stack_end=0x7fffdc48) at libc-start.c:260
result = optimized out
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 1131986251244584139,
4207820, 140737488346208, 0, 0, -1131986250051404597, 1127480366617410763},
mask_was_saved = 0}},
  priv = {pad = {0x0, 0x0, 0x416f50, 0x7fffdc68}, data = {prev
= 0x0, cleanup = 0x0, canceltype = 4288336}}}
not_first_call = optimized out
#4  0x004034f8 in ?? ()
No symbol table info available.
#5  0x7fffdc48 in ?? ()
No symbol table info available.
#6  0x in ?? ()
No symbol table info available.



2013/8/1 Steven Chamberlain ste...@pyro.eu.org

 Hi,

 On 01/08/13 

Bug#718490: More info

2013-08-01 Thread Steven Chamberlain
On 01/08/13 15:10, Petr Salinger wrote:
 But it suffices to add #include netinet/ether.h
 and segfault of ifconfig is gone.

Strange that this only breaks on 9.1, but the above fix makes sense
because build log checks already showed:

http://qa.debian.org/bls/packages/f/freebsd-utils.html
 W implicit-declaration af_link.c:68 (kfreebsd-i386)

and a few similar issues.

https://buildd.debian.org/status/fetch.php?pkg=freebsd-utilsarch=kfreebsd-i386ver=9.1-2stamp=1374530954
 cc -Wall -g -pipe -fPIC -I. -D_GNU_SOURCE -D__va_list=__builtin_va_list 
 -isystem /usr/include/tirpc -D__FreeBSD_version=__FreeBSD_kernel_version -O2 
 -isystem /usr/include/freebsd -I/«PKGBUILDDIR»/debian/local/include 
 -I/«PKGBUILDDIR»/include -lbsd  -DINET6 -DINET -Wall -Wmissing-prototypes 
 -Wcast-qual -Wwrite-strings -Wnested-externs -Wall -g -pipe -fPIC -I. 
 -D_GNU_SOURCE -D__va_list=__builtin_va_list -isystem /usr/include/tirpc 
 -D__FreeBSD_version=__FreeBSD_kernel_version -O2 -std=gnu99 -fstack-protector 
 -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c af_link.c
 af_link.c: In function 'link_status':
 af_link.c:68:8: warning: implicit declaration of function 'ether_ntoa' 
 [-Wimplicit-function-declaration]
 ether_ntoa((struct ether_addr *)LLADDR(sdl)));
 ^

 cc -Wall -g -pipe -fPIC -I. -D_GNU_SOURCE -D__va_list=__builtin_va_list 
 -isystem /usr/include/tirpc -D__FreeBSD_version=__FreeBSD_kernel_version -O2 
 -isystem /usr/include/freebsd -I/«PKGBUILDDIR»/debian/local/include 
 -I/«PKGBUILDDIR»/include -lbsd  -DINET6 -DINET -Wall -Wmissing-prototypes 
 -Wcast-qual -Wwrite-strings -Wnested-externs -Wall -g -pipe -fPIC -I. 
 -D_GNU_SOURCE -D__va_list=__builtin_va_list -isystem /usr/include/tirpc 
 -D__FreeBSD_version=__FreeBSD_kernel_version -O2 -std=gnu99 -fstack-protector 
 -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c ifieee80211.c
 ifieee80211.c: In function 'list_scan':
 ifieee80211.c:3184:4: warning: implicit declaration of function 'ether_ntoa' 
 [-Wimplicit-function-declaration]

 cc -Wall -g -pipe -fPIC -I. -D_GNU_SOURCE -D__va_list=__builtin_va_list 
 -isystem /usr/include/tirpc -D__FreeBSD_version=__FreeBSD_kernel_version -O2 
 -isystem /usr/include/freebsd -I/«PKGBUILDDIR»/debian/local/include 
 -I/«PKGBUILDDIR»/include -lbsd  -DINET6 -DINET -Wall -Wmissing-prototypes 
 -Wcast-qual -Wwrite-strings -Wnested-externs -Wall -g -pipe -fPIC -I. 
 -D_GNU_SOURCE -D__va_list=__builtin_va_list -isystem /usr/include/tirpc 
 -D__FreeBSD_version=__FreeBSD_kernel_version -O2 -std=gnu99 -fstack-protector 
 -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c ifbridge.c
 ifbridge.c: In function 'bridge_addresses':
 ifbridge.c:241:3: warning: implicit declaration of function 'ether_ntoa' 
 [-Wimplicit-function-declaration]

 cc -Wall -g -pipe -fPIC -I. -D_GNU_SOURCE -D__va_list=__builtin_va_list 
 -isystem /usr/include/tirpc -D__FreeBSD_version=__FreeBSD_kernel_version -O2 
 -isystem /usr/include/freebsd -I/«PKGBUILDDIR»/debian/local/include 
 -I/«PKGBUILDDIR»/include -lbsd  -DINET6 -DINET -Wall -Wmissing-prototypes 
 -Wcast-qual -Wwrite-strings -Wnested-externs -Wall -g -pipe -fPIC -I. 
 -D_GNU_SOURCE -D__va_list=__builtin_va_list -isystem /usr/include/tirpc 
 -D__FreeBSD_version=__FreeBSD_kernel_version -O2 -std=gnu99 -fstack-protector 
 -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign  -o ifconfig 
 ifconfig.o af_link.o af_inet.o af_inet6.o af_atalk.o af_nd6.o ifclone.o 
 ifmedia.o ifvlan.o ifgre.o ifgif.o ifieee80211.o regdomain.o ifcarp.o 
 ifgroup.o ifbridge.o iflagg.o af_ipx.o -lexpat -lsbuf -lipx -lbsd 
 ../../lib/linkaddr.o

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#718490: More info

2013-08-01 Thread Lars Lansink
I admit I am not a very experience debian hacker but I tried adding this to
ifconfig.c and rebuild the package with dpkg-buildpackage.

BUILDDIR/sbin/ifconfig/ifconfig still segfaults though so I have not tried
to replace the standard package yet.


2013/8/1 Petr Salinger petr.salin...@seznam.cz

 Seems similar to 
 http://bugs.debian.org/cgi-**bin/bugreport.cgi?bug=696514http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696514


 Yes I thought so at first, but this feature seems to be working on 8.3
 and 9.0 kernels so it is likely a kernel ABI change instead.


 But it suffices to add #include netinet/ether.h
 and segfault of ifconfig is gone.

 Petr




-- 
Lars (cry...@cryptr.net a gmail powered domain)