From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9B61FA0350; Wed, 29 Apr 2020 20:03:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5CBB31DAF3; Wed, 29 Apr 2020 20:03:02 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id F365E1DAEC for ; Wed, 29 Apr 2020 20:02:59 +0200 (CEST) IronPort-SDR: sam9iwOP3PzOMd9+HKhPk0Pufcc8cwuqVnDYbwJfLP1JmcITYUK1E6bS9770ltzakfx6FWWRp9 kA9eB/XmFLxQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 11:02:25 -0700 IronPort-SDR: H+Jbn7ORp5QZsTkE4LxgXt4dCvDAxxCBsZwtnEZ4Dc6kVPBA/qRKYQfV6Sc39re2SYZJilGqr1 G0/DlAWETaCw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,332,1583222400"; d="scan'208";a="261507830" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga006.jf.intel.com with ESMTP; 29 Apr 2020 11:02:25 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Apr 2020 11:02:24 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Apr 2020 11:02:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZSoU7tmb5yUl3uurvp943IxZ8O60r12vsqdr0lBdzdjKmH1IbQ3TjoXn3rLpHxpIfelGSAaAh30y8YjCa8ewTL/Sq7UD8vjNcu+CismvUIbUjAcWlSC2PFEtUZT/0MKtPRWKey/P7JPzJzsajjyjPbxIWZ68vi0OYYltO8IYG/C/jG7+f3QW/bbBaKnsE/AA47CFWi5CBzNrKxYwrq08T+FR3WGNDUoKnWnmgXZFJLsG42aV+SqNtYea9U1vLg+sFDuxrCfL5EYckOhzYTq472eMVbDdqjz6ko7oSOVaViXxIS+f+1tGqgG3CTQskF0YtZTygZUkhhnNiB9aH3JGlg== 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-SenderADCheck; bh=fgfRT5L0v/qigsrgomSFOvMHOqQkNSDYdpjUyf7sXN8=; b=FMI7D00uafsmyRJ5wme8SJX+/oZCRByV1K0gbhc8DgchZe3/c9RDfhwSurP+b/9lcvf/2HkoqwTc81uLLd90EXV3MRrb9+orD+o3U21ecD00H7t/cXzUcR8qHqLPKvurcfc6D7bKva7iQWbSteDSgIAtxxTj13AHQ/9+ytIsPjPUd8LBhXJiWn5xtrMBsY5pAtOsDJd89KdoAHo0LP2AQOqzvuFw0jG93oXDE/vP/IDWfp4Oun5wq1pmwwLu3+c7G/FEX7x6YT5ED3bwbRZC5oabh7iO6nKHcfDR+Fc+cxizpBYc7DY4SboM0b9OdKUbnHe3zZxU/GyaHYfAZaz+ZA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fgfRT5L0v/qigsrgomSFOvMHOqQkNSDYdpjUyf7sXN8=; b=Qj9F4IXIYlBgtPynE4tjAOlvvppSa35i4uQNwBQIKt0G4lo66dbuzmFLb4lCuAz9oRuaCX/RUSULy2meslbgNHKx/4cr2dX+dc4D4oW+yv7Pm72oqiJwk6362aKp9fUYtuCNX46G+hu0xET5RfxAzXK3YQIaZVGGYCPX2wMHrgU= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB2533.namprd11.prod.outlook.com (2603:10b6:a02:c8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Wed, 29 Apr 2020 18:02:22 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4%6]) with mapi id 15.20.2937.023; Wed, 29 Apr 2020 18:02:22 +0000 From: "Ananyev, Konstantin" To: Aaron Conole , Honnappa Nagarahalli CC: "dev@dpdk.org" , Gavin Hu , Olivier Matz , nd Thread-Topic: [dpdk-dev] ISSUE: compiling with asan+ubsan Thread-Index: AQHWF/BvEZNhHl9JVkKn2j1egYOlWKiDueKQgAAQDFGAAD1qgIABE2u/gAtVRDA= Date: Wed, 29 Apr 2020 18:02:22 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.165] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a13381b0-5f3d-4e22-1f44-08d7ec6777af x-ms-traffictypediagnostic: BYAPR11MB2533: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 03883BD916 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(396003)(39860400002)(376002)(346002)(136003)(366004)(76116006)(66476007)(66556008)(66446008)(66946007)(52536014)(64756008)(966005)(478600001)(5660300002)(186003)(110136005)(9686003)(55016002)(26005)(4326008)(54906003)(2906002)(86362001)(7696005)(71200400001)(8936002)(316002)(6506007)(8676002)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IOp5EiDVUnFRElpegecXWhs3+kvv0rAUfR/StZKwa7BAFCp/xKPCioEI1LTjQnZ6cK+YSEmRTjRajpevfpzfAxO67v5cyGP69ymuza+QWuLy3Qq7H6wzU73gFYTYH5LoG7DU86pu8WmSN/szbz0jXlqr2GF0ik1SZY2T6fuufG7hLFIySBKTqrhsdTk5jFNU/adnhQydYlRnzMPEZVehPCE/o3RLq35IHmkoIALlF1CgNZtEhA5x0VquaP5B08t7ahytQkGsOf7oP97/4e1gX/5u3DyLHDsxP+JrG5OEao7GKfcKu4+UKwUjCB+XgRvlUvHmvO39lDid+l3ayt14lkq/hHUbMwDwutJ4cM7b7u6uV6uStOahRqm22/WhIIl18NRikh1GwutLMjgVuZFioMDU8MKtTtszLLOS3Du+U35UqvVcBxBGAsVYZfAQVILgETV4hY1/NPN6IFbMCnhjkrXu6k6J3t3UljmA0HPSPNT0m0/wXqHF2/0MQ0uNe3DLQ6cQURLq019RuqqQbcRSqg== x-ms-exchange-antispam-messagedata: holZDPh1ND4ObLhK1QR+eoyk0Ar9zmByy/YK4QRCtdDvrbHwHWn6gdT76Rl4p4kU7yBmAJvmS0Nd5A8MAheLYJUsUNWu93OssYLr925cNt5HvTWSccYvfKnnhkHfZqbIseOgP3t0UbHgR33h/7sYpSuZAHsLxFWGN8fnGrLHZQfwUgRDI3IuoWAFigYQGbVp1vmpFj8b7m7MFw+HEq1bG2DOVljoxrUR7N8WHAv+dQE599Ihz1FU9sXiR3LaYnn2k6aATtWk708L4tfASWWdWGbtDBtA3ydwyoDfsJL3i3V7nkv8gq9ZyD6Xq4MIQwZ1JQEwYvJA7HFUQZL/Hzid1P+yEVPm3Uc4PQwIgRp1z/RjSynmMDo4i0rXw2IExnXv8MopnTDnJBejSPPPsSNQBKPXPYbanelQLn2Rm2HdmMM43bWKG2q3ev3k5v5yA/Q1dQFREOrcoU1vRK/wl43exoT+2VpLtFrnkq696K0xw6uUCK/XaHAoSl6y7Q/Z+o/WWdHr4LBVAmcDo7ZtrTppansHyaxWgxhqwYjebY+Sv3HX/MLQG6Fb2QNcCDv2SyAewxodkfioAU2yjtPLBpDRkK8zw9Yj20a3tk7Mgb/YeELQZf5YLkT9B2dg0MM9EyM+HLWahiI76R0CHc7ZSCb8W6tk5Sx23RlQ9DjjGMHoVFjy7BcbDG4y3zB5VZsO62glDuqix1rkpcFyvSTbdddbnBPMHdAw8sSrP95JfDK9zdP7USIn/Kdz7LviEsbZrsoVailh2MliqTxLpBAfFEsokFYbA0djut5BsOkof0R57TsYu7dtZ8BWXrX3YbBvvILb x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: a13381b0-5f3d-4e22-1f44-08d7ec6777af X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Apr 2020 18:02:22.8827 (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: Y2Gm9LzPfIGMo3EyOztD580fQJCvgnIpSubFIJaj65azxUG5X+gcIzquQNImjzjb3Jv/KEmKA0zzmZZ638vEtmoW0PP10lbHxMuTjAIqaa4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2533 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] ISSUE: compiling with asan+ubsan X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > >> >> While compiling with asan and ubsan I run into the following error: > >> >> > >> >> FAILED: app/test/app@test@@dpdk-test@exe/test_ring.c.o > >> >> > >> >> gcc -Iapp/test/app@test@@dpdk-test@exe -Iapp/test -I../app/test > >> >> -Ilib/librte_acl -I../lib/librte_acl -I. -I../ -Iconfig -I../config > >> >> - > >> >> Ilib/librte_eal/include -I../lib/librte_eal/include > >> >> -Ilib/librte_eal/linux/include -I../lib/librte_eal/linux/include > >> >> -Ilib/librte_eal/common - I../lib/librte_eal/common > >> >> -Ilib/librte_eal/x86/include -I../lib/librte_eal/x86/include > >> >> -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs - > >> >> I../lib/librte_kvargs -Ilib/librte_bitratestats > >> >> -I../lib/librte_bitratestats -Ilib/librte_ethdev > >> >> -I../lib/librte_ethdev -Ilib/librte_net - I../lib/librte_net > >> >> -Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool > >> >> -I../lib/librte_mempool -Ilib/librte_ring -I../lib/librte_ring - > >> >> Ilib/librte_meter -I../lib/librte_meter -Ilib/librte_metrics > >> >> -I../lib/librte_metrics -Ilib/librte_bpf -I../lib/librte_bpf > >> >> -Ilib/librte_cfgfile - I../lib/librte_cfgfile -Ilib/librte_cmdline > >> >> -I../lib/librte_cmdline -Ilib/librte_cryptodev > >> >> -I../lib/librte_cryptodev -Ilib/librte_distributor - > >> >> I../lib/librte_distributor -Ilib/librte_efd -I../lib/librte_efd > >> >> -Ilib/librte_hash -I../lib/librte_hash -Ilib/librte_eventdev > >> >> -I../lib/librte_eventdev - Ilib/librte_timer -I../lib/librte_timer > >> >> -Ilib/librte_fib -I../lib/librte_fib -Ilib/librte_rib > >> >> -I../lib/librte_rib -Ilib/librte_flow_classify - > >> >> I../lib/librte_flow_classify -Ilib/librte_table -I../lib/librte_tab= le > >> >> -Ilib/librte_port -I../lib/librte_port -Ilib/librte_sched > >> >> -I../lib/librte_sched - Ilib/librte_ip_frag -I../lib/librte_ip_frag > >> >> -Ilib/librte_kni -I../lib/librte_kni -Ilib/librte_pci > >> >> -I../lib/librte_pci -Ilib/librte_lpm -I../lib/librte_lpm - > >> >> Ilib/librte_ipsec -I../lib/librte_ipsec -Ilib/librte_security > >> >> -I../lib/librte_security -Ilib/librte_latencystats > >> >> -I../lib/librte_latencystats - Ilib/librte_member > >> >> -I../lib/librte_member -Ilib/librte_pipeline -I../lib/librte_pipeli= ne > >> >> -Ilib/librte_rawdev -I../lib/librte_rawdev -Ilib/librte_rcu - > >> >> I../lib/librte_rcu -Ilib/librte_reorder -I../lib/librte_reorder > >> >> -Ilib/librte_stack -I../lib/librte_stack -Idrivers/mempool/ring - > >> >> I../drivers/mempool/ring -Idrivers/mempool/stack > >> >> -I../drivers/mempool/stack -Idrivers/event/skeleton > >> >> -I../drivers/event/skeleton - Idrivers/bus/pci -I../drivers/bus/pci > >> >> -I../drivers/bus/pci/linux -Idrivers/bus/vdev -I../drivers/bus/vdev > >> >> -Idrivers/net/bonding - I../drivers/net/bonding -Idrivers/net/ring > >> >> -I../drivers/net/ring -Ilib/librte_power -I../lib/librte_power > >> >> -Ilib/librte_pdump -I../lib/librte_pdump -Ilib/librte_compressdev > >> >> -I../lib/librte_compressdev -fdiagnostics-color=3Dalways > >> >> -fsanitize=3Daddress,undefined -fno-omit-frame-pointer -pipe > >> >> -D_FILE_OFFSET_BITS=3D64 -Wall -Winvalid-pch -Werror -O2 -g -includ= e > >> >> rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat- nonliteral > >> >> -Wformat-security -Wmissing-declarations -Wmissing-prototypes > >> >> -Wnested-externs -Wold-style-definition -Wpointer-arith - > >> >> Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings > >> >> -Wno-missing-field-initializers -march=3Dnative -mno-avx512f - > >> >> DALLOW_EXPERIMENTAL_API -Wno-format-truncation -D_GNU_SOURCE - > >> MD -MQ > >> >> 'app/test/app@test@@dpdk-test@exe/test_ring.c.o' > >> >> -MF 'app/test/app@test@@dpdk-test@exe/test_ring.c.o.d' -o > >> >> 'app/test/app@test@@dpdk-test@exe/test_ring.c.o' -c > >> >> ../app/test/test_ring.c > >> >> > >> >> cc1: out of memory allocating 65536 bytes after a total of 46096261= 12 > >> >> bytes > > I have a machine where I hit this error for a lot of other files every > > time I do a fresh compile. I attribute that to low swap space. >=20 > I am shocked that a translation unit should be 4.6G? That's > unbelievably HUGE - there's no way that's correct. There must be > something going on with your machine - I've only ever seen it with > test_ring.c and it's very consistent. >=20 > >> > > >> > I also noticed that test_ring.c compilation takes a huge amount of t= ime and > >> memory. > >> > On my box it not as bad as yours (up to ~100 sec and ~1 GB) , but s= till > > The compilation time issue was attributed to compiler version. We saw > > the issues only on clang. GCC did not show any problems. > > Is this problem something new? >=20 > This is happening on GCC. Actually, the meson build with clang + > asan&ubsan doesn't even work right. >=20 > >> seems too much. > >> > Will try to have a look later this week. > >> > >> Okay - glad I'm not the only one. My only theory is that all the inli= ning is > >> exploding the size of the file during the translation unit processing. > >> > >> I ran it through the preprocessor and didn't see any large arrays crea= ted > >> anywhere. But there are loads of calls to the rte_ring that are tagge= d as > >> "always inline" - even the test_enqueue and test_dequeue functions are > >> "always inline" and they are quite large. Just a completely unfounded= guess. >=20 > As a test, I changed the attributes in test_ring.h to remove the > always_inline - and I was finally able to complete a build with > asan&ubsan using GCC. This is on x86_64 platform. Just running the > fast tests. >=20 > Look at test_ring_enqueue/test_ring_dequeue - those functions are large > and branchy. The compiler is being forced to inline them. I'm not sure > how many other places that's happening, but it simply cannot be > correct. They're used all over that test_ring.c translation unit. > That's a huge amount of expansion required by the compiler and a bunch > of flow analysis being thrown away. You've pessimized for compilation > memory. >=20 > Can you please take a closer look? Can you try: http://patches.dpdk.org/patch/69559/ On my machine it takes less then 10s and 300MB after the patch. >=20 > >> CC'd Honnappa (and others) to take a look. > >> > >> >> > >> >> This is in a constrained (read: container) environment. I guess on= e > >> >> way of resolving would be to allocate more memory to the container, > >> >> but I'm also curious why the object files are getting so large? > >> >> Should I consider this a bug or "working as intended"? This will > >> >> have implications if we want asan/ubsan under the travis build also= . > >> >> > >> >> -Aaron