Bug #49269 | mysqltest crashes on 'reap' if query executed after 'send' | ||
---|---|---|---|
Submitted: | 1 Dec 2009 16:30 | Modified: | 17 Jun 2010 19:28 |
Reporter: | Sven Sandberg | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Tools: MTR / mysql-test-run | Severity: | S7 (Test Cases) |
Version: | 5.1 | OS: | Any |
Assigned to: | Bjørn Munch | CPU Architecture: | Any |
[1 Dec 2009 16:30]
Sven Sandberg
[7 Dec 2009 12:09]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/93047 2866 Bjorn Munch 2009-12-07 Bug #49269 mysqltest crashes on 'reap' if query executed after 'send' Set a flag after send to trap the case
[6 Jan 2010 8:46]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/96077 2871 Bjorn Munch 2010-01-06 Bug #49269 mysqltest crashes on 'reap' if query executed after 'send' Set a flag after send to trap the case
[6 Jan 2010 11:24]
Bjørn Munch
Found a problem while running full tests: a few tests failed because they do send in one connection, then switch connection without reap. Then when the test goes back to the connection where it did send, the first SQL statement fails. The library crash apparently doesn't happen here so we should probably allow it by resetting the flag. The tests in question use send because they just need it executed (e.g. a LOCK TABLES) but aren't interested in the reply. I'm about to push this together with other approved fixes, so will commit a follow-up extra patch.
[6 Jan 2010 11:57]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/96109 2875 Bjorn Munch 2010-01-06 Bug #49269 mysqltest crashes on 'reap' if query executed after 'send' Small amendment: ignore pending reap when switching connection, add test
[6 Jan 2010 13:47]
Bjørn Munch
Pushed to 5.1-mtr, trunk-mtr, next-mr-mtr, 6.0-codebase-mtr
[6 Jan 2010 18:46]
Bjørn Munch
Nah, that didn't work, I can't allow a new stmt after send after switching connections, as the result appears to be unpredictable. Also I'm getting a strange error on Windows making it untestable, need to investigate.
[7 Jan 2010 10:24]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/96232 2876 Bjorn Munch 2010-01-07 Bug #49269 mysqltest crashes on 'reap' if query executed after 'send' Undid amendment allowing pending reap after switching connections Moved check for pending reap earlier; failed if running with ps-protocol
[7 Jan 2010 14:18]
Bjørn Munch
Looking again at the crash, I see that mysqltest has actually written: Error: Packets out of order (Found: 1, expected 6) lt-mysqltest: net.c:912: my_real_read: Assertion `0' failed. Didn't notice this at first. The source code is: --- #ifdef EXTRA_DEBUG fflush(stdout); fprintf(stderr,"Error: Packets out of order (Found: %d, expected %d)\n", (int) net->buff[net->where_b + 3], (uint) (uchar) net->pkt_nr); fflush(stderr); DBUG_ASSERT(0); #endif --- So this is an intentional crash when boult with debug, as a consequence of incorrect usage. So I consider this *not* a library bug after all and will not file a separate bug for that.
[7 Jan 2010 20:16]
Timothy Smith
Adding reap to the test cases, and requiring reap even if a connection has been switched, looks good to me.
[15 Jan 2010 10:27]
Magnus Blåudd
Probably also fixes BUG#44042 Also see BUG#20304 which actually should be fixed in the MySQL C API, but I think since the functionality to do 'mysql_read_query_result' + 'mysql_send_query' actually is kind of a hack, it could be fixed in mysqltest by using "flag" like you have done. Test cases from BUG#49761 looks good. The combined patched are hard to read, would it be possible to extract the full patch?
[15 Jan 2010 12:55]
Bjørn Munch
Pushed to 5.1-mtr, trunk-mtr, next-mr-mtr, 6.0-codebase-mtr
[20 Feb 2010 9:31]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100220092844-jh07ayojyxn8uh9p) (version source revid:bjorn.munch@sun.com-20100107122320-dwynu5qnthtduevs) (merge vers: 6.0.14-alpha) (pib:16)
[20 Feb 2010 9:33]
Bugs System
Pushed into 5.5.3-m2 (revid:alik@sun.com-20100220092622-wvhh1vfy5tjq4mhu) (version source revid:bjorn.munch@sun.com-20100107102700-h84tn8kgftqhl430) (merge vers: 5.5.1-m2) (pib:16)
[20 Feb 2010 9:36]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100220092730-paoo5t9gcajs5dq8) (version source revid:bjorn.munch@sun.com-20100107102835-5rqkaprayb062452) (pib:16)
[22 Feb 2010 20:25]
Paul DuBois
Noted in 5.5.3, 6.0.14 changelogs. mysqltest no longer lets you execute an SQL statement on a connection after doing a send command, unless you do a reap first. This was previously accepted but could produce unpredictable results. Setting report to Need Merge pending push to 5.1.x, Celosia.
[1 Mar 2010 8:44]
Bugs System
Pushed into 5.1.45 (revid:joro@sun.com-20100301083827-xnimmrjg6bh33o1o) (version source revid:azundris@mysql.com-20100222175719-viuh0f3gdsrkgv0r) (merge vers: 5.1.45) (pib:16)
[1 Mar 2010 16:36]
Paul DuBois
Noted in 5.1.45 changelog.
[17 Jun 2010 11:59]
Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:39]
Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:martin.skold@mysql.com-20100609140708-52rvuyq4q500sxkq) (merge vers: 5.1.45-ndb-6.2.19) (pib:16)
[17 Jun 2010 13:24]
Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)