pt-online-schema-change doesn't clean up triggers when receiving SIGINT

Bug #1077218 reported by rcoli on 2012-11-09
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to

Bug Description

repro steps :

1) start ALTER with pt-osc
2) hit ctrl-c to abort, possibly because the trigger is exhausting thread_stack
3) notice that while the signal is handled ("Exiting on SIGINT."), the code which either removes the triggers or notifies the user that the triggers have not been dropped (with the SQL to drop them) does not run
4) be confused as to why your thread_stack is still exhausted, until you manually drop the triggers

While I understand part of the point of not deleting the triggers is the resume feature, if I ctrl-c out of pt-osc, I personally would prefer the triggers be deleted. At very least, I'd like the code which would warn me that they have not been deleted to run. :)

tags: added: pt-online-schema-change triggers
Changed in percona-toolkit:
status: New → Confirmed
Brian Fraser (fraserbn) on 2012-12-06
Changed in percona-toolkit:
assignee: nobody → Brian Fraser (fraserbn)
Brian Fraser (fraserbn) wrote :


I can't reproduce this; Hitting Ctrl + C seems to always trigger the message that the triggers & new table won't be dropped. Have you tried with the newest version of the toolkit? If so, could you send the output of running the tool with PTDEBUG?

Changed in percona-toolkit:
status: Confirmed → Incomplete
rcoli (rcoli) wrote :

I'm using 2.1.4, will try with 2.1.7 ASAP.

rcoli (rcoli) wrote :

Tried with 2.1.9, ctrl-c resulted in no messages and neither the triggers nor the table being dropped. Had to manually clean them up.

Potentially relevant information :

Ubuntu 10.04 (Lucid Lynx)
This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi

Changed in percona-toolkit:
assignee: Brian Fraser (fraserbn) → nobody
status: Incomplete → Triaged
Changed in percona-toolkit:
milestone: none → 2.2.6
importance: Undecided → Medium
Changed in percona-toolkit:
importance: Medium → Undecided
milestone: 2.2.6 → none
Rares Mirica (mrares) wrote :

Would be very happy to have a flag instructing osc to drop the triggers and new table if ctrl+c is pressed, so that no extra manual work is needed.

rcoli (rcoli) wrote :

@Rares Mirica :

Are you saying that you can reproduce the behavior I have, where ctrl-c does not clean up? If so, what versions of pt-osc and perl are you using?

Rares Mirica (mrares) wrote :


I believe the standard behaviour is to display a message with the necessary SQL that needs to run for the cleanup (DROP TRIGGERS, DROP DATABASE). I see potential for improvement (removal of necessary manual intervention) by providing a flag to trigger dropping triggers and databases upon ctrl+c.

But I do see the message, so it works as advertised....

Percona now uses JIRA for bug reports so this bug report is migrated to:

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

Other bug subscribers