Bug 951588 fix needs revert and re-fixing

Bug #1222709 reported by Laurynas Biveinis
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Invalid
High
Laurynas Biveinis
5.1
Invalid
High
Laurynas Biveinis
5.5
Invalid
High
Laurynas Biveinis
5.6
Invalid
High
Laurynas Biveinis

Bug Description

Bug 951588 was about the fact that calling handler ::info from another thread is inherently unsafe because it overwrites the handler state, causing troubles for the handler-owning thread. The fix was to clone handler first, and then run ::info on the cloned handler.

This fix is very fragile: see bug 1113388, bug 1193264, bug 1193308, bug 1206486, bug 1205200, bug 1204859, bug 1206020, and probably others. handler::clone() was not designed for such use.

A better is fix is needed. One option would be to implement new small info-like method for handler that returns the already-available information from the handler without doing a full clone nor info.

Related branches

tags: added: i-s-temp-tables qablock
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

It appears that
- Calling info() is safe on a non-cloned handler belonging to this connection. Thus I_S.TEMPORARY_TABLES queries may simply do it.
- Calling neither info() nor clone() is safe on handlers belonging to other connections. Thus for I_S.GLOBAL_TEMPORARY_TABLES the best we can do is to read the existing stats, whatever they happen to be, without calling any method first.

Revision history for this message
Roel Van de Paar (roel11) wrote :

Please also check i37704 to see if it is likely the same problem (if so please sent a note from within that issue).

Revision history for this message
Roel Van de Paar (roel11) wrote :

Bug 1260151 & bug 1260154 were marked duplicate of this one also.

Laurynas, can we push this forward? We keep running into these sort of issues and it makes run analysis hard.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

i37704 analyzed, it is a different problem.

The current issue is close to the top of my TODO.

Revision history for this message
Roel Van de Paar (roel11) wrote :

Bug 1367922 - regression?

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Not a regression because it is not fixed in the first place yet.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Un-duplicated the individual I_S.GLOBAL_TEMPORARY_TABLES bugs, and will fix the analysed ones without moving away from the use of handler::clone. That should allow GLOBAL_TEMPORARY_TABLES to become subject to QA again, and then the remaining i-s-temp-tables bugs can be fixed as they are analyzed or as the testcases are produced by QA.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-719

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.