Bug #11489 Crashes in restore while parsing a backup file
Submitted: 21 Jun 2005 19:32 Modified: 25 Jul 2005 15:45
Reporter: Ray Durant Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Administrator Severity:S1 (Critical)
Version:1.0.22 OS:Mac OS X (OS X 10.4.1)
Assigned to: CPU Architecture:Any

[21 Jun 2005 19:32] Ray Durant
Description:
Date/Time:      2005-06-21 14:17:14.716 -0500
OS Version:     10.4.1 (Build 8B15)
Report Version: 3

Command: MySQL Administrator
Path:    /Applications/MySQL Administrator.app/Contents/MacOS/MySQL Administrator
Parent:  WindowServer [67]

Version: ??? (1.0.22)

PID:    451
Thread: 2

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x0433e000

Thread 0:
0   libSystem.B.dylib              	0x9000a778 mach_msg_trap + 8
1   libSystem.B.dylib              	0x9000a6bc mach_msg + 60
2   com.apple.CoreFoundation       	0x9074a4d8 __CFRunLoopRun + 832
3   com.apple.CoreFoundation       	0x90749ddc CFRunLoopRunSpecific + 268
4   com.apple.HIToolbox            	0x93122ca0 RunCurrentEventLoopInMode + 264
5   com.apple.HIToolbox            	0x93122334 ReceiveNextEventCommon + 380
6   com.apple.HIToolbox            	0x931221a0 BlockUntilNextEventMatchingListInMode + 96
7   com.apple.AppKit               	0x9362b1a4 _DPSNextEvent + 384
8   com.apple.AppKit               	0x9362ae68 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 116
9   com.apple.AppKit               	0x936273cc -[NSApplication run] + 472
10  com.apple.AppKit               	0x93717c1c NSApplicationMain + 452
11  com.mysql.Administrator        	0x00005910 _start + 392 (crt.c:267)
12  com.mysql.Administrator        	0x00005784 start + 48

Thread 1:
0   libSystem.B.dylib              	0x9002ca98 semaphore_wait_signal_trap + 8
1   libSystem.B.dylib              	0x9003127c pthread_cond_wait + 508
2   com.apple.Foundation           	0x92883420 -[NSConditionLock lockWhenCondition:] + 68
3   com.apple.AppKit               	0x936c7b58 -[NSUIHeartBeat _heartBeatThread:] + 324
4   com.apple.Foundation           	0x9287c2b4 forkThreadForFunction + 108
5   libSystem.B.dylib              	0x9002c3d4 _pthread_body + 96

Thread 2 Crashed:
0   com.mysql.MySQLToolsCommon     	0x1004f5b0 g_utf8_get_char + 0
1   com.mysql.MySQLToolsCommon     	0x100834a8 myx_read_char_from_intl_file + 68
2   com.mysql.MySQLToolsCommon     	0x1006edb8 myx_get_next_sql_statement + 180
3   com.mysql.MySQLToolsCommon     	0x1006f204 myx_get_next_sql_statement_file + 84
4   com.mysql.Administrator        	0x0002aec8 myx_get_backup_content_from_sql_file_incremental + 320 (myx_backup.c:1192)
5   com.mysql.Administrator        	0x0002b6bc myx_get_backup_content + 188 (myx_backup.c:1081)
6   com.mysql.Administrator        	0x0001059c loadBackupFile + 56 (crt.c:300)
7   com.mysql.MySQLToolsCommon     	0x100081d8 -[CallbackRequest execute:] + 156
8   com.mysql.MySQLToolsCommon     	0x10008390 -[MMySQLDispatcher(Private) executeRequest:] + 64
9   com.mysql.MySQLToolsCommon     	0x1000866c processRequests + 76
10  libSystem.B.dylib              	0x9002c3d4 _pthread_body + 96

Thread 3:
0   libSystem.B.dylib              	0x9002f68c kevent + 12
1   com.apple.DesktopServices      	0x9278bad8 TFSNotificationTask::FSNotificationTaskProc(void*) + 56
2   ...ple.CoreServices.CarbonCore 	0x90b387d0 PrivateMPEntryPoint + 76
3   libSystem.B.dylib              	0x9002c3d4 _pthread_body + 96

