You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by si...@post.ch on 2020/03/02 14:50:44 UTC

[users@httpd] Segmentation faults on graceful reload of Apache httpd with APR 1.7.0 and mod_auth_openidc

Hi everyone,

We have been having issues with segmentation faults on graceful restarts of Apache httpd in combination with the module mod_auth_openidc.

After a back and forth with one of the developers over on Github, we came to the finding that the segmentation faults occur with version 1.7.0 of the APR but not version 1.6.5. The full discussion can be found in the Github issue at https://github.com/zmartzone/mod_auth_openidc/issues/458.

To reliably reproduce the problem, my coworker created a Docker container and uploaded it to Docker Hub at https://hub.docker.com/r/ifrido/httpd-openidc-debug with detailed steps to produce the segmentation fault on the Overview page. The corresponding Dockerfile can be viewed at https://hub.docker.com/r/ifrido/httpd-openidc-debug/dockerfile.

The setup consists of the following components:
- centos:latest (Docker image),
- apr-1.7.0 (self-compiled),
- apr-util-1.6.1 (self-compiled),
- httpd-2.4.41 (self-compiled), and
- mod_auth_openidc-2.4.1 (self-compiled).

My coworker also confirmed that the problem does not occur, if APR version 1.6.5 is used instead of version 1.7.0.

Note that we are not sure if it is a bug in mod_auth_openidc, in APR 1.7.0, our configuration, or the way we build the components.

We are not sure how to proceed with this issue, so any help or suggestions are appreciated. I am also happy to provide more information if necessary.

Thanks!
Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


AW: [users@httpd] Segmentation faults on graceful reload of Apache httpd with APR 1.7.0 and mod_auth_openidc

Posted by si...@post.ch.
Hi Eric,

Just to let you know, it appears that the developer managed to solve the issue with your suggestion: https://github.com/zmartzone/mod_auth_openidc/issues/458#issuecomment-599203268.

Thanks again!
Simon


-----Ursprüngliche Nachricht-----
Von: Studer Simon, I253 extern 
Gesendet: Dienstag, 3. März 2020 08:21
An: users@httpd.apache.org
Betreff: AW: [users@httpd] Segmentation faults on graceful reload of Apache httpd with APR 1.7.0 and mod_auth_openidc

Hi Eric,

Thank you for your quick reply! This information might be interesting for the developers of mod_auth_openidc. I will show them your message and report back here if we manage to solve the issue.

Best,
Simon


-----Ursprüngliche Nachricht-----
Von: Eric Covener <co...@gmail.com>
Gesendet: Montag, 2. März 2020 17:01
An: users@httpd.apache.org
Betreff: Re: [users@httpd] Segmentation faults on graceful reload of Apache httpd with APR 1.7.0 and mod_auth_openidc

On Mon, Mar 2, 2020 at 10:59 AM Eric Covener <co...@gmail.com> wrote:
>
> On Mon, Mar 2, 2020 at 9:50 AM <si...@post.ch> wrote:
> >
> > Hi everyone,
> >
> > We have been having issues with segmentation faults on graceful restarts of Apache httpd in combination with the module mod_auth_openidc.
> >
> > After a back and forth with one of the developers over on Github, we came to the finding that the segmentation faults occur with version 1.7.0 of the APR but not version 1.6.5. The full discussion can be found in the Github issue at https://github.com/zmartzone/mod_auth_openidc/issues/458.
> >
> > To reliably reproduce the problem, my coworker created a Docker container and uploaded it to Docker Hub at https://hub.docker.com/r/ifrido/httpd-openidc-debug with detailed steps to produce the segmentation fault on the Overview page. The corresponding Dockerfile can be viewed at https://hub.docker.com/r/ifrido/httpd-openidc-debug/dockerfile.
>
> Hi Simon, re: your GH issue and specifically the snippet here:
> https://github.com/zmartzone/mod_auth_openidc/issues/458

Argh, meant https://github.com/zmartzone/mod_auth_openidc/issues/458#issuecomment-581413230

>
> To me it's a bit bizarre that this SHM cache does cleanups in the 
> child processes.
> The SHM is created by the parent process and would normally be 
> destroyed in the parent process.  This would be the usual handling of 
> shared memory AFAICT.
>
> Since "context" itself is not in shared memory, there is no way for 
> one child to tell another that it has destroyed the SHM segment.
> Also, nothing modules should not really write to the pointers hung off
> their per-module or per-directory apache configs.   It is another red
> flag in this same short snippet.
>
> Unless the maintainers have some trivia about why this cleanup of SHM 
> should run in the parent, I think it's the culprit.



--
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

AW: [users@httpd] Segmentation faults on graceful reload of Apache httpd with APR 1.7.0 and mod_auth_openidc

Posted by si...@post.ch.
Hi Eric,

Thank you for your quick reply! This information might be interesting for the developers of mod_auth_openidc. I will show them your message and report back here if we manage to solve the issue.

Best,
Simon


-----Ursprüngliche Nachricht-----
Von: Eric Covener <co...@gmail.com> 
Gesendet: Montag, 2. März 2020 17:01
An: users@httpd.apache.org
Betreff: Re: [users@httpd] Segmentation faults on graceful reload of Apache httpd with APR 1.7.0 and mod_auth_openidc

