[SERVER-4065] thread interruption is disabled in V8 native callback, makes it impossible to kill op Created: 12/Oct/11  Updated: 11/Jul/16  Resolved: 13/Oct/11

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: 2.1.0

Type: Bug Priority: Major - P3
Reporter: Antoine Girbal Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

drop2.js failing because it's trying to interrupt op when it's doing a sleep()



 Comments   
Comment by auto [ 13/Oct/11 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: - SERVER-4065: better handling, disable interrupt in callback but mark as interrupted
Branch: master
https://github.com/mongodb/mongo/commit/a087cc3e72a960f95ce7a297b30cbe51cc31fd12

Comment by auto [ 13/Oct/11 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: - SERVER-4065: thread interruption is disabled in V8 native callback, makes it impossible to kill op
Branch: master
https://github.com/mongodb/mongo/commit/3e153de2b9e4fa4acf4b1e513a96c0ac0dc2cb84

Comment by Antoine Girbal [ 13/Oct/11 ]

when keeping interrupt possible during callback, the downside is that many v8 calls can fail (return empty result) if thread is interrupted.
One more difficulty is that calls can be nested V8 > C++ > V8 > C++.
It seems that just the fact that a callback creates a new JS object with a C++ constructor means nested call.
2 options:
1. add checks all around the code to check for empty results
2. find a way to temporarily disable interrupts during a callback, but still record interrupts. This must detect nesting so that nested calls complete.

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