Thread 4:
0   libSystem.B.dylib              	0x9002ca98 semaphore_wait_signal_trap + 8
1   libSystem.B.dylib              	0x9003127c pthread_cond_wait + 508
2   ...ple.CoreServices.CarbonCore 	0x90b389c0 MPWaitOnQueue + 224
3   com.apple.DesktopServices      	0x9278c330 TNodeSyncTask::SyncTaskProc(void*) + 108
4   ...ple.CoreServices.CarbonCore 	0x90b387d0 PrivateMPEntryPoint + 76
5   libSystem.B.dylib              	0x9002c3d4 _pthread_body + 96

Thread 2 crashed with PPC Thread State:
  srr0: 0x1004f5b0 srr1: 0x0000d030                vrsave: 0x00000000
    cr: 0x22000424  xer: 0x00000004   lr: 0x100834a8  ctr: 0x10083464
    r0: 0x1008348c   r1: 0xf0182990   r2: 0x00002705   r3: 0x0433e000
    r4: 0x003eaf28   r5: 0x003eaf28   r6: 0x00000021   r7: 0xf0182a4c
    r8: 0xf01829e8   r9: 0x0433e000  r10: 0x04e2d9ff  r11: 0x101c8218
   r12: 0x10083464  r13: 0x00000000  r14: 0x00000000  r15: 0x0185fc00
   r16: 0x00000000  r17: 0x00000000  r18: 0x00000000  r19: 0x00000000
   r20: 0xf0182b5c  r21: 0x10083464  r22: 0xf0182b58  r23: 0x003eaf28
   r24: 0x00000001  r25: 0x003eaf28  r26: 0x00000006  r27: 0x003806c8
   r28: 0x009fb400  r29: 0xf0182a48  r30: 0x0185fc00  r31: 0x1008346c

Binary Images Description:
    0x1000 -    0x49fff com.mysql.Administrator ??? (1.0.22)	/Applications/MySQL Administrator.app/Contents/MacOS/MySQL Administrator
