#48597 closed defect (fixed)
mongodb @ 3.0.5 segfaults with boost 1.59
Reported by: | pe8ter@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | webmaster@…, arkonan (Alexandra Ellwood) | |
Port: | mongodb |
Description
After updating to boost version 1.59, mongod segfaults immediately. Reverting back to version 1.58 stops the errors.
Mac OS 10.10.5, Xcode Version 6.4 (6E35b)
Attached is a small error dump.
Attachments (1)
Change History (19)
Changed 9 years ago by pe8ter@…
comment:1 Changed 9 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to ryandesign@… |
---|
comment:2 follow-up: 3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
For other reasons, I'm already planning on switching mongodb back to using its bundled copy of boost, which would fix this.
comment:3 Changed 9 years ago by pe8ter@…
Replying to ryandesign@…: Excellent. Thanks for the quick response.
comment:4 Changed 9 years ago by coolfactor@…
I thought I was losing my mind when mongodb refused to start after updating boost. Saw a reference to "boost" in the crash log. Attempting to reinstall both has not fixed, so thanks for reporting this problem here.
Ryan, any (rough) timeline for a fix?
comment:5 Changed 9 years ago by coolfactor@…
Gah! MacPorts doesn't even let me easily re-install Boost 1.58.0. Lots of reports about MacPorts no longer supporting the @1.58.0 syntax... why oh why??? Must go through a complicated process of downloading via Subversion and installing that way? Who's brilliant idea was this to stop supporting the @version syntax? Ugh... (there's probably a good reason, but annoying to run into these problems in the middle of a work day...)
comment:6 follow-up: 7 Changed 9 years ago by coolfactor@…
For anybody that stumbles across this ticket and needs to reinstall Boost 1.58.0, here are the steps that I've tried...
- Create a "src" directory at the root of your drive (or use another directory outside of your Home directory, such as /tmp).
- Download the Portfile using the "Original Link" at the bottom of this page: browser:trunk/dports/devel/boost/Portfile@136759
- Move that Portfile into the directory that you created in Step #1.
- Navigate into the directory and run: sudo port install
It says that Boost 1.58.0_3 installs successfully, however it doesn't appear to have worked. Attempting to install MongoDB 3.0.5 proceeds to install Boost 1.59.0 again.
Any ideas?
comment:7 Changed 9 years ago by pe8ter@…
Replying to coolfactor@…:
This support page states that you must download the supporting files as well:
wiki:howto/InstallingOlderPort
Boost has quite a few. I recommend following the directions at the bottom for installing via Subversion. This will download those files for you.
Good luck!
comment:8 follow-up: 9 Changed 9 years ago by pe8ter@…
A little help. Here are the commands you run to revert back to boost 1.58:
cd /tmp svn co -r 136759 http://svn.macports.org/repository/macports/trunk/dports/devel/boost cd boost sudo port install sudo port activate boost @1.58.0
Verify that the old version is now active:
port installed boost
The response should be this:
The following ports are currently installed: boost @1.58.0_3+no_single+no_static+python27 (active) boost @1.59.0_0+no_single+no_static+python27
comment:9 Changed 9 years ago by coolfactor@…
Replying to pe8ter@…:
A little help.
Thank you. I'll try that now.
I did find the earlier discussion that Ryan started with the MongoDB folks about how C++11 is now required, and this is the source of the grief? (https://jira.mongodb.org/browse/SERVER-19661)
I'm curious how MongoDB 3.0.5 landed on MacPorts if this was a known and unfixed issue? And thank you for your work to fix this problem now. MacPorts is supposed to make installing and maintaining software a snap, so when problems like this occur, it really throws a hanger into the fan, eh? :)
@ryandesign.. thank you for your tremendous contribution to MacPorts over the years!
comment:10 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Status: | new → assigned |
---|
No, as far as I know, the C++11 requirement is unrelated to this new problem. Rather, apparently, boost 1.59 is different enough from 1.58 that it causes a problem for mongodb. (mongodb was updated to 3.0.5 before boost was updated to 1.59.) This is not surprising; the developers of boost frequently make changes that cause problems. Therefore it should improve reliability to switch mongodb to its bundled copy of boost, with which we can assume mongodb will work since that combination has been tested by the mongodb developers. The previous reasons why we were instead using the MacPorts version of boost no longer apply as of mongodb version 3.
I have succeeded in building mongodb with its bundled boost. The reason I have not committed it yet is that when I switched mongodb to use its bundled copy of boost, pcre and snappy, it also switched to using the Mac OS X versions of libpcap and openssl, whereas I would want to continue using the MacPorts versions of libpcap and openssl which are newer.
comment:11 Changed 9 years ago by coolfactor@…
So I was able to get Mongo 3.0.5 to play nicely with Boost 1.59.0. It's working. Not noticing any problems.
I followed some of the instructions on the InstallingOlderPort page:
- Uninstalled libcxx and all dependents.
- Updated the MacPorts config with the following:
cxx_stdlib libc++ buildfromsource always delete_la_files yes
- Reinstalled Boost and MongoDB (which takes forever! to build).
Once done, everything was peachy. Does this look okay?
This setup does mean that every port that I install will need to be built manually, but I'm willing to accept that tradeoff for now.
comment:12 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
You can do that if you want, but it should have nothing to do with this problem. The problem was originally reported on OS X 10.10, where libc++ is already the default.
I suspect that just rebuilding mongodb 3.0.5 with boost 1.59 installed might fix whatever the problem is. (i.e. "sudo port -ns upgrade --force mongodb") But I don't plan on testing that; instead I plan to use the bundled boost as outlined above.
comment:14 Changed 9 years ago by coolfactor@…
So if I'm understanding, it's the pre-compiled version of MongoDB 3.0.5 that was being delivered via MacPorts that was not playing nicely with Boost 1.59, and building MongoDB locally would have avoided the problem?
comment:15 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Since I don't think any of the other steps you mentioned doing would have any bearing on the problem, I can only surmise that what fixed it for you was rebuilding mongodb 3.0.5 from source against boost 1.59. I haven't reproduced the problem on my system so I can't confirm whether that's really a fix. Anyone who is experiencing the problem and wishes to try can run "sudo port -ns upgrade --force mongodb
" (after making sure that boost 1.59.0 is already installed and active). Let me know if that changes anything.
I am waiting for a response from the developers of mongodb to my question about how to build mongodb with its bundled boost while still using MacPorts versions of some other libraries.
comment:16 Changed 9 years ago by arkonan (Alexandra Ellwood)
I can confirm that rebuilding mongodb 3.0.5 from source against boost 1.59.0 fixes the segfault on launch.
comment:17 follow-up: 18 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | lxs@… added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Ok thanks, then I'll go with that as the fix for now. Increased the revision in r139626 to suggest a rebuild for everyone.
comment:18 Changed 9 years ago by pe8ter@…
Replying to ryandesign@…:
Thanks for working so fast on this!
In the future, please Cc the port maintainers (
port info --maintainers mongodb
), if any.