GNU bug report logs - #69064
python-mysqlclient: MySQLdb.string_literal SIGSEGV

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Marco Rimoldi <rimarko@HIDDEN>; dated Mon, 12 Feb 2024 00:09:02 UTC; Maintainer for guix is bug-guix@HIDDEN.
Added indication that bug 69064 blocks69122 Request was from Marco Rimoldi <rimarko@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 69064 <at> debbugs.gnu.org:


Received: (at 69064) by debbugs.gnu.org; 12 Feb 2024 14:40:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 12 09:40:20 2024
Received: from localhost ([127.0.0.1]:60352 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rZXTm-0004jI-RK
	for submit <at> debbugs.gnu.org; Mon, 12 Feb 2024 09:40:20 -0500
Received: from smtp-32.italiaonline.it ([213.209.10.32]:53972 helo=libero.it)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rimarko@HIDDEN>) id 1rZX9r-0000db-7U
 for 69064 <at> debbugs.gnu.org; Mon, 12 Feb 2024 09:19:45 -0500
Received: from localhost ([93.38.119.137]) by smtp-32.iol.local with ESMTPA
 id ZX9Tr9R0mQSiOZX9Tr8ds4; Mon, 12 Feb 2024 15:19:19 +0100
x-libjamoibt: 1601
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021;
 t=1707747559; bh=s5zh+fFLsk2HNqUVHHILNIeUJXBvf832CR9nWGMka4g=;
 h=From;
 b=Dywe4c1ekT/qz5E2pZAdHv3pJCBgDaV8pUdQlw1rYU2bspkb2sNggGUYc5F2YMJiF
 rtTyDzkC+SRW21Q5nI0777ee6kPYhpTQos2ZgZzqK/QmsS39OYsCRG7Gl28MUZnSn4
 rK35StPHDBGSAesYx5rlcLdFir8zB95Z+fFQcsb2L/EtoDhovr5N0l/LfMlntzrgqC
 Up0+VYWCXXIhQ53B4OEnilzZYvYnSmQKeqsaKfduUEm4ct7S9+uguGuil1V7ArYVdO
 EbwqHoTAtYfR4fTag2iqz03PGaizC7aAZIqfGd0X4H7wv3f+bUXvr22dyoyN4ApR6y
 Jvja78nlYNeww==
X-CNFS-Analysis: v=2.4 cv=M6buKDws c=1 sm=1 tr=0 ts=65ca28e7 cx=a_exe
 a=zr5aN+YwjWvrDHBFAPbA8Q==:117 a=zr5aN+YwjWvrDHBFAPbA8Q==:17
 a=kj9zAlcOel0A:10 a=BQMRhwaQAMqB1m1hSUQA:9 a=CjuIK1q_8ugA:10
Date: Mon, 12 Feb 2024 15:19:18 +0100
From: Marco Rimoldi <rimarko@HIDDEN>
To: 69064 <at> debbugs.gnu.org
Subject: Re: bug#69064: python-mysqlclient: MySQLdb.string_literal SIGSEGV
Message-ID: <20240212151918.42a38476@HIDDEN>
In-Reply-To: <handler.69064.B.170769653911763.ack <at> debbugs.gnu.org>
References: <20240212010816.6e4b4711@HIDDEN>
 <handler.69064.B.170769653911763.ack <at> debbugs.gnu.org>
X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfPhNhZVEscOgcPZwvQObKX+8azemLSGpmsK78nTNHZEzMaUei+gtzp644tpkJAzTJzR5MeTbInc3R605yAWtbqhzHDINda2hncW9c9oDj3f539XNBEAU
 Qz7tNGzAn+DawLgQArjeiCIqyaD1pz+UIdL4m4/7sSCDYyc6cdoVJHP4TKvNbmy5ejGHQK8Pv5wkLQ==
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 69064
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I've set up to test this bug with a more recent version of mariadb, but I must be missing something important about the Guix workflow here. Maybe that could explain the bug as an error on my part, as well. I'd really appreciate your help, because I'm at a loss here.

The steps I've taken so far:

I populated a manifest.scm file along these lines:

