netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fw: iproute2: segfault with ip link show dev
@ 2015-01-07 19:42 Stephen Hemminger
  2015-01-09 11:43 ` Vadim Kochan
  2015-01-09 16:59 ` Vadim Kochan
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2015-01-07 19:42 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 1996 bytes --]

Looks like one VF info changes broke old code

Begin forwarded message:

Date: Wed, 7 Jan 2015 04:06:53 -0800
From: William Dauchy <william@gandi.net>
To: "stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: iproute2: segfault with ip link show dev


Hi,

I was using iproute2 3.15.
My network card in using igb driver with VF enable, e.g igb.max_vfs=2
After upgrading to 3.16, I have now a segfault while doing a
usual `ip link show dev eth1`.
Disabling VFS make the segafult disappear.

Here is the gdb trace even if it does not contain much info.
The segfault occurs when at the VF step.

(gdb) break print_linkinfo
Breakpoint 1 at 0x40782d
(gdb) set args link show dev eth1
(gdb) r
Starting program: /sbin/ip link show dev eth1

Breakpoint 1, 0x000000000040782d in print_linkinfo ()
(gdb) n
Single stepping until exit from function print_linkinfo,
which has no line number information.
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP
mode DEFAULT group default qlen 10000
    link/ether 00:26:6c:ff:b5:c1 brd ff:ff:ff:ff:ff:ff

Program received signal SIGSEGV, Segmentation fault.
0x00000000004070eb in print_vfinfo ()
(gdb) bt
#0  0x00000000004070eb in print_vfinfo ()
#1  0x0000000000407f9f in print_linkinfo ()
#2  0x000000000041f266 in iplink_get ()
#3  0x0000000000409c69 in ipaddr_list_flush_or_save ()
#4  0x000000000040a113 in ipaddr_list_link ()
#5  0x00000000004203f6 in do_iplink ()
#6  0x0000000000405a07 in do_cmd ()
#7  0x000000000040621e in main ()

The expected output is for example:

# ip link show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP mode DEFAULT group default qlen 10000
    link/ether 00:26:6c:ff:b3:8d brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto


I'm using my own kernel build, a stable v3.14.x

Regards,
-- 
William

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fw: iproute2: segfault with ip link show dev
  2015-01-07 19:42 Fw: iproute2: segfault with ip link show dev Stephen Hemminger
@ 2015-01-09 11:43 ` Vadim Kochan
  2015-01-09 16:59 ` Vadim Kochan
  1 sibling, 0 replies; 3+ messages in thread
From: Vadim Kochan @ 2015-01-09 11:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev@vger.kernel.org

Hi,

I really don't know about VF thing but I did a diff of 3.15.0 and
3.16.0 in ip/ipaddress.c
and seems in print_vfinfo:

    vf_rate = RTA_DATA(vf[IFLA_VF_RATE]);

might be a NULL ?

Regards,

