PerfectlySoft / PerfectlySoft/Perfect-MySQL

mysql crashes on ping()

Open
#23 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
126
Forks
58
Avg merge
25m
Merged PRs (30d)
1

Description

Hello,

I have a scenario where the same client makes several api calls asynchronously. In each call, i ping the database if the existing connection continues, if not, try to reconnect etc.

In on of these ping's program crashes with the following error:

malloc: *** error for object 0x101faf630: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug

screen shot 2018-03-29 at 20 32 13

I also tried doWithLock{} for each api call to be thread safe, but it did not work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the asynchronous scenario around ping() and the reconnect path, including calls protected by doWithLock{}. Investigate the reported malloc failure and define done as repeated concurrent connection checks completing without a crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, swift
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.