0x10000000 - 0x100cffff com.mysql.MySQLToolsCommon ??? (1.0)	/Applications/MySQL Administrator.app/Contents/Frameworks/MySQLToolsCommon.framework/Versions/1.0.0/MySQLToolsCommon
0x8fe00000 - 0x8fe50fff dyld 43	/usr/lib/dyld
0x90000000 - 0x901a6fff libSystem.B.dylib 	/usr/lib/libSystem.B.dylib
0x901fe000 - 0x90202fff libmathCommon.A.dylib 	/usr/lib/system/libmathCommon.A.dylib
0x90204000 - 0x90257fff com.apple.CoreText 1.0.0 (???)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
0x90284000 - 0x90335fff ATS 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x90364000 - 0x9069cfff com.apple.CoreGraphics 1.256.5 (???)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x90727000 - 0x90800fff com.apple.CoreFoundation 6.4.1 (368.1)	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x90849000 - 0x90849fff com.apple.CoreServices 10.4 (???)	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x9084b000 - 0x9094dfff libicucore.A.dylib 	/usr/lib/libicucore.A.dylib
0x909a7000 - 0x90a2bfff libobjc.A.dylib 	/usr/lib/libobjc.A.dylib
0x90a55000 - 0x90ac9fff com.apple.framework.IOKit 1.4 (???)	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x90ae3000 - 0x90af5fff libauto.dylib 	/usr/lib/libauto.dylib
0x90afc000 - 0x90dc1fff com.apple.CoreServices.CarbonCore 10.4 (611.1)	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x90e24000 - 0x90ea4fff com.apple.CoreServices.OSServices 4.0 (4.0.0)	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x90eee000 - 0x90f2efff com.apple.CFNetwork 4.0 (80)	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x90f43000 - 0x90f5bfff com.apple.WebServices 1.1.2 (1.1.0)	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore
0x90f6b000 - 0x90fe9fff com.apple.SearchKit 1.0.3	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x9102e000 - 0x91055fff com.apple.Metadata 0.1 (121)	/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x91066000 - 0x91073fff libz.1.dylib 	/usr/lib/libz.1.dylib
0x91076000 - 0x91238fff com.apple.security 4.0 (221)	/System/Library/Frameworks/Security.framework/Versions/A/Security
0x9133a000 - 0x91343fff com.apple.DiskArbitration 2.1	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x9134a000 - 0x91371fff com.apple.SystemConfiguration 1.8.0	/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x91384000 - 0x9138cfff libbsm.dylib 	/usr/lib/libbsm.dylib
0x91390000 - 0x9140efff com.apple.audio.CoreAudio 3.0.0 (3.0)	/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x9144c000 - 0x9144cfff com.apple.ApplicationServices 10.4 (???)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x9144e000 - 0x91486fff com.apple.AE 1.5 (297)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x914a1000 - 0x9156cfff com.apple.ColorSync 4.4	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x915c1000 - 0x91654fff com.apple.print.framework.PrintCore 4.0 (172)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x9169a000 - 0x91757fff com.apple.QD 3.8.5 (???)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x91795000 - 0x917f3fff com.apple.HIServices 1.5.0 (???)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x91821000 - 0x91844fff com.apple.LangAnalysis 1.6	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x91858000 - 0x9187dfff com.apple.FindByContent 1.5	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent
0x91890000 - 0x918d0fff com.apple.LaunchServices 10.4.2 (156)	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x918eb000 - 0x918fffff com.apple.speech.synthesis.framework 3.3	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x9190d000 - 0x91943fff com.apple.ImageIO.framework 1.0	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x91957000 - 0x91a19fff libcrypto.0.9.7.dylib 	/usr/lib/libcrypto.0.9.7.dylib
0x91a65000 - 0x91a7afff libcups.2.dylib 	/usr/lib/libcups.2.dylib
0x91a7f000 - 0x91a9bfff libJPEG.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x91aa0000 - 0x91b0ffff libJP2.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
0x91b26000 - 0x91b2afff libGIF.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x91b2c000 - 0x91b44fff libRaw.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib
0x91b47000 - 0x91b8afff libTIFF.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x91b91000 - 0x91baafff libPng.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x91baf000 - 0x91bb2fff libRadiance.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x91bb4000 - 0x91bb4fff com.apple.Accelerate 1.1.1 (Accelerate 1.1.1)	/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x91bb6000 - 0x91ca0fff com.apple.vImage 2.0	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x91ca8000 - 0x91cc7fff com.apple.Accelerate.vecLib 3.1.1 (vecLib 3.1.1)	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x91d33000 - 0x91d53fff libmx.A.dylib 	/usr/lib/libmx.A.dylib
0x91d59000 - 0x91dbefff libvMisc.dylib 	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x91dc8000 - 0x91e5afff libvDSP.dylib 	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x91e74000 - 0x92404fff libBLAS.dylib 	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x9244c000 - 0x9275cfff libLAPACK.dylib 	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x92789000 - 0x92814fff com.apple.DesktopServices 1.3	/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x92856000 - 0x92a7ffff com.apple.Foundation 6.4 (567)	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x92b9d000 - 0x92c7bfff libxml2.2.dylib 	/usr/lib/libxml2.2.dylib
0x92c9b000 - 0x92d89fff libiconv.2.dylib 	/usr/lib/libiconv.2.dylib
0x92d9b000 - 0x92db9fff libGL.dylib 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x92dc4000 - 0x92e1efff libGLU.dylib 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x92e6a000 - 0x92e7afff com.apple.speech.recognition.framework 3.4	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x930d5000 - 0x930f2fff com.apple.audio.SoundManager 3.9	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
0x9311a000 - 0x9342afff com.apple.HIToolbox 1.4.1 (???)	/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x93575000 - 0x93581fff com.apple.opengl 1.4.0	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x93614000 - 0x9361cfff libgcc_s.1.dylib 	/usr/lib/libgcc_s.1.dylib
0x93621000 - 0x93621fff com.apple.Cocoa 6.4 (???)	/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x93623000 - 0x93c54fff com.apple.AppKit 6.4.1 (824.1)	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x93fe0000 - 0x9404afff com.apple.CoreData 1.0 (46)	/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x94082000 - 0x9414cfff com.apple.audio.toolbox.AudioToolbox 1.4	/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x941a0000 - 0x941a0fff com.apple.audio.units.AudioUnit 1.4	/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x941a2000 - 0x94301fff com.apple.QuartzCore 1.4.1	/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x94349000 - 0x94386fff libsqlite3.0.dylib 	/usr/lib/libsqlite3.0.dylib
0x9438e000 - 0x943d9fff libGLImage.dylib 	/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x94579000 - 0x94588fff libCGATS.A.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib
0x94590000 - 0x9459cfff libCSync.A.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x945e1000 - 0x945f5fff libRIP.A.dylib 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x95491000 - 0x95514fff libstdc++.6.dylib 	/usr/lib/libstdc++.6.dylib

