bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29368: Unreliable failing tests / segfaulting guile


From: Ludovic Courtès
Subject: bug#29368: Unreliable failing tests / segfaulting guile
Date: Sun, 26 Nov 2017 15:59:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Martin Castillo <address@hidden> skribis:

> In the meantime I updated the guix checkout and since my
> .config/guix/latest points to the guix checkout, i checked 84bd92438 out
> in another directory and ran
> guix environment guix --ad-hoc strace
> ./bootstrap && ./configure --localstatedir=/var
> ./pre-inst-env strace -f -o log.fifo -s 234 make check -j3
>
> make check -j3 doesn't always trigger it. But it did in the following 2
> cases.
>
> Your command creates a lot of output, so I piped straces output to
> bzip2. It took very long so I aborted and retried but piped it onto the
> host system to compress it. This is still takes very long when it
> reached guix-daemon test. On top of it, I got a filesystem error which
> resulted in a ro-remount, so I decided to interrupt the second try, too.
> You can access the logs at
> https://seafile.zfn.uni-bremen.de/d/7990941e630141309a58/

Thanks a lot for the logs.

With the script below I extracted the lines corresponding to a non-zero
exit of ‘list-runtime-roots’, and then looked at what happened
immediately before.  It typically looks like this:

--8<---------------cut here---------------start------------->8---
15542 write(2, "Backtrace:\nIn srfi/srfi-1.scm:\n   592:29 19 (map1 _)\n   
592:29 18 (map1 _)\n   592:29 17 (map1 _)\n   592:29 16 (map1 _)\n   592:29 15 
(map1 _)\n   592:29 14 (map1 _)\n   592:29 13 (map1 _)\n   592:29 12 (map1 _)\n 
  592:29 11 (map1 _)\
n   59"..., 852) = 852
15542 exit_group(1 <unfinished ...>
--8<---------------cut here---------------end--------------->8---

So most likely it corresponds to the error you reported:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (while #t (load-from-path "list-runtime-roots"))
... ;; skipping repeated expected output
srfi/srfi-1.scm:592:17: In procedure map1:
srfi/srfi-1.scm:592:17: In procedure fport_read: Kein passender Prozess
gefunden ;; No matching process found
--8<---------------cut here---------------end--------------->8---

Indeed, if we open, say, /proc/XYZ/cmdline and then process XYZ dies,
reading from that file descriptor yields ESRCH (the error above).

Commit 9b0713012905f3997d6fad201dba7c3d93b38b13 fixes that.  I’ll update
the ‘guix’ package snapshot soon so we get this fix.

Thank you!

Ludo’.

(use-modules (ice-9 rdelim)
             (ice-9 match)
             (ice-9 regex))

(define exec-rx
  (make-regexp "^([[:digit:]]+) exec.*list-runtime-roots"))

(define exit-rx
  (make-regexp "^([[:digit:]]+) exit_group"))

(call-with-input-file "/tmp/log"
  (lambda (port)
    (let loop ((pid #f))
      (match (read-line port)
        ((? eof-object?)
         #f)
        (line
         (if pid
             (match (regexp-exec exit-rx line)
               (#f
                (loop pid))
               (result
                (if (= pid (string->number (match:substring result 1)))
                    (begin
                      (pk 'exit pid line (port-line port))
                      (loop #f))
                    (loop pid))))
             (match (regexp-exec exec-rx line)
               (#f
                (loop pid))
               (result
                (loop (string->number (match:substring result 1)))))))))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]