Online-Schema-Change core dump adding new columns (After) with Comments

Bug #1484677 reported by Dave Gregg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
New
Undecided
Unassigned

Bug Description

Constantly getting a Segmentation Fault when trying to add two new float columns AFTER a column and adding 'comments'.
I have added many new columns before - successfully. So I have no clue what's going on here?

I have managed to narrow this down to the following...
When I remove the "AFTER column" - this appears to work.... at least a dry-run does not core dump?

BUT - we need to be able to get these columns in a particular order.

My statement is as follows:
pt-online-schema-change --recursion-method=dsn=h=10.0.10.110,D=percona,t=dsns --nocheck-replication-filters --check-interval=2 --max-lag=60 --critical-load Threads_running=30 --alter "ADD GyroStupMin float DEFAULT NULL AFTER GyroStabilityTol COMMENT 'Gyro Startup time in ms defined as the time for the Gyro outputs to reach 90% of steady state values', ADD GyroStupMax float DEFAULT NULL AFTER GyroStabilityTol COMMENT 'Gyro Startup time in ms defined as the time for the Gyro outputs to reach 90% of steady state values' " h=10.0.10.110,D=ATDB,t=AccelGyroTestSpec,u=ptool,p=pswd--dry-run

Thanks ~ Dave

Revision history for this message
Dave Gregg (dgregg) wrote :
Download full text (20.4 KiB)

