https://bugzilla.wikimedia.org/show_bug.cgi?id=37225
christ...@quelltextlich.at changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christ...@quelltextlich.at --- Comment #59 from Aaron Schulz <aschulz4...@gmail.com> 2012-07-09 17:13:26 UTC --- (In reply to comment #58) > What happens when the master can't be reached (in Revision::newFromConds())? > Any chance we could get a null back instead of an exception? Normally, no unless the ignoreErrors() function was called on the DB. Running the sha1 script though, I noticed that sometimes the DB class forgets that the connection was dropped, and I get raw mysql_query warnings. I think this happens when DB errors are caught and then the DB is used further down the line. --- Comment #60 from christ...@quelltextlich.at 2012-07-09 23:51:48 UTC --- After some playing around with xmldumps-test, I am able to reliably reproduce the problem automatically: It's a race condition, that can be triggered in the following way: (1) Start with a page, whose last revision is from PersonA. (2) PersonB starts uploading a new revision of the page. (3) PersonC starts uploading a new revision of the page. (4) Request from PersonC finishes (5) Request from PersonB finishes Between (2) and (5), PersonB's connection to the master database executes the SQL sequence [...] SELECT /* User::loadGroups */ ug_group FROM `user_groups` WHERE ug_user = '1' SELECT /* Block::newLoad Root */ ipb_id,ipb_address,ipb_by,ipb_by_text,ipb_reason,ipb_timestamp,ipb_auto,ipb_anon_only,ipb_create_account,ipb_enable_autoblock,ipb_expiry,ipb_deleted,ipb_block_email,ipb_allow_usertalk,ipb_parent_block_id FROM `ipblocks` WHERE ipb_address = 'Root' SELECT /* WikiPage::pageData Root */ page_id,page_namespace,page_title,page_restrictions,page_counter,page_is_redirect,page_is_new,page_random,page_touched,page_latest,page_len FROM `page` WHERE page_namespace = '0' AND page_title = 'PageZ' LIMIT 1 FOR UPDATE [...] If PersonC's request is dealt /between/ this given first and third SELECT, both revisions (PersonB's and PersonC's) end up in the database: The oldest version is PersonA's, followed by PersonC's, and finally PersonB's. In the "Recent Changes", the PersonB's revision lists its full size as +value. No database error, connection loss, network problem, etc need to occur. Yes, it's only a rough description. But as I will not find time to investigate the issue further in the next few days, I hope this description and SQL sequence nevertheless helps others to quickly reproduce the race condition as well and hunt it down. As the setup is tedious, I attached some log files. ;-) -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l