Skip to content
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

make: *** [install_mongodb_cxx_driver] Error #69

Closed
YorkZ opened this issue Dec 28, 2014 · 20 comments
Closed

make: *** [install_mongodb_cxx_driver] Error #69

YorkZ opened this issue Dec 28, 2014 · 20 comments
Labels

Comments

@YorkZ
Copy link

YorkZ commented Dec 28, 2014

I was compiling this project: https://github.com/datacratic/platform-deps.

The project can be compiled by make all, but not by bear -- make all. The
compilation stopped after producing the error:

make: *** [install_mongodb_cxx_driver] Error 1

Thanks in advance for any help.

@rizsotto rizsotto added the bug label Dec 29, 2014
@rizsotto
Copy link
Owner

thanks for the report. in the new year will look at it.

@rizsotto
Copy link
Owner

rizsotto commented Jan 5, 2015

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.)

@YorkZ
Copy link
Author

YorkZ commented Jan 6, 2015

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

@rizsotto
Copy link
Owner

rizsotto commented Jan 7, 2015

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.

@YorkZ
Copy link
Author

YorkZ commented Jan 10, 2015

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.

@rizsotto
Copy link
Owner

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.

@YorkZ
Copy link
Author

YorkZ commented Jan 21, 2015

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

@rizsotto
Copy link
Owner

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.

@YorkZ
Copy link
Author

YorkZ commented Jan 22, 2015

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 bytest_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 forall-am'.
make[2]: Leaving directory /home/rtbkit/platform-deps/zeromq3-x' make[1]: *** [all-recursive] Error 1 make[1]: Targetall' 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

@rizsotto rizsotto reopened this Jan 22, 2015
@rizsotto
Copy link
Owner

Thanks York, will look at it on the weekend.

@rizsotto
Copy link
Owner

Could not reproduce the issue, but checked and fixed all possible double memory deallocation. The fix is in the release 2.0.1.

@asandroq
Copy link

asandroq commented Feb 4, 2015

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.

@rizsotto
Copy link
Owner

rizsotto commented Feb 4, 2015

thanks Alex for the report and the debugging. will look at it soon.

@rizsotto
Copy link
Owner

rizsotto commented Feb 8, 2015

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?

@YorkZ
Copy link
Author

YorkZ commented Feb 14, 2015

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

@YorkZ
Copy link
Author

YorkZ commented Feb 14, 2015

I found the crash report window. Please see the attached image.
error

@rizsotto
Copy link
Owner

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)?

@cuadue
Copy link

cuadue commented Mar 27, 2015

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.

@rizsotto
Copy link
Owner

It's a good news Wes, thanks to report it. Will try to make a test case out of it. Thanks!

@rizsotto
Copy link
Owner

rizsotto commented Apr 4, 2015

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.

@rizsotto rizsotto removed this from the 2.0 milestone Aug 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants