Current time: 11-26-2024, 06:40 AM Hello There, Guest! (LoginRegister)


Post Reply 
Error 500
Author Message
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #27
RE: Error 500
sci2tech Wrote:Gui need to check lock because: 1. not to allow 2 engine instances to be running in same time => corrupted files

I understand that the backend needs locking to prevent multiple instances running at the same time, but as this is already done by the backend itself, why does the gui need to lock too?

sci2tech Wrote:2. second request to engine must wait until first request is finished (otherwise request will not be handled until third request).

This is not an issue, because the second request will fire a new "rqst-mngr" instance, which will sit there blocked (at the flock line, before doing anything) until the first one ends. When the first one has ended, "flock" returns and this second instance will continue as usual.

My only explanation is that gui locking is there to prevent a situation like this happening:
Code:
1. gui creates user "domain1.tld", with it's default mail addresses an such.
2. rqst-mngr (1) is run
3. rqst-mngr (1) launches dmn-mngr, who adds "domain1.tld"
4. gui creates a new user "domain2.tld", with it's default mail addresses and such.
5. rqst-mngr (2) is run, but gets blocked in the "flock" line.
6. rqst-mngr launches mbox-mngr, who tries to add mails for both "domain1.tld" (no problem) _and_ "domain2.tld" (which has not been created yet). Thereafter, bad things _may_ happen.
7. rqst-mngr (1) ends
8. rqst-mngr (2) wakes up
9. rqst-mngr (2) launches dmn-mngr, who adds "domain2.tld"
10. rqst-mngr (2) end

Now, the current code is not preventing this from happenning in some situations (vulnerable to a race condition), and therefore it should be correctly fixed. The key question to answer is: does the above situation really lead to bad things happening?
(This post was last modified: 08-29-2009 07:27 PM by kilburn.)
08-29-2009 07:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Error 500 - theprincy - 08-26-2009, 08:10 AM
RE: Error 500 - theprincy - 08-27-2009, 01:36 AM
RE: Error 500 - kilburn - 08-27-2009, 03:42 AM
RE: Error 500 - theprincy - 08-27-2009, 09:02 AM
RE: Error 500 - theprincy - 08-27-2009, 08:20 PM
RE: Error 500 - nuke3d - 08-27-2009, 08:29 PM
RE: Error 500 - theprincy - 08-27-2009, 08:43 PM
RE: Error 500 - nuke3d - 08-27-2009, 09:33 PM
RE: Error 500 - theprincy - 08-27-2009, 09:36 PM
RE: Error 500 - nuke3d - 08-27-2009, 09:45 PM
RE: Error 500 - theprincy - 08-27-2009, 09:50 PM
RE: Error 500 - nuke3d - 08-27-2009, 09:56 PM
RE: Error 500 - theprincy - 08-27-2009, 10:01 PM
RE: Error 500 - nuke3d - 08-27-2009, 10:09 PM
RE: Error 500 - theprincy - 08-28-2009, 12:19 AM
RE: Error 500 - theprincy - 08-28-2009, 04:12 PM
RE: Error 500 - gOOvER - 08-28-2009, 04:41 PM
RE: Error 500 - theprincy - 08-28-2009, 04:46 PM
RE: Error 500 - theprincy - 08-28-2009, 06:35 PM
RE: Error 500 - kilburn - 08-28-2009, 07:15 PM
RE: Error 500 - gOOvER - 08-28-2009, 07:51 PM
RE: Error 500 - theprincy - 08-28-2009, 08:00 PM
RE: Error 500 - theprincy - 08-28-2009, 07:40 PM
RE: Error 500 - theprincy - 08-29-2009, 04:52 AM
RE: Error 500 - kilburn - 08-29-2009, 02:33 PM
RE: Error 500 - theprincy - 08-29-2009, 05:47 PM
RE: Error 500 - kilburn - 08-29-2009 07:13 PM
RE: Error 500 - sci2tech - 08-29-2009, 07:34 PM
RE: Error 500 - kilburn - 08-29-2009, 07:47 PM
RE: Error 500 - sci2tech - 08-29-2009, 08:02 PM
RE: Error 500 - kilburn - 08-29-2009, 09:51 PM
RE: Error 500 - sci2tech - 08-29-2009, 11:28 PM
RE: Error 500 - kilburn - 08-30-2009, 03:28 AM
RE: Error 500 - sci2tech - 08-30-2009, 03:50 AM
RE: Error 500 - kilburn - 08-30-2009, 06:53 PM
RE: Error 500 - sci2tech - 08-30-2009, 06:56 PM

Forum Jump:


User(s) browsing this thread: 11 Guest(s)