[SERVER-13446] Solaris builds depend on ILLUMOS libc Created: 31/Mar/14 Updated: 11/Jul/16 Resolved: 22/May/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.2, 2.7.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ernie Hershey | Assignee: | Shaun Verch |
| Resolution: | Done | Votes: | 2 |
| Labels: | community-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Completed: | |||||||||||||
| Sprint: | Server 2.7.1 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
In Oracle Solaris, this leads to this error:
|
| Comments |
| Comment by Githook User [ 27/May/14 ] | ||||||||||||||||||||||||||||||||
|
Author: {u'name': u'Shaun Verch', u'email': u'shaun.verch@mongodb.com'}Message: (cherry picked from commit 1ec7a22e8b10833d250892e62d7e0942b1dbb9f2) Conflicts: | ||||||||||||||||||||||||||||||||
| Comment by Githook User [ 22/May/14 ] | ||||||||||||||||||||||||||||||||
|
Author: {u'name': u'Shaun Verch', u'email': u'shaun.verch@mongodb.com'}Message: | ||||||||||||||||||||||||||||||||
| Comment by Githook User [ 17/May/14 ] | ||||||||||||||||||||||||||||||||
|
Author: {u'username': u'kangas', u'name': u'Matt Kangas', u'email': u'matt.kangas@mongodb.com'}Message: Revert " This reverts commit 5a44bf386eaba7d18a142206868bdbab15432eea. | ||||||||||||||||||||||||||||||||
| Comment by Githook User [ 16/May/14 ] | ||||||||||||||||||||||||||||||||
|
Author: {u'name': u'Shaun Verch', u'email': u'shaun.verch@mongodb.com'}Message: | ||||||||||||||||||||||||||||||||
| Comment by Itay Neeman [ 22/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
Great - created | ||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 22/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
Yes, please file a CXX issue for this. We have a code review prepared for this that we believe will have correct behavior, using IANA's timezone code. | ||||||||||||||||||||||||||||||||
| Comment by Itay Neeman [ 22/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
We need this fix in the C++ driver as well - will this be backported over, or should I file a support CXX issue for it? | ||||||||||||||||||||||||||||||||
| Comment by Pavel Ryzhov [ 10/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
A simple implementation of timegm from https://github.com/vlmarek/notmuch-solaris/blob/master/compat/timegm.c seems to be working fine because MongoDB 2.6 x64 with it on Solaris 11.1 passed all tests. I am not sure if it is a correct way to patch it but it seems that it just converts struct tm to ms and that is all. Could anybody validate this approach? PS: Both files in the attachment. | ||||||||||||||||||||||||||||||||
| Comment by Pavel Ryzhov [ 10/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
timegm patch and test results of mongodb 2.6 on solaris | ||||||||||||||||||||||||||||||||
| Comment by Davide Italiano [ 04/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
Solaris is 100% POSIX compliant, I think this is true for Solaris 10 and (probably) for Solaris 11.
and therefore is not portable and cannot be 100% mapped using POSIX API(s). | ||||||||||||||||||||||||||||||||
| Comment by Shaun Verch [ 02/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
The reason we used timegm in the first place can be seen here: http://linux.die.net/man/3/timegm The example they show in that page for how to implement timegm in terms of mktime manipulates the "TZ" environment variable, which is not thread safe. schwerin, am I remembering this correctly? The manual for Solaris has mktime: http://docs.oracle.com/cd/E26502_01/html/E29034/mktime-3c.html#scrolltoc and gmtime: http://docs.oracle.com/cd/E26502_01/html/E29034/gmtime-3c.html#scrolltoc but does not seem to have timegm or any references to it. | ||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 01/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
That's a good find. Turns out: "If you use this symbol in your programs, be aware that the resulting | ||||||||||||||||||||||||||||||||
| Comment by Ernie Hershey [ 01/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
Actually I don't think either solution will work. 1) The buildbot builder is using the same flavor of libc:
2) In 2.6, "timegm" is dependent on the illumos symbol.
3) in 2.4, nothing is dependent on the symbol.
4) We introduced timegm to the code in December in master.
5) Maybe sverch knows more detail.
| ||||||||||||||||||||||||||||||||
| Comment by Ernie Hershey [ 01/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
As a last resort, I think so. The environments aren't very different though. We should also be able to figure out what's different about the buildbot build environment and replicate it in MCI. They're both using libc's with ILLUMOS version symbols and similar gcc versions, but the buildbot gcc looks like it's joyent's but the mci one is from the built in OmniOS packaging repo. | ||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 01/Apr/14 ] | ||||||||||||||||||||||||||||||||
|
Can we possibly use the buildbot SmartOS instance to build a 2.6 binary by hand when we release 2.6, until we solve the problem on the new MCI host? That could buy us some time. |