On Mon, Mar 2, 2020 at 10:59 AM Eric Covener <co...@gmail.com> wrote:
>
> On Mon, Mar 2, 2020 at 9:50 AM <si...@post.ch> wrote:
> >
> > Hi everyone,
> >
> > We have been having issues with segmentation faults on graceful restarts of Apache httpd in combination with the module mod_auth_openidc.
> >
> > After a back and forth with one of the developers over on Github, we came to the finding that the segmentation faults occur with version 1.7.0 of the APR but not version 1.6.5. The full discussion can be found in the Github issue at https://github.com/zmartzone/mod_auth_openidc/issues/458.
> >
> > To reliably reproduce the problem, my coworker created a Docker container and uploaded it to Docker Hub at https://hub.docker.com/r/ifrido/httpd-openidc-debug with detailed steps to produce the segmentation fault on the Overview page. The corresponding Dockerfile can be viewed at https://hub.docker.com/r/ifrido/httpd-openidc-debug/dockerfile.
>
> Hi Simon, re: your GH issue and specifically the snippet here:
> https://github.com/zmartzone/mod_auth_openidc/issues/458

Argh, meant https://github.com/zmartzone/mod_auth_openidc/issues/458#issuecomment-581413230

>
> To me it's a bit bizarre that this SHM cache does cleanups in the 
> child processes.
> The SHM is created by the parent process and would normally be 
> destroyed in the parent process.  This would be the usual handling of 
> shared memory AFAICT.
>
> Since "context" itself is not in shared memory, there is no way for 
> one child to tell another that it has destroyed the SHM segment.
> Also, nothing modules should not really write to the pointers hung off
> their per-module or per-directory apache configs.   It is another red
> flag in this same short snippet.
>
> Unless the maintainers have some trivia about why this cleanup of SHM 
> should run in the parent, I think it's the culprit.



--
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: [users@httpd] Segmentation faults on graceful reload of Apache httpd with APR 1.7.0 and mod_auth_openidc

Posted by Eric Covener <co...@gmail.com>.
On Mon, Mar 2, 2020 at 10:59 AM Eric Covener <co...@gmail.com> wrote:
>
> On Mon, Mar 2, 2020 at 9:50 AM <si...@post.ch> wrote:
> >
> > Hi everyone,
> >
> > We have been having issues with segmentation faults on graceful restarts of Apache httpd in combination with the module mod_auth_openidc.
> >
> > After a back and forth with one of the developers over on Github, we came to the finding that the segmentation faults occur with version 1.7.0 of the APR but not version 1.6.5. The full discussion can be found in the Github issue at https://github.com/zmartzone/mod_auth_openidc/issues/458.
> >
> > To reliably reproduce the problem, my coworker created a Docker container and uploaded it to Docker Hub at https://hub.docker.com/r/ifrido/httpd-openidc-debug with detailed steps to produce the segmentation fault on the Overview page. The corresponding Dockerfile can be viewed at https://hub.docker.com/r/ifrido/httpd-openidc-debug/dockerfile.
>
> Hi Simon, re: your GH issue and specifically the snippet here:
> https://github.com/zmartzone/mod_auth_openidc/issues/458

Argh, meant https://github.com/zmartzone/mod_auth_openidc/issues/458#issuecomment-581413230

>
> To me it's a bit bizarre that this SHM cache does cleanups in the
> child processes.
> The SHM is created by the parent process and would normally be
> destroyed in the parent process.  This would
> be the usual handling of shared memory AFAICT.
>
> Since "context" itself is not in shared memory, there is no way for
> one child to tell another that it has destroyed the SHM segment.
> Also, nothing modules should not really write to the pointers hung off
> their per-module or per-directory apache configs.   It is another red
> flag in this same short snippet.
>
> Unless the maintainers have some trivia about why this cleanup of SHM
> should run in the parent, I think it's the culprit.



-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Segmentation faults on graceful reload of Apache httpd with APR 1.7.0 and mod_auth_openidc

Posted by Eric Covener <co...@gmail.com>.
On Mon, Mar 2, 2020 at 9:50 AM <si...@post.ch> wrote:
>
> Hi everyone,
>
> We have been having issues with segmentation faults on graceful restarts of Apache httpd in combination with the module mod_auth_openidc.
>
> After a back and forth with one of the developers over on Github, we came to the finding that the segmentation faults occur with version 1.7.0 of the APR but not version 1.6.5. The full discussion can be found in the Github issue at https://github.com/zmartzone/mod_auth_openidc/issues/458.
>
> To reliably reproduce the problem, my coworker created a Docker container and uploaded it to Docker Hub at https://hub.docker.com/r/ifrido/httpd-openidc-debug with detailed steps to produce the segmentation fault on the Overview page. The corresponding Dockerfile can be viewed at https://hub.docker.com/r/ifrido/httpd-openidc-debug/dockerfile.

Hi Simon, re: your GH issue and specifically the snippet here:
https://github.com/zmartzone/mod_auth_openidc/issues/458

To me it's a bit bizarre that this SHM cache does cleanups in the
child processes.
The SHM is created by the parent process and would normally be
destroyed in the parent process.  This would
be the usual handling of shared memory AFAICT.

Since "context" itself is not in shared memory, there is no way for
one child to tell another that it has destroyed the SHM segment.
Also, nothing modules should not really write to the pointers hung off
their per-module or per-directory apache configs.   It is another red
flag in this same short snippet.

Unless the maintainers have some trivia about why this cleanup of SHM
should run in the parent, I think it's the culprit.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org