Discussion:
Hang on startup
Ben Boeckel
2018-10-15 18:56:37 UTC
Permalink
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.

Thanks,

--Ben
Jostein Berntsen
2018-10-15 19:08:45 UTC
Permalink
Post by Ben Boeckel
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
Kevin J. McCarthy
2018-10-15 19:42:27 UTC
Permalink
Post by Ben Boeckel
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
Ben Boeckel
2018-10-15 20:17:46 UTC
Permalink
Post by Kevin J. McCarthy
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.
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

Loading...