Bug #109732 Workbench crashes with SIGILL on MacOS Ventura 13.1 on doing simple SELECT
Submitted: 22 Jan 2023 18:48 Modified: 24 Feb 2023 18:01
Reporter: Orin Eman Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version: OS:MacOS (Ventura 13.1)
Assigned to: CPU Architecture:x86 (6-Core Intel Core i5, 3.3 GHz)

[22 Jan 2023 18:48] Orin Eman
Description:
Connect to MySQL server and perform a SELECT eg: "SELECT * FROM something.somethingelse;

MySQL WorkBench crashes with an illegal instruction (SIGILL).

A similar crash has been reported with V8.0.29, only with a SIGSEGV fault rather than a SIGILL, but 8.0.29 has been reported as a workaround and indeed doesn't crash for some users.

Partial report (full report in private comment):

Process:               MySQLWorkbench [40050]
Path:                  /Applications/MySQLWorkbench 2.app/Contents/MacOS/MySQLWorkbench
Identifier:            com.oracle.workbench.MySQLWorkbench
Version:               8.0.32.CE (1)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-01-22 10:34:06.5790 -0800
OS Version:            macOS 13.1 (22C65)
Report Version:        12
Bridge OS Version:     7.1 (20P2059)
Anonymous UUID:        2674AFD3-6A7A-7905-49F1-B77C6ADC2D8E

Sleep/Wake UUID:       AA1B35DB-7A9B-4E69-88AF-5FECC6687ECC

Time Awake Since Boot: 3300000 seconds
Time Since Wake:       3343309 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 4 Illegal instruction: 4
Terminating Process:   exc handler [40050]

Application Specific Backtrace 0:
0   CoreFoundation                      0x00007ff81525440b __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007ff814da0e25 objc_exception_throw + 48
2   CoreFoundation                      0x00007ff8152eb54b -[NSObject(NSObject) __retain_OA] + 0
3   CoreFoundation                      0x00007ff8151be64b ___forwarding___ + 1324
4   CoreFoundation                      0x00007ff8151be088 _CF_forwarding_prep_0 + 120
5   WBExtras                            0x000000010ff5b1a1 -[MResultsetViewer tableView:willDisplayCell:forTableColumn:row:] + 393
6   AppKit                              0x00007ff818672a9e -[NSTableView _delegateWillDisplayCell:forColumn:row:] + 104
7   AppKit                              0x00007ff8185b7973 -[NSTableView preparedCellAtColumn:row:] + 1835
8   MySQLWorkbench                      0x000000010f871a98 -[MGridView preparedCellAtColumn:row:] + 54
9   AppKit                              0x00007ff8185b713d -[NSTableView _drawContentsAtRow:column:withCellFrame:] + 42
10  AppKit                              0x00007ff8185b6dbd -[NSTableView drawRow:clipRect:] + 1638
11  AppKit                              0x00007ff8185b6438 -[NSTableView drawRowIndexes:clipRect:] + 707
12  AppKit                              0x00007ff818541fa9 -[NSTableView drawRect:] + 1670
13  AppKit                              0x00007ff8184742d4 _NSViewDrawRect + 121
14  AppKit                              0x00007ff818c59743 -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 1810
15  AppKit                              0x00007ff818473a00 -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] + 753
16  QuartzCore                          0x00007ff81cca0109 CABackingStoreUpdate_ + 254
17  QuartzCore                          0x00007ff81cd038f1 ___ZN2CA5Layer8display_Ev_block_invoke + 53
18  QuartzCore                          0x00007ff81cc9f316 -[CALayer _display] + 2275
19  AppKit                              0x00007ff818473655 -[_NSBackingLayer display] + 462
20  AppKit                              0x00007ff8183eb7ed -[_NSViewBackingLayer display] + 554
21  QuartzCore                          0x00007ff81cc9e2c8 _ZN2CA5Layer17display_if_neededEPNS_11TransactionE + 900
22  QuartzCore                          0x00007ff81ce178da _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 648
23  QuartzCore                          0x00007ff81cc7f119 _ZN2CA11Transaction6commitEv + 725
24  AppKit                              0x00007ff818484adf __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 285
25  AppKit                              0x00007ff818c9c9df ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
26  CoreFoundation                      0x00007ff8151db0b2 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
27  CoreFoundation                      0x00007ff8151dafda __CFRunLoopDoObservers + 482
28  CoreFoundation                      0x00007ff8151da560 __CFRunLoopRun + 870
29  CoreFoundation                      0x00007ff8151d9b80 CFRunLoopRunSpecific + 560
30  HIToolbox                           0x00007ff81eb1e766 RunCurrentEventLoopInMode + 292
31  HIToolbox                           0x00007ff81eb1e576 ReceiveNextEventCommon + 679
32  HIToolbox                           0x00007ff81eb1e2b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
33  AppKit                              0x00007ff818325f33 _DPSNextEvent + 909
34  AppKit                              0x00007ff818324db4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219
35  AppKit                              0x00007ff8183173f7 -[NSApplication run] + 586
36  AppKit                              0x00007ff8182eb427 NSApplicationMain + 817
37  dyld                                0x00007ff814dcd310 start + 2432

