[SERVER-20696] Aggregation Suite Failure in server6190.js Created: 30/Sep/15  Updated: 25/Aug/16  Resolved: 01/Oct/15

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: 3.1.8
Fix Version/s: 3.1.9

Type: Bug Priority: Major - P3
Reporter: Nishidha Assignee: Ramon Fernandez Marina
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Issue:

  • On ppc64le VM, Aggregation suite is failing with error at line# 20 in server6190.js as
    E QUERY [thread1] Error: [1] != [52] are not equal : undefined :
  • On another VM of mine which is x86, it passed

Cause:
I investigated this area of mongodb code by putting logs on both ppc64le as well x86 VMs in
1. Function int ExpressionWeek::extract(const tm& tm) in src/mongo/db/pipeline/expression.cpp and
2. function time_t Value::coerceToTimeT() const in src/mongo/db/pipeline/value.cpp
o This function calls gmtime
Log output gave me different results as expected. The difference in output of gmtime was exactly 9.5 hrs.

When I checked system date, I found x86 VM had date in EDT timezone whereas ppc64le has in IST. Difference in IST time and EDT time is also 9.5 hrs.

Hence, on machines with IST timezone (there could be others timezones too), this test suite fails in calculating week number for given date owing to the difference in current time (milliseconds since epoch time differs for different timezones).

Solution:
By changing system timezone and date to EDT on ppc64le, the test case simply passes. Seems the server code and expected output in test case assertions have been written considering EDT or similar timezone.

Hence, this is a bug which is not specific to ppc64le but a common problem when you've different timezone set.



 Comments   
Comment by Ramon Fernandez Marina [ 05/Oct/15 ]

Thanks for confirming the fix npanpaliya. The fix will be included in the next development release (3.1.9), and I'm also requesting a backport to the v3.0 branch.

Comment by Nishidha [ 05/Oct/15 ]

Thank you ramon.fernandez for fixing this. I verified this test with the latest code of mongod server and the test passed.

Could you also please confirm the server version in which this fix has been released? I see 3.1.9 in version.json in the latest code. Is that correct?

Regards,
Nishidha

Comment by Ramon Fernandez Marina [ 01/Oct/15 ]

Thanks for reporting this npanpaliya, we've fixed the test to work on all time zones.

Here's the new version of the test, feel free to give it a try and report back.

Cheers,
Ramón.

Comment by Githook User [ 01/Oct/15 ]

Author:

{u'name': u'Ramon Fernandez', u'email': u'ramon@mongodb.com'}

Message: SERVER-20696 make testing TZ-independent
Branch: master
https://github.com/mongodb/mongo/commit/114ad4ae31112a730591fdd987d5ad0028e33bf2

Comment by Ramon Fernandez Marina [ 30/Sep/15 ]

Thanks for the detailed report npanpaliya, we're investigating.

Generated at Thu Feb 08 03:55:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.