From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lina.andersenit.dk (lina2.andersenit.dk [87.238.248.235]) by dpdk.org (Postfix) with ESMTP id F406AB38C for ; Tue, 16 Sep 2014 13:37:08 +0200 (CEST) Received: from mjctp ([176.21.17.234]) by lina.andersenit.dk (Postfix) with ASMTP id CUG65444 for ; Tue, 16 Sep 2014 13:42:44 +0200 From: "Morten Jagd Christensen" To: Date: Tue, 16 Sep 2014 13:42:47 +0200 Message-ID: <007501cfd1a3$573fff00$05bffd00$@xenanetworks.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: Ac/RoiVFDJfjHl/zQwegzMOBkgypJg== Content-Language: da Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Valgrind and DPDK - does it work ? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2014 11:37:09 -0000 Hi all, =20 I am interested to hear if anyone here have had any luck running = Valgrind on DPDK applications? =20 I tried to use this some time ago, but Valgrind does not seem to work together with hugepages =96 or=20 I am doing something wrong ;-) =20 I would like to hear form anyone having success or failure with Valgrind = and DPDK. =20 Best regards =20 /Morten =20 This is an extract of a printout from running my application normally >sudo ./build/l47app =96c 0xffffffff =96n 4 EAL: Detected a total of 32 lcores EAL: Setting up memory... EAL: Ask a virtual area of 0x280000000 bytes EAL: Virtual area found at 0x7f7b80000000 (size =3D 0x280000000) EAL: Ask a virtual area of 0x280000000 bytes EAL: Virtual area found at 0x7f78c0000000 (size =3D 0x280000000) EAL: Requesting 10 pages of size 1024MB from socket 0 EAL: Requesting 10 pages of size 1024MB from socket 1 =20 This is what I get when running Valgrind >sudo valgrind --leak-check=3Dfull ./build/l47server EAL: Detected a total of 32 lcores EAL: Setting up memory... EAL: map_all_hugepages(): mmap failed: Invalid argument EAL: Failed to mmap 1024 MB hugepages =20 And here is an strace of the above command=20 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = =3D 0 gettid() =3D 29696 read(1028, "C", 1) =3D 1 close(6) =3D 0 gettid() =3D 29696 write(1029, "D", 1) =3D 1 rt_sigprocmask(SIG_SETMASK, [], ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = =3D 0 write(1, "EAL: Setting up memory...\n", 26EAL: Setting up memory... ) =3D 26 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = =3D 0 gettid() =3D 29696 read(1028, "D", 1) =3D 1 mmap(0x805b51000, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) =3D 0x805b51000 getpid() =3D 29696 getpid() =3D 29696 gettid() =3D 29696 write(1029, "E", 1) =3D 1 rt_sigprocmask(SIG_SETMASK, [], ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = =3D 0 open("/dev/hugepages/rtemap_0", O_RDWR|O_CREAT, 0755) =3D 6 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = =3D 0 gettid() =3D 29696 read(1028, "E", 1) =3D 1 mmap(0x39fe0000, 1073741824, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, = 6, 0) =3D -1 EINVAL (Invalid argument) gettid() =3D 29696 write(1029, "F", 1) =3D 1 rt_sigprocmask(SIG_SETMASK, [], ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = =3D 0 write(1, "EAL: map_all_hugepages(): mmap f"..., 56EAL: = map_all_hugepages(): mmap failed: Invalid argument ) =3D 56 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = =3D 0 gettid() =3D 29696 read(1028, "F", 1) =3D 1 close(6) =3D 0 gettid() =3D 29696 write(1029, "G", 1) =3D 1 rt_sigprocmask(SIG_SETMASK, [], ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = =3D 0 write(1, "EAL: Failed to mmap 1024 MB huge"..., 38EAL: Failed to mmap = 1024 MB hugepages =20 =20 Morten Jagd Christensen VP Product Management Xena Networks L=E6derstr=E6de 34, 3rd Floor 1201 Copenhagen K Denmark Ph: (+45) 51 54 51 87 mjc@xenanetworks.com =20