Re: Strange Segmentation Fault
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Thu, 22 Jun 2006 18:33:05 +0000 (UTC)
In article <pan.2006.06.22.18.01.59.226931@xxxxxxxxxxx>,
Tim Evers <devnull@xxxxxxxxxxx> wrote:
Es schrieb roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson):
In article <pan.2006.06.22.17.36.45.448101@xxxxxxxxxxx>,
Tim Evers <devnull@xxxxxxxxxxx> wrote:
linux system, apache w. suexec, perl, graphviz (2.8).
A perl script calls the graphviz binary. This works perfectly in a console
but fails with a segfault when called under Apache/mod_cgi/perl
I think you'd better take this question to a linux newsgroup.
comp.lang.c only deals with matters that are expressible in standard C
but large parts of apache and suexec and perl require system-specific
extensions.
Thanks for the tip - I will do that, but all the Apache/Perl stuff ist not
problem specific and just presented "colorandi causa".
Ah? Then you've been able to reproduce the problem without using
apache or perl? Until you are able to create a test case that does
not rely on those factors, you cannot know whether they are
contributing to the problem or not.
This is a strace excerpt:
27137 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
mmap() and mmap2() are not part of standard C.
[Off topic]
When you are running under apache mod_perl, you are going to have
libraries loaded into your address space that you would not otherwise
have loaded. Depending on where the system's memory allocator
places allocated memory relative to loaded libraries, that could
result there being a noticably smaller available allocatable space.
Are you checking all of your malloc()'s to see if they perhaps
return the NULL pointer?
Alternately, it is potentially a case not of running out of virtual
memory, but rather that the virtual memory gets located in a different
place when those libraries are loaded, and that the difference in
location is making visible a bug you have in using a bad pointer
or in accessing an array out of bounds.
So, are you *sure* that
"all the Apache/Perl stuff is not problem specific" ?
--
"law -- it's a commodity"
-- Andrew Ryan (The Globe and Mail, 2005/11/26)
.
- Follow-Ups:
- Re: Strange Segmentation Fault
- From: Tim Evers
- Re: Strange Segmentation Fault
- References:
- Strange Segmentation Fault
- From: Tim Evers
- Re: Strange Segmentation Fault
- From: Walter Roberson
- Re: Strange Segmentation Fault
- From: Tim Evers
- Strange Segmentation Fault
- Prev by Date: 16-Bit char pointers valid?
- Next by Date: Re: ifdefs
- Previous by thread: Re: Strange Segmentation Fault
- Next by thread: Re: Strange Segmentation Fault
- Index(es):
Relevant Pages
|
|