Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Nov 2024 18:37:24 -0400
From:      "Dan Langille" <dan@langille.org>
To:        "John Levine" <johnl@taugh.com>
Cc:        "John Levine" <johnl@iecc.com>, "RW via freebsd-questions" <freebsd-questions@freebsd.org>, dale@dalescott.net
Subject:   Re: dma: could not pick up queue file
Message-ID:  <ded5daf2-488a-43e6-b06b-de25bc7bb67b@app.fastmail.com>
In-Reply-To: <00907865-86c5-4fb4-bc3f-0c795de2f6fc@taugh.com>
References:  <685d00e3-bacb-45cd-a166-40c6a484347e@app.fastmail.com> <22042f18-4cbb-4f62-841b-fef4a7262899@app.fastmail.com> <1c49d4a22aefd22541a526d387912eb3@dalescott.net> <20241031225337.288E8A4F1F81@ary.qy> <c3f2a459-5d9a-4ddf-acaf-9677bc252c5e@app.fastmail.com> <382f9b53-0d5e-0fd3-5d9f-9d1a8954dd5b@iecc.com> <e8f0f723-3aea-4f89-8f8f-f40def956d3c@app.fastmail.com> <00907865-86c5-4fb4-bc3f-0c795de2f6fc@taugh.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--b008a27bd48a4ffc82efff2c9630d9e5
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

There is something I'm not following.

[22:35 wikis dvl ~] % sudo /usr/libexec/dma -q
[22:35 wikis dvl ~] % sudo ps auwx | grep dma      
dvl    42469  0.0  0.1 12808  2376  2  S+J  22:35   0:00.00 grep dma

This tells me the daemon doesn't stick around. It starts, does stuff, goes away.

That does not match what we're seeing in the logs below.

If it is the daemon from the top of the hour, it's been sitting around for nearly 6 minutes.


On Fri, Nov 1, 2024, at 5:46 PM, John Levine wrote:
> The queue flushing daemon is run every hour from your crontab. As I said, once a day is plenty since mail is normally never queued.
> Sent from phone with tiny keyboard, please excuse typos.
> *From:* Dan Langille 
> *Sent:* Fri Nov 01 12:31:39 EDT 2024
> *To:* John Levine , RW via freebsd-questions 
> *Cc:* dale@dalescott.net
> *Subject:* Re: dma: could not pick up queue file
> 
> On Fri, Nov 1, 2024, at 9:23 AM, John R. Levine wrote:
>>  On Fri, 1 Nov 2024, Dan Langille wrote:
>>>  This event occurred today.  These logs are slightly amended to obscure host names and email and IP addresses.
>>> 
>>>  Nov  1 00:00:10 wikis newsyslog[46335]: logfile turned over
>>>  Nov  1 03:05:42 wikis dma[46d60][90243]: new mail from user=root uid=26 envelope_from=<root@wikis.[redacted]>
>>>  Nov  1 03:05:42 wikis dma[dma][90258]: could not pick up queue file: `/var/spool/dma/Q46d60.432a50848050'/`/var/spool/dma/M46d60.432a50848050': No such file or directory
>>>  Nov  1 03:05:42 wikis dma[46d60][90243]: mail to=<dan@example.org> queued as 46d60.432a50848050
>>>  Nov  1 03:05:42 wikis dma[46d60.432a50848050][90243]: <dan@example.org> trying delivery
>>>  Nov  1 03:05:42 wikis dma[46d60.432a50848050][90269]: using smarthost (tallboy.[redacted]:25)
>>>  Nov  1 03:05:42 wikis dma[46d60.432a50848050][90269]: trying remote delivery to tallboy.[redacted] [10.0.0.1] pref 0
>>>  Nov  1 03:05:42 wikis dma[46d60.432a50848050][90269]: <dan@example.org> delivery successful
>>>  Nov  1 03:46:21 wikis dma[46d47][96425]: new mail from user=root uid=26 envelope_from=<root@wikis.[redacted]>
>> 
>>  Look again.  The failure was PID 90258 which I assume is the daemon, not 
>>  90243 which is the program sending the message.  This suggests it is 
>>  indeed a harmless race condition.
>> 
>>  In my experience, the initial delivery always succeeds and it never 
>>  queues, so running the queue daemon once a day just in case should be 
>>  plenty.
> 
> Is this queue daemon sitting around waiting to do something? Where did it come from?
> 
> [16:30 wikis dvl ~] % sudo ps auwwx | grep dma
> dvl    66535  0.0  0.1 12808  2376  1  S+J  16:30   0:00.00 grep dma
> 
> It's not there. So where did it come from?

--
  Dan Langille
  dan@langille.org


--b008a27bd48a4ffc82efff2c9630d9e5
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div>There is someth=
ing I'm not following.</div><div><br></div><div>[22:35 wikis dvl ~] % su=
do /usr/libexec/dma -q<br></div><div>[22:35 wikis dvl ~] % sudo ps auwx =
| grep dma&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></div><div>dvl&nbsp;&n=
bsp;&nbsp; 42469&nbsp; 0.0&nbsp; 0.1 12808&nbsp; 2376&nbsp; 2&nbsp; S+J&=
nbsp; 22:35&nbsp;&nbsp; 0:00.00 grep dma<br></div><div><br></div><div>Th=
is tells me the daemon doesn't stick around. It starts, does stuff, goes=
 away.<br></div><div><br></div><div>That does not match what we're seein=