The table I am trying to add the columns to - looks like this...
CREATE TABLE `AccelGyroTestSpec` (
  `SpecIndex` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
  `Part_No` varchar(50) DEFAULT NULL COMMENT 'Name of Product',
  `ASIC` varchar(10) DEFAULT NULL COMMENT 'Which ASIC is in product',
  `AccelSenseElement` varchar(15) DEFAULT NULL COMMENT 'MEMS Accelerometer Sense Element',
  `GyroSenseElement` varchar(15) DEFAULT NULL COMMENT 'MEMS Gyro Sense Element',
  `SpecType` enum('engineering','production','samples') DEFAULT 'production' COMMENT 'Type of Spec',
  `Approved` enum('pending','approved','obsolete','rejected') DEFAULT NULL COMMENT 'Approval Status of Spec',
  `ApprovedBy` varchar(3) DEFAULT NULL COMMENT 'Approver of Spec',
  `CreatedBy` varchar(5) DEFAULT NULL COMMENT 'Creation Date of Spec',
  `DateApproved` date DEFAULT NULL COMMENT 'Approval Date of Spec',
  `DateObsolete` date DEFAULT NULL COMMENT 'Date Spec Obsoleted',
  `BasedOn` int(10) unsigned DEFAULT NULL COMMENT 'SpecIndex of Prior Spec',
  `Comments` varchar(200) DEFAULT NULL,
  `ReelSize` int(5) DEFAULT NULL COMMENT 'Default number of parts on a reel',
  `AuditParts` int(5) DEFAULT NULL COMMENT 'Number of Audit Parts on each Reel',
  `TpgmPath` varchar(260) DEFAULT NULL COMMENT 'SPEA Test Program Path',
  `DeviceName` varchar(150) DEFAULT NULL COMMENT 'SPEA Device Name',
  `HumidityScrn` enum('None','Initial','Verify') DEFAULT NULL,
  `TemperatureSetpts` varchar(50) DEFAULT NULL COMMENT 'Comma separated list of temperatures. First Temp is considered Room Temp. These are the temperatures for temperature compensation is performed and thermal performance is measured at',
  `PROMMask` varchar(256) DEFAULT NULL,
  `PROMImage` varchar(256) DEFAULT NULL,
  `DefaultRAMImage` varchar(256) DEFAULT NULL,
  `RegisterMask` varchar(256) DEFAULT NULL COMMENT 'Mask defining which register bits to test',
  `I2C_Address` char(7) DEFAULT NULL COMMENT 'String of seven ones and zeros representing I2C Address (MSB first). An 8th (LSB) is added when communicating with the device to signify Read (1) vs Write (0)',
  `Vdd` float DEFAULT NULL COMMENT 'Units: V',
  `VddIO` float DEFAULT NULL COMMENT 'Units: V',
  `VddRatioHigh` float DEFAULT NULL,
  `VddRatioLow` float DEFAULT NULL,
  `RegulatorTarget` float DEFAULT NULL COMMENT 'Target (V) for Regulator Trim',
  `RegulatorTol` float DEFAULT NULL COMMENT 'Tolerance (% of Target) for Regulator Trim',
  `OSCTarget` float DEFAULT NULL COMMENT 'Oscillator (OSC) Target (Hz)',
  `OSCTol` float DEFAULT NULL COMMENT 'Oscillator (OSC) Tolerance (Hz)',
  `VCOTarget` float DEFAULT NULL COMMENT 'VCO Target (Hz)',
  `VCOTol` float DEFAULT NULL COMMENT 'VCO Tolerance (Hz)',
  `WDTTarget` float DEFAULT NULL COMMENT 'WatchDogTimer (WDT) Target (Hz)',
  `WDTTol` float DEFAULT NULL COMMENT 'WatchDogTimer (WDT) Tolerance (Hz)',
  `CurrentMin` float DEFAULT NULL COMMENT 'Minimum Operating Current (mA)',
  `CurrentMax` float DEFAULT NULL COMMENT 'Maximum Operating Current (mA)',
  `AltCurrent1Min` float DEFAULT NULL COMMENT 'Max for Alternate Current 1 Measurement',
  `AltCurrent1Max` float DEFAULT NULL COMMENT 'Max for Alternate Current 1 Measurem...

Revision history for this message
Dave Gregg (dgregg) wrote :

I am attaching a dry-run with debug....

PTDEBUG=1 pt-online-schema-change --recursion-method=dsn=h=10.0.10.110,D=percona,t=dsns --nocheck-replication-filters --check-interval=2 --max-lag=60 --critical-load Threads_running=30 --alter "ADD GyroStupMin float DEFAULT NULL AFTER GyroStabilityTol COMMENT 'Gyro Startup time in ms defined as the time for the Gyro outputs to reach 90% of steady state values', ADD GyroStupMax float DEFAULT NULL AFTER GyroStabilityTol COMMENT 'Gyro Startup time in ms defined as the time for the Gyro outputs to reach 90% of steady state values';" h=10.0.10.110,D=ATDB,t=AccelGyroTestSpec,u=ptool,p=pswd --dry-run > Daves_Percona.log 2>&1

Revision history for this message
Dave Gregg (dgregg) wrote :

My SQL statement has been tested and works outside the bounds of pt-online-schema-change
so I am not sure what I have to do different to get this to work?

I have execute a number of ADD Column After Column statements.....no issues. But this one is different for some reason?

Things that might be issues that I have never done before are as follows:
1. I have never added a new column as a float before
2. Never added a column with a "Comment" before

Revision history for this message
Dave Gregg (dgregg) wrote :

The first statement I sent you lacked a ";" at the end of the sql. I was experimenting. I tried executing with and without.
You need to have the ":" statement. (Just an FYI)

Revision history for this message
Dave Gregg (dgregg) wrote :

SO - if I remove the "AFTER COLUMN NAME" as follows - it works ??? What is going on ???

pt-online-schema-change --recursion-method=dsn=h=10.0.10.110,D=percona,t=dsns --nocheck-replication-filters --check-interval=2 --max-lag=60 --critical-load Threads_running=30 --alter "ADD GyroStupMin float DEFAULT NULL comment 'Gyro Startup time in ms defined as the time for the Gyro outputs to reach 90% of steady state values', ADD GyroStupMax float DEFAULT NULL comment 'Gyro Startup time in ms defined as the time for the Gyro outputs to reach 90% of steady state values'; " h=10.0.10.110,D=ATDB,t=AccelGyroTestSpec,u=ptool,p=pswd --dry-run

Revision history for this message
Dave Gregg (dgregg) wrote :

I have it working!!! Finally!!!

Had to reverse the order of the COMMENT and the AFTER

Thanks
Dave

Revision history for this message
Frank Cizmich (frank-cizmich) wrote :

Hello Dave,

I'm glad you could sort it out.
I suggest from now on you use the attached version of pt-online-schema-change which has the nasty "segmentation fault" bug fixed.
First, you'll no longer have "segmentation fault" bug (sometimes even "out of memory")
Second, you'll get a proper error message from mysql if the "--alter" clause has a problem, and probably from any other error the tool encounters.
This version will be available in the next release which is due... soon

Revision history for this message
Frank Cizmich (frank-cizmich) wrote :
Revision history for this message
Dave Gregg (dgregg) wrote : RE: [Bug 1484677] Re: Online-Schema-Change core dump adding new columns (After) with Comments

Thanks Frank

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Frank Cizmich
Sent: Friday, August 14, 2015 2:09 PM
To: David Gregg
Subject: [Bug 1484677] Re: Online-Schema-Change core dump adding new columns (After) with Comments

Hello Dave,

I'm glad you could sort it out.
I suggest from now on you use the attached version of pt-online-schema-change which has the nasty "segmentation fault" bug fixed.
First, you'll no longer have "segmentation fault" bug (sometimes even "out of memory") Second, you'll get a proper error message from mysql if the "--alter" clause has a problem, and probably from any other error the tool encounters.
This version will be available in the next release which is due... soon

** Attachment added: "fixed version of tool"
   https://bugs.launchpad.net/percona-toolkit/+bug/1484677/+attachment/4444899/+files/pt-online-schema-change

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1484677

Title:
  Online-Schema-Change core dump adding new columns (After) with
  Comments

Status in Percona Toolkit:
  New

Bug description:
  Constantly getting a Segmentation Fault when trying to add two new float columns AFTER a column and adding 'comments'.
  I have added many new columns before - successfully. So I have no clue what's going on here?

  I have managed to narrow this down to the following...
  When I remove the "AFTER column" - this appears to work.... at least a dry-run does not core dump?

  BUT - we need to be able to get these columns in a particular order.

  My statement is as follows:
  pt-online-schema-change --recursion-method=dsn=h=10.0.10.110,D=percona,t=dsns --nocheck-replication-filters --check-interval=2 --max-lag=60 --critical-load Threads_running=30 --alter "ADD GyroStupMin float DEFAULT NULL AFTER GyroStabilityTol COMMENT 'Gyro Startup time in ms defined as the time for the Gyro outputs to reach 90% of steady state values', ADD GyroStupMax float DEFAULT NULL AFTER GyroStabilityTol COMMENT 'Gyro Startup time in ms defined as the time for the Gyro outputs to reach 90% of steady state values' " h=10.0.10.110,D=ATDB,t=AccelGyroTestSpec,u=ptool,p=pswd--dry-run

  Thanks ~ Dave

To manage notifications about this bug go to:
https://bugs.launchpad.net/percona-toolkit/+bug/1484677/+subscriptions

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.