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 138B7A00BE; Mon, 23 May 2022 14:10:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC1104014F; Mon, 23 May 2022 14:10:54 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 8587540141 for ; Mon, 23 May 2022 14:10:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653307853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2wvmZGSTkRiAlFPPQGuUedHE5Yao0zD1wRidCtax53w=; b=MpO9O2LQE5W4lpbQtAitbqxm1XyfOrTkFviPMVxFlNoRcyDrGvw8dIwdSdbJVtnjirlKjX lzHo1IYQz+us9XLfIfcRHuhZuYunutzjCugALiY1bZd5W0gZM+7/p9L7J0yChQoXQkjiPJ Y7ktB0VF1u7mlELmiCyZPQzIjW5t8+U= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-588-QnMvKpsYOomz-KPeV0ElaQ-1; Mon, 23 May 2022 08:10:51 -0400 X-MC-Unique: QnMvKpsYOomz-KPeV0ElaQ-1 Received: by mail-lj1-f200.google.com with SMTP id a8-20020a2e7f08000000b00253c7e7f572so2808971ljd.1 for ; Mon, 23 May 2022 05:10:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2wvmZGSTkRiAlFPPQGuUedHE5Yao0zD1wRidCtax53w=; b=Pm7XRC4hLpfwscEZvGyGrunWtyCsqt9bmo45iOqNE0yEDD6v8jORjJr2vuAqncIZJf zwb7HjeiE+0AkK50Zz5x7TZbT6YONmOLPXlEB+40O7VZQN7avf7s19w9O95W/IPk3MkS irsiIQIpi3zfHtP56NrRvPaWf2jHNz7pDglJWNXKhUmHgpD+LmdUZDuqW0Wy+s7ZJUF2 xrzGdQjcjzwHKnryuICCsB0JSAfQP9+sw8sVFJADgcdBJyBefD8xFeypNy6DHPTmpGj2 oUHoKb1Hf0Woad+DbFdXF35B6EoJylYJAHCtcT7T1i1xL3QUBgMt0b2asCSQv1k/WYFI rFlw== X-Gm-Message-State: AOAM530SiJ14rCoK3cKXiGqrYiHW5jtjRciHOBtBLoMxzP/O0r+P0Ucr X+J8Fm5+341hBZJ4dGVfiFYk+YED1TtgMqMCQnEx0Vf0JGi2PDvwMdjnFvFuD2bLTbl6Mk6KLH0 ywNd6aeU1I0HbZ/RNfjM= X-Received: by 2002:a05:6512:2a9a:b0:477:caea:4ba with SMTP id dt26-20020a0565122a9a00b00477caea04bamr14519359lfb.575.1653307850482; Mon, 23 May 2022 05:10:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqg85uaK1PQ491OnSTHihfZ9OcEtPfLmKfnGExEmltehKStJZLyI3MKss1gl2RxBEauG/W6B3wUo9a5jjQRHE= X-Received: by 2002:a05:6512:2a9a:b0:477:caea:4ba with SMTP id dt26-20020a0565122a9a00b00477caea04bamr14519349lfb.575.1653307850277; Mon, 23 May 2022 05:10:50 -0700 (PDT) MIME-Version: 1.0 References: <20220517160444.413819-1-zhichaox.zeng@intel.com> <20220523111642.10406-1-zhichaox.zeng@intel.com> In-Reply-To: <20220523111642.10406-1-zhichaox.zeng@intel.com> From: David Marchand Date: Mon, 23 May 2022 14:10:39 +0200 Message-ID: Subject: Re: [PATCH v2] lib/eal: fix segfaults due to thread exit order To: "Zeng, ZhichaoX" Cc: dev , Qiming Yang , Bruce Richardson , Harman Kalra Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Mon, May 23, 2022 at 5:17 AM wrote: > > From: Zhichao Zeng > > The eal-intr-thread is not closed before memory cleanup in the > process of exiting. There is a small probability that when the > eal-intr-thread is about to use some pointers, the memory were > just cleaned, which cause the segment fault error caught by ASan. > > This patch close the eal-intr-thread before memory cleanup when > exiting to avoid segment fault. This breaks the debug_autotest unit test. It results in a segfault in a forked process executing rte_exit()/rte_eal_cleanup(). That's probably because intr_thread thread does not exist in the forked process. -- David Marchand