Model: PowerBook5,6, BootROM 4.9.1f1, 1 processors, PowerPC G4  (1.2), 1.5 GHz, 512 MB
Graphics: ATI Mobility Radeon 9700, ATY,RV360M11, AGP, 64 MB
Memory Module: SODIMM0/J25LOWER, 512 MB, DDR SDRAM, PC2700U-25330
AirPort: AirPort Extreme, 3.5f1 (3.50.37.p6)
Modem: Jump, , V.92, Version 1.0, 
Bluetooth: Version 1.6.0f2, 2 service, 0 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
PCI Card: TXN,PCIXXXX-00, cardbus, PC Card
Parallel ATA Device: MATSHITADVD-R   UJ-845E, 
Parallel ATA Device: FUJITSU MHT2080AH, 74.53 GB
USB Device: Bluetooth HCI, , Up to 12 Mb/sec, 500 mA
USB Device: Apple Internal Keyboard/Trackpad, Apple Computer, Up to 12 Mb/sec, 500 mA

How to repeat:
Create a back up using MSA, then restore it using MSA.  Backup options selected - Lock all tables.  I'm connecting to the localhost, using server version 4.1.12, client 5.0.4.

Funny thing is that the restores work on from backups created on an older version of MSA for windows.  (Sorry I forgot to get the version number)  But I recently upgraded MSA for Windows version 1.0.21 and the backups created from it can't be restored on the OSX version of MSA.

Suggested fix:
Unknown
[23 Jun 2005 7:55] Victoria Reznichenko
Hello,

Thank you for the report, but I wasn't able reproduce it.
I tried:
- create backup file on Mac OS and restore it on Mac OS
- create backup file on Windows and restore it on Mac OS

Can you please upload backup file and say if you check any of the following options in MySQL Administrator during restore:
- Ignore SQL errors
- Create schemas if necessary
[23 Jun 2005 18:01] Ray Durant
I did a little trouble shooting and tired backing up and restoring individual tables.
It took me quite a while to figure all of this out, but I finally figured out that it was one particular table would crash whlie analysing.  

Also I've found that two other of my tables, would parse properly but when you actually restore them the OK dialog letting you know that the restore was properly complete would not show.  I also realized that it was restoring those partially.

These tables were originally created from an import if a DB2 database.  After looking at the tables directly I've found strange characters, they looked like squares, and paragraph marks.  Since they were not needed, I did a little search and destroy.  The restores work fine now.

I'm attaching the file that would crash the restore tool. (quote_itemcomments.sql)

On a side note...
At first it thought it was just a problem with MSA for OS X,  but the same problem now shows up in the current windows version.

I was using 1.0.1a for Windows.  The backup's that were made from with this version would restore properly with the 1.0.22 version for OS X.  When I upgraded the windows version now those backups would fail.
[23 Jun 2005 18:11] Ray Durant
I can't upload the file it is greater than 200k.  It is 796k zipped.
[25 Jun 2005 15:45] Jorge del Conde
Hi,

I was unable to reproduce this bug.

Can you please send me an email with the attached file ?

my email address is jorge@mysql.com

Thanks !!
[25 Jul 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".