You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Brian Adams <ba...@admeld.com> on 2009/01/08 03:13:37 UTC

null pollset

Hi,

I just created a new dev box on Fedora 10 and I’m seeing something strange with httpd that I built from source.  It’s segfaulting constantly (even though I can get pages and modules to execute).  If I look at a coredump I see this:

(gdb) where
#0  apr_pollset_add (pollset=0x0, descriptor=0xbf8aadec) at poll/unix/epoll.c:150
#1  0x080bd161 in child_main (child_num_arg=<value optimized out>) at prefork.c:532
#2  0x080bd613 in make_child (s=0x8ee4830, slot=1) at prefork.c:746
#3  0x080bdc9a in startup_children () at prefork.c:764
#4  ap_mpm_run (_pconf=0x8edf550, plog=0x8f19638, s=0x8ee4830) at prefork.c:985
#5  0x08069800 in main (argc=Cannot access memory at address 0x0
) at main.c:740


Looks like apr_pollset_create is failing in prefork.c.  Any ideas on why this would happen?

Thanks for the help.

Brian

RE: null pollset

Posted by Brian Adams <ba...@admeld.com>.
It's definitely this.   Thanks!



-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@kippdata.de]
Sent: Thu 1/8/2009 6:21 AM
To: modules-dev@httpd.apache.org
Subject: Re: null pollset
 
On 08.01.2009 03:13, Brian Adams wrote:
> Hi,
>
> I just created a new dev box on Fedora 10 and I'm seeing something strange with httpd that I built from source.  It's segfaulting constantly (even though I can get pages and modules to execute).  If I look at a coredump I see this:
>
> (gdb) where
> #0  apr_pollset_add (pollset=0x0, descriptor=0xbf8aadec) at poll/unix/epoll.c:150
> #1  0x080bd161 in child_main (child_num_arg=<value optimized out>) at prefork.c:532
> #2  0x080bd613 in make_child (s=0x8ee4830, slot=1) at prefork.c:746
> #3  0x080bdc9a in startup_children () at prefork.c:764
> #4  ap_mpm_run (_pconf=0x8edf550, plog=0x8f19638, s=0x8ee4830) at prefork.c:985
> #5  0x08069800 in main (argc=Cannot access memory at address 0x0
> ) at main.c:740
>
>
> Looks like apr_pollset_create is failing in prefork.c.  Any ideas on why this would happen?

Could it be BZ 46467?

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467

Regards,

Rainer


Re: null pollset

Posted by Rainer Jung <ra...@kippdata.de>.
On 08.01.2009 03:13, Brian Adams wrote:
> Hi,
>
> I just created a new dev box on Fedora 10 and I’m seeing something strange with httpd that I built from source.  It’s segfaulting constantly (even though I can get pages and modules to execute).  If I look at a coredump I see this:
>
> (gdb) where
> #0  apr_pollset_add (pollset=0x0, descriptor=0xbf8aadec) at poll/unix/epoll.c:150
> #1  0x080bd161 in child_main (child_num_arg=<value optimized out>) at prefork.c:532
> #2  0x080bd613 in make_child (s=0x8ee4830, slot=1) at prefork.c:746
> #3  0x080bdc9a in startup_children () at prefork.c:764
> #4  ap_mpm_run (_pconf=0x8edf550, plog=0x8f19638, s=0x8ee4830) at prefork.c:985
> #5  0x08069800 in main (argc=Cannot access memory at address 0x0
> ) at main.c:740
>
>
> Looks like apr_pollset_create is failing in prefork.c.  Any ideas on why this would happen?

Could it be BZ 46467?

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467

Regards,

Rainer

Re: null pollset

Posted by Sorin Manolache <so...@gmail.com>.
On Thu, Jan 8, 2009 at 03:13, Brian Adams <ba...@admeld.com> wrote:
>
> Hi,
>
> I just created a new dev box on Fedora 10 and I'm seeing something strange with httpd that I built from source.  It's segfaulting constantly (even though I can get pages and modules to execute).  If I look at a coredump I see this:
>
> (gdb) where
> #0  apr_pollset_add (pollset=0x0, descriptor=0xbf8aadec) at poll/unix/epoll.c:150
> #1  0x080bd161 in child_main (child_num_arg=<value optimized out>) at prefork.c:532
> #2  0x080bd613 in make_child (s=0x8ee4830, slot=1) at prefork.c:746
> #3  0x080bdc9a in startup_children () at prefork.c:764
> #4  ap_mpm_run (_pconf=0x8edf550, plog=0x8f19638, s=0x8ee4830) at prefork.c:985
> #5  0x08069800 in main (argc=Cannot access memory at address 0x0
> ) at main.c:740
>
>
> Looks like apr_pollset_create is failing in prefork.c.  Any ideas on why this would happen?

Here you have a part of the code of apr_pollset_create.

child_main calls this function with flags = 0 and size =
num_listeners. I don't know how num_listeners is initialised. Anyway,
"man epoll_create" says that the size argument is ignored by
epoll_create.

Anyway, I would recommend you to try a small program calling
epoll_create. It could be that you don't have a kernel compiled with
epoll (epoll_create returns -1).

APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset,
                                             apr_uint32_t size,
                                             apr_pool_t *p,
                                             apr_uint32_t flags)
{
    apr_status_t rv;
    int fd;

    fd = epoll_create(size);
    if (fd < 0) {
        *pollset = NULL;
        return errno;
    }

    *pollset = apr_palloc(p, sizeof(**pollset));

// skipped the rest. If we reach here, pollset cannot be NULL anymore.
There's more code but "flags" being 0 makes sure that the code where
*pollset = NULL is not executed.

    return APR_SUCCESS;
}



>
> Thanks for the help.
>
> Brian
>



-- 
A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?