On Wed, Jan 7, 2015 at 9:42 PM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> Looks like one VF info changes broke old code
>
> Begin forwarded message:
>
> Date: Wed, 7 Jan 2015 04:06:53 -0800
> From: William Dauchy <william@gandi.net>
> To: "stephen@networkplumber.org" <stephen@networkplumber.org>
> Subject: iproute2: segfault with ip link show dev
>
>
> Hi,
>
> I was using iproute2 3.15.
> My network card in using igb driver with VF enable, e.g igb.max_vfs=2
> After upgrading to 3.16, I have now a segfault while doing a
> usual `ip link show dev eth1`.
> Disabling VFS make the segafult disappear.
>
> Here is the gdb trace even if it does not contain much info.
> The segfault occurs when at the VF step.
>
> (gdb) break print_linkinfo
> Breakpoint 1 at 0x40782d
> (gdb) set args link show dev eth1
> (gdb) r
> Starting program: /sbin/ip link show dev eth1
>
> Breakpoint 1, 0x000000000040782d in print_linkinfo ()
> (gdb) n
> Single stepping until exit from function print_linkinfo,
> which has no line number information.
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP
> mode DEFAULT group default qlen 10000
>     link/ether 00:26:6c:ff:b5:c1 brd ff:ff:ff:ff:ff:ff
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000004070eb in print_vfinfo ()
> (gdb) bt
> #0  0x00000000004070eb in print_vfinfo ()
> #1  0x0000000000407f9f in print_linkinfo ()
> #2  0x000000000041f266 in iplink_get ()
> #3  0x0000000000409c69 in ipaddr_list_flush_or_save ()
> #4  0x000000000040a113 in ipaddr_list_link ()
> #5  0x00000000004203f6 in do_iplink ()
> #6  0x0000000000405a07 in do_cmd ()
> #7  0x000000000040621e in main ()
>
> The expected output is for example:
>
> # ip link show dev eth1
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP mode DEFAULT group default qlen 10000
>     link/ether 00:26:6c:ff:b3:8d brd ff:ff:ff:ff:ff:ff
>     vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
>     vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
>
>
> I'm using my own kernel build, a stable v3.14.x
>
> Regards,
> --
> William

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fw: iproute2: segfault with ip link show dev
  2015-01-07 19:42 Fw: iproute2: segfault with ip link show dev Stephen Hemminger
  2015-01-09 11:43 ` Vadim Kochan
@ 2015-01-09 16:59 ` Vadim Kochan
  1 sibling, 0 replies; 3+ messages in thread
From: Vadim Kochan @ 2015-01-09 16:59 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, vadim4j

On Wed, Jan 07, 2015 at 11:42:17AM -0800, Stephen Hemminger wrote:
> Looks like one VF info changes broke old code
> 
> Begin forwarded message:
> 
> Date: Wed, 7 Jan 2015 04:06:53 -0800
> From: William Dauchy <william@gandi.net>
> To: "stephen@networkplumber.org" <stephen@networkplumber.org>
> Subject: iproute2: segfault with ip link show dev
> 
> 
> Hi,
> 
> I was using iproute2 3.15.
> My network card in using igb driver with VF enable, e.g igb.max_vfs=2
> After upgrading to 3.16, I have now a segfault while doing a
> usual `ip link show dev eth1`.
> Disabling VFS make the segafult disappear.
> 
> Here is the gdb trace even if it does not contain much info.
> The segfault occurs when at the VF step.
> 
> (gdb) break print_linkinfo
> Breakpoint 1 at 0x40782d
> (gdb) set args link show dev eth1
> (gdb) r
> Starting program: /sbin/ip link show dev eth1
> 
> Breakpoint 1, 0x000000000040782d in print_linkinfo ()
> (gdb) n
> Single stepping until exit from function print_linkinfo,
> which has no line number information.
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP
> mode DEFAULT group default qlen 10000
>     link/ether 00:26:6c:ff:b5:c1 brd ff:ff:ff:ff:ff:ff
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000004070eb in print_vfinfo ()
> (gdb) bt
> #0  0x00000000004070eb in print_vfinfo ()
> #1  0x0000000000407f9f in print_linkinfo ()
> #2  0x000000000041f266 in iplink_get ()
> #3  0x0000000000409c69 in ipaddr_list_flush_or_save ()
> #4  0x000000000040a113 in ipaddr_list_link ()
> #5  0x00000000004203f6 in do_iplink ()
> #6  0x0000000000405a07 in do_cmd ()
> #7  0x000000000040621e in main ()
> 
> The expected output is for example:
> 
> # ip link show dev eth1
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP mode DEFAULT group default qlen 10000
>     link/ether 00:26:6c:ff:b3:8d brd ff:ff:ff:ff:ff:ff
>     vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
>     vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
> 
> 
> I'm using my own kernel build, a stable v3.14.x
> 
> Regards,
> -- 
> William

I have a working patch which was tested by William and will send it
soon.

Regards,
Vadim Kochan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-09 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 19:42 Fw: iproute2: segfault with ip link show dev Stephen Hemminger
2015-01-09 11:43 ` Vadim Kochan
2015-01-09 16:59 ` Vadim Kochan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).