You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Charles Randall <cr...@matchlogic.com> on 2000/02/17 17:01:38 UTC

2.0 builds, but dumps core on FreeBSD 3.3

Following Bill Stoddard's mini-instructions (sure wish the details were in a
README or STATUS)...

Using FreeBSD 3.3-R, libtool 1.3.4, m4 1.4, autoconf 2.13 and a fresh copy
of the apache-2.0 source via rsync,

	% ./buildconf
	% ./configure
	% make

results in an "apache" executable using the mpmt_pthread MPM.

Unfortunately, it simply dumps core at startup. For example, trying to get
the module list with the '-l' (ell) option I get

	% ./apache -l
	Segmentation fault(core dumped)

Running in the debugger,

--- snip ---
(gdb) run
Starting program: /usr/home/crandall/2.0/apache-2.0/src/apache 

Program received signal SIGSEGV, Segmentation fault.
ap_lock (lock=0x0) at locks.c:121
121         if (lock->type != APR_CROSS_PROCESS) {
--- snip ---

Backing off to the prefork MPM by trying,

	% ./buildconf
	% ./configure --with-mpm=prefork
	% make

Same thing,

	% ./apache -l
	Segmentation fault(core dumped)

Same place,

--- snip ---
(gdb) run
Starting program: /usr/home/crandall/2.0/apache-2.0/src/apache 

Program received signal SIGSEGV, Segmentation fault.
ap_lock (lock=0x0) at locks.c:121
121         if (lock->type != APR_CROSS_PROCESS) {
--- snip ---

If my build method is totally off-base, someone please post a consistent
method that we can use for "build-a-thons" on the systems we have available
to us.

As a side note, shouldn't "make distclean" remove config.status in the mm
directory?

Suggestions?

Charles


Re: [PATCH] 2.0 builds, but dumps core on FreeBSD 3.3 (ap_lock)

Posted by Jeff Trawick <tr...@ibm.net>.
Note that is the same problem I had a different fix for an hour or
so ago (subject="need ap_initialize() before create_process()->...->lock_inter()-
semop()"), not seeing your post until now.  


[PATCH] 2.0 builds, but dumps core on FreeBSD 3.3 (ap_lock)

Posted by Chia-liang Kao <cl...@CirX.ORG>.
Hi,

I just played with apache-2.0 on FreeBSD 4.0-current, and it coredumped on
ap_lock. This is because (in prefork mpm) setup_lock() is called in 
ap_initialize(), and ap_init_alloc is called before ap_initialize.
The ap_lock() causing segfault missed the proper op_on setting for semop.

I don't know if sysv sem strictly require implementations to follow the order
in struct sembuf. If so, the follow in patch would help.

Cheers,
CLK

On Thu, Feb 17, 2000 at 11:47:42AM -0500, rbb@apache.org wrote:
> I need to know which call to ap_lock is causing the seg fault.
> Unfortunately, I do not currently have access to a FreeBSD machine that I
> can do any testing on.  I am hoping to get access to a FreeBSD machine in
> a few weeks.  If you can get me either an account on a FreeBSD machine or
> a complete trace of the seg fault, I will see what I can do.

Index: crossproc.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/lib/apr/locks/unix/crossproc.c,v
retrieving revision 1.12
diff -u -r1.12 crossproc.c
--- crossproc.c	2000/01/25 23:04:27	1.12
+++ crossproc.c	2000/02/20 12:01:21
@@ -57,16 +57,10 @@
 
 #if defined (USE_SYSVSEM_SERIALIZE)  
 
-static struct sembuf op_on;
-static struct sembuf op_off;
+static struct sembuf op_on = {0, -1, SEM_UNDO};
+static struct sembuf op_off = {0, 1, SEM_UNDO};
 
 void setup_lock() {
-    op_on.sem_num = 0;
-    op_on.sem_op = -1;
-    op_on.sem_flg = SEM_UNDO;
-    op_off.sem_num = 0;
-    op_off.sem_op = 1;
-    op_off.sem_flg = SEM_UNDO;
 }
 
 ap_status_t lock_cleanup(void *lock_)

Re: 2.0 builds, but dumps core on FreeBSD 3.3

Posted by rb...@apache.org.
I need to know which call to ap_lock is causing the seg fault.
Unfortunately, I do not currently have access to a FreeBSD machine that I
can do any testing on.  I am hoping to get access to a FreeBSD machine in
a few weeks.  If you can get me either an account on a FreeBSD machine or
a complete trace of the seg fault, I will see what I can do.

Ryan

On Thu, 17 Feb 2000, Charles Randall wrote:

> Following Bill Stoddard's mini-instructions (sure wish the details were in a
> README or STATUS)...
> 
> Using FreeBSD 3.3-R, libtool 1.3.4, m4 1.4, autoconf 2.13 and a fresh copy
> of the apache-2.0 source via rsync,
> 
> 	% ./buildconf
> 	% ./configure
> 	% make
> 
> results in an "apache" executable using the mpmt_pthread MPM.
> 
> Unfortunately, it simply dumps core at startup. For example, trying to get
> the module list with the '-l' (ell) option I get
> 
> 	% ./apache -l
> 	Segmentation fault(core dumped)
> 
> Running in the debugger,
> 
> --- snip ---
> (gdb) run
> Starting program: /usr/home/crandall/2.0/apache-2.0/src/apache 
> 
> Program received signal SIGSEGV, Segmentation fault.
> ap_lock (lock=0x0) at locks.c:121
> 121         if (lock->type != APR_CROSS_PROCESS) {
> --- snip ---
> 
> Backing off to the prefork MPM by trying,
> 
> 	% ./buildconf
> 	% ./configure --with-mpm=prefork
> 	% make
> 
> Same thing,
> 
> 	% ./apache -l
> 	Segmentation fault(core dumped)
> 
> Same place,
> 
> --- snip ---
> (gdb) run
> Starting program: /usr/home/crandall/2.0/apache-2.0/src/apache 
> 
> Program received signal SIGSEGV, Segmentation fault.
> ap_lock (lock=0x0) at locks.c:121
> 121         if (lock->type != APR_CROSS_PROCESS) {
> --- snip ---
> 
> If my build method is totally off-base, someone please post a consistent
> method that we can use for "build-a-thons" on the systems we have available
> to us.
> 
> As a side note, shouldn't "make distclean" remove config.status in the mm
> directory?
> 
> Suggestions?
> 
> Charles
> 
> 


Come to the first official Apache Software Foundation
Conference!!!   <http://ApacheCon.Com/>

_______________________________________________________________________________
Ryan Bloom                        	rbb@ntrnet.net
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615		Ryan Bloom -- thinker, adventurer, artist,
				     writer, but mostly, friend.
-------------------------------------------------------------------------------