From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qL45KPl612CzjAAAgWs5BA (envelope-from ) for ; Sat, 26 Jun 2021 21:07:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0D/vI/l612DDDAAAB5/wlQ (envelope-from ) for ; Sat, 26 Jun 2021 19:07:37 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DE8A91C950 for ; Sat, 26 Jun 2021 21:07:36 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1DE62290DB; Sat, 26 Jun 2021 15:07:32 -0400 (EDT) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by mail.notmuchmail.org (Postfix) with ESMTPS id 9838C290D6 for ; Sat, 26 Jun 2021 15:07:29 -0400 (EDT) Received: by mail-wr1-x42b.google.com with SMTP id j1so14664739wrn.9 for ; Sat, 26 Jun 2021 12:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OtGcCjtJmqsSxOSPs9fhIsw4w6avE4ZaIt9hKoV7hoU=; b=uhVH9Su1Yx/ct5HrByxgaun3+2goTl8OMDCgNrTfGJPnr/O/ipvbYZyncf8plOewbM rbf/kNB9DZBJugsps7naVl9rNHbtFtviw9fKEr9b7m1Ic2YIRCDVcs88YysL6+gUlfk0 t4jJviqgf50RrWBe0oLi6t1NaRGxQk9SRy4XGXY2nrppASg4WyOa9JTNjrSy17gRDUUg Nm3RQl3wwdpeLr2zY2AqMnLis+MejAipiKieZAUci//sMlWI5UMHKX/iqTohBDdZvvxs lmv9fWiB6A3FQWYdiZegZvUCdMvCFsGph9gx1y6uAdWLhbjbaFKH3jt33A4L3XvIfTpK gexw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OtGcCjtJmqsSxOSPs9fhIsw4w6avE4ZaIt9hKoV7hoU=; b=oSAL1JBG+JQBjyjtzGAk+V3tWdwWO+Or2R6nwG7EUhk/ohbhgfM9vxYrEJJacy6R4D UTQ/RN/3QEoT04Mub+v2F7EXHKS5J+apMX8q3kuoyRCUg23AnxFXN4q3UTtqQYyv5Is+ xBcnLbMGEwoTEEln1rd31t6Ci/iIWHU0cznKoXbPX3bzLcukBlqPFNDTz/LVM6szrBGS s0eNmxO95HK4hCmwGDdwgZ9r+vDwk6uCwGe4/dJ+Ze3UcLV4eCQLVX1+u+yQDEIF6no9 WJvYgfGZUc6hc1uyBzVXf9LydiCrp2XllHXfTypvCpfMCGlQFnemUKO1PlN6Ny/4DhtV UFgA== X-Gm-Message-State: AOAM530qe8OYHdwjyiKzSKjuWaP4zs+/i5VHqMXUhuC/Pt0cipPmlII0 at3jXxmYSPb2R17NyNj/yp1zgZE7rzlr+hfngfRmLKUaqPE= X-Google-Smtp-Source: ABdhPJz0Qv6P/5K64pWxt/p+ZczPQagA5LWv32irdpO1QLpuaGjfDNU8WhBjidu48RQ35QTymbzYc9GZJj8hczMPymU= X-Received: by 2002:a5d:61cd:: with SMTP id q13mr18433469wrv.84.1624734448397; Sat, 26 Jun 2021 12:07:28 -0700 (PDT) MIME-Version: 1.0 References: <20210517193915.1220114-1-felipe.contreras@gmail.com> <20210517193915.1220114-3-felipe.contreras@gmail.com> <874ke5tehj.fsf@tethera.net> <871r98u6he.fsf@tethera.net> In-Reply-To: <871r98u6he.fsf@tethera.net> From: Felipe Contreras Date: Sat, 26 Jun 2021 14:07:17 -0500 Message-ID: Subject: Re: [PATCH 2/2] ruby: enable garbage collection using talloc To: David Bremner Message-ID-Hash: 6RUFPADQTLZECRKA6AY2BFBKXK4EYYVS X-Message-ID-Hash: 6RUFPADQTLZECRKA6AY2BFBKXK4EYYVS X-MailFrom: felipe.contreras@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: "notmuch@notmuchmail.org" , Tomi Ollila X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624734457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=3thsi1BlpNQvrZ+kCt4wLcZ8PYB+JEkuBeHx4pOL3jI=; b=H7la7Nln0fcwDTj5NUt4o0ytY9u/snWSDt0SNudDuFm8r1XK2Q2Ze6/gq0bQTwk3j82oAh pPPXgYL76LIfYXV2mmiv286L4mv/GbgDdd3RD6TZonj7QtlYlISGkyGgvmdE6zszAKcR9h dAFa6HILRhr4Ry0/OllZGA7INKuOnEXEAYLTTpHAZW/ov8enOxEdXBTDxoBEEAtyES5g9u oZ7/RpPv7ns4PzOWFZnARy2csSFJaZqDDbyHeYis5xF2vjAWD+APudfL9oSWjJemr7W/yR 2LJHtmaFoY4Kmp0k+PnV9NGaay2wTDbntV0trQwhspdUh+wgbNGC+R6F6LnAOA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624734457; a=rsa-sha256; cv=none; b=c1RqyCeqzg3XpE/wn5Kff9oIUBI5m/ruk29PTbOYz2M6au6BKoLcxpMkspRFXtstmTBEvi Z0k+1g2HvR2zS9MlEB4oqFDhl9f4UTEyQG5ruV2zI9QpfOimIq6nNd71LMeYDZ4sjyMf+8 RjKWpYr92kU+j6WLGPvYsw7asLYdKXiGblqq3iT6bboD+PkieBmE39hPpcRdCzv0pmXO6F QfkHNOZ3mT/yj12BAybtQwPzNmnze+hizolDSU8/pyz7/ODmUfq0Qs2u59qoefjFLaVzlp +c2aIGZTaRvVWlP0eHwuvaQxXxihWLP/Mc2dvxT2k6tN5fgwdnZOVsIQK0uVZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=uhVH9Su1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.96 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=uhVH9Su1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: DE8A91C950 X-Spam-Score: -0.96 X-Migadu-Scanner: scn1.migadu.com X-TUID: OpWugutow1lY On Fri, Jun 11, 2021 at 3:54 AM David Bremner wrote: > > David Bremner writes: > > > Felipe Contreras writes: > > > >> We basically steal all the objects from their notmuch parents, therefore > >> they are completely under Ruby's gc control. > >> > >> The order at which these objects are freed does not matter any more, > >> because destroying the database does not destroy all the children > >> objects, since they belong to Ruby now. > >> > > > > I guess from a purist point of view this is a kind of layering > > violation, since the use of talloc is purportedly an internal > > implementation detail of the library. Still, I think it's a reasonable > > approach given that the ruby bindings are maintained as part of notmuch, > > and we are not very likely to abandon talloc. > > > > One issue to double check: in a few places we explicitely _don't_ use > talloc. What happens when those objects are passed to talloc_steal? Seems like talloc aborts. Are there any of such objects? -- Felipe Contreras