openbmc / phosphor-networkd

Apache License 2.0
18 stars 49 forks source link

phosphor-network-manager consumes all CPU on DHCPv6 #37

Closed leiyu-bytedance closed 3 years ago

leiyu-bytedance commented 3 years ago

When DHCPv6 is enabled by IPv6AccpetRA, and the DHCPv6 server is serving, the service phosphor-network-manager is consuming all possible CPU.

The stack trace shows it's in kernel:

# cat /proc/411/stack 
[<0>] do_work_pending+0x4c/0x548 
[<0>] slow_work_pending+0xc/0x20 
[<0>] 0x76a23b98 
leiyu-bytedance commented 3 years ago

Backtrace:

#0  0x76897d8c in __GI_____strtoul_l_internal (nptr=0xf <error: Cannot access memory at address 0xf>, endptr=0x7eb460f8, base=16, group=<optimized out>, loc=0x769a6a10 <_nl_global_locale>)
    at strtol_l.c:308
#1  0x7689768c in __GI___strtoul_internal (nptr=<optimized out>, endptr=<optimized out>, base=<optimized out>, group=<optimized out>) at strtol.c:98
#2  0x768ad6b8 in __vfscanf_internal (s=s@entry=0x7eb46510, format=format@entry=0xda08be ":ffff:ffff:ffff:ffff:ffff", argptr=..., argptr@entry=..., mode_flags=mode_flags@entry=2)
    at vfscanf-internal.c:206
#3  0x768aa694 in __GI___isoc99_sscanf (s=0x7eb466c4 "ffff", format=0x44f4f8 "%hx") at isoc99_sscanf.c:31
#4  0x00411bd4 in phosphor::network::internal::toV6Cidr (subnetMask=...) at /usr/include/c++/10.2.0/bits/basic_string.h:186
#5  phosphor::network::toCidr (subnetMask=..., addressFamily=<optimized out>) at ../git/util.cpp:200
#6  phosphor::network::getInterfaceAddrs[abi:cxx11]() () at ../git/util.cpp:410
#7  phosphor::network::EthernetInterface::createIPAddressObjects (this=0xd9c26c) at ../git/ethernet_interface.cpp:227
#8  0x0042a0d4 in phosphor::network::Manager::createInterfaces (this=0xd953b8) at ../git/network_manager.cpp:256
#9  0x0042a7f4 in phosphor::network::Manager::createChildObjects (this=0xd953b8) at ../git/network_manager.cpp:268
#10 0x0042ba7c in phosphor::network::refreshObjects () at /usr/include/c++/10.2.0/bits/unique_ptr.h:173
#11 phosphor::network::refreshObjects () at ../git/network_manager_main.cpp:235                                              
leiyu-bytedance commented 3 years ago

Possibly duplicate of https://github.com/openbmc/phosphor-networkd/issues/36

leiyu-bytedance commented 3 years ago

Fixed by https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-networkd/+/40192