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 42D16A04FA; Thu, 6 Feb 2020 07:41:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74CDE1BFAC; Thu, 6 Feb 2020 07:41:41 +0100 (CET) Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by dpdk.org (Postfix) with ESMTP id 179D91BFAA for ; Thu, 6 Feb 2020 07:41:40 +0100 (CET) Received: by mail-lf1-f68.google.com with SMTP id l18so3283301lfc.1 for ; Wed, 05 Feb 2020 22:41:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=qpQURwW3h5hHbNSlOPNJPxoY+OyFxoXZBE9iZJhOrAE=; b=I8BCihkcYj9XexL/C/TaGSX4g2fPf3Dz6lToEIBlphIBddyhNNRqa3ArM0M3/MpMwv QcLgdGHf+ovfoAq9Fti8oxIH83HUCM1luX2Awu9oHdF9K5cVBRWSb12dZcDq61AF2K5Q qcY6HZjUdqZ+ZizUhQFUIiqyg+cp6X2SaIcNFA8c0Pzvp3TqZ+KXa6mMQLNkrpm6DtCQ GSeZ84N0zulgMc5e0LugqAgnaXBCfyQrmX4Lg1PxfD2nXMyQwCl8qzC+z2R8Gfqy1vp4 3+YPRf6OUDoabT737mihuJ6IVmZpuUOjemaYAt1nCsMFkkRXQEDXUWZ7BC/nqILqhSdx gDaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version; bh=qpQURwW3h5hHbNSlOPNJPxoY+OyFxoXZBE9iZJhOrAE=; b=H/u2PH336oNQe6mwNviGAAqkcq7vAGW9Xl/hbLN0xM/mCbdAx+rnUqamx2C6y6sksX Zm773ZEuc294cvJ0wZihy8Y5L1eKyCadNMSKZwvMgjJSNhUL7ENfaHLhGJ0m0dcib+0p B9xgn37DiIniWeTZvpRR25/GbmIN1PO2BIsl05DH8hGHT7X67zqK/qwY0RGlNIdUxrQH b8Tn0t8rFctGth4FeFz7IE0upUP1pxg9VovWDAsN4kgQblXoqon8O+SDMx4UVqb67fuP +XNRiHllEAt116E8/5ApX1VCRGu8F+nWhcJZe0wFsf3TPuEXHlBpA6pgieqOsIYlMalH HkQA== X-Gm-Message-State: APjAAAUuhEeRbHXnpIJRuYEiqsMS2TU+6BCNwz8lUfKGQd/KiqTzMbK3 6pWfrOxCCLs7zVAlfS+b1n0= X-Google-Smtp-Source: APXvYqxH/E5jRiwHTRv0NfJHVaQ6mZEeigqdjknBLZw+YxGNbZB5AXs5wB84c2sZBjrFnTlKdlRUkg== X-Received: by 2002:ac2:5dc7:: with SMTP id x7mr928446lfq.24.1580971299463; Wed, 05 Feb 2020 22:41:39 -0800 (PST) Received: from Sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id 11sm758374lju.103.2020.02.05.22.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 22:41:38 -0800 (PST) Date: Thu, 6 Feb 2020 09:41:37 +0300 From: Dmitry Kozlyuk To: Pallavi Kadam Cc: dev@dpdk.org, thomas@monjalon.net, Harini.Ramakrishnan@microsoft.com, keith.wiles@intel.com, bruce.richardson@intel.com, david.marchand@redhat.com, jerinjacobk@gmail.com, ranjit.menon@intel.com, antara.ganesh.kolar@intel.com Message-ID: <20200206094137.66a3bc7e@Sovereign> In-Reply-To: <50a4ad5d-d1f2-52a7-5265-e3f0c88114c5@intel.com> References: <20200131000307.10608-1-pallavi.kadam@intel.com> <20200201000406.11060-1-pallavi.kadam@intel.com> <20200201000406.11060-10-pallavi.kadam@intel.com> <20200205225441.3d833bae@Sovereign> <63c486b2-b53a-ffe8-fcdf-4fd207132df2@intel.com> <50a4ad5d-d1f2-52a7-5265-e3f0c88114c5@intel.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/R3D_+K9NbG+UAqjwwOX5sV0" Subject: Re: [dpdk-dev] [PATCH v7 9/9] eal: add minimum viable code to support parsing 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" --MP_/R3D_+K9NbG+UAqjwwOX5sV0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline > On 2/5/2020 4:39 PM, Pallavi Kadam wrote: > > > > > > On 2/5/2020 11:54 AM, Dmitry Kozlyuk wrote: > >> Crashes at argument parsing, WinDbg log attached. > > This patch works fine with meson=0.49. > > I was able to execute the 'helloworld' app. > > > > When I tried to build with meson=0.52 it failed with the error: > > [9/25] Linking target lib/librte_kvargs-20.0.dll. > > FAILED: lib/librte_kvargs-20.0.dll > > clang @lib/librte_kvargs-20.0.dll.rsp > > clang: error: no such file or directory: '/OPT:REF' > > Fixed this error with the patch you sent before. > were able to execute parsing: > > $ ./build/examples/dpdk-helloworld.exe -l 4-8 > EAL: Detected 20 lcore(s) > EAL: Detected 2 NUMA nodes > hello from core 5 > hello from core 6 > hello from core 7 > hello from core 8 > hello from core 4 > > > > > Not completely sure, if this could be the reason for the crash. The crash does not happen with any arguments, "-l 4-8" works fine as do "-cf" and "-v", but "--log-level=eal:8" crashes reproducibly. I assume application should not crash on invalid options, but report an error and exit. For the reference, I applied your patchset to the latest dpdk:master. Z:\>build\native\clang\examples\dpdk-helloworld.exe EAL: Detected 4 lcore(s) EAL: Detected 1 NUMA nodes OK, no lcores specified. Z:\>build\native\clang\examples\dpdk-helloworld.exe -cf EAL: Detected 4 lcore(s) EAL: Detected 1 NUMA nodes hello from core 1 hello from core 2 hello from core 3 hello from core 0 OK, 4 lcores enabled. Z:\>build\native\clang\examples\dpdk-helloworld.exe -cf --log-level=eal:8 Crash, WinDbg log attached to bug report. Z:\>echo %errorlevel% -1073741819 Z:\> Attaching the build log, but I don't think it matters, it's something with getopt implementation or it's use, judging by stack trace. P.S. I can also see "--syslog" option in the help message, you should probably hide it via #ifndef, as you did with said option handling. -- Dmitry Kozlyuk --MP_/R3D_+K9NbG+UAqjwwOX5sV0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=clang.txt Z:\>ninja -C build\native\clang ninja: Entering directory `build\native\clang' [0/1] Regenerating build files. The Meson build system Version: 0.53.999 Source dir: \\10.0.2.4\qemu Build dir: \\10.0.2.4\qemu\build\native\clang Build type: native build Program cat found: NO Program more found: YES (C:\Windows\system32\more.COM) Project name: DPDK Project version: 20.02.0-rc1 C compiler for the host machine: clang (clang 9.0.1 "clang version 9.0.1 ") C linker for the host machine: clang link 14.24.28316.0 Host machine cpu family: x86_64 Host machine cpu: x86_64 Program cat found: NO Program more found: YES (C:\Windows\system32\more.COM) Program ../buildtools/symlink-drivers-solibs.sh found: YES (sh \\10.0.2.4\qemu\config\../buildtools/symlink-drivers-solibs.sh) Checking for size of "void *" : 8 Library m found: NO Library numa found: NO Did not find pkg-config by name 'pkg-config' Found Pkg-config: NO Did not find CMake 'cmake' Found CMake: NO Run-time dependency libbsd found: NO (tried pkgconfig and cmake) pcap-config found: NO Run-time dependency pcap found: NO (tried pkgconfig and config-tool) Compiler for C supports arguments -Wextra: YES (cached) config\meson.build:202: WARNING: Consider using the built-in warning_level option instead of using "-Wextra". Compiler for C supports arguments -Wcast-qual: YES (cached) Compiler for C supports arguments -Wdeprecated: YES (cached) Compiler for C supports arguments -Wformat-nonliteral: YES (cached) Compiler for C supports arguments -Wformat-security: YES (cached) Compiler for C supports arguments -Wmissing-declarations: YES (cached) Compiler for C supports arguments -Wmissing-prototypes: YES (cached) Compiler for C supports arguments -Wnested-externs: YES (cached) Compiler for C supports arguments -Wold-style-definition: YES (cached) Compiler for C supports arguments -Wpointer-arith: YES (cached) Compiler for C supports arguments -Wsign-compare: YES (cached) Compiler for C supports arguments -Wstrict-prototypes: YES (cached) Compiler for C supports arguments -Wundef: YES (cached) Compiler for C supports arguments -Wwrite-strings: YES (cached) Compiler for C supports arguments -Wno-address-of-packed-member: YES (cached) Compiler for C supports arguments -Wno-packed-not-aligned: NO (cached) Compiler for C supports arguments -Wno-missing-field-initializers: YES (cached) Fetching value of define "__SSE4_2__" : 1 (cached) Fetching value of define "__AES__" : 1 (cached) Fetching value of define "__PCLMUL__" : 1 (cached) Fetching value of define "__AVX__" : 1 (cached) Fetching value of define "__AVX2__" : 1 (cached) Fetching value of define "__AVX512F__" : (cached) Fetching value of define "__RDRND__" : 1 (cached) Fetching value of define "__RDSEED__" : 1 (cached) Program gen-pmdinfo-cfile.sh found: YES (sh \\10.0.2.4\qemu\buildtools\gen-pmdinfo-cfile.sh) Program check-experimental-syms.sh found: YES (sh \\10.0.2.4\qemu\buildtools\check-experimental-syms.sh) Program python3 found: YES (C:\Python\python.exe) Program grep found: NO Program findstr found: YES (C:\Windows\system32\findstr.EXE) Compiler for C supports arguments -Wno-format-truncation: NO (cached) Message: lib/librte_kvargs: Defining dependency "kvargs" Checking for function "getentropy" : NO (cached) Message: lib/librte_eal: Defining dependency "eal" Program doxygen found: NO Program sphinx-build found: NO Library execinfo found: NO Compiler for C supports arguments -Wno-format-truncation: NO (cached) Configuring rte_build_config.h using configuration Message: ================= Libraries Enabled ================= libs: kvargs, eal, Message: =============== Drivers Enabled =============== Message: ================= Content Skipped ================= libs: drivers: Build targets in project: 8 Found ninja.EXE-1.9.0 at "C:\Program Files\Meson\ninja.EXE" [8/25] Compiling C object lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_option.c.obj. In file included from ../../../lib/librte_eal/common/rte_option.c:5: ..\..\..\lib/librte_eal/windows/eal/include\getopt.h:117:1: warning: unused function 'warnx' [-Wunused-function] warnx(const char *fmt, ...) ^ 1 warning generated. [9/25] Linking target lib/librte_kvargs-0.200.dll. clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored Creating library lib\librte_kvargs.dll.a and object lib\librte_kvargs.dll.exp [15/25] Compiling C object lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal.c.obj. In file included from ../../../lib/librte_eal/windows/eal/eal.c:16: In file included from ..\..\..\lib\librte_eal\common\eal_options.h:8: ..\..\..\lib/librte_eal/windows/eal/include\getopt.h:117:1: warning: unused function 'warnx' [-Wunused-function] warnx(const char *fmt, ...) ^ 1 warning generated. [16/25] Compiling C object lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_thread.c.obj. ../../../lib/librte_eal/common/eal_common_thread.c:170:25: warning: unused parameter 'attr' [-Wunused-parameter] const pthread_attr_t *attr, ^ 1 warning generated. [17/25] Compiling C object lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_options.c.obj. ../../../lib/librte_eal/common/eal_common_options.c:263:10: warning: 'strerror' is deprecated: This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] path, strerror(errno)); ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h:181:16: note: 'strerror' has been explicitly marked deprecated here _Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s) ^ C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:311:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE' #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \ ^ C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:301:47: note: expanded from macro '_CRT_DEPRECATE_TEXT' #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text)) ^ ../../../lib/librte_eal/common/eal_common_options.c:317:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ In file included from ../../../lib/librte_eal/common/eal_common_options.c:15: ..\..\..\lib/librte_eal/windows/eal/include\getopt.h:117:1: warning: unused function 'warnx' [-Wunused-function] warnx(const char *fmt, ...) ^ ../../../lib/librte_eal/common/eal_common_options.c:107:20: warning: unused variable 'default_solib_dir' [-Wunused-variable] static const char *default_solib_dir = RTE_EAL_PMD_PATH; ^ ../../../lib/librte_eal/common/eal_common_options.c:251:1: warning: unused function 'eal_plugindir_init' [-Wunused-function] eal_plugindir_init(const char *path) ^ 5 warnings generated. [24/25] Linking target examples/dpdk-helloworld.exe. clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored [25/25] Linking target lib/librte_eal-0.200.dll. clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored Creating library lib\librte_eal.dll.a and object lib\librte_eal.dll.exp --MP_/R3D_+K9NbG+UAqjwwOX5sV0--