From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20093 invoked from network); 19 Feb 2021 21:20:30 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 19 Feb 2021 21:20:30 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 1ess; Fri Feb 19 16:13:17 -0500 2021 Received: from abbatoir.fios-router.home (pool-108-41-92-79.nycmny.fios.verizon.net [108.41.92.79]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 0718f4bc (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Fri, 19 Feb 2021 13:13:04 -0800 (PST) Message-ID: <5AE9D560F742B991050C8E636061FC9E@eigenstate.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit To: 9front@9front.org Date: Fri, 19 Feb 2021 13:13:03 -0800 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: TOR over HTML framework firewall replication Subject: Re: [9front] [Bug] Mail fails to send attachments Reply-To: 9front@9front.org Precedence: bulk Quoth sirjofri : > > 19.02.2021 20:56:00 theinicke@bss-wf.de: > > Today I have noticed that since the rewrite Mail fails to send > > attachments. > > That is if one includes an "Attach: /some/file" line and posts it, > > (if file exists) marshal suicides like so: 66286: marshal 66286: sys: > > write on closed pipe pc=0x25e04 > > leaving us with a sent mail without the attachments. > > > > I have not been able to track down the cause yet. > > Have reproduced it on a clean install updated to latest HEAD > > to make sure it is not caused by any of my modifications. > > Here are the symptoms: > > > > If in /sys/src/cmd/upas/marshal/marshal.c:421 attachment function is > > called, then > > in /sys/src/cmd/upas/marshal/marshal.c:430 the error occurs. > > Same here. The same happens when using Include: instead of Attach. Ori is > unable to reproduce this, afaik. Using marshal -8 directly works fine > btw. > > sirjofri > I don't know why marshal -8 would work, when Mail wouldn't. We just invoke: upas/marshal -8 -S outgoing The pipe being closed is talking to upas/send, which is likely dying or exiting early. This may help capture it: diff -r 39b061370f36 sys/src/cmd/upas/marshal/marshal.c --- a/sys/src/cmd/upas/marshal/marshal.c Wed Feb 17 11:20:13 2021 +0100 +++ b/sys/src/cmd/upas/marshal/marshal.c Fri Feb 19 13:08:55 2021 -0800 @@ -1172,6 +1172,7 @@ err = nil; while((w = wait()) != nil){ + fprint(2, "%d: %s\n", w->pid, w->msg); if(w->pid == pid || w->pid == pgppid) if(w->msg[0] != 0) err = estrdup(w->msg); If you have dtracy enabled, it may be possible to snoop the exit status, which could help get an idea of what's going on. Don't see a great way to get the process name, so it'll take some guesswork: dtracy 'sys:exits:entry if(arg0 != 0) { print probe, pid, (string)arg0 }'