How to repeat:
Install MySQL Workbench 8.0.32 on MacOS Ventura 13.1.
Connect to server.
Attempt a SELECT.
[22 Jan 2023 18:50] Orin Eman
NB: It doesn't crash if the SELECT fails.
[24 Jan 2023 2:08] Orin Eman
The problem is here in, lines 458 on in MResultsetViewer.mm.  It is assuming aCell is an MQResultSetCell that has setIsNull and setIsBlob whereas in fact aCell is an MQIndicatorCell which has neither.  Adding dummy setIsNull and setIsBlob methods to MQIndicatorCell prevents the crash.

Whether aCell being an MQIndicatorCell is expected or not is unknown to me and needs further investigation.

  if (columnIndex >= 0)
    {
      [aCell setIsNull: (*mData)->is_field_null(rowIndex, columnIndex)];
      [aCell setIsBlob: (*mData)->get_column_type(columnIndex) == bec::GridModel::BlobType];
    }
    else
    {
      [aCell setIsNull: NO];
      [aCell setIsBlob: NO];
    }
[25 Jan 2023 13:11] MySQL Verification Team
Hello Orin Eman,

Thank you for the bug report.
Imho this is duplicate of Bug #109671, please see Bug #109671.

Regards,
Ashwini Patil
[25 Jan 2023 20:22] Orin Eman
Agreed on it being a duplicate of https://bugs.mysql.com/bug.php?id=109671

I didn't find https://bugs.mysql.com/bug.php?id=109671 when I searched for something similar.

For the record, I added my investigation to https://bugs.mysql.com/bug.php?id=109671.

This bug can be closed.
[26 Jan 2023 16:39] Liquid Monks
This bug affects me on MacOS (Ventura 13.2) - Apple M1 Max - 10 (8 performance and 2 efficiency), 32 Core GPU
[2 Feb 2023 12:56] JOHN YEARY
Error Report

Attachment: report.txt (text/plain), 36.02 KiB.

[24 Feb 2023 17:52] Adesh Katiyar
Hi

Still getting the same issue. Please advise the fix.

Thanks
[24 Feb 2023 17:59] Orin Eman
@Adesh Katiyar - try version 8.0.29 - unless you are really good with Xcode, in which case, get the Workbench code from GitHub and apply the above fix.
[24 Feb 2023 18:01] Orin Eman
@Adesh Katiyar - try version 8.0.29 - unless you are really good with Xcode, in which case, get the Workbench code from GitHub and apply the fix in bug # 109671.
[14 Apr 2023 18:18] Luis Zuniga
Just to confirm version 8.0.29 worked for me. I'm using Ventura 13.3.1 and the workbench crashed with latest version, had to downgrade.