From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2CF3942870; Thu, 30 Mar 2023 15:28:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACE80410D3; Thu, 30 Mar 2023 15:28:26 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 75AF840E25 for ; Thu, 30 Mar 2023 15:28:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680182904; x=1711718904; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=V6hkAzsCuCruey2b/LLUBr+K/xjeCckHFe++1BTi8AI=; b=GvEXSgm5CAPHCNZjBvKBuBwQFlrbe8zPh8BVBNhXM2SmMkjv9QnAVgxJ cnZ3Q8BqJHOFoByiYttdBeZspJI6jqfGkTConW61pjnlNQA5GniiKmrAO rGRYET7xHErW0rsQURNON50MEJON6h4cbR3gqUR+GAhRWl9+d1AKgqzac KkjHnqlVC4mA61F6MNtaZhFajVqHPxyq39FC478dzPgElHINgqK7061J/ UQFMDxOyPwS0sXyYXZfrIi38/54qYQHJg/CjvTy568tTPsRjquuUW+2ia quMjCDPulNyHtTGx+gqVeQAmbUvbkYmdFyXotS2/qcLnCjJfiyGF5hG7z w==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="427442483" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="427442483" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 06:28:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="773980469" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="773980469" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 30 Mar 2023 06:28:07 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 30 Mar 2023 06:28:07 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 30 Mar 2023 06:28:07 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Thu, 30 Mar 2023 06:28:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O+OkSaBTNIGUBMscZyW8A9LBKnNcK5aUNFF1x9wgoMUy9pBHuIr5TrAmjZwPCsIyIv6xOLnTl/MqUuIvh2BRCfJJuZoKfb05ao5MnmaXtQf0ee7xO37/xbiKC+81LY2MiHXIMroRd/oxQZepaL+xYtfTk2ihb1McXK1yhxa3FcmHKSyiHucnMqWcG+H5BzSZdjRb6e0I3fhRHlCBaYUZRSTGqXvf0VQqjfyX/hOnofzc9aNUrE1ldo/INYmeZdFUBgQf7yUWsShUclXW0OeFE6V7HCqhyDdPbuvx9jPJQ1xV9GGPUVukrhnqnIeNVtPMfJt2EoksD2kujm0+L9mCZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SJZ41QEeXZgJEtO34AtC9sH2rLits2iWG/bX23R0Kdg=; b=c6A6eeoPHadHKobgb5HburG3KCJ0Ll8WhRusPcxyQvmT0/eykntV/iRAP4mTy8Xjepx4Bs8tBZcN5MG5Lqw0QqbRdslbm4mvVfwiaYdqQhsU3JHQCIPaDNChEkRdU9Sjy54ktwJHGySBTh7totyzFUdfiz4sfYgnl9+5qFv+T//Oc68wnSe+UpZJ2N34FXzwZ6wSSyYlI2Gd1vmh6nnULROSU4d63LmvY9fI6GROI4WsERF4MukSOCiKAYvoSD9jtpmqlLGvPKQwbyjQpHFnDLTtZ6bjJ/JQx3JWuYajuO8w0E3ideMON3UPFu/n/hHwNp0KZcU9nSjGdZb9Ve4f1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH0PR11MB4967.namprd11.prod.outlook.com (2603:10b6:510:41::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.34; Thu, 30 Mar 2023 13:28:05 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c%8]) with mapi id 15.20.6222.035; Thu, 30 Mar 2023 13:28:05 +0000 Date: Thu, 30 Mar 2023 14:28:00 +0100 From: Bruce Richardson To: Christian Ehrhardt CC: dev , Luca Boccassi Subject: Re: Should we try to be more graceful in library init on old Hardware? Message-ID: References: Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO4P123CA0009.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:150::14) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH0PR11MB4967:EE_ X-MS-Office365-Filtering-Correlation-Id: b41fa0a7-8611-4e71-cc48-08db31229827 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vTYp8la5B+SHvcoB9+ucsgY7q1h+iowZqmWTSskviWDuQNwLIkGQRkD5q8+V5GZuGo2WT377iZHGj5FTboZ41pGqehgj3fgYN6EhyTWvWuInDdHJS9KlDDHlD49/kC5+mQRS5WoKx6ywVXcI/G5rRDafyaWC5WZ3M4oXcOXmisUct5XEJN2wyNNIHn9pVJ/a7o7B+x1e8N7/VZB1XgG7atRSPY5p2oRjEwlMwx3w2jJYzVVOdHMj9Zd7aCuuOJpXlRRXha1gOZ+Js/DXrYeiIa/mEih0xYjJVFSwgUJaQTMqRoe60ydJ7qKde1j3yr9hOa9ru6MLVZRNw+b3HoMdu3GU/4PdXwOBXMP16O6iB5H4SiEzXURLkU5GmP7yCrpAjNvvDoxtn3/U8nWYdddc1/F41f9pVYjBxdqek2VIwaUIVAS+6MRrMLgFpryoyZEGcMUrMgIcmGAdMovpKKyBuFjSQ8L2dbPFuOpWbGxViy4TVF2X34yXydxXaykKJSmCJUyPE73oJWcxCIjNXcc+3DkP8Bl06Khadby61OlCxyy/xZxRB1KWGZbzwPpeEAcu X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(366004)(396003)(376002)(346002)(136003)(451199021)(966005)(54906003)(6486002)(6666004)(478600001)(6506007)(316002)(26005)(6512007)(8936002)(66476007)(66556008)(6916009)(8676002)(4326008)(41300700001)(186003)(82960400001)(66946007)(2906002)(5660300002)(86362001)(44832011)(38100700002)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IkpxT3ug9lJXTZlcMb07GRz09BjJ5unRZuwoq2hdNH8SrsWUSBJ/A7b8YuQ7?= =?us-ascii?Q?oBJTEbaft+euJ7Y76cOfVsg4ZHeXPTzlTVvq2L6igVyscnIkGSHi06rBMbRE?= =?us-ascii?Q?fwnzqj4Y846JeZkTBoeCUty15TUTN42QMFgXIzJOQ+V8BdHesag8YcAIn4XN?= =?us-ascii?Q?FgSId7Bdg2qK//Aq7+W3EgiHiFYBRf0l/kJtW4LXehCqIAhQ98x9bxweDTKD?= =?us-ascii?Q?gNusPEdZuqlNCucWgO6ibLH4jjS2i577UrvffrRPRBqOjljKQBz/DmiEorsv?= =?us-ascii?Q?sUFnNccFJqtmfEqHSXT0zrr8T2GS6m6VTPlz3wXHllOBSdVOXqpJl5z3bMww?= =?us-ascii?Q?zZ6AfsxBnZiJZ8B+oDMWO+w712Uv6/JOnw345algCVts3lEkFv7WtuY3zFFr?= =?us-ascii?Q?2XmXrfm7XQGv1nTxIxIROruU95EmZhs7JKv+8x/IzXvLe7724fYJMf+NAdGl?= =?us-ascii?Q?S/xvtRhhPXC+PafP+jBybsgHy49I5nX2DGpBeKOhIa08JtprZz5AnVdL9tXA?= =?us-ascii?Q?6H1j7b20AofdDy7Icedn50WHmLkeVERkd8OpGy0TvYDwNH6EQDp3QYBCVLpd?= =?us-ascii?Q?R3EwPKBM08hhReIt/dgVm81XGa0uHieNL7k4wuMC2kWx78ROojE6HWl6Ac4f?= =?us-ascii?Q?5rTPbkUrGJdFD2GwXsqSgpk9MTAiNh19kiG5OQq/P7J5xzaRfcWSF0OaQEF3?= =?us-ascii?Q?n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iqSq+luG37Ujqe8nV+?= =?us-ascii?Q?1A=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: b41fa0a7-8611-4e71-cc48-08db31229827 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2023 13:28:05.6809 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f4iXLr305GHFpILgCIjLQmeReiPMTDkLG88oO4ErdXPRTn4unH3+2mcfceB14KeRRpP6sXjLkxF84OZMu4vNO0EzShYo/zYXinRV409VGgk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4967 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Mar 30, 2023 at 02:15:42PM +0100, Bruce Richardson wrote: > On Thu, Mar 30, 2023 at 02:53:41PM +0200, Christian Ehrhardt wrote: > > Hi, > > I've recently gotten a kind of bug I was waiting for many years. > > In fact I wondered if it would still come up as each year made it less likely. > > But it happened and I got a crash report of someone using dpdk a > > rather old pre sse4.2 hardware. > > => https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/2009635/comments/9 > > > > The reporter was nice and tried the newer 22.11, but that is just as affected. > > > > I understand that DPDK, as a project, has set this as the minimal > > accepted hardware capability. > > But due to some programs - in this case UHD - being able to do many > > other things it might happen that UHD or any else just links to DPDK > > (as it could be used with it) and due to that runs into a crash when > > loading. In theory other tools like collectd which has dpdk support > > would be affected by the same. > > > > Example: > > root@1bee22d20ca0:/# uhd_usrp_probe > > Illegal instruction (core dumped) > > > > (gdb) bt > > #0 0x00007f4b2d3a3374 in rte_srand () from > > /lib/x86_64-linux-gnu/librte_eal.so.23 > > #1 0x00007f4b2d3967ec in ?? () from /lib/x86_64-linux-gnu/librte_eal.so.23 > > #2 0x00007f4b2e5d1fbe in call_init (l=, > > argc=argc@entry=1, argv=argv@entry=0x7ffeabf5b488, > > env=env@entry=0x7ffeabf5b498) > > at ./elf/dl-init.c:70 > > #3 0x00007f4b2e5d20a8 in call_init (env=0x7ffeabf5b498, > > argv=0x7ffeabf5b488, argc=1, l=) at ./elf/dl-init.c:33 > > #4 _dl_init (main_map=0x7f4b2e6042e0, argc=1, argv=0x7ffeabf5b488, > > env=0x7ffeabf5b498) at ./elf/dl-init.c:117 > > #5 0x00007f4b2e5ea8b0 in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 > > #6 0x0000000000000001 in ?? () > > #7 0x00007ffeabf5c844 in ?? () > > #8 0x0000000000000000 in ?? () > > > > Right now all we could do is: > > a) say bad luck old hardware (not nice) > > b) make super complex alternative builds with and without dpdk support > > c) ask the DPDK project to work on non sse4.2 (unlikely and too late > > in 2023 I guess) > > d) Somehow make the initialization graceful (that is what I'm RFC here) > > > > If we could manage to get that DPDK to ensure the lib loading paths > > are SSE4.2 free. > > Then we could check the capabilities on the actual initialization and > > return a proper bad result instead of a crash. > > Due to that only real-users of DPDK would be required to have > > sufficiently new hardware. > > And OTOH users of software that links, but in the current config would > > not use DPDK would suffer less. > > > > WDYT? > > Maybe it has been already discussed and I did neither remember nor find it? > > > It certainly hasn't been discussed previously, but there is meant to be > support for this in EAL init itself. Almost the first function called > from eal_init() is "rte_cpu_is_supported()" [1] which checks the build-time > CPU flags against those of the current system. > Unfortunately, from the error message you are getting, that doesn't seem to > be working ok in the case of SSE4.2. It seems the compiler is inserting > SSE4 instructions before we even get to that point. :-( > > Perhaps we need to move eal init to a new file, and compile it (and the > cpuflag checks) with very minimal CPU flags. > Following up to my own mail... I believe we may be able to solve this easier by maybe using the "target" attribute for those functions. For x86 builds I don't see why eal init cannot be compiled for an earlier SSE version, (march=core2, perhaps). It's not a performance-sensitive function. Thoughts? /Bruce