Bug 19 - Crash on initialization if first RTE_MAX_LCORE cores are disabled
Summary: Crash on initialization if first RTE_MAX_LCORE cores are disabled
Status: RESOLVED FIXED
Alias: None
Product: DPDK
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All All
: Normal minor
Target Milestone: ---
Assignee: Solal Pirelli
URL:
Depends on:
Blocks:
 
Reported: 2018-04-01 14:24 CEST by Solal Pirelli
Modified: 2019-02-01 11:56 CET (History)
3 users (show)



Attachments

Description Solal Pirelli 2018-04-01 14:24:58 CEST
In eal_common_options.c, the master lcore is found by looking for the first enabled lcore (http://dpdk.org/browse/dpdk/tree/lib/librte_eal/common/eal_common_options.c?h=v18.02#n1213).

However, there is no check for the case where no enabled lcore is found. In the (unlikely!) case of all first RTE_MAX_LCORE cores being disabled, the next instruction will cause an out-of-bounds array access, probably crashing the app.
Comment 1 Ajit Khaparde 2018-09-16 00:11:33 CEST
Ferruh, who gets to work on this?
Comment 2 Bruce Richardson 2018-12-17 17:56:41 CET
Can you provide a series of instructions on how to reproduce this crash? I've tried using the DPDK helloworld example, and no matter how I seem to specify the -l or -c parameters, I always get an error message about an invalid set of cores, rather than a segfault.
Comment 3 Ajit Khaparde 2018-12-17 22:07:58 CET
Can you provide Bruce the steps to reproduce this? Thanks
Comment 4 Bruce Richardson 2019-01-15 15:39:15 CET
Ping.
Any update on steps to reproduce?

Also, does patch: http://patches.dpdk.org/patch/49792/ fix this issue?
Comment 5 Bruce Richardson 2019-01-17 15:52:54 CET
Patch http://patches.dpdk.org/patch/49914/ upstreamed by David Marchand to fix this issue.
Comment 6 Ferruh YIGIT 2019-01-31 17:44:12 CET
Solal can you please verify the defect? So that we can close it. Thanks.
Comment 7 Solal Pirelli 2019-02-01 10:38:22 CET
Yes, patch 49914 fixes this issue, this can be closed. Thanks!
Comment 8 Ferruh YIGIT 2019-02-01 11:56:10 CET
Thanks for confirming Solal.

Note You need to log in before you can comment on or make changes to this bug.