Commit c35ea8c
Update hsFlowd to close the pipe immediately (sonic-net#50)
Without this fix, sflowmgrd is taking 10-20 mins to finish command service restart hsflowd in Debian 13
sflowmgrd trace
0 read () from /lib/x86_64-linux-gnu/libc.so.6
1 _IO_file_underflow () from /lib/x86_64-linux-gnu/libc.so.6
2 _IO_default_uflow () from /lib/x86_64-linux-gnu/libc.so.6
3 _IO_getline_info () from /lib/x86_64-linux-gnu/libc.so.6
4 fgets () from /lib/x86_64-linux-gnu/libc.so.6
5 swss::exec(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () from /lib/x86_64-linux-gnu/libswsscommon.so.0
6 swss::SflowMgr::sflowHandleService (this=this@entry=0x7ffdc4ae6dc0,
enable=enable@entry=true) at ./cfgmgr/sflowmgr.cpp:67
7 swss::SflowMgr::doTask (this=<optimized out>, consumer=...)
at ./cfgmgr/sflowmgr.cpp:459
8 Consumer::execute (this=0x556f0715b280) at ../orchagent/orch.cpp:338
9 main (argc=<optimized out>, argv=<optimized out>)
at ./cfgmgr/sflowmgrd.cpp:74
hsflowd trace:
(gdb) bt
close () from /lib/x86_64-linux-gnu/libc.so.6
main (argc=<optimized out>, argv=<optimized out>) at hsflowd.c:1927
(gdb) f 1
1927 hsflowd.c: No such file or directory.
(gdb) p i
$1 = 1035943704
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x00007fa33f48d9e0 in close () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) f 1
1927 in hsflowd.c
(gdb) p i
$2 = 1024299507
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
48 root 20 0 2652 928 820 R 92.4 0.0 5:24.66 hsflowd
Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
Co-authored-by: Vivek Reddy <vkarri@nvidia.com>1 parent 85ed5a6 commit c35ea8c
2 files changed
Lines changed: 46 additions & 0 deletions
File tree
- src/sflow/hsflowd/patch
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
0 commit comments