Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smc_run: bugfix for concurrent socket creation #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GuangguanWang
Copy link

The initialize process was not protected by lock, causing segmentation fault due to null pointer exception on orig_socket when creating sockets concurrently.

The initialize process was not protected by lock, causing
segmentation fault due to null pointer exception on orig_socket
when creating sockets concurrently.

Signed-off-by: Guangguan Wang <[email protected]>
@GuangguanWang
Copy link
Author

Hi, @wenjia-wezh,
This issue can be reproduced by mysql. The steps to reproduce are as follows
start mysql server:
smc_run mysqld --user=root --bind-address=0.0.0.0 &
clean up data:
smc_run sysbench /usr/share/sysbench/oltp_read_only.lua --mysql-host= --mysql-port= --mysql-user=root --mysql-password= --mysql-db=dbtest1a --db-driver=mysql --tables=8 --table-size=1000000 --report-interval=10 --threads=8 --time=120 cleanup
prepare data:
smc_run sysbench /usr/share/sysbench/oltp_read_only.lua --mysql-host= --mysql-port= --mysql-user=root --mysql-password= --mysql-db=dbtest1a --db-driver=mysql --tables=8 --table-size=1000000 --report-interval=10 --threads=8 --time=120 prepare
When running prepare data command, there is a high probability of segment fault, because of null pointer of orig_socket.
If you have any comments about this patch, please let me know.
Thanks.

@dust-li
Copy link

dust-li commented Oct 16, 2024

hi @wenjia-wezh @JanKarcher can you take a look at this, this has been hang for a long time, we see difference users complain about this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants