9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] [Bug] Mail fails to send attachments
Date: Fri, 19 Feb 2021 13:13:03 -0800	[thread overview]
Message-ID: <5AE9D560F742B991050C8E636061FC9E@eigenstate.org> (raw)
In-Reply-To: <f252e420-ed06-4605-821c-75345a15f1e4@sirjofri.de>

Quoth sirjofri <sirjofri+ml-9front@sirjofri.de>:
> 
> 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
	}'



  parent reply	other threads:[~2021-02-19 21:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 19:56 theinicke
2021-02-19 20:13 ` sirjofri
2021-02-19 20:54   ` Romano
2021-02-19 21:13   ` ori [this message]
2021-02-19 23:47     ` sirjofri
2021-02-20  0:28       ` sirjofri
2021-02-20  0:49         ` ori
2021-02-20 13:02           ` sirjofri
2021-02-19 23:27   ` ori
2021-02-20 13:16     ` [9front] [Patch] " sirjofri
2021-02-20 13:37       ` hiro
2021-02-20 14:03         ` [9front] bad headers in mail (was: Mail attachment bug) sirjofri
2021-02-20 14:10           ` hiro

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5AE9D560F742B991050C8E636061FC9E@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9front@9front.org \
    /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.
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 NNTP newsgroup(s).