Re: Hang on startup

2018-10-15 Thread Ben Boeckel
On Mon, Oct 15, 2018 at 12:42:27 -0700, Kevin J. McCarthy wrote:
> Mutt performs a DNS lookup using gethostname() and getaddrinfo() to try
> to find out the host's FQDN.  If you are hanging, it could be this is
> not configured correctly.
> 
> Adding a line to /etc/hosts with a FQDN may help:
>   127.0.1.1  rotor.yourdomain rotor
> 
> See also https://muttmua.gitlab.io/mutt/manual-dev.html#hostname
> although setting that does not change the startup behavior because the
> muttrc is processed afterwards.

Indeed, watching strace for longer shows that (I was always impatient
before):

recvfrom(5, "\366\310\201\202\0\1\0\0\0\0\0\0\5rotor\0\0\1\0\1", 2048, 0, 
{sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.96")}, 
[28->16]) = 23
poll([{fd=5, events=POLLIN}], 1, 4996)  = 0 (Timeout)

I remember now that we have been having DNS hiccups here and that would
seem to be another symptom of that problem. Thanks for the workaround.
I'll ping our sysadmins again :) .

--Ben


Re: Hang on startup

2018-10-15 Thread Kevin J. McCarthy
On Mon, Oct 15, 2018 at 02:56:37PM -0400, Ben Boeckel wrote:
> I've been experiencing this for a while and I'd like to get to the
> bottom of it. When starting `mutt`, sometimes it hangs for a long time
> before drawing the UI (input is appropriately buffered though). Is there
> some network call done on startup or other I/O (`strace` shows that it
> is in the middle of a `poll` call when it is hanging) that might be
> timing out? Currently using 1.10.1, but I've been seeing it for a while
> now, so it isn't new behavior.

Mutt performs a DNS lookup using gethostname() and getaddrinfo() to try
to find out the host's FQDN.  If you are hanging, it could be this is
not configured correctly.

Adding a line to /etc/hosts with a FQDN may help:
  127.0.1.1  rotor.yourdomain rotor

See also https://muttmua.gitlab.io/mutt/manual-dev.html#hostname
although setting that does not change the startup behavior because the
muttrc is processed afterwards.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Hang on startup

2018-10-15 Thread Jostein Berntsen
On 15.10.18,14:56, Ben Boeckel wrote:
> Hi,
> 
> I've been experiencing this for a while and I'd like to get to the
> bottom of it. When starting `mutt`, sometimes it hangs for a long time
> before drawing the UI (input is appropriately buffered though). Is there
> some network call done on startup or other I/O (`strace` shows that it
> is in the middle of a `poll` call when it is hanging) that might be
> timing out? Currently using 1.10.1, but I've been seeing it for a while
> now, so it isn't new behavior.
> 

Can you start mutt with "mutt -d 2" and see if you get more information 
then? 

Check first that your mutt is compiled with DEBUG though:

mutt -v | grep DEBUG


Jostein