From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 17 10:42:37 2022 Received: (at 53296) by debbugs.gnu.org; 17 Jan 2022 15:42:37 +0000 Received: from localhost ([127.0.0.1]:47646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9U9U-0001DS-Pr for submit@debbugs.gnu.org; Mon, 17 Jan 2022 10:42:37 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:46788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9U9P-0001DA-BJ for 53296@debbugs.gnu.org; Mon, 17 Jan 2022 10:42:35 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id C9DD11D2; Mon, 17 Jan 2022 16:42:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NDziGGNoqjlo; Mon, 17 Jan 2022 16:42:24 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A5328197; Mon, 17 Jan 2022 16:42:23 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: elaexuotee@wilsonb.com Subject: Re: bug#53296: Intermittent segfaults when parsing (?) custom package from repo. References: <3E4C9P1M7LAZ4.3OM9BXEOU8OKP@wilsonb.com> Date: Mon, 17 Jan 2022 16:42:23 +0100 In-Reply-To: <3E4C9P1M7LAZ4.3OM9BXEOU8OKP@wilsonb.com> (elaexuotee@wilsonb.com's message of "Sun, 16 Jan 2022 15:12:08 +0900") Message-ID: <87pmoqmkrk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: C9DD11D2 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53296 Cc: 53296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, elaexuotee@wilsonb.com skribis: > Recently working on a package, I have been encounting intermittent segfau= lt > during a build. > > The segfault seems to only occur when I have some error in my code that c= auses > a crash, and the segfaults tend to cluster, appearing unexpectedly for a = few > build attempts, and then disappearing right as I think they are reproduci= ble > and try to grab an strace or something. Unfortunately, that's about the e= xtent > of information I have been able to gleen. > > The latest segfault happened with the attached package definition. Note, = the > offending code is at line 77, where I forgot to remove a docstring from a > variable that used to be a procedure. Here=E2=80=99s how I tried (and failed) to reproduce the segfault: --8<---------------cut here---------------start------------->8--- $ find /tmp/test /tmp/test /tmp/test/gnu /tmp/test/gnu/packages /tmp/test/gnu/packages/jsoftware.scm $ guix build -L /tmp/test jsoftware /tmp/test/gnu/packages/jsoftware.scm:76:0: warning: source expression faile= d to match any pattern guix build: error: jsoftware: nekonata pako $ guix build -f /tmp/test/gnu/packages/jsoftware.scm=20 /tmp/test/gnu/packages/jsoftware.scm:76:0: error: (define ijconsole "G-exp = script that detects AVX/AVX2 support at runtime and executes jconsole\n wi= th the appropriate libj.so and profile.ijs." (with-imported-modules (quote = ((guix cpu) (guix memoization) (guix profiling) (guix sets) (srfi srfi-26))= ) (program-file "ijconsole" (gexp (begin (use-modules ((guix cpu) #:select = (cpu-flags current-cpu)) ((guix sets) #:select (set-contains?)) ((srfi srfi= -26) #:select (cute))) (define %basedir (dirname (dirname (current-filename= )))) (let* ((jconsole (string-append %basedir "/libexec/j/jconsole")) (cpu-= has-flag? (cute set-contains? (cpu-flags (current-cpu)) <>)) (libj (format = #f "~a/lib/j/libj~a.so" %basedir (cond ((cpu-has-flag? "avx2") "-avx2") ((c= pu-has-flag? "avx") "-avx") (else "")))) (jprofile (string-append %basedir = "/etc/j/profile.ijs"))) (apply execl jconsole "ijconsole" "-lib" libj "-jpr= ofile" jprofile (cdr (command-line))))))))): source expression failed to ma= tch any pattern $ guix describe Generacio 201 Jan 12 2022 23:15:13 (nuna) guix 0052c3b repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 0052c3b0458fba32920a1cfb48b8311429f0d6b5 --8<---------------cut here---------------end--------------->8--- Is there another way to reproduce it? Is the =E2=80=98LD_LIBRARY_PATH=E2=80=99 variable set on your system? Thanks, Ludo=E2=80=99.