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 5D43742870; Thu, 30 Mar 2023 15:15:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4DD97410D3; Thu, 30 Mar 2023 15:15:54 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 4B66A40E25 for ; Thu, 30 Mar 2023 15:15:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680182152; x=1711718152; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=R700gXg+tZRMVEC1hzY9WGhkhh8jTQkOO40rNl9GeKQ=; b=jTNsVLtwiW30jH4PU29j3XGTVPIu5nQPiWQT1o0QjJ8Ia1vg8c2HCc/+ uEK56tqKQ/GNvNzVHI4XTfVyGfBZijCZq8IH1W4W7JgkJ55ZvJBO0oZKi meRWtRd3ZUmxjm6V6E+6vmnObZt2Ky729+HxNEbjlE5RF7s1W88Vgi+Eg 432NPXgXrw9M/nOxjQBXceqV4nvEeQIZ6EPr4ZkUrjMdOxsUbJB4LeaU8 8cI6jogik2y7vz60cmALnjfTrvIvjf4mcxi04r5U14vtKv3eHemRFQxoB TMUK8wWYb65EnT1emApPfGC539uLa8QWn438TszvN+hY4PPF0P/8CHnh+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="427440178" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="427440178" 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:15:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="773979029" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="773979029" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 30 Mar 2023 06:15:51 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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:15:50 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) 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:15:50 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (134.134.137.100) 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:15:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kJ2qR+jDW0VCrbBZlmqwox1EC0xo9UChyP8Z6qCUWkEyDt1gRnacBlQyPz6wT8vk60jl/4jm6lscOgn0ivrqvF/lPZQTPCUg2Jn77+LlJIzG9TaF04/J89siN8F3VjAmcKjIcyYQSqCaMe1vltUnhKLvvXc0oJTOr+vpXtpLyeOM14XqzQqTfyr/Suc8dE8oH1ntWgYVD0TogrXl/lyr0wUtZO/RQLI0FGSGavltKAvzhGNBviAMyzfYjVQ3V5RI3OjZlby1F6HX2a/GD6jVp0YLxl24E8Pw0Nymzt4k71ezQEImFxgAacuCXVtVvcsLGiCyLD5FGHZzqpCBUZ6OJA== 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=/nNLrWiKU9rcKTbhpVTemCYgEJZBZ9GhzMelAer44W8=; b=jdNnQ7kb7X94rKf/tBK/3ySPJSaRsQ8fBT/ATP6zjdyfTXg5nWKp50icdnViXeRfhxszvdKjWmTWeCi2s5H1bojLLmw4/RC89PR84h349Rwj5feOEN9qE5zle8Ask/iPn2eI6yPpapvK0oh1XjrLhvfaSA0MeQZJnAknGn3GF9pbdephugq1jIxBEPD4oc8l97ijBq+LWNFBvlKRslBSdLYCRsnKfBqqc+ddfKeL0yRCjlQ6dcixuin7z/ZK7hJ+z5QpJJk6Aj4ZJvox9uh+spuIUeATAlfCureKiQ/jqCZwyXabe3/djarXvRmHCsD7LceSJ60FuCk3Tq07fuf4dA== 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 CO1PR11MB5076.namprd11.prod.outlook.com (2603:10b6:303:90::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.21; Thu, 30 Mar 2023 13:15:47 +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:15:47 +0000 Date: Thu, 30 Mar 2023 14:15:42 +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: LO4P123CA0007.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:150::12) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CO1PR11MB5076:EE_ X-MS-Office365-Filtering-Correlation-Id: 63c88978-869d-4f0d-3319-08db3120e030 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G9WqLKkaC5ReyaObNHOwzzdwj0I16R4jS9xI3zWNOFL0eRXHsPrPcuOF3rNKBLkSByk/ErRhugwBbOYT4zfoluMfNZn5+PEkSVlXajAy1GBhnHhy6fL+mKXBdqQlIljgkVY6FkiGndc07dXD3j2PDcyNhvkhOhkp4U143Yo9eTJlzq28hEWzaKOBwYx992e2R3PXYefju38n12qRmhpaBSg5dfZ1npJpxHSlkIvEGvCDauBOBd/BdhlVdjSEndkILjc+4eaRBCoZutVBEjwDa45i/gnvwpTVE948DUsM+MNXML5AoaEjPItZ/c8jwBV5NP+rvVBszxMO58HLcHDil/ZfbZfhzPG0GW/SPYaGjH2ziBWV0MkhkQpL8ZLSueKnRqEJlIzYimIGdVCg4C8KWR+Q5jph6dh/7HUKKJqzHOw/sosYnkRMYj73qtY5LA6GXjeiA2eEv04eiKLhEoZKQDSww/QC7+PmCvkog1yc3j7hCn13kXyGf4tGg67X5jxILC5UxnI0EdPQ+V1H1muzMOvUHDCVRIB9resxRBuTSKOIBRsQb4Vq/qK+qTGcqr2n6c6t5VY+m0nXggzozrXt8Q== 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)(396003)(366004)(376002)(136003)(346002)(451199021)(6916009)(8936002)(38100700002)(44832011)(86362001)(4326008)(82960400001)(66556008)(66476007)(66946007)(5660300002)(8676002)(41300700001)(83380400001)(6486002)(966005)(54906003)(6666004)(2906002)(478600001)(6512007)(26005)(6506007)(186003)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AeoX9erEkAg4zQxMqLEvreNuKAU0RBW/uA0iRgYJHCXWP6MKF8NelHjOxrZ/?= =?us-ascii?Q?JoY1iLzUy9SbXyjImcbErO+eRqJBIwcoZZGX0bzjC+/ZYt5WBPUZ60BvgBFM?= =?us-ascii?Q?QTHouBTVH9qbXqUE20Sre3r1QTQpsww09nvsz/X9D2TGlcUKMX3jQzFYr0RA?= =?us-ascii?Q?SrleKCwSJGPxTWPxSAnE/nA5lrxckK7Kbl8XVr3yj5AuYItGxr8bDicqN9nk?= =?us-ascii?Q?HDyO2ZlDDwwULMZ/e3ChhVLPFtC9d7TsyshNta49e+PiRFP7xXwysptH6LgI?= =?us-ascii?Q?meM+rRn7ydcrRKza8rA5ZO9eT/x6jiVS/p/Ltnt0GHQOl3ibja55XfcF6p7p?= =?us-ascii?Q?SjUGFUM6q0M856zHXDkIY5fPL7VKaJkfh+sjnGwrHTGL0iCNDoJcsXgd0JgC?= =?us-ascii?Q?WIC1CqY02M3buQrRxgg3mNs/s0Cw0e0yEy3dUCB0se2kTr8Niys9gcjZEDdM?= =?us-ascii?Q?Lx0X75FlmTh4cCBCRJTN6QGbxHFxRX3FAS6IgN+JpOb07jjiw6gh97HX1g1A?= =?us-ascii?Q?ls1tYkfEfRR++NpPwsq6vkqvdHKGLlnmi4+2Hy4998dy2W7VhXfvPrui7m0E?= =?us-ascii?Q?rC5lMEIB3VMIxZHBWXH9O0JxmkYJif/IFi2mgce2vXVOWmpc4GcBpddsK6Sz?= =?us-ascii?Q?n9VAQ3rZYisPePrHHJskDfLGeGxYCpfTW9d0dT7gDt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is6xMn/+1W7czCk1WhCL3f9SM9u9E09U+62bwQF3yjgmQOQY2SN0IiHg?= =?us-ascii?Q?Fg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 63c88978-869d-4f0d-3319-08db3120e030 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:15:47.5734 (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: yK4SKDM7MUKbbpI3v8msRGNrSzt0/pOqE8EIuVMUDGduWViXxV+UjWNJjxcuZ0v4azxrMzpfLR2RV92Kuc7Nu4hpxd3XRF6mV+TVDAynARI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5076 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: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. /Bruce [1] http://git.dpdk.org/dpdk/tree/lib/eal/common/eal_common_cpuflags.c