DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: Slava Ovsiienko <viacheslavo@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Matan Azrad <matan@mellanox.com>,
	Raslan Darawsheh <rasland@mellanox.com>,
	Ori Kam <orika@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	"thomas@mellanox.net" <thomas@mellanox.net>
Subject: Re: [dpdk-dev] app/test: unit test problem with testing mbuf in forked child process
Date: Thu, 6 Feb 2020 08:52:23 +0100	[thread overview]
Message-ID: <20200206075223.GL22738@platinum> (raw)
In-Reply-To: <AM4PR05MB32657F4EC029471A22542B6FD2050@AM4PR05MB3265.eurprd05.prod.outlook.com>

Hi Slava,

On Wed, Jan 29, 2020 at 12:31:35PM +0000, Slava Ovsiienko wrote:
> While working on the unit test for the mbuf with pinned external buffers I found that:
> app/test/test_mbuf.c:
> - test_failing_mbuf_sanity_check()
>   - verify_mbuf_check_panics(buf)
>     - fork()
>       - child process()
> 
> Does not work (either over regular mbufs, not pinned ones) in correct way.
> The mbuf being tested is not mapped (in huge page) to child process and it always completes with seg fault.
> The question - is this problem of my setup, or did we change the memory mapping model
> and this unit test should be updated?

I tried to reproduce the issue, but in my case it looks it's working.
I added some prints in rte_mbuf_sanity_check() and rte_mbuf_check().
Here is the log on my platform:


# cat /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
512

