classification
Title: zmq mysql core dump
Type: crash Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Rohit Gupta, eric.smith
Priority: normal Keywords:

Created on 2020-04-09 17:59 by Rohit Gupta, last changed 2020-04-10 14:06 by eric.smith. This issue is now closed.

Messages (4)
msg366083 - (view) Author: Rohit Gupta (Rohit Gupta) Date: 2020-04-09 17:59
# pyzmq==19.0.0
# zmq==0.0.0
# mysql-connector-python==8.0.19

# Following code is resulting in 
# Segmentation fault (core dumped)
##################################
import zmq
import mysql.connector

database = "dev"
host = "192.168.56.1"
port = 3306
user = "user"
pwd = "user"
print(database, host, port, user, pwd)
db  = mysql.connector.connect(host=host, port=int(port), user=user, password=pwd, database=database, autocommit=False)
cur = db.cursor()
print("Connected")
msg366084 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-04-09 18:23
This looks like a problem in zmq, pyzmq, or mysql-connector-python, not in python itself. I'd suggest asking in a mysql-connector-python specific location for starters.

You should also try to duplicate the problem without importing zmq, which doesn't seem to be used by your example.

A stack trace of the segfault might also shed more light. As it is, there's not a lot to go on here.
msg366110 - (view) Author: Rohit Gupta (Rohit Gupta) Date: 2020-04-10 06:27
For the time being, changing the order of import is solving the problem.
msg366128 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-04-10 14:06
I'm going to close this. If you can provide information on how to reproduce this and/or what you observe in the segfault dump, we will happily reopen it.

I think the best "resolution" tag is to call this "third party", but I'm not sure it matters too much.
History
Date User Action Args
2020-04-10 14:06:00eric.smithsetstatus: open -> closed
resolution: third party
messages: + msg366128

stage: resolved
2020-04-10 06:27:09Rohit Guptasetmessages: + msg366110
2020-04-09 18:23:42eric.smithsetnosy: + eric.smith
messages: + msg366084
2020-04-09 17:59:55Rohit Guptacreate