-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
benchmark dumping core in "RunInThread" Function. #524
Comments
Can you post the commands you used to compile and link your benchmark?
Dominic Hamon | Google
*There are no bad ideas; only good ideas that go horribly wrong.*
…On Mon, Feb 5, 2018 at 9:15 PM, Naveen ***@***.***> wrote:
Hi I am trying to run a simplest benchmark on my amd ryzen 7 machine. I am
seeing a core dump in RunInThread function.
2018-02-06 12:31:10
Run on (16 X 3000 MHz CPU s)
CPU Caches:
L1 Data 32K (x8)
L1 Instruction 64K (x8)
L2 Unified 512K (x8)
L3 Unified 8192K (x2)
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
uname -a
Linux lt-hkg1-dws13 4.14.5-1.el7.elrepo.x86_64 #1
<#1> SMP Sun Dec 10 09:54:56
EST 2017 x86_64 x86_64 x86_64 GNU/Linux
g++ --version
g++ (GCC) 6.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and the backtrace of the core is
#0 0x0000000000000000 in ?? ()
#1 <#1> 0x000000000040dc55 in
benchmark::internal::(anonymous namespace)::RunInThread(
benchmark::internal::Benchmark::Instance const*, unsigned long, int,
benchmark::internal::ThreadManager*) ()
#2 <#2> 0x000000000040ed50 in
benchmark::RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*,
benchmark::BenchmarkReporter*) ()
#3 <#3> 0x0000000000405ad0 in
main (argc=, argv=0x7fffa795b998) at /home/nbansal/Documents/lt/
git/c/lt-jarvis/bench/./include/benchedsreader.h:35
static void BM_test(benchmark::State& state){
for( auto _ : state) std::string("test");
}
BENCHMARK(BM_test);
BENCHMARK_MAIN();```
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#524>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfIMnJP9QQXR24I6_OQY1KxuSa2jDRLks5tR9_1gaJpZM4R6grK>
.
|
I can produce it with the sample code given in this page as well. commit bc83262 (HEAD -> master, origin/master, origin/HEAD)
|
Can you please provide the command lines you used to build it. Was it
cmake? Did you use make? Can you also post the output of a clean cmake run
so I can see what was detected?
…On Tue, Feb 6, 2018, 17:30 Naveen ***@***.***> wrote:
I can produce it with the sample code given in this page as well.
One more thing I did compile the libbenchmark from the master branch and
the last commit is
commit bc83262
<bc83262>
(HEAD -> master, origin/master, origin/HEAD)
Author: Tim ***@***.***
Date: Sat Feb 3 23:04:36 2018 -0600
.vs/ and CmakeSettings.json to gitignore (#522
<#522>)
***@***.*** codes]$ ./a.out
2018-02-07 09:27:47
Run on (16 X 3000 MHz CPU s)
CPU Caches:
L1 Data 32K (x8)
L1 Instruction 64K (x8)
L2 Unified 512K (x8)
L3 Unified 8192K (x2)
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
Segmentation fault (core dumped)
***@***.*** codes]$ uname -a
Linux lt-hkg1-dws13 4.14.5-1.el7.elrepo.x86_64 #1 SMP Sun Dec 10 09:54:56 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
***@***.*** codes]$ less bench.cpp ^C
***@***.*** codes]$ cat bench.cpp
#include <benchmark/benchmark.h>
static void BM_StringCreation(benchmark::State& state) {
for (auto _ : state)
std::string empty_string;
}
// Register the function as a benchmark
BENCHMARK(BM_StringCreation);
// Define another benchmark
static void BM_StringCopy(benchmark::State& state) {
std::string x = "hello";
for (auto _ : state)
std::string copy(x);
}
BENCHMARK(BM_StringCopy);
BENCHMARK_MAIN();
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#524 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfIMlmHfW0nJwTaCqVXlMxTs9QiHR06ks5tSPykgaJpZM4R6grK>
.
|
I can see, if I use the default system compiler which is 4.8 then it works fine. But if I use gcc 6.4 which I installed later on, then I see this crash. For testing it simpally I am not using cmake, just the command line to compile and run.
|
Now I have it working. I think it was compiler version mismatch between how I compiled libbenchmark and my benchmark itself. |
Hi I am trying to run a simplest benchmark on my amd ryzen 7 machine. I am seeing a core dump in RunInThread function.
2018-02-06 12:31:10
Run on (16 X 3000 MHz CPU s)
CPU Caches:
L1 Data 32K (x8)
L1 Instruction 64K (x8)
L2 Unified 512K (x8)
L3 Unified 8192K (x2)
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
uname -a
Linux lt-hkg1-dws13 4.14.5-1.el7.elrepo.x86_64 #1 SMP Sun Dec 10 09:54:56 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
g++ --version
g++ (GCC) 6.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and the backtrace of the core is
#0 0x0000000000000000 in ?? ()
#1 0x000000000040dc55 in benchmark::internal::(anonymous namespace)::RunInThread(benchmark::internal::Benchmark::Instance const*, unsigned long, int, benchmark::internal::ThreadManager*) ()
#2 0x000000000040ed50 in benchmark::RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*, benchmark::BenchmarkReporter*) ()
#3 0x0000000000405ad0 in main (argc=, argv=0x7fffa795b998) at /home/nbansal/Documents/lt/git/c/lt-jarvis/bench/./include/benchedsreader.h:35
The text was updated successfully, but these errors were encountered: