From: Mathieu Othacehe <m.othacehe@gmail.com>
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel <guix-devel@gnu.org>, Amirouche <amirouche@hypermove.net>
Subject: Re: (guix git) and guile-git finalizers.
Date: Sat, 01 Jul 2017 12:16:47 +0200 [thread overview]
Message-ID: <87r2y0h374.fsf@gmail.com> (raw)
In-Reply-To: <87fues6yjt.fsf@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
Hi Andy,
> Why do you feel the need to "shut down" libgit? Honestly I would punt.
> Most other libraries aren't like that.
Thanks for the review and pointing out those two issues. So our best
option may be to stop using libgit2-shutdown in (guix git).
I attached a patch, what do you guys think ?
Thanks,
Mathieu
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-guix-git-Stop-using-libgit2-shutdown.patch --]
[-- Type: text/x-patch, Size: 1168 bytes --]
From d8336eb41574d41bd36330c26f56da8090c8907e Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <m.othacehe@gmail.com>
Date: Sat, 1 Jul 2017 12:14:05 +0200
Subject: [PATCH] guix: git: Stop using libgit2-shutdown.
* guix/git.scm (with-libgit2): Stop calling (libgit2-shutdown) to prevent
segfaults when pointer finalizers are run.
---
guix/git.scm | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/guix/git.scm b/guix/git.scm
index 17a6784ae..406c81734 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -34,13 +34,12 @@
(make-parameter "/var/cache/guix/checkouts"))
(define-syntax-rule (with-libgit2 thunk ...)
- (dynamic-wind
- (lambda ()
- (libgit2-init!))
- (lambda ()
- thunk ...)
- (lambda ()
- (libgit2-shutdown))))
+ (begin
+ ;; XXX: The right thing to do would be to call (libgit2-shutdown) here,
+ ;; but pointer finalizers used in guile-git may be called after shutdown,
+ ;; resulting in a segfault. Hence, let's skip shutdown call for now.
+ (libgit2-init!)
+ thunk ...))
(define* (url-cache-directory url
#:optional (cache-directory
--
2.13.1
next prev parent reply other threads:[~2017-07-01 10:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 12:44 (guix git) and guile-git finalizers Mathieu Othacehe
2017-06-13 8:15 ` Ludovic Courtès
2017-06-13 16:41 ` Mathieu Othacehe
2017-06-19 16:01 ` Mathieu Othacehe
2017-06-22 11:40 ` Andy Wingo
2017-07-01 10:16 ` Mathieu Othacehe [this message]
2017-07-01 12:50 ` Ludovic Courtès
2017-07-01 14:33 ` Mathieu Othacehe
2017-06-13 8:47 ` Andy Wingo
2017-06-13 16:39 ` Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r2y0h374.fsf@gmail.com \
--to=m.othacehe@gmail.com \
--cc=amirouche@hypermove.net \
--cc=guix-devel@gnu.org \
--cc=wingo@igalia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).