Issue 1973 - Shell Fork Runaway Bug
Summary: Shell Fork Runaway Bug
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-20 23:47 UTC by anthm@cylynx.com
Modified: 2004-12-06 01:36 UTC (History)
0 users

See Also:


Attachments
fork.c (2.34 KB, text/x-csrc)
2002-07-22 15:31 UTC, anthm@cylynx.com
Details

Note You need to log in before you can comment on or make changes to this issue.
Description anthm@cylynx.com 2002-07-20 23:47:40 UTC
Full_Name: Anthony Minessale
Version: newest
OS: solaris
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (65.31.133.81)


There is a bug in the code for the shell module 
that causes exec / fork runaway that will kill the box.

It was already acknoledged like a year ago and I patched an 
earlier version,  Is this bug going to be removed from the production 
release soon?  I got the newest one last week and was suprised it still
exsisted
and I have'nt the time to mess with patching it every time so 
I guess I'll wait paitently.  Just wondering in case it slipped through 
the cracks.









Comment 1 Kurt Zeilenga 2002-07-22 07:08:37 UTC
At 08:47 AM 2002-07-21, anthm@cylynx.com wrote:
>Full_Name: Anthony Minessale
>Version: newest
>OS: solaris
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (65.31.133.81)
>
>
>There is a bug in the code for the shell module 
>that causes exec / fork runaway that will kill the box.
>
>It was already acknoledged like a year ago and I patched an 
>earlier version,  Is this bug going to be removed from the production 
>release soon?  I got the newest one last week and was suprised it still
>exsisted
>and I have'nt the time to mess with patching it every time so 
>I guess I'll wait paitently.  Just wondering in case it slipped through 
>the cracks.

What's the ITS tracking number of your original bug report / patch
submission?  I'm also not sure what you mean by "newest".  Please
use version numbers (or dates if using CVS branch tags).

Kurt


Comment 2 anthm@cylynx.com 2002-07-22 15:31:33 UTC
hi,

I found the original patched servers/slapd/back-shell/fork.c
that I have. The unpatched version has not changed at all since 
2.0.25


Here is a diff from the unmodified version.
and the mod fork.c is attached.

7a8,10
>
>
>
15a19,22
> #include <ac/wait.h>
> #include <ac/signal.h>
> #include <ac/errno.h>
>
18a26,52
>
>
> static RETSIGTYPE
> wait4child( int sig )
> {
>   int save_errno = errno;
>
> #ifdef WNOHANG
>   errno = 0;
> #ifdef HAVE_WAITPID
>   while ( waitpid( (pid_t)-1, NULL, WNOHANG ) > 0 || errno == EINTR )
>     ;       /* NULL */
> #else
>   while ( wait3( NULL, WNOHANG, NULL ) > 0 || errno == EINTR )
>     ;       /* NULL */
> #endif
> #else
>   (void) wait( NULL );
> #endif
>   (void) SIGNAL_REINSTALL( sig, wait4child );
>   errno = save_errno;
> }
>
>
>
>
>
84a119,121
>       while ( waitpid( (pid_t)-1, NULL, WNOHANG ) > 0 || errno == EINTR )
>         ;       /* NULL */
>
86a124,129
>
>
>
>
>
>




