[SERVER-23169] group failed : Command failed with error 139: 'Failure to enumerate object' Created: 16/Mar/16 Updated: 08/Jan/24 Resolved: 28/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, Querying |
| Affects Version/s: | 3.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Zhang Youdong | Assignee: | Jonathan Reams |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||
| Backwards Compatibility: | Fully Compatible | |||||||||||||||||
| Operating System: | ALL | |||||||||||||||||
| Steps To Reproduce: |
|
|||||||||||||||||
| Sprint: | Platforms 12 (04/01/16) | |||||||||||||||||
| Participants: | ||||||||||||||||||
| Description |
|
group failed : Command failed with error 139: 'Failure to enumerate object' 3.2 not work, but 3.0 works |
| Comments |
| Comment by Ramon Fernandez Marina [ 28/Mar/16 ] | |||||||||||||||||
|
I understand that the fix for | |||||||||||||||||
| Comment by Zhang Youdong [ 18/Mar/16 ] | |||||||||||||||||
|
~jason.carey, thank you for your reply, expecting it to be fiexed ASAP. | |||||||||||||||||
| Comment by Mira Carey [ 17/Mar/16 ] | |||||||||||||||||
|
The group statement could and should work in 3.2, it's absolutely a bug that it isn't working today. There was an optimization added when we migrated from V8 to SpiderMonkey to try and save on copies of some objects. The idea was that we would pass pointers to bson data, rather than owned copies, in some situations to Javascript. We have guards internally to make sure that those unowned pointers aren't dereferenced, but it's still breaking your legitimate use case. That situation is described in the linked server ticket. Regards, | |||||||||||||||||
| Comment by Zhang Youdong [ 17/Mar/16 ] | |||||||||||||||||
|
Thanks for your reply, but I still have a question. 1. the group statement can work in MongoDB-3.0, I want to know if it's caused by change of the javascript engine?(V8 to spidermonkey) 2. when all the docments have the same user.id fields, group can also work.
| |||||||||||||||||
| Comment by Mira Carey [ 16/Mar/16 ] | |||||||||||||||||
|
It appears that the problem is showing up in the value.user = doc.user assignment. The assignment we make there relies on the doc object having an extended lifetime, and it appears that we're violating that constraint. Replacing your reproducer with:
No longer fails for me. I'll file a ticket with the underlying issue and link it back to this one. Thanks for your bug report, | |||||||||||||||||
| Comment by Ramon Fernandez Marina [ 16/Mar/16 ] | |||||||||||||||||
|
Thanks for the clear reproducer zyd_com, I can reproduce the change in behavior and we're investigating. Cheers, |