[MDEV-4897] Assertion `share->tdc.prev == 0 && share->tdc.next == 0' failed in TABLE_SHARE* tdc_acquire_share(THD*, const char*, const char*, const char*, uint, uint, TABLE**) Created: 2013-08-14 Updated: 2013-08-22 Resolved: 2013-08-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.4 |
| Fix Version/s: | 10.0.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
(All threads stack trace is attached as 'threads1') Coredump doesn't seem to be very helpful:
bzr version-info
RQG grammar (mdev4897.yy)
gentest command line (assuming the server is running on port 3306, all default options suffice):
runall command line (starts the server on port 19300 and runs the same test):
It takes a few minutes to hit the failure on my machine. |
| Comments |
| Comment by Sergey Vojtovich [ 2013-08-14 ] |
|
The most obvious way to reproduce it should be as following: 1. create a table (e.g. create table t1(a int)) There is probably easier way to evict t2 from the table cache, but it needs more code analysis. This assertion is not fully correct: when multiple threads acquire the same previously unused share, only one thread shall remove share from unused list. Other threads will ignore this step and may continue even if that thread didn't yet remove the share from unused list. |
| Comment by Sergey Vojtovich [ 2013-08-14 ] |
|
Ehm, 5. if we're still not crashed goto 3 ...to evict t1 from the table cache... sorry for confusion. |
| Comment by Elena Stepanova [ 2013-08-14 ] |
|
Thanks for the analysis, based on that I was able to create a stress test which reproduces the problem reliably on my machine, I added details to the problem description. You can try it out on yours, or I can try your fix on mine, or I can create a test setup on perro. |
| Comment by Sergey Vojtovich [ 2013-08-15 ] |
|
Hi Elena, just remove this assertion and test again. There is even simpler test case, which I didn't think about yesterday: |
| Comment by Sergey Vojtovich [ 2013-08-15 ] |
|
Fixed in 10.0.4. http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/3801 |
| Comment by Elena Stepanova [ 2013-08-16 ] |
|
Removing the assertion worked all right so far. I'm running more tests on the new revision. |