Are you sure these backtraces were from a process that was really hanging? Everything in there looks as if it was just an idling connection which was still connected to the IMAP client. Although the last output was "OK Idle completed." which means that the client most likely would have gone back to IDLE command instead of just leaving it there..
Can you check process's connections in FreeBSD with netstat -p or something else?
Sorry, I didn't mean to imply they were hanging.
But it appears that they were unused.
As my first email showed, the Outlook client had error messages and the connections were closed. (Happening frequently.)
The logs show more and more imap-logins for the same user (and same IP). But no old imap-login processes.
My logs show multiple "dovecot: imap-login: Login" for same user (from same IP) -- over 130 times in less than one day. Is that normal?
As I don't know correct behaviour: should I normally have imap-login with start time of when I started dovecot? (In my case, they are recent times and not when dovecot started.)
And more and more "imap" processes are left running.
Since I started this thread I have many more "imap" processes running (again only one user is using this).
How many "imap" processes is normal for one user from one client (and one IP)? (I have probably had over a hundred today, but I killed many off a few hours ago.)
sockstat does show several imap connections. But netstat shows same are in CLOSE_WAIT and have been for a while.
There are many more "imap" processes without any network connection though.
- Jeremy C. Reed
p.s. Instead of "netstat -p" (from Linux net-tools), on BSD systems use fstat and/or sockstat. (Or lsof from third party package.)