(define-public mariadb-test
  (package
    (name "mariadb-test")
    (version "10.11.7")
    [...]
    (build-system cmake-build-system)
    (outputs '("out" "lib" "dev"))
    (arguments
     `(#:tests? #f   ;; tests disabled but passing for the most part
    [...]

(define-public python-mysqlclient-test
  (package
    (name "python-mysqlclient")
    (version "2.2.4")
    [...]
    (build-system pyproject-build-system)
    (arguments '(#:tests? #f))          ;XXX: requires a live database
    (inputs (list pkg-config 
                  `(,mariadb-test "dev")
		  `(,mariadb-test "lib")
                  zlib))
    (propagated-inputs (list `(,mariadb-test "lib")))
    [...]

(define transform
  (options->transformation
   '((with-debug-info . "mariadb-test"))))

(packages->manifest (list gdb
			  python-pdbpp
			  python-3
			  (transform python-mysqlclient-test)
			  (transform mariadb-test)))

I then launched a guix shell and ran the debugger:

guix shell --manifest=manifest.scm
gdb --args "python3 test.py"
(gdb) run
Starting program: /gnu/store/hm1kl7zi0r2nbg1zgh8ywwm0h35h6zfx-profile/bin/python3 test.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff75b5f23 in ?? () from /gnu/store/z0c58i28g97z85w986i841l4crbpf8zk-mariadb-10.10.2-lib/lib/libmariadb.so.3

The part that I cannot understand is why the segfault always happens in mariadb-10.10.2-lib, ie. a different package compared to what I declared in the manifest file. This happens after running "guix gc", as well.

Marco




Information forwarded to bug-guix@HIDDEN:
bug#69064; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Feb 2024 00:08:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 11 19:08:59 2024
Received: from localhost ([127.0.0.1]:33247 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rZJsZ-00033f-9t
	for submit <at> debbugs.gnu.org; Sun, 11 Feb 2024 19:08:59 -0500
Received: from lists.gnu.org ([2001:470:142::17]:45280)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rimarko@HIDDEN>) id 1rZJsW-00033C-Ks
 for submit <at> debbugs.gnu.org; Sun, 11 Feb 2024 19:08:57 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rimarko@HIDDEN>) id 1rZJs8-0006ps-K2
 for bug-guix@HIDDEN; Sun, 11 Feb 2024 19:08:32 -0500
Received: from smtp-32.italiaonline.it ([213.209.10.32] helo=libero.it)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rimarko@HIDDEN>) id 1rZJry-00025r-AB
 for bug-guix@HIDDEN; Sun, 11 Feb 2024 19:08:32 -0500
Received: from localhost ([93.38.119.137]) by smtp-32.iol.local with ESMTPA
 id ZJrsrzkMLQSiOZJrtr4mHI; Mon, 12 Feb 2024 01:08:17 +0100
x-libjamoibt: 1601
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021;
 t=1707696497; bh=NmWx8yQ61dNV0XnLMt7JBoOspwtl2leGjlRiuhBV9UI=;
 h=From;
 b=Ls3L9oLz0e4/X1Fx5uTbyBzER7MttmfnSJvO6mvrRTaKvBOLucoug12n8Yp4ZzAii
 u5RsFm+omQgG95aYrVMkigaBFysfWNA8zitMP+YAzygztP0RJnOhCkKHhu28d+5eHj
 ssDPltz4m078D+ZryfynzU2kEsLJiccxsbXTvlYaZAKTcEBmQHrF73GO3wshtarBCE
 s8jBCSE8Bn2XgUgBxWpSJ3yuo4JYDBuDLWbNghxFodwJcHfUtrrC7h36CiXSf01dc1
 t8r8jBMBlS8SKP46VQkyWhL15mwIaV9OxDELFoR19dOU2QwpJtYtfkeY803KGN8j01
 Mx2GbWT0CbLzw==
X-CNFS-Analysis: v=2.4 cv=M6buKDws c=1 sm=1 tr=0 ts=65c96171 cx=a_exe
 a=zr5aN+YwjWvrDHBFAPbA8Q==:117 a=zr5aN+YwjWvrDHBFAPbA8Q==:17
 a=kj9zAlcOel0A:10 a=DpKllTfuhuHQXJe5dogA:9 a=CjuIK1q_8ugA:10
Date: Mon, 12 Feb 2024 01:08:16 +0100
From: Marco Rimoldi <rimarko@HIDDEN>
To: bug-guix@HIDDEN
Subject: python-mysqlclient: MySQLdb.string_literal SIGSEGV
Message-ID: <20240212010816.6e4b4711@HIDDEN>
X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfF3QGkqllwVKSYECPLi2uDV/02aD4xnA1llWNJm2SiNizKoBy5kfknoNX6niSydlC8cYViIri0mRS9yksuO+kfO8PqlgqebLhJIBFjWH5zvdbAAax0xy
 4pXu4sEALo9zb8Nr159SXMvaCvhdFnHntprg4S4+BrP3nuuTnoH9em85jR4N7wxEZsrFNPmp9wvXRw==
Received-SPF: pass client-ip=213.209.10.32; envelope-from=rimarko@HIDDEN;
 helo=libero.it
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hello,
 I think I found a bug in python-mysqlclient@HIDDEN compiled
 with mariadb:dev@HIDDEN To reproduce: run a Python 3.10.7 terminal, import
 the MySQLdb module,
 call the string_literal function with any argument. Interpreter
 crashes due to segmentation fault. Arch is x86_64. 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rimarko[at]libero.it)
 0.9 SPF_FAIL               SPF: sender does not match SPF record (fail)
 [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;
 id=rimarko%40libero.it; ip=2001%3A470%3A142%3A%3A17; r=debbugs.gnu.org]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 2.0 SPOOFED_FREEMAIL       No description available.
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

Hello,

I think I found a bug in python-mysqlclient@HIDDEN compiled with mariadb:dev@HIDDEN

To reproduce: run a Python 3.10.7 terminal, import the MySQLdb module, call the  string_literal function with any argument. Interpreter crashes due to segmentation fault. Arch is x86_64.

Same with version 2.2.4, tested tweaking the package definition.

I tried installing mariadb with debug symbols, but I was not able to make mysqlclient link against that variant (either using transformations in a manifest file or --with-debug-info=mariadb). Suggestions are welcome.

The bug affects the openmolar package.

Marco




Acknowledgement sent to Marco Rimoldi <rimarko@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#69064; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 21 Mar 2024 15:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.