# ./devtools/test-build.sh -s -v -j16 x86_64-native-linuxapp-gcc
[...]
# ./x86_64-native-linuxapp-gcc/app/test
EAL: Detected 24 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No free hugepages reported in hugepages-2048kB
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: PCI device 0000:01:00.0 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:10a7 net_e1000_igb
EAL: PCI device 0000:01:00.1 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:10a7 net_e1000_igb
EAL: PCI device 0000:04:00.0 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:04:00.1 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:10fb net_ixgbe
APP: HPET is not enabled, using TSC as default timer
RTE>>mbuf_autotest
[...]
Now checking for error conditions
rte_mbuf_sanity_check((nil))
rte_mbuf_check((nil)):188
PANIC in rte_mbuf_sanity_check():
mbuf is NULL
13: [./x86_64-native-linuxapp-gcc/app/test(_start+0x2a) [0x555cc9791a1a]]
12: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7feb31e00b97]]
11: [./x86_64-native-linuxapp-gcc/app/test(main+0x3be) [0x555cc96d868e]]
10: [./x86_64-native-linuxapp-gcc/app/test(cmdline_interact+0x3b) [0x555cc9c07f9b]]
9: [./x86_64-native-linuxapp-gcc/app/test(+0x6299e0) [0x555cc9c079e0]]
8: [./x86_64-native-linuxapp-gcc/app/test(rdline_char_in+0x9d1) [0x555cc9c0b4a1]]
7: [./x86_64-native-linuxapp-gcc/app/test(+0x629ce0) [0x555cc9c07ce0]]
6: [./x86_64-native-linuxapp-gcc/app/test(cmdline_parse+0x328) [0x555cc9c08ce8]]
5: [./x86_64-native-linuxapp-gcc/app/test(+0x1b3b33) [0x555cc9791b33]]
4: [./x86_64-native-linuxapp-gcc/app/test(+0x24b12c) [0x555cc982912c]]
3: [./x86_64-native-linuxapp-gcc/app/test(rte_mbuf_sanity_check+0x130) [0x555cc9b72fa0]]
2: [./x86_64-native-linuxapp-gcc/app/test(__rte_panic+0xbd) [0x555cc96c8a62]]
1: [./x86_64-native-linuxapp-gcc/app/test(rte_dump_stack+0x2e) [0x555cc9be749e]]
rte_mbuf_sanity_check(0x7ffdf4c53f00)
rte_mbuf_check(0x7ffdf4c53f00):188
rte_mbuf_check(0x7ffdf4c53f00):194
PANIC in rte_mbuf_sanity_check():
bad mbuf pool
13: [./x86_64-native-linuxapp-gcc/app/test(_start+0x2a) [0x555cc9791a1a]]
12: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7feb31e00b97]]
11: [./x86_64-native-linuxapp-gcc/app/test(main+0x3be) [0x555cc96d868e]]
10: [./x86_64-native-linuxapp-gcc/app/test(cmdline_interact+0x3b) [0x555cc9c07f9b]]
9: [./x86_64-native-linuxapp-gcc/app/test(+0x6299e0) [0x555cc9c079e0]]
8: [./x86_64-native-linuxapp-gcc/app/test(rdline_char_in+0x9d1) [0x555cc9c0b4a1]]
7: [./x86_64-native-linuxapp-gcc/app/test(+0x629ce0) [0x555cc9c07ce0]]
6: [./x86_64-native-linuxapp-gcc/app/test(cmdline_parse+0x328) [0x555cc9c08ce8]]
5: [./x86_64-native-linuxapp-gcc/app/test(+0x1b3b33) [0x555cc9791b33]]
4: [./x86_64-native-linuxapp-gcc/app/test(+0x24b149) [0x555cc9829149]]
3: [./x86_64-native-linuxapp-gcc/app/test(rte_mbuf_sanity_check+0x130) [0x555cc9b72fa0]]
2: [./x86_64-native-linuxapp-gcc/app/test(__rte_panic+0xbd) [0x555cc96c8a62]]
1: [./x86_64-native-linuxapp-gcc/app/test(rte_dump_stack+0x2e) [0x555cc9be749e]]
rte_mbuf_sanity_check(0x7ffdf4c53f00)
rte_mbuf_check(0x7ffdf4c53f00):188
rte_mbuf_check(0x7ffdf4c53f00):194
PANIC in rte_mbuf_sanity_check():
bad IO addr
13: [./x86_64-native-linuxapp-gcc/app/test(_start+0x2a) [0x555cc9791a1a]]
12: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7feb31e00b97]]
11: [./x86_64-native-linuxapp-gcc/app/test(main+0x3be) [0x555cc96d868e]]
10: [./x86_64-native-linuxapp-gcc/app/test(cmdline_interact+0x3b) [0x555cc9c07f9b]]
9: [./x86_64-native-linuxapp-gcc/app/test(+0x6299e0) [0x555cc9c079e0]]
8: [./x86_64-native-linuxapp-gcc/app/test(rdline_char_in+0x9d1) [0x555cc9c0b4a1]]
7: [./x86_64-native-linuxapp-gcc/app/test(+0x629ce0) [0x555cc9c07ce0]]
6: [./x86_64-native-linuxapp-gcc/app/test(cmdline_parse+0x328) [0x555cc9c08ce8]]
5: [./x86_64-native-linuxapp-gcc/app/test(+0x1b3b33) [0x555cc9791b33]]
4: [./x86_64-native-linuxapp-gcc/app/test(+0x24b149) [0x555cc9829149]]
3: [./x86_64-native-linuxapp-gcc/app/test(rte_mbuf_sanity_check+0x130) [0x555cc9b72fa0]]
2: [./x86_64-native-linuxapp-gcc/app/test(__rte_panic+0xbd) [0x555cc96c8a62]]
1: [./x86_64-native-linuxapp-gcc/app/test(rte_dump_stack+0x2e) [0x555cc9be749e]]
rte_mbuf_sanity_check(0x7ffdf4c53f00)
rte_mbuf_check(0x7ffdf4c53f00):188
rte_mbuf_check(0x7ffdf4c53f00):194
PANIC in rte_mbuf_sanity_check():
bad virt addr
13: [./x86_64-native-linuxapp-gcc/app/test(_start+0x2a) [0x555cc9791a1a]]
12: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7feb31e00b97]]
11: [./x86_64-native-linuxapp-gcc/app/test(main+0x3be) [0x555cc96d868e]]
10: [./x86_64-native-linuxapp-gcc/app/test(cmdline_interact+0x3b) [0x555cc9c07f9b]]
9: [./x86_64-native-linuxapp-gcc/app/test(+0x6299e0) [0x555cc9c079e0]]
8: [./x86_64-native-linuxapp-gcc/app/test(rdline_char_in+0x9d1) [0x555cc9c0b4a1]]
7: [./x86_64-native-linuxapp-gcc/app/test(+0x629ce0) [0x555cc9c07ce0]]
6: [./x86_64-native-linuxapp-gcc/app/test(cmdline_parse+0x328) [0x555cc9c08ce8]]
5: [./x86_64-native-linuxapp-gcc/app/test(+0x1b3b33) [0x555cc9791b33]]
4: [./x86_64-native-linuxapp-gcc/app/test(+0x24b149) [0x555cc9829149]]
3: [./x86_64-native-linuxapp-gcc/app/test(rte_mbuf_sanity_check+0x130) [0x555cc9b72fa0]]
2: [./x86_64-native-linuxapp-gcc/app/test(__rte_panic+0xbd) [0x555cc96c8a62]]
1: [./x86_64-native-linuxapp-gcc/app/test(rte_dump_stack+0x2e) [0x555cc9be749e]]
rte_mbuf_sanity_check(0x7ffdf4c53f00)
rte_mbuf_check(0x7ffdf4c53f00):188
rte_mbuf_check(0x7ffdf4c53f00):194
rte_mbuf_check(0x7ffdf4c53f00):209
PANIC in rte_mbuf_sanity_check():
bad ref cnt
13: [./x86_64-native-linuxapp-gcc/app/test(_start+0x2a) [0x555cc9791a1a]]
12: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7feb31e00b97]]
11: [./x86_64-native-linuxapp-gcc/app/test(main+0x3be) [0x555cc96d868e]]
10: [./x86_64-native-linuxapp-gcc/app/test(cmdline_interact+0x3b) [0x555cc9c07f9b]]
9: [./x86_64-native-linuxapp-gcc/app/test(+0x6299e0) [0x555cc9c079e0]]
8: [./x86_64-native-linuxapp-gcc/app/test(rdline_char_in+0x9d1) [0x555cc9c0b4a1]]
7: [./x86_64-native-linuxapp-gcc/app/test(+0x629ce0) [0x555cc9c07ce0]]
6: [./x86_64-native-linuxapp-gcc/app/test(cmdline_parse+0x328) [0x555cc9c08ce8]]
5: [./x86_64-native-linuxapp-gcc/app/test(+0x1b3b33) [0x555cc9791b33]]
4: [./x86_64-native-linuxapp-gcc/app/test(+0x24b149) [0x555cc9829149]]
3: [./x86_64-native-linuxapp-gcc/app/test(rte_mbuf_sanity_check+0x130) [0x555cc9b72fa0]]
2: [./x86_64-native-linuxapp-gcc/app/test(__rte_panic+0xbd) [0x555cc96c8a62]]
1: [./x86_64-native-linuxapp-gcc/app/test(rte_dump_stack+0x2e) [0x555cc9be749e]]
rte_mbuf_sanity_check(0x7ffdf4c53f00)
rte_mbuf_check(0x7ffdf4c53f00):188
rte_mbuf_check(0x7ffdf4c53f00):194
rte_mbuf_check(0x7ffdf4c53f00):209
PANIC in rte_mbuf_sanity_check():
bad ref cnt
13: [./x86_64-native-linuxapp-gcc/app/test(_start+0x2a) [0x555cc9791a1a]]
12: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7feb31e00b97]]
11: [./x86_64-native-linuxapp-gcc/app/test(main+0x3be) [0x555cc96d868e]]
10: [./x86_64-native-linuxapp-gcc/app/test(cmdline_interact+0x3b) [0x555cc9c07f9b]]
9: [./x86_64-native-linuxapp-gcc/app/test(+0x6299e0) [0x555cc9c079e0]]
8: [./x86_64-native-linuxapp-gcc/app/test(rdline_char_in+0x9d1) [0x555cc9c0b4a1]]
7: [./x86_64-native-linuxapp-gcc/app/test(+0x629ce0) [0x555cc9c07ce0]]
6: [./x86_64-native-linuxapp-gcc/app/test(cmdline_parse+0x328) [0x555cc9c08ce8]]
5: [./x86_64-native-linuxapp-gcc/app/test(+0x1b3b33) [0x555cc9791b33]]
4: [./x86_64-native-linuxapp-gcc/app/test(+0x24b149) [0x555cc9829149]]
3: [./x86_64-native-linuxapp-gcc/app/test(rte_mbuf_sanity_check+0x130) [0x555cc9b72fa0]]
2: [./x86_64-native-linuxapp-gcc/app/test(__rte_panic+0xbd) [0x555cc96c8a62]]
1: [./x86_64-native-linuxapp-gcc/app/test(rte_dump_stack+0x2e) [0x555cc9be749e]]

Can you give more details about how you start the test?

Thanks,
Olivier

      reply	other threads:[~2020-02-06  7:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 12:31 Slava Ovsiienko
2020-02-06  7:52 ` Olivier Matz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200206075223.GL22738@platinum \
    --to=olivier.matz@6wind.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=rasland@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@mellanox.net \
    --cc=viacheslavo@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).