g in the logs below.<br></div><div><br></div><div>If it is the daemon fr=
om the top of the hour, it's been sitting around for nearly 6 minutes.</=
div><div><br></div><div><br></div><div>On Fri, Nov 1, 2024, at 5:46 PM, =
John Levine wrote:<br></div><blockquote type=3D"cite" id=3D"qt" style=3D=
"zoom:0%;"><div dir=3D"auto"><div>The queue flushing daemon is run every=
 hour from your crontab. As I said, once a day is plenty since mail is n=
ormally never queued.<br></div></div><div dir=3D"auto">Sent from phone w=
ith tiny keyboard, please excuse typos.<br></div><div style=3D"font-size=
:10pt;font-family:Tahoma, sans-serif;padding-top:3pt;padding-right:0in;p=
adding-bottom:0in;padding-left:0in;"><div><hr style=3D"border-right-widt=
h:medium;border-bottom-width:medium;border-left-width:medium;border-righ=
t-style:none;border-bottom-style:none;border-left-style:none;border-righ=
t-color:currentcolor;border-bottom-color:currentcolor;border-left-color:=
currentcolor;border-image-source:none;border-image-slice:100%;border-ima=
ge-width:1;border-image-outset:0;border-image-repeat:stretch;border-top-=
width:1pt;border-top-style:solid;border-top-color:rgb(225, 225, 225);"><=
b>From:</b> Dan Langille <br></div><div> <b>Sent:</b> Fri Nov 01 12:31:3=
9 EDT 2024<br></div><div> <b>To:</b> John Levine , RW via freebsd-questi=
ons <br></div><div> <b>Cc:</b> dale@dalescott.net<br></div><div> <b>Subj=
ect:</b> Re: dma: could not pick up queue file<br></div></div><div><br><=
/div><pre class=3D"qt-blue"><div>On Fri, Nov 1, 2024, at 9:23 AM, John R=
. Levine wrote:<br></div><blockquote class=3D"qt-gmail_quote" style=3D"m=
argin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;borde=
r-left-width:1px;border-left-style:solid;border-left-color:rgb(114, 159,=
 207);padding-left:1ex;"><div> On Fri, 1 Nov 2024, Dan Langille wrote:<b=
r></div><blockquote class=3D"qt-gmail_quote" style=3D"margin-top:0pt;mar=
gin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-width:1px;=
border-left-style:solid;border-left-color:rgb(173, 127, 168);padding-lef=
t:1ex;"><div> This event occurred today.  These logs are slightly amende=
d to obscure host names and email and IP addresses.<br></div><div><br></=
div><div> Nov  1 00:00:10 wikis newsyslog[46335]: logfile turned over<br=
></div><div> Nov  1 03:05:42 wikis dma[46d60][90243]: new mail from user=
=3Droot uid=3D26 envelope_from=3D&lt;root@wikis.[redacted]&gt;<br></div>=
<div> Nov  1 03:05:42 wikis dma[dma][90258]: could not pick up queue fil=
e: `/var/spool/dma/Q46d60.432a50848050'/`/var/spool/dma/M46d60.432a50848=
050': No such file or directory<br></div><div> Nov  1 03:05:42 wikis dma=
[46d60][90243]: mail to=3D&lt;dan@example.org&gt; queued as 46d60.432a50=
848050<br></div><div> Nov  1 03:05:42 wikis dma[46d60.432a50848050][9024=
3]: &lt;dan@example.org&gt; trying delivery<br></div><div> Nov  1 03:05:=
42 wikis dma[46d60.432a50848050][90269]: using smarthost (tallboy.[redac=
ted]:25)<br></div><div> Nov  1 03:05:42 wikis dma[46d60.432a50848050][90=
269]: trying remote delivery to tallboy.[redacted] [<a href=3D"http://10=
.0.0.1">10.0.0.1</a>] pref 0<br></div><div> Nov  1 03:05:42 wikis dma[46=
d60.432a50848050][90269]: &lt;dan@example.org&gt; delivery successful<br=
></div><div> Nov  1 03:46:21 wikis dma[46d47][96425]: new mail from user=
=3Droot uid=3D26 envelope_from=3D&lt;root@wikis.[redacted]&gt;<br></div>=
</blockquote><div><br></div><div> Look again.  The failure was PID 90258=
 which I assume is the daemon, not <br></div><div> 90243 which is the pr=
ogram sending the message.  This suggests it is <br></div><div> indeed a=
 harmless race condition.<br></div><div><br></div><div> In my experience=
, the initial delivery always succeeds and it never <br></div><div> queu=
es, so running the queue daemon once a day just in case should be <br></=
div><div> plenty.<br></div></blockquote><div><br></div><div>Is this queu=
e daemon sitting around waiting to do something? Where did it come from?=
<br></div><div><br></div><div>[16:30 wikis dvl ~] % sudo ps auwwx | grep=
 dma<br></div><div>dvl    66535  0.0  0.1 12808  2376  1  S+J  16:30   0=
:00.00 grep dma<br></div><div><br></div><div>It's not there. So where di=
d it come from?<br></div></pre></blockquote><div><br></div><div id=3D"si=
g65064480"><div class=3D"signature">--<br></div><div class=3D"signature"=
>&nbsp; Dan Langille<br></div><div class=3D"signature">&nbsp; dan@langil=
le.org<br></div><div class=3D"signature"><br></div></div><div><br></div>=
</body></html>
--b008a27bd48a4ffc82efff2c9630d9e5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ded5daf2-488a-43e6-b06b-de25bc7bb67b>