Bug #114249 MySQL Workbench unexpectedly crashes on Apple Silicon Macs
Submitted: 6 Mar 2024 17:16 Modified: 14 Apr 2024 12:16
Reporter: KOHEI UEHARA Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0.36.CE OS:MacOS (macOS 14.3.1 (23D60))
Assigned to: MySQL Verification Team CPU Architecture:ARM (Apple M1)
Tags: Apple Silicon, crash, python

[6 Mar 2024 17:16] KOHEI UEHARA
Description:
MySQL Workbench 8.0.36.CE (build 1) unexpectedly crashes on a MacBook Pro with an Apple M1 chip running macOS 14.3.1 (23D60). The crash occurs at random times after launching the application and is consistently reproducible.

According to the attached crash report, the crash happens in the dict_dealloc(PyGRTDictObject*) function within the libgrt.dylib library at address 0x1054e084c. It is suspected to be caused by accessing an invalid memory address (0x0000000000000001). This suggests that the crash may be due to the improper deallocation of a Python dict object by the Python code inside MySQL Workbench.

The crash report indicates that the exception type is EXC_BAD_ACCESS (SIGSEGV) and the termination reason is "Namespace SIGNAL, Code 11 Segmentation fault: 11". The crashing thread is the main thread.

This crash effectively renders MySQL Workbench unusable on Apple Silicon devices as it happens frequently and makes the application unreliable for any practical use. Fixing this crash is crucial for many users who rely on MySQL Workbench for their database management tasks.

I have attached the detailed crash report generated by the macOS CrashReporter utility. Please let me know if you need any additional information to investigate and resolve this issue.

How to repeat:
1. Install MySQL Workbench 8.0.36.CE (build 1) on a Mac with an Apple Silicon (M1) processor.
2. Launch MySQL Workbench.
3. Observe that the default "Local instance 3306" connection shows "No connection established" for the Schemas.
4. Create a new MySQL connection: a. Click on the "+" button next to "MySQL Connections". b. Fill in the required details for the new connection, such as the connection name, hostname, port, username, and password. c. Click on "Test Connection" to verify the connection details. d. Click on "OK" to save the new connection.
5. Double-click on the newly created connection to connect to the MySQL server.
6. MySQL Workbench crashes unexpectedly during the connection process.
7. The crash can be confirmed by the appearance of the macOS crash reporter dialog.

Suggested fix:
No suggestion
[14 Mar 2024 12:16] MySQL Verification Team
Hello!

Thank you for the bug report.
To investigate further this issue at our end, may I kindly request you to launch workbench under debug mode (--log-level=debug3) and provide unaltered workbench log file(more details about log are explained here - https://dev.mysql.com/doc/workbench/en/workbench-reporting-bugs.html)?

Regards,
Ashwini Patil
[16 Mar 2024 3:46] Yasushi Abe
https://github.com/mysql/mysql-workbench/commit/6c77b3d975fa25a2746675a0f02c185a9a22eb55#d...

It appears that dict_dealloc is specified in tp_dealloc of grt.DictIterator.
When I cast dict_dealloc's self to PyGRTDictIteratorObject* when it crashed, it pointed to the string "setupPending".
[15 Apr 2024 1: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".