----- Original Message ----- 
From: <openldap-its@OpenLDAP.org>
To: <anthm@cylynx.com>
Sent: Saturday, July 20, 2002 6:47 PM
Subject: Re: Shell Fork Runaway Bug (ITS#1973)



*** THIS IS AN AUTOMATICALLY GENERATED REPLY ***

Thanks for your report to openldap-its@OpenLDAP.org.  Your report
has been placed into our Issue Tracking System and has been assigned
the tracking number ITS#1973.

One of our support engineers will look at your report in due course.
Note that this may take some time because our support engineers
are volunteers.  They only work on OpenLDAP when they have spare
time.

If you need to provide additional information in regards to your
issue report, you may do so by replying to this message.  Note that
any mail sent to openldap-its@openldap.org with (ITS#1973)
in the subject will automatically be attached to the issue report.

mailto:openldap-its@openldap.org?subject=(ITS#1973)

You may follow the progress of this report by loading the following
URL in a web browser:
    http://www.OpenLDAP.org/its/index.cgi?findid=1973

Please remember to retain your issue tracking number (ITS#1973)
on any further messages you send to us regarding this report.  If
you don't then you'll just waste our time and yours because we
won't be able to properly track the report.

Please note that the Issue Tracking System is not intended to
be used to seek help in the proper use of OpenLDAP Software.
Such requests will be closed.

OpenLDAP Software is user supported.
http://www.OpenLDAP.org/support/

--------------
Copyright 2002 The OpenLDAP Foundation, All Rights Reserved.


Comment 3 anthm@cylynx.com 2002-07-22 18:46:19 UTC
Sorry,

I didnt submit the original bug I just was a victim of it.
When you use the shell backend there is code in both the shell mod and the main
process that works find for any number of days then unde some condition
will start to spawn off zombies like mad and take the box down.
I do remem

The issue tracking system used to find a bunch of refs to it.
2.0.18 was when I first encountered it and used a patch
as well as some rearranging of my own to get something to work
nothing formal.

I tried 2.0.25 expecting the bug to be gone and got the same
problem was what I was trying to say.


I looked it up on google and found this little thread discussing it.

http://www.openldap.org/lists/openldap-bugs/199812/msg00077.html



----- Original Message -----
From: "Kurt D. Zeilenga" <Kurt@OpenLDAP.org>
To: <anthm@cylynx.com>
Cc: <openldap-its@OpenLDAP.org>
Sent: Monday, July 22, 2002 2:08 AM
Subject: Re: Shell Fork Runaway Bug (ITS#1973)


At 08:47 AM 2002-07-21, anthm@cylynx.com wrote:
>Full_Name: Anthony Minessale
>Version: newest
>OS: solaris
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (65.31.133.81)
>
>
>There is a bug in the code for the shell module
>that causes exec / fork runaway that will kill the box.
>
>It was already acknoledged like a year ago and I patched an
>earlier version,  Is this bug going to be removed from the production
>release soon?  I got the newest one last week and was suprised it still
>exsisted
>and I have'nt the time to mess with patching it every time so
>I guess I'll wait paitently.  Just wondering in case it slipped through
>the cracks.

What's the ITS tracking number of your original bug report / patch
submission?  I'm also not sure what you mean by "newest".  Please
use version numbers (or dates if using CVS branch tags).

Kurt

Comment 4 Kurt Zeilenga 2002-07-28 05:03:10 UTC
There is a bug fix for this in HEAD.  It is suggested
that older versions of back-shell not be used in
threaded environments. 

Kurt


At 11:46 AM 2002-07-22, anthm@cylynx.com wrote:
>Sorry,
>
>I didnt submit the original bug I just was a victim of it.
>When you use the shell backend there is code in both the shell mod and the main
>process that works find for any number of days then unde some condition
>will start to spawn off zombies like mad and take the box down.
>I do remem
>
>The issue tracking system used to find a bunch of refs to it.
>2.0.18 was when I first encountered it and used a patch
>as well as some rearranging of my own to get something to work
>nothing formal.
>
>I tried 2.0.25 expecting the bug to be gone and got the same
>problem was what I was trying to say.
>
>
>I looked it up on google and found this little thread discussing it.
>
>http://www.openldap.org/lists/openldap-bugs/199812/msg00077.html
>
>
>
>----- Original Message -----
>From: "Kurt D. Zeilenga" <Kurt@OpenLDAP.org>
>To: <anthm@cylynx.com>
>Cc: <openldap-its@OpenLDAP.org>
>Sent: Monday, July 22, 2002 2:08 AM
>Subject: Re: Shell Fork Runaway Bug (ITS#1973)
>
>
>At 08:47 AM 2002-07-21, anthm@cylynx.com wrote:
>>Full_Name: Anthony Minessale
>>Version: newest
>>OS: solaris
>>URL: ftp://ftp.openldap.org/incoming/
>>Submission from: (NULL) (65.31.133.81)
>>
>>
>>There is a bug in the code for the shell module
>>that causes exec / fork runaway that will kill the box.
>>
>>It was already acknoledged like a year ago and I patched an
>>earlier version,  Is this bug going to be removed from the production
>>release soon?  I got the newest one last week and was suprised it still
>>exsisted
>>and I have'nt the time to mess with patching it every time so
>>I guess I'll wait paitently.  Just wondering in case it slipped through
>>the cracks.
>
>What's the ITS tracking number of your original bug report / patch
>submission?  I'm also not sure what you mean by "newest".  Please
>use version numbers (or dates if using CVS branch tags).
>
>Kurt

Comment 5 Kurt Zeilenga 2002-09-06 21:17:26 UTC
changed state Open to Closed
Comment 6 Howard Chu 2004-12-06 01:36:04 UTC
moved from Incoming to Archive.Incoming