Comments (20)
thanks for the report. in the new year will look at it.
from bear.
hi York, I am trying to reproduce the bug, but failed. for me even the make all
does not work. could you send me the output for both compilation? (something like make all 2>&1 | tee simple.out
and bear -n -- make all 2>&1 | tee bear.out
and send the simple.out
, bear.out
and compile_commands.json
files.)
from bear.
Hi László,
Thank you very much for your help. I've collected the output files from "make all 2>&1 | tee simple.out" and "bear -n -- make all 2>&1 | tee bear.out", as well as the compile_commands.json file. But as I sent the files to your google.com address my email was returned back. Could you please give me your email address that I can use to send the files?
Thanks,
York
from bear.
thanks York for the files. it was big enlightenment for me! i recognized two things already.
- the build fail with Bear, because of boost thread library Scons check fails. (although it was compiled and installed to the very same way in both cases.) would be interesting to run those checks more verbose both cases. (maybe
strace
can spot the differences.) - Bear is blind for Scons compilation. Scons does execute the compiler by calling shell script, the shell script calls
env
command to reset the environment and calls the compiler itself. this clean environment stops Bear to work and intercept the compiler invocation. this is a bug for Bear, which i don't know how to fix at this moment.
from bear.
Hi László,
Thank you very much for digging into the issue. Hopefully you will come up with some solution. Let me know if you need my help.
from bear.
hi York, there is a rewrite of the tool, which suppose to fix this problem. please reopen this bug if it still fails for you.
from bear.
Hi rizsotto,
Thank you so much for addressing the issue. I just tried "bear -- make all" but got an error:
$ bear -- make all
bear: [Errno 2] No such file or directory
Thanks,
York
from bear.
hi York, the command line changed a little bit. the correct command in your case would be: bear make all
. could you try that and tell me is it still an issue.
from bear.
Hi László,
When building the project with bear make all
, it still fails, but with different error:
The crashed program seems to use third-party or local libraries:
/usr/local/lib/libear.so
It is highly recommended to check if the problem persists without those first
The following is the errors on the console output.
make[2]: *** [all] Segmentation fault (core dumped)
make[2]: Leaving directory /home/rtbkit/platform-deps/zeromq3-x/src' Making all in doc make[2]: Entering directory
/home/rtbkit/platform-deps/zeromq3-x/doc'
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_bind.xml zmq_bind.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_unbind.xml zmq_unbind.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_connect.xml zmq_connect.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_disconnect.xml zmq_disconnect.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_close.xml zmq_close.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_ctx_new.xml zmq_ctx_new.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_ctx_destroy.xml zmq_ctx_destroy.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_ctx_get.xml zmq_ctx_get.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_ctx_set.xml zmq_ctx_set.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_init.xml zmq_msg_init.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_init_data.xml zmq_msg_init_data.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_init_size.xml zmq_msg_init_size.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_move.xml zmq_msg_move.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_copy.xml zmq_msg_copy.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_size.xml zmq_msg_size.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_data.xml zmq_msg_data.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_close.xml zmq_msg_close.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_send.xml zmq_msg_send.txt
asciidoc -d manpage -b docbook -f ./asciidoc.conf
-azmq_version=3.2.3 -ozmq_msg_recv.xml zmq_msg_recv.txt
*** glibc detected *** make: free(): invalid pointer: 0x00000000008f98a0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7e846)[0x2b0e53970846]
make[0x40df59]
make[0x40fbb1]
make[0x410390]
make[0x4190a2]
make[0x4188a7]
make[0x419433]
make[0x4183f7]
make[0x419433]
make[0x4183f7]
make[0x4198b7]
make[0x403d88]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x2b0e5391376d]
make[0x403fb1]
======= Memory map: ========
00400000-00428000 r-xp 00000000 08:01 1311381 /usr/bin/make
00627000-00628000 r--p 00027000 08:01 1311381 /usr/bin/make
00628000-0062a000 rw-p 00028000 08:01 1311381 /usr/bin/make
008c6000-00926000 rw-p 00000000 00:00 0 [heap]
2b0e532c2000-2b0e532e4000 r-xp 00000000 08:01 525282 /lib/x86_64-linux-gnu/ld-2.15.so
2b0e532e4000-2b0e532e8000 rw-p 00000000 00:00 0
2b0e532fc000-2b0e532ff000 rw-p 00000000 00:00 0
2b0e534e4000-2b0e534e5000 r--p 00022000 08:01 525282 /lib/x86_64-linux-gnu/ld-2.15.so
2b0e534e5000-2b0e534e7000 rw-p 00023000 08:01 525282 /lib/x86_64-linux-gnu/ld-2.15.so
2b0e534e7000-2b0e534ea000 r-xp 00000000 08:01 1573017 /usr/local/lib/libear.so
2b0e534ea000-2b0e536e9000 ---p 00003000 08:01 1573017 /usr/local/lib/libear.so
2b0e536e9000-2b0e536ea000 rw-p 00002000 08:01 1573017 /usr/local/lib/libear.so
2b0e536ea000-2b0e536f1000 r-xp 00000000 08:01 525285 /lib/x86_64-linux-gnu/librt-2.15.so
2b0e536f1000-2b0e538f0000 ---p 00007000 08:01 525285 /lib/x86_64-linux-gnu/librt-2.15.so
2b0e538f0000-2b0e538f1000 r--p 00006000 08:01 525285 /lib/x86_64-linux-gnu/librt-2.15.so
2b0e538f1000-2b0e538f2000 rw-p 00007000 08:01 525285 /lib/x86_64-linux-gnu/librt-2.15.so
2b0e538f2000-2b0e53aa7000 r-xp 00000000 08:01 525289 /lib/x86_64-linux-gnu/libc-2.15.so
2b0e53aa7000-2b0e53ca6000 ---p 001b5000 08:01 525289 /lib/x86_64-linux-gnu/libc-2.15.so
2b0e53ca6000-2b0e53caa000 r--p 001b4000 08:01 525289 /lib/x86_64-linux-gnu/libc-2.15.so
2b0e53caa000-2b0e53cac000 rw-p 001b8000 08:01 525289 /lib/x86_64-linux-gnu/libc-2.15.so
2b0e53cac000-2b0e53cb1000 rw-p 00000000 00:00 0
2b0e53cb1000-2b0e53cb3000 r-xp 00000000 08:01 528558 /lib/x86_64-linux-gnu/libdl-2.15.so
2b0e53cb3000-2b0e53eb3000 ---p 00002000 08:01 528558 /lib/x86_64-linux-gnu/libdl-2.15.so
2b0e53eb3000-2b0e53eb4000 r--p 00002000 08:01 528558 /lib/x86_64-linux-gnu/libdl-2.15.so
2b0e53eb4000-2b0e53eb5000 rw-p 00003000 08:01 528558 /lib/x86_64-linux-gnu/libdl-2.15.so
2b0e53eb5000-2b0e53ecd000 r-xp 00000000 08:01 525283 /lib/x86_64-linux-gnu/libpthread-2.15.so
2b0e53ecd000-2b0e540cc000 ---p 00018000 08:01 525283 /lib/x86_64-linux-gnu/libpthread-2.15.so
2b0e540cc000-2b0e540cd000 r--p 00017000 08:01 525283 /lib/x86_64-linux-gnu/libpthread-2.15.so
2b0e540cd000-2b0e540ce000 rw-p 00018000 08:01 525283 /lib/x86_64-linux-gnu/libpthread-2.15.so
2b0e540ce000-2b0e540d2000 rw-p 00000000 00:00 0
2b0e540d2000-2b0e547b6000 r--p 00000000 08:01 1317673 /usr/lib/locale/locale-archive
2b0e547b6000-2b0e547cc000 r-xp 00000000 08:01 1337532 /usr/local/gcc/4.9.2/lib64/libgcc_s.so.1
2b0e547cc000-2b0e549cb000 ---p 00016000 08:01 1337532 /usr/local/gcc/4.9.2/lib64/libgcc_s.so.1
2b0e549cb000-2b0e549cc000 rw-p 00015000 08:01 1337532 /usr/local/gcc/4.9.2/lib64/libgcc_s.so.1
7fff5fbec000-7fff5fc0d000 rw-p 00000000 00:00 0 [stack]
7fff5fdfe000-7fff5fe00000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
/bin/bash: line 9: 10430 Aborted (core dumped) make $local_target
Making all in perf
make[2]: Entering directory /home/rtbkit/platform-deps/zeromq3-x/perf' make[2]: *** No rule to make target
../src/libzmq.la', needed by local_lat'. CXX local_lat.o CXX remote_lat.o /bin/bash: line 9: 10454 Segmentation fault (core dumped) make $local_target Making all in tests make[2]: Entering directory
/home/rtbkit/platform-deps/zeromq3-x/tests'
make[2]: *** No rule to make target ../src/libzmq.la', needed by
test_pair_inproc'.
CXX test_pair_inproc.o
CXX test_pair_tcp.o
CXX test_reqrep_inproc.o
CXX test_reqrep_tcp.o
CXX test_hwm.o
CXX test_reqrep_device.o
CXX test_sub_forward.o
CXX test_invalid_rep.o
*** glibc detected *** make: double free or corruption (fasttop): 0x0000000000b6a3a0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7e846)[0x2ab6d47bc846]
make[0x40df59]
make[0x40fbb1]
make[0x410390]
make[0x4190a2]
make[0x419433]
make[0x4183f7]
make[0x419433]
make[0x4183f7]
make[0x419433]
make[0x4183f7]
make[0x4198b7]
make[0x403d88]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x2ab6d475f76d]
make[0x403fb1]
======= Memory map: ========
00400000-00428000 r-xp 00000000 08:01 1311381 /usr/bin/make
00627000-00628000 r--p 00027000 08:01 1311381 /usr/bin/make
00628000-0062a000 rw-p 00028000 08:01 1311381 /usr/bin/make
00b35000-00b97000 rw-p 00000000 00:00 0 [heap]
2ab6d410e000-2ab6d4130000 r-xp 00000000 08:01 525282 /lib/x86_64-linux-gnu/ld-2.15.so
2ab6d4130000-2ab6d4134000 rw-p 00000000 00:00 0
2ab6d4148000-2ab6d414b000 rw-p 00000000 00:00 0
2ab6d4330000-2ab6d4331000 r--p 00022000 08:01 525282 /lib/x86_64-linux-gnu/ld-2.15.so
2ab6d4331000-2ab6d4333000 rw-p 00023000 08:01 525282 /lib/x86_64-linux-gnu/ld-2.15.so
2ab6d4333000-2ab6d4336000 r-xp 00000000 08:01 1573017 /usr/local/lib/libear.so
2ab6d4336000-2ab6d4535000 ---p 00003000 08:01 1573017 /usr/local/lib/libear.so
2ab6d4535000-2ab6d4536000 rw-p 00002000 08:01 1573017 /usr/local/lib/libear.so
2ab6d4536000-2ab6d453d000 r-xp 00000000 08:01 525285 /lib/x86_64-linux-gnu/librt-2.15.so
2ab6d453d000-2ab6d473c000 ---p 00007000 08:01 525285 /lib/x86_64-linux-gnu/librt-2.15.so
2ab6d473c000-2ab6d473d000 r--p 00006000 08:01 525285 /lib/x86_64-linux-gnu/librt-2.15.so
2ab6d473d000-2ab6d473e000 rw-p 00007000 08:01 525285 /lib/x86_64-linux-gnu/librt-2.15.so
2ab6d473e000-2ab6d48f3000 r-xp 00000000 08:01 525289 /lib/x86_64-linux-gnu/libc-2.15.so
2ab6d48f3000-2ab6d4af2000 ---p 001b5000 08:01 525289 /lib/x86_64-linux-gnu/libc-2.15.so
2ab6d4af2000-2ab6d4af6000 r--p 001b4000 08:01 525289 /lib/x86_64-linux-gnu/libc-2.15.so
2ab6d4af6000-2ab6d4af8000 rw-p 001b8000 08:01 525289 /lib/x86_64-linux-gnu/libc-2.15.so
2ab6d4af8000-2ab6d4afd000 rw-p 00000000 00:00 0
2ab6d4afd000-2ab6d4aff000 r-xp 00000000 08:01 528558 /lib/x86_64-linux-gnu/libdl-2.15.so
2ab6d4aff000-2ab6d4cff000 ---p 00002000 08:01 528558 /lib/x86_64-linux-gnu/libdl-2.15.so
2ab6d4cff000-2ab6d4d00000 r--p 00002000 08:01 528558 /lib/x86_64-linux-gnu/libdl-2.15.so
2ab6d4d00000-2ab6d4d01000 rw-p 00003000 08:01 528558 /lib/x86_64-linux-gnu/libdl-2.15.so
2ab6d4d01000-2ab6d4d19000 r-xp 00000000 08:01 525283 /lib/x86_64-linux-gnu/libpthread-2.15.so
2ab6d4d19000-2ab6d4f18000 ---p 00018000 08:01 525283 /lib/x86_64-linux-gnu/libpthread-2.15.so
2ab6d4f18000-2ab6d4f19000 r--p 00017000 08:01 525283 /lib/x86_64-linux-gnu/libpthread-2.15.so
2ab6d4f19000-2ab6d4f1a000 rw-p 00018000 08:01 525283 /lib/x86_64-linux-gnu/libpthread-2.15.so
2ab6d4f1a000-2ab6d4f1e000 rw-p 00000000 00:00 0
2ab6d4f1e000-2ab6d5602000 r--p 00000000 08:01 1317673 /usr/lib/locale/locale-archive
2ab6d5602000-2ab6d5618000 r-xp 00000000 08:01 1337532 /usr/local/gcc/4.9.2/lib64/libgcc_s.so.1
2ab6d5618000-2ab6d5817000 ---p 00016000 08:01 1337532 /usr/local/gcc/4.9.2/lib64/libgcc_s.so.1
2ab6d5817000-2ab6d5818000 rw-p 00015000 08:01 1337532 /usr/local/gcc/4.9.2/lib64/libgcc_s.so.1
7fff22646000-7fff22667000 rw-p 00000000 00:00 0 [stack]
7fff22781000-7fff22783000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
/bin/bash: line 9: 10465 Aborted (core dumped) make $local_target
make[2]: Entering directory /home/rtbkit/platform-deps/zeromq3-x' make[2]: Nothing to be done for
all-am'.
make[2]: Leaving directory /home/rtbkit/platform-deps/zeromq3-x' make[1]: *** [all-recursive] Error 1 make[1]: Target
all' not remade because of errors.
make[1]: INTERNAL: Exiting with 2 jobserver tokens available; should be 8!
make[1]: Leaving directory `/home/rtbkit/platform-deps/zeromq3-x'
make: *** [install_zeromq] Error 2
Let me know if I can be of help. Not sure why I was not able to reopen this issue.
Thanks,
York
from bear.
Thanks York, will look at it on the weekend.
from bear.
Could not reproduce the issue, but checked and fixed all possible double memory deallocation. The fix is in the release 2.0.1.
from bear.
I got the latest master and I have the same problem. Setting MALLOC_CHECK_ to 1 gives me:
*** glibc detected *** make: free(): invalid pointer: 0x0000000000e01eb0 ***
*** glibc detected *** make: free(): invalid pointer: 0x0000000000d945a0 ***
*** glibc detected *** make: free(): invalid pointer: 0x0000000000dc9580 ***
*** glibc detected *** make: free(): invalid pointer: 0x0000000000dbcb80 ***
I also commented all the calls to free()
in ear.c, but the problem persisted.
from bear.
thanks Alex for the report and the debugging. will look at it soon.
from bear.
Still was not able to reproduce this bug, although tried in many ways... But run the Address Sanitizer against 'libear' and fixed the findings. Could you try to re-run this scenario for me with the new version?
from bear.
Hi László,
I apologize for replying late. The past a few weeks had been crazily busy and too stressful.
I just tried building the project using the latest bear, but still got errors. The following is part of the error from console output.
make[2]: *** No rule to make target `../src/libzmq.la', needed by `test_pair_inproc'.
CXX test_pair_inproc.o
CXX test_pair_tcp.o
CXX test_reqrep_inproc.o
CXX test_reqrep_tcp.o
CXX test_hwm.o
CXX test_reqrep_device.o
CXX test_sub_forward.o
CXX test_invalid_rep.o
CXX test_msg_flags.o
CXX test_connect_resolve.o
CXX test_connect_delay.o
CXX test_last_endpoint.o
CXX test_term_endpoint.o
CXX test_monitor.o
CXX test_router_mandatory.o
CXX test_disconnect_inproc.o
CXX test_shutdown_stress.o
CXX test_pair_ipc.o
CXX test_reqrep_ipc.o
CXX test_timeo.o
make[2]: Target `all' not remade because of errors.
make[2]: Leaving directory `/home/rtbkit/platform-deps/zeromq3-x/tests'
make[2]: Entering directory `/home/rtbkit/platform-deps/zeromq3-x'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/rtbkit/platform-deps/zeromq3-x'
make[1]: *** [all-recursive] Error 1
make[1]: Target `all' not remade because of errors.
make[1]: INTERNAL: Exiting with 1 jobserver tokens available; should be 8!
make[1]: Leaving directory `/home/rtbkit/platform-deps/zeromq3-x'
make: *** [install_zeromq] Error 2
Shortly before producing this error, my Ubuntu system reported a crash of "make" caused by a bear library. Unfortunately, because I didn't write down the messages immediately and the error reporting window has disappeared. Please let me know if you need more from me.
Have a nice weekend
from bear.
I found the crash report window. Please see the attached image.
from bear.
Thanks York for the report. I am away from keyboard till May. But when I am back will install a ubuntu to be able reproduce this. Could you send me which version do u use, and what packages shall I install to succeed the make (without bear)?
from bear.
I've encountered the double free in my project. The call tree goes something like:
bear make
cd subdir && qmake && make -C subdir
The double free does not seem to occur if I skip the outer Makefile and corresponding qmake call, and instead execute bear make -C subdir
.
from bear.
It's a good news Wes, thanks to report it. Will try to make a test case out of it. Thanks!
from bear.
i made a new release (2.0.3) which try to fix this issue. made change which is more restrictive about memory allocation at library loading. i'm still travelling and can't test against this project on my machine. could somebody run a test against the new version of Bear? that would be a great help for me. thanks in advance.
from bear.
Related Issues (20)
- compile asan, but the content of compile_commands.json is empty HOT 4
- makeopts ignored HOT 3
- can't install bear without sudo HOT 2
- has no member named ‘always_print_primitive_fields’ HOT 7
- How can I create the compile_commands.json for the Bear project? HOT 3
- Combining compile & link with Clang results in erroneous entry HOT 3
- Empty compilation database when compiling OpenBSD kernel HOT 2
- bear::func_test failed 7 tests (3.1.4) HOT 8
- [Build failed] ld cannot find stdc++fs: ld: undefined reference to std::filesystem HOT 4
- Question - how to capture built in compiler options HOT 1
- How to support emcc compiler? HOT 1
- bear 3.1.4 hangs when proxy is enabled in ubuntu 24.04 HOT 3
- I get the error: "ERROR: ld.so: object '/usr/$LIB/bear/libexec.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored." HOT 3
- Build2 compatibility HOT 5
- Cannot open /usr/local/bin/bear: No such file HOT 1
- Bear does not preserve single quotes in command line macro definitions HOT 2
- Build problem with fmtlib 11
- Bear doesn't seem to detect MinGW calls on macOS HOT 2
- LSP: Unsupported option '-m68000' for target x86_64-pc-linux-gnu HOT 3
- bear in WSL2 failed: wrapper: failed with: gRPC call failed: failed to connect to all addresses (solved) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bear.