dovecot issues

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

dovecot issues

Edgar Pettijohn III
I'm trying to setup dovecot with opensmtpd and I'm getting the following
errors for dovecot.

Jun 20 21:41:04 auth-worker(10932): Fatal:
pool_system_realloc(268435456): Out of memory
Jun 20 21:41:04 auth-worker(10932): Fatal: master: service(auth-worker):
child 10932 returned error 83 (Out of memory (service auth-worker {
vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
environment to get core dump)
Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
process died unexpectedly
Jun 20 21:41:10 auth-worker(12071): Fatal:
pool_system_realloc(268435456): Out of memory
Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
process died unexpectedly
Jun 20 21:41:10 auth-worker(12071): Fatal: master: service(auth-worker):
child 12071 returned error 83 (Out of memory (service auth-worker {
vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
environment to get core dump)

originally I was getting the following:

pipe() failed: Too many open files

but that was corrected by adding the following to /etc/login.conf:

dovecot:\
        :openfiles-cur=512:\
        :openfiles-max=2048:\
        :tc=daemon:

I'm new to openbsd so go easy on me.

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

mbregg
On 2014-06-20 20:48, Edgar Pettijohn wrote:

> I'm trying to setup dovecot with opensmtpd and I'm getting the
> following
> errors for dovecot.
>
> Jun 20 21:41:04 auth-worker(10932): Fatal:
> pool_system_realloc(268435456): Out of memory
> Jun 20 21:41:04 auth-worker(10932): Fatal: master:
> service(auth-worker):
> child 10932 returned error 83 (Out of memory (service auth-worker {
> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
> environment to get core dump)
> Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
> process died unexpectedly
> Jun 20 21:41:10 auth-worker(12071): Fatal:
> pool_system_realloc(268435456): Out of memory
> Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
> process died unexpectedly
> Jun 20 21:41:10 auth-worker(12071): Fatal: master:
> service(auth-worker):
> child 12071 returned error 83 (Out of memory (service auth-worker {
> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
> environment to get core dump)

You could try increasing vsz_limit to something like 512 MB.  Do you
have mailboxes with a large quantity of emails (as in thousands) that
256 MB isn't enough?

Mike

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

Edgar Pettijohn III
On 06/20/2014 10:05 PM, Mike Bregg wrote:

> On 2014-06-20 20:48, Edgar Pettijohn wrote:
>> I'm trying to setup dovecot with opensmtpd and I'm getting the following
>> errors for dovecot.
>>
>> Jun 20 21:41:04 auth-worker(10932): Fatal:
>> pool_system_realloc(268435456): Out of memory
>> Jun 20 21:41:04 auth-worker(10932): Fatal: master: service(auth-worker):
>> child 10932 returned error 83 (Out of memory (service auth-worker {
>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>> environment to get core dump)
>> Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
>> process died unexpectedly
>> Jun 20 21:41:10 auth-worker(12071): Fatal:
>> pool_system_realloc(268435456): Out of memory
>> Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
>> process died unexpectedly
>> Jun 20 21:41:10 auth-worker(12071): Fatal: master: service(auth-worker):
>> child 12071 returned error 83 (Out of memory (service auth-worker {
>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>> environment to get core dump)
>
> You could try increasing vsz_limit to something like 512 MB.  Do you
have mailboxes with a large quantity of emails (as in thousands) that
256 MB isn't enough?
>
> Mike
>
I felt like that was a clue, but have no idea how to set vsz_limit,
however there is no mail on the system.  I got those errors just testing
imap login from mutt.


Edgar

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

mbregg
On 2014-06-20 21:14, Edgar Pettijohn wrote:

> On 06/20/2014 10:05 PM, Mike Bregg wrote:
>> On 2014-06-20 20:48, Edgar Pettijohn wrote:
>>> I'm trying to setup dovecot with opensmtpd and I'm getting the
>>> following
>>> errors for dovecot.
>>>
>>> Jun 20 21:41:04 auth-worker(10932): Fatal:
>>> pool_system_realloc(268435456): Out of memory
>>> Jun 20 21:41:04 auth-worker(10932): Fatal: master:
>>> service(auth-worker):
>>> child 10932 returned error 83 (Out of memory (service auth-worker {
>>> vsz_limit=256 MB }, you may need to increase it) - set
>>> CORE_OUTOFMEM=1
>>> environment to get core dump)
>>> Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
>>> process died unexpectedly
>>> Jun 20 21:41:10 auth-worker(12071): Fatal:
>>> pool_system_realloc(268435456): Out of memory
>>> Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
>>> process died unexpectedly
>>> Jun 20 21:41:10 auth-worker(12071): Fatal: master:
>>> service(auth-worker):
>>> child 12071 returned error 83 (Out of memory (service auth-worker {
>>> vsz_limit=256 MB }, you may need to increase it) - set
>>> CORE_OUTOFMEM=1
>>> environment to get core dump)
>>
>> You could try increasing vsz_limit to something like 512 MB.  Do you
> have mailboxes with a large quantity of emails (as in thousands) that
> 256 MB isn't enough?
>>
>> Mike
>>
> I felt like that was a clue, but have no idea how to set vsz_limit,
> however there is no mail on the system.  I got those errors just
> testing
> imap login from mutt.

Have a look through the config files in /etc/dovecot/conf.d

Mike

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

Edgar Pettijohn III
On 06/20/2014 10:58 PM, Mike Bregg wrote:

> On 2014-06-20 21:14, Edgar Pettijohn wrote:
>> On 06/20/2014 10:05 PM, Mike Bregg wrote:
>>> On 2014-06-20 20:48, Edgar Pettijohn wrote:
>>>> I'm trying to setup dovecot with opensmtpd and I'm getting the
>>>> following
>>>> errors for dovecot.
>>>>
>>>> Jun 20 21:41:04 auth-worker(10932): Fatal:
>>>> pool_system_realloc(268435456): Out of memory
>>>> Jun 20 21:41:04 auth-worker(10932): Fatal: master:
>>>> service(auth-worker):
>>>> child 10932 returned error 83 (Out of memory (service auth-worker {
>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>>>> environment to get core dump)
>>>> Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
>>>> process died unexpectedly
>>>> Jun 20 21:41:10 auth-worker(12071): Fatal:
>>>> pool_system_realloc(268435456): Out of memory
>>>> Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
>>>> process died unexpectedly
>>>> Jun 20 21:41:10 auth-worker(12071): Fatal: master:
>>>> service(auth-worker):
>>>> child 12071 returned error 83 (Out of memory (service auth-worker {
>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>>>> environment to get core dump)
>>>
>>> You could try increasing vsz_limit to something like 512 MB.  Do you
>> have mailboxes with a large quantity of emails (as in thousands) that
>> 256 MB isn't enough?
>>>
>>> Mike
>>>
>> I felt like that was a clue, but have no idea how to set vsz_limit,
>> however there is no mail on the system.  I got those errors just testing
>> imap login from mutt.
>
> Have a look through the config files in /etc/dovecot/conf.d
>
> Mike
>
Yeah I found it hiding out in 10-master.conf upped it to 512MB as
suggested with no luck.  Then just for fun I upped it to 5000M and still
no luck.

Edgar

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

Edgar Pettijohn III
On 06/20/2014 11:20 PM, Edgar Pettijohn wrote:

> On 06/20/2014 10:58 PM, Mike Bregg wrote:
>> On 2014-06-20 21:14, Edgar Pettijohn wrote:
>>> On 06/20/2014 10:05 PM, Mike Bregg wrote:
>>>> On 2014-06-20 20:48, Edgar Pettijohn wrote:
>>>>> I'm trying to setup dovecot with opensmtpd and I'm getting the
>>>>> following
>>>>> errors for dovecot.
>>>>>
>>>>> Jun 20 21:41:04 auth-worker(10932): Fatal:
>>>>> pool_system_realloc(268435456): Out of memory
>>>>> Jun 20 21:41:04 auth-worker(10932): Fatal: master:
>>>>> service(auth-worker):
>>>>> child 10932 returned error 83 (Out of memory (service auth-worker {
>>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>>>>> environment to get core dump)
>>>>> Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
>>>>> process died unexpectedly
>>>>> Jun 20 21:41:10 auth-worker(12071): Fatal:
>>>>> pool_system_realloc(268435456): Out of memory
>>>>> Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
>>>>> process died unexpectedly
>>>>> Jun 20 21:41:10 auth-worker(12071): Fatal: master:
>>>>> service(auth-worker):
>>>>> child 12071 returned error 83 (Out of memory (service auth-worker {
>>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>>>>> environment to get core dump)
>>>> You could try increasing vsz_limit to something like 512 MB.  Do you
>>> have mailboxes with a large quantity of emails (as in thousands) that
>>> 256 MB isn't enough?
>>>> Mike
>>>>
>>> I felt like that was a clue, but have no idea how to set vsz_limit,
>>> however there is no mail on the system.  I got those errors just testing
>>> imap login from mutt.
>> Have a look through the config files in /etc/dovecot/conf.d
>>
>> Mike
>>
> Yeah I found it hiding out in 10-master.conf upped it to 512MB as
> suggested with no luck.  Then just for fun I upped it to 5000M and still
> no luck.
>
> Edgar
>
I just noticed in the log even after raising vsz_limit the error remains
the same claiming vsz_limit=256MB

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

Otto Moerbeek
On Fri, Jun 20, 2014 at 11:37:07PM -0500, Edgar Pettijohn wrote:

> On 06/20/2014 11:20 PM, Edgar Pettijohn wrote:
> > On 06/20/2014 10:58 PM, Mike Bregg wrote:
> >> On 2014-06-20 21:14, Edgar Pettijohn wrote:
> >>> On 06/20/2014 10:05 PM, Mike Bregg wrote:
> >>>> On 2014-06-20 20:48, Edgar Pettijohn wrote:
> >>>>> I'm trying to setup dovecot with opensmtpd and I'm getting the
> >>>>> following
> >>>>> errors for dovecot.
> >>>>>
> >>>>> Jun 20 21:41:04 auth-worker(10932): Fatal:
> >>>>> pool_system_realloc(268435456): Out of memory
> >>>>> Jun 20 21:41:04 auth-worker(10932): Fatal: master:
> >>>>> service(auth-worker):
> >>>>> child 10932 returned error 83 (Out of memory (service auth-worker {
> >>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
> >>>>> environment to get core dump)
> >>>>> Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
> >>>>> process died unexpectedly
> >>>>> Jun 20 21:41:10 auth-worker(12071): Fatal:
> >>>>> pool_system_realloc(268435456): Out of memory
> >>>>> Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
> >>>>> process died unexpectedly
> >>>>> Jun 20 21:41:10 auth-worker(12071): Fatal: master:
> >>>>> service(auth-worker):
> >>>>> child 12071 returned error 83 (Out of memory (service auth-worker {
> >>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
> >>>>> environment to get core dump)
> >>>> You could try increasing vsz_limit to something like 512 MB.  Do you
> >>> have mailboxes with a large quantity of emails (as in thousands) that
> >>> 256 MB isn't enough?
> >>>> Mike
> >>>>
> >>> I felt like that was a clue, but have no idea how to set vsz_limit,
> >>> however there is no mail on the system.  I got those errors just testing
> >>> imap login from mutt.
> >> Have a look through the config files in /etc/dovecot/conf.d
> >>
> >> Mike
> >>
> > Yeah I found it hiding out in 10-master.conf upped it to 512MB as
> > suggested with no luck.  Then just for fun I upped it to 5000M and still
> > no luck.
> >
> > Edgar
> >
> I just noticed in the log even after raising vsz_limit the error remains
> the same claiming vsz_limit=256MB

This is a know bug. If an unknown user tries to log in, the login code
goes into a loop expanding a buffer until it runs out of mem. The
cause of the bug is also known, but nobody (including myself) came up
with a diff yet.

The login process gets rsstarted, so there is no immediate functional
problem, apart from the log being filled.

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

Edgar Pettijohn III
On 06/21/2014 02:17 AM, Otto Moerbeek wrote:

> On Fri, Jun 20, 2014 at 11:37:07PM -0500, Edgar Pettijohn wrote:
>
>> On 06/20/2014 11:20 PM, Edgar Pettijohn wrote:
>>> On 06/20/2014 10:58 PM, Mike Bregg wrote:
>>>> On 2014-06-20 21:14, Edgar Pettijohn wrote:
>>>>> On 06/20/2014 10:05 PM, Mike Bregg wrote:
>>>>>> On 2014-06-20 20:48, Edgar Pettijohn wrote:
>>>>>>> I'm trying to setup dovecot with opensmtpd and I'm getting the
>>>>>>> following
>>>>>>> errors for dovecot.
>>>>>>>
>>>>>>> Jun 20 21:41:04 auth-worker(10932): Fatal:
>>>>>>> pool_system_realloc(268435456): Out of memory
>>>>>>> Jun 20 21:41:04 auth-worker(10932): Fatal: master:
>>>>>>> service(auth-worker):
>>>>>>> child 10932 returned error 83 (Out of memory (service auth-worker {
>>>>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>>>>>>> environment to get core dump)
>>>>>>> Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
>>>>>>> process died unexpectedly
>>>>>>> Jun 20 21:41:10 auth-worker(12071): Fatal:
>>>>>>> pool_system_realloc(268435456): Out of memory
>>>>>>> Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
>>>>>>> process died unexpectedly
>>>>>>> Jun 20 21:41:10 auth-worker(12071): Fatal: master:
>>>>>>> service(auth-worker):
>>>>>>> child 12071 returned error 83 (Out of memory (service auth-worker {
>>>>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>>>>>>> environment to get core dump)
>>>>>> You could try increasing vsz_limit to something like 512 MB.  Do you
>>>>> have mailboxes with a large quantity of emails (as in thousands) that
>>>>> 256 MB isn't enough?
>>>>>> Mike
>>>>>>
>>>>> I felt like that was a clue, but have no idea how to set vsz_limit,
>>>>> however there is no mail on the system.  I got those errors just testing
>>>>> imap login from mutt.
>>>> Have a look through the config files in /etc/dovecot/conf.d
>>>>
>>>> Mike
>>>>
>>> Yeah I found it hiding out in 10-master.conf upped it to 512MB as
>>> suggested with no luck.  Then just for fun I upped it to 5000M and still
>>> no luck.
>>>
>>> Edgar
>>>
>> I just noticed in the log even after raising vsz_limit the error remains
>> the same claiming vsz_limit=256MB
> This is a know bug. If an unknown user tries to log in, the login code
> goes into a loop expanding a buffer until it runs out of mem. The
> cause of the bug is also known, but nobody (including myself) came up
> with a diff yet.
>
> The login process gets rsstarted, so there is no immediate functional
> problem, apart from the log being filled.
>
> -Otto
>
Thanks for all the replies.  Not sure what I was doing wrong I was
trying to use bsdauth, but could never get it to let me login.  Switched
to MySql and its working.  No more memory errors in the log.

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

Brad Smith-14
On 21/06/14 3:21 PM, Edgar Pettijohn wrote:

> On 06/21/2014 02:17 AM, Otto Moerbeek wrote:
>> On Fri, Jun 20, 2014 at 11:37:07PM -0500, Edgar Pettijohn wrote:
>>
>>> On 06/20/2014 11:20 PM, Edgar Pettijohn wrote:
>>>> On 06/20/2014 10:58 PM, Mike Bregg wrote:
>>>>> On 2014-06-20 21:14, Edgar Pettijohn wrote:
>>>>>> On 06/20/2014 10:05 PM, Mike Bregg wrote:
>>>>>>> On 2014-06-20 20:48, Edgar Pettijohn wrote:
>>>>>>>> I'm trying to setup dovecot with opensmtpd and I'm getting the
>>>>>>>> following
>>>>>>>> errors for dovecot.
>>>>>>>>
>>>>>>>> Jun 20 21:41:04 auth-worker(10932): Fatal:
>>>>>>>> pool_system_realloc(268435456): Out of memory
>>>>>>>> Jun 20 21:41:04 auth-worker(10932): Fatal: master:
>>>>>>>> service(auth-worker):
>>>>>>>> child 10932 returned error 83 (Out of memory (service auth-worker {
>>>>>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>>>>>>>> environment to get core dump)
>>>>>>>> Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
>>>>>>>> process died unexpectedly
>>>>>>>> Jun 20 21:41:10 auth-worker(12071): Fatal:
>>>>>>>> pool_system_realloc(268435456): Out of memory
>>>>>>>> Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
>>>>>>>> process died unexpectedly
>>>>>>>> Jun 20 21:41:10 auth-worker(12071): Fatal: master:
>>>>>>>> service(auth-worker):
>>>>>>>> child 12071 returned error 83 (Out of memory (service auth-worker {
>>>>>>>> vsz_limit=256 MB }, you may need to increase it) - set CORE_OUTOFMEM=1
>>>>>>>> environment to get core dump)
>>>>>>> You could try increasing vsz_limit to something like 512 MB.  Do you
>>>>>> have mailboxes with a large quantity of emails (as in thousands) that
>>>>>> 256 MB isn't enough?
>>>>>>> Mike
>>>>>>>
>>>>>> I felt like that was a clue, but have no idea how to set vsz_limit,
>>>>>> however there is no mail on the system.  I got those errors just testing
>>>>>> imap login from mutt.
>>>>> Have a look through the config files in /etc/dovecot/conf.d
>>>>>
>>>>> Mike
>>>>>
>>>> Yeah I found it hiding out in 10-master.conf upped it to 512MB as
>>>> suggested with no luck.  Then just for fun I upped it to 5000M and still
>>>> no luck.
>>>>
>>>> Edgar
>>>>
>>> I just noticed in the log even after raising vsz_limit the error remains
>>> the same claiming vsz_limit=256MB
>> This is a know bug. If an unknown user tries to log in, the login code
>> goes into a loop expanding a buffer until it runs out of mem. The
>> cause of the bug is also known, but nobody (including myself) came up
>> with a diff yet.
>>
>> The login process gets rsstarted, so there is no immediate functional
>> problem, apart from the log being filled.
>>
>> -Otto
>>
> Thanks for all the replies.  Not sure what I was doing wrong I was
> trying to use bsdauth, but could never get it to let me login.  Switched
> to MySql and its working.  No more memory errors in the log.

Of course there are no more memory errors when you changed the
authentication mechanism. Otto mentioned to you the reason for the
errors.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

Edgar Pettijohn III
On 06/21/2014 06:37 PM, Brad Smith wrote:

> On 21/06/14 3:21 PM, Edgar Pettijohn wrote:
>> On 06/21/2014 02:17 AM, Otto Moerbeek wrote:
>>> On Fri, Jun 20, 2014 at 11:37:07PM -0500, Edgar Pettijohn wrote:
>>>
>>>> On 06/20/2014 11:20 PM, Edgar Pettijohn wrote:
>>>>> On 06/20/2014 10:58 PM, Mike Bregg wrote:
>>>>>> On 2014-06-20 21:14, Edgar Pettijohn wrote:
>>>>>>> On 06/20/2014 10:05 PM, Mike Bregg wrote:
>>>>>>>> On 2014-06-20 20:48, Edgar Pettijohn wrote:
>>>>>>>>> I'm trying to setup dovecot with opensmtpd and I'm getting the
>>>>>>>>> following
>>>>>>>>> errors for dovecot.
>>>>>>>>>
>>>>>>>>> Jun 20 21:41:04 auth-worker(10932): Fatal:
>>>>>>>>> pool_system_realloc(268435456): Out of memory
>>>>>>>>> Jun 20 21:41:04 auth-worker(10932): Fatal: master:
>>>>>>>>> service(auth-worker):
>>>>>>>>> child 10932 returned error 83 (Out of memory (service
>>>>>>>>> auth-worker {
>>>>>>>>> vsz_limit=256 MB }, you may need to increase it) - set
>>>>>>>>> CORE_OUTOFMEM=1
>>>>>>>>> environment to get core dump)
>>>>>>>>> Jun 20 21:41:04 auth: Error: auth worker: Aborted request: Worker
>>>>>>>>> process died unexpectedly
>>>>>>>>> Jun 20 21:41:10 auth-worker(12071): Fatal:
>>>>>>>>> pool_system_realloc(268435456): Out of memory
>>>>>>>>> Jun 20 21:41:10 auth: Error: auth worker: Aborted request: Worker
>>>>>>>>> process died unexpectedly
>>>>>>>>> Jun 20 21:41:10 auth-worker(12071): Fatal: master:
>>>>>>>>> service(auth-worker):
>>>>>>>>> child 12071 returned error 83 (Out of memory (service
>>>>>>>>> auth-worker {
>>>>>>>>> vsz_limit=256 MB }, you may need to increase it) - set
>>>>>>>>> CORE_OUTOFMEM=1
>>>>>>>>> environment to get core dump)
>>>>>>>> You could try increasing vsz_limit to something like 512 MB.
>>>>>>>> Do you
>>>>>>> have mailboxes with a large quantity of emails (as in thousands)
>>>>>>> that
>>>>>>> 256 MB isn't enough?
>>>>>>>> Mike
>>>>>>>>
>>>>>>> I felt like that was a clue, but have no idea how to set vsz_limit,
>>>>>>> however there is no mail on the system.  I got those errors just
>>>>>>> testing
>>>>>>> imap login from mutt.
>>>>>> Have a look through the config files in /etc/dovecot/conf.d
>>>>>>
>>>>>> Mike
>>>>>>
>>>>> Yeah I found it hiding out in 10-master.conf upped it to 512MB as
>>>>> suggested with no luck.  Then just for fun I upped it to 5000M and
>>>>> still
>>>>> no luck.
>>>>>
>>>>> Edgar
>>>>>
>>>> I just noticed in the log even after raising vsz_limit the error
>>>> remains
>>>> the same claiming vsz_limit=256MB
>>> This is a know bug. If an unknown user tries to log in, the login code
>>> goes into a loop expanding a buffer until it runs out of mem. The
>>> cause of the bug is also known, but nobody (including myself) came up
>>> with a diff yet.
>>>
>>> The login process gets rsstarted, so there is no immediate functional
>>> problem, apart from the log being filled.
>>>
>>>     -Otto
>>>
>> Thanks for all the replies.  Not sure what I was doing wrong I was
>> trying to use bsdauth, but could never get it to let me login.  Switched
>> to MySql and its working.  No more memory errors in the log.
>
> Of course there are no more memory errors when you changed the
> authentication mechanism. Otto mentioned to you the reason for the
> errors.
>
And then I confirmed that that was the reason by switching to Mysql.

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

Stuart Henderson
In reply to this post by Otto Moerbeek
On 2014-06-21, Otto Moerbeek <[hidden email]> wrote:
>
> This is a know bug. If an unknown user tries to log in, the login code
> goes into a loop expanding a buffer until it runs out of mem. The
> cause of the bug is also known, but nobody (including myself) came up
> with a diff yet.

To be clear: this is fixed in libc but it's a post-5.5 change - when Otto
says that nobody came up with a diff, he's talking about a diff to have
dovecot cope with the old libc code. The relevant libc commit (below) should
apply directly to a 5.5 system.

Also note that you can use a separate passwd-like file for dovecot
authentication, which is not affected by this bug, so you can work around
it without configuring ldap/sql. (Personally I like to use different
passwords for email and login accounts so I do this anyway..)


---------------------
PatchSet 5269
Date: 2014/03/05 23:44:47
Author: schwarze
Branch: HEAD
Tag: (none)
Log:
Fix the return values of getpwnam_r(), getpwuid_r(), getgrnam_r(),
and getgrgid_r() to agree with POSIX.  Not touching errno handling
yet, which will also need fixing.

Problem originally reported by william at 25thandClement dot com on bugs@.
OK sthen@, and kettenis@ agrees it's "a step in the right direction".

Members:
        gen/getgrent.c:1.38->1.39
        gen/getpwent.c:1.48->1.49

Index: src/lib/libc/gen/getgrent.c
diff -u src/lib/libc/gen/getgrent.c:1.38 src/lib/libc/gen/getgrent.c:1.39
--- src/lib/libc/gen/getgrent.c:1.38 Wed Apr 17 17:40:35 2013
+++ src/lib/libc/gen/getgrent.c Wed Mar  5 23:44:47 2014
@@ -1,4 +1,4 @@
-/* $OpenBSD: getgrent.c,v 1.38 2013/04/17 17:40:35 tedu Exp $ */
+/* $OpenBSD: getgrent.c,v 1.39 2014/03/05 23:44:47 schwarze Exp $ */
 /*
  * Copyright (c) 1989, 1993
  * The Regents of the University of California.  All rights reserved.
@@ -134,6 +134,7 @@
  if (bufsize < GETGR_R_SIZE_MAX)
  return ERANGE;
  errnosave = errno;
+ errno = 0;
  *result = getgrnam_gs(name, grp, (struct group_storage *)buffer);
  if (*result == NULL)
  ret = errno;
@@ -180,6 +181,7 @@
  if (bufsize < GETGR_R_SIZE_MAX)
  return ERANGE;
  errnosave = errno;
+ errno = 0;
  *result = getgrgid_gs(gid, grp, (struct group_storage *)buffer);
  if (*result == NULL)
  ret = errno;
Index: src/lib/libc/gen/getpwent.c
diff -u src/lib/libc/gen/getpwent.c:1.48 src/lib/libc/gen/getpwent.c:1.49
--- src/lib/libc/gen/getpwent.c:1.48 Fri Nov 15 22:32:55 2013
+++ src/lib/libc/gen/getpwent.c Wed Mar  5 23:44:47 2014
@@ -1,4 +1,4 @@
-/* $OpenBSD: getpwent.c,v 1.48 2013/11/15 22:32:55 benno Exp $ */
+/* $OpenBSD: getpwent.c,v 1.49 2014/03/05 23:44:47 schwarze Exp $ */
 /*
  * Copyright (c) 2008 Theo de Raadt
  * Copyright (c) 1988, 1993
@@ -708,8 +708,12 @@
 {
  struct passwd *pwret = NULL;
  int flags = 0, *flagsp;
+ int my_errno = 0;
+ int saved_errno;
 
  _THREAD_PRIVATE_MUTEX_LOCK(pw);
+ saved_errno = errno;
+ errno = 0;
  if (!_pw_db && !__initdb())
  goto fail;
 
@@ -733,8 +737,12 @@
 fail:
  if (pwretp)
  *pwretp = pwret;
+ if (pwret == NULL)
+ my_errno = errno;
+ if (!errno)
+ errno = saved_errno;
  _THREAD_PRIVATE_MUTEX_UNLOCK(pw);
- return (pwret ? 0 : 1);
+ return (my_errno);
 }
 
 struct passwd *
@@ -753,8 +761,12 @@
 {
  struct passwd *pwret = NULL;
  int flags = 0, *flagsp;
+ int my_errno = 0;
+ int saved_errno;
 
  _THREAD_PRIVATE_MUTEX_LOCK(pw);
+ saved_errno = errno;
+ errno = 0;
  if (!_pw_db && !__initdb())
  goto fail;
 
@@ -778,8 +790,12 @@
 fail:
  if (pwretp)
  *pwretp = pwret;
+ if (pwret == NULL)
+ my_errno = errno;
+ if (!errno)
+ errno = saved_errno;
  _THREAD_PRIVATE_MUTEX_UNLOCK(pw);
- return (pwret ? 0 : 1);
+ return (my_errno);
 }
 
 struct passwd *

Reply | Threaded
Open this post in threaded view
|

Re: dovecot issues

Stuart Henderson
In reply to this post by Edgar Pettijohn III
Sender: [hidden email]
On-Behalf-Of: [hidden email]
Subject: Re: dovecot issues
Message-Id: <[hidden email]>
Recipient: [hidden email]
Received: from Mail2.damovo.com (109.204.121.44)
        by UK001B237.d.grp (10.8.1.9) with Microsoft SMTP Server (TLS) id 14.2.318.4; Sun, 22 Jun 2014 10:56:38 +0100
Received: from cluster-j.mailcontrol.com (85.115.54.190)
        by Mail2.damovo.com (109.204.121.44) with Microsoft SMTP Server (TLS) id 14.2.318.4; Sun, 22 Jun 2014 10:56:36 +0100
Received: from shear.ucar.edu (lists.openbsd.org [192.43.244.163])
        by rly33j.srv.mailcontrol.com (MailControl) with ESMTP id s5M9uXqK017194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL)
        for <[hidden email]>; Sun, 22 Jun 2014 10:56:36 +0100
Received: from openbsd.org (localhost [127.0.0.1])
        by shear.ucar.edu (8.14.5/8.14.5) with ESMTP id s5MA6YIX016881
        for <[hidden email]>; Sun, 22 Jun 2014 04:06:36 -0600 (MDT)
Received: from plane.gmane.org (plane.gmane.org [80.91.229.3])
        by shear.ucar.edu (8.14.5/8.14.5) with ESMTP id s5MA6Asi022634
        for <[hidden email]>; Sun, 22 Jun 2014 04:06:11 -0600 (MDT)
Received: from list
        by plane.gmane.org with local (Exim 4.69) (envelope-from <[hidden email]>) id 1WyeVD-00063u-5m
        for [hidden email]; Sun, 22 Jun 2014 11:55:59 +0200
Received: from naiad.spacehopper.org ([195.95.187.26])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
        for <[hidden email]>; Sun, 22 Jun 2014 11:55:59 +0200
Received: from stu
        by naiad.spacehopper.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
        for <[hidden email]>; Sun, 22 Jun 2014 11:55:59 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: <[hidden email]>
From: Stuart Henderson <[hidden email]>
Subject: Re: dovecot issues
Date: Sun, 22 Jun 2014 09:55:48 +0000
Lines: 126
Message-ID: <[hidden email]>
References: <[hidden email]> <[hidden email]> <[hidden email]> <[hidden email]> <[hidden email]> <[hidden email]> <[hidden email]>
X-Complaints-To: [hidden email]
X-Gmane-NNTP-Posting-Host: naiad.spacehopper.org
User-Agent: slrn/1.0.1 (OpenBSD)
List-Help: <mailto:[hidden email]?body=help>
List-ID: <misc.openbsd.org>
List-Owner: <mailto:[hidden email]>
List-Post: <mailto:[hidden email]>
List-Subscribe: <mailto:[hidden email]?body=sub%20misc>
List-Unsubscribe: <mailto:[hidden email]?body=unsub%20misc>
X-Loop: [hidden email]
Precedence: list
Sender: <[hidden email]>
X-Mailcontrol-Inbound: 8gSgIv9v3sbRnxYICSb3h!uiaIa96vptNsOUTq2TeYo=
X-Spam-Score: -0.7
X-Scanned-By: MailControl 28796.38 (www.mailcontrol.com) on 10.74.0.143
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Return-Path: owner-misc+M140771=adam.atkinson=[hidden email]
X-MS-Exchange-Organization-OriginalArrivalTime: 22 Jun 2014 09:56:36.9984 (UTC)
X-MS-Exchange-Organization-OriginalClientIPAddress: 85.115.54.190
X-MS-Exchange-Organization-OriginalServerIPAddress: 109.204.121.44
X-MS-Exchange-Organization-MessageDirectionality: Incoming
X-MS-Exchange-Organization-Cross-Premises-Headers-Processed: Mail2.damovo.com
X-MS-Exchange-Organization-PRD: openbsd.org
Received-SPF: None (Mail2.damovo.com: [hidden email] does not designate permitted sender hosts)
X-MS-Exchange-Organization-OriginalSize: 6183
X-MS-Exchange-Forest-MessageScope: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Organization-MessageScope: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Organization-HygienePolicy: Standard
X-MS-Exchange-Organization-AVStamp-Mailbox: MSFTFF;1;0;0 0 0
X-MS-Exchange-Organization-MessageLatencyInProgress: LSRV=Mail2.damovo.com:TOTAL=0;2014-06-22T09:56:37.232Z
X-MS-Exchange-Forest-ArrivalHubServer: UK001B237.d.grp
X-MS-Exchange-Organization-SenderIdResult: NONE
X-MS-Exchange-Organization-AuthSource: Mail2.damovo.com
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-MessageLatency: SRV=Mail2.damovo.com:TOTAL=0
X-MS-Exchange-Organization-Recipient-Limit-Verified: True
X-MS-Exchange-Forest-RulesExecuted: UK001B237
X-MS-Exchange-Organization-Rules-Execution-History: WW-SetDomainsAsNotJunk%%%DamovoUK-FaultEscalation%%%DamovoUK_AutoResponse%%%DE-UPSAlarmRule%%%BE-OutboundDisclaimer%%%WW-OutboundDisclaimer%%%UK-OutboundDisclaimer%%%IE-OutboundDisclaimer%%%DamovoUK_GFiRule%%%DE-Redirect_Techem%%%CH-SupportRule%%%UKScanToEmailBlockExternal

On 2014-06-21, Otto Moerbeek <[hidden email]> wrote:
>
> This is a know bug. If an unknown user tries to log in, the login code
> goes into a loop expanding a buffer until it runs out of mem. The
> cause of the bug is also known, but nobody (including myself) came up
> with a diff yet.

To be clear: this is fixed in libc but it's a post-5.5 change - when Otto
says that nobody came up with a diff, he's talking about a diff to have
dovecot cope with the old libc code. The relevant libc commit (below) should
apply directly to a 5.5 system.

Also note that you can use a separate passwd-like file for dovecot
authentication, which is not affected by this bug, so you can work around
it without configuring ldap/sql. (Personally I like to use different
passwords for email and login accounts so I do this anyway..)


---------------------
PatchSet 5269
Date: 2014/03/05 23:44:47
Author: schwarze
Branch: HEAD
Tag: (none)
Log:
Fix the return values of getpwnam_r(), getpwuid_r(), getgrnam_r(),
and getgrgid_r() to agree with POSIX.  Not touching errno handling
yet, which will also need fixing.

Problem originally reported by william at 25thandClement dot com on bugs@.
OK sthen@, and kettenis@ agrees it's "a step in the right direction".

Members:
        gen/getgrent.c:1.38->1.39
        gen/getpwent.c:1.48->1.49

Index: src/lib/libc/gen/getgrent.c
diff -u src/lib/libc/gen/getgrent.c:1.38 src/lib/libc/gen/getgrent.c:1.39
--- src/lib/libc/gen/getgrent.c:1.38 Wed Apr 17 17:40:35 2013
+++ src/lib/libc/gen/getgrent.c Wed Mar  5 23:44:47 2014
@@ -1,4 +1,4 @@
-/* $OpenBSD: getgrent.c,v 1.38 2013/04/17 17:40:35 tedu Exp $ */
+/* $OpenBSD: getgrent.c,v 1.39 2014/03/05 23:44:47 schwarze Exp $ */
 /*
  * Copyright (c) 1989, 1993
  * The Regents of the University of California.  All rights reserved.
@@ -134,6 +134,7 @@
  if (bufsize < GETGR_R_SIZE_MAX)
  return ERANGE;
  errnosave = errno;
+ errno = 0;
  *result = getgrnam_gs(name, grp, (struct group_storage *)buffer);
  if (*result == NULL)
  ret = errno;
@@ -180,6 +181,7 @@
  if (bufsize < GETGR_R_SIZE_MAX)
  return ERANGE;
  errnosave = errno;
+ errno = 0;
  *result = getgrgid_gs(gid, grp, (struct group_storage *)buffer);
  if (*result == NULL)
  ret = errno;
Index: src/lib/libc/gen/getpwent.c
diff -u src/lib/libc/gen/getpwent.c:1.48 src/lib/libc/gen/getpwent.c:1.49
--- src/lib/libc/gen/getpwent.c:1.48 Fri Nov 15 22:32:55 2013
+++ src/lib/libc/gen/getpwent.c Wed Mar  5 23:44:47 2014
@@ -1,4 +1,4 @@
-/* $OpenBSD: getpwent.c,v 1.48 2013/11/15 22:32:55 benno Exp $ */
+/* $OpenBSD: getpwent.c,v 1.49 2014/03/05 23:44:47 schwarze Exp $ */
 /*
  * Copyright (c) 2008 Theo de Raadt
  * Copyright (c) 1988, 1993
@@ -708,8 +708,12 @@
 {
  struct passwd *pwret = NULL;
  int flags = 0, *flagsp;
+ int my_errno = 0;
+ int saved_errno;
 
  _THREAD_PRIVATE_MUTEX_LOCK(pw);
+ saved_errno = errno;
+ errno = 0;
  if (!_pw_db && !__initdb())
  goto fail;
 
@@ -733,8 +737,12 @@
 fail:
  if (pwretp)
  *pwretp = pwret;
+ if (pwret == NULL)
+ my_errno = errno;
+ if (!errno)
+ errno = saved_errno;
  _THREAD_PRIVATE_MUTEX_UNLOCK(pw);
- return (pwret ? 0 : 1);
+ return (my_errno);
 }
 
 struct passwd *
@@ -753,8 +761,12 @@
 {
  struct passwd *pwret = NULL;
  int flags = 0, *flagsp;
+ int my_errno = 0;
+ int saved_errno;
 
  _THREAD_PRIVATE_MUTEX_LOCK(pw);
+ saved_errno = errno;
+ errno = 0;
  if (!_pw_db && !__initdb())
  goto fail;
 
@@ -778,8 +790,12 @@
 fail:
  if (pwretp)
  *pwretp = pwret;
+ if (pwret == NULL)
+ my_errno = errno;
+ if (!errno)
+ errno = saved_errno;
  _THREAD_PRIVATE_MUTEX_UNLOCK(pw);
- return (pwret ? 0 : 1);
+ return (my_errno);
 }
 
 struct passwd *