Re: apache+mod_ssl signal 4

2005-04-04 Thread Uzi Klein
Doug White wrote:
[]
php was compiled with OpenSSL support.
When I removed that, it works like charm.
( Still, i might want that future one day )
[]
I've seen this if you have multiple OpenSSL versions installed and somehow
both libraries get linked in at once.  This commonly happens if you have
program X linked against openssl 0.9.6 and load shared library Y linked
against 0.9.7.
Use ldd to inspect your httpd and php modules and try to find the
offending openssl library. Perhaps you installed OpenSSL as a port at one
point?
Thanks for giving me the idea.
Perhaps there was some kind of test using OpenSSL from ports, even tho 
there's no track of it.

Doesn't OpenSLL rebuild the libs when one rebuild world?
Anyway, feels better now when the problem is "fixed" and i have a 
general idea of what the problem is.

--
Uzi Klein
BMBY Software Systems Ltd
http://www.bmby.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: apache+mod_ssl signal 4

2005-04-04 Thread Doug White
On Mon, 4 Apr 2005, Uzi Klein wrote:

> Chuck Swiger wrote:
>
> [.]
> > Try using PHP from the ports and see whether that runs better.  If it
> > does, well, take a look at what the port changes, and you've probably
> > located the source of your current problems.
>
> I mananged to fix it.
> php was compiled with OpenSSL support.
> When I removed that, it works like charm.
> ( Still, i might want that future one day )
>
> BTW, PHP has no specific FreeBSD patches AFAIK, and it was working on
> 5.3-RELEASE before p-5.
>
> Looks more like a shared lib problem than a PHP bug to me, but then
> again, I'm no expert.

I've seen this if you have multiple OpenSSL versions installed and somehow
both libraries get linked in at once.  This commonly happens if you have
program X linked against openssl 0.9.6 and load shared library Y linked
against 0.9.7.

Use ldd to inspect your httpd and php modules and try to find the
offending openssl library. Perhaps you installed OpenSSL as a port at one
point?

--
Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED]  |  www.FreeBSD.org
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: apache+mod_ssl signal 4

2005-04-03 Thread Uzi Klein
Chuck Swiger wrote:
[.]
Try using PHP from the ports and see whether that runs better.  If it 
does, well, take a look at what the port changes, and you've probably 
located the source of your current problems.
I mananged to fix it.
php was compiled with OpenSSL support.
When I removed that, it works like charm.
( Still, i might want that future one day )
BTW, PHP has no specific FreeBSD patches AFAIK, and it was working on 
5.3-RELEASE before p-5.

Looks more like a shared lib problem than a PHP bug to me, but then 
again, I'm no expert.

Regards
--
Uzi Klein
BMBY Software Systems Ltd
http://www.bmby.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: apache+mod_ssl signal 4

2005-04-03 Thread Uzi Klein
Hi
I rebuilt world last nite... didnt help much...
attached my kernel, make.conf and dmesg output
Doug White wrote:
On Sat, 2 Apr 2005, Barney Wolff wrote:

On Fri, Apr 01, 2005 at 06:59:11PM -0800, Doug White wrote:
pid 62364 (httpd), uid 0: exited on signal 4 (core dumped)
Apr  1 11:48:45 www kernel: pid 62364 (httpd), uid 0: exited on signal 4
(core dumped)
Signal 4 is SIGABRT, which is a software-initiated abort.
Well, no, it's ILL, indicating perhaps code compiled for a different
cpu model than it's being run on, or a trashed library.

oops. heh. I really need to get into the habit of checking signal(3) more
often.
Yeah, SIGILL would imply the library was improperly compiled. Since
libcrypto will generate CPU-specific assembly based on the CPUTYPE
setting, setting it to the wrong CPU type will cause Wierd Problems.
Now it exist on signal 11
BTW, it hangs  with the default httpd.conf (without any cert loaded) as 
well.

--
Uzi Klein
BMBY Software Systems Ltd
http://www.bmby.com
machine i386

cpu I486_CPU
cpu I586_CPU
cpu I686_CPU

ident   BMBY

# To statically compile in device wiring instead of /boot/device.hints
#hints  "GENERIC.hints" # Default places to look for devices.

options SMP # Multi-Processor
options SCHED_4BSD  # 4BSD scheduler
options INET# InterNETworking
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options MD_ROOT # MD is a potential root device
options CD9660  # ISO 9660 Filesystem
options PROCFS  # Process filesystem (requires PSEUDOFS)
options PSEUDOFS# Pseudo-filesystem framework
options GEOM_GPT# GUID Partition Tables.
options COMPAT_43   # Compatible with BSD 4.3 [KEEP THIS!]
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
options KTRACE  # ktrace(1) support
options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time 
extensions
options KBD_INSTALL_CDEV# install a CDEV entry in /dev
#optionsAHC_REG_PRETTY_PRINT# Print register bitfields in debug
# output.  Adds ~128k to driver.
#optionsAHD_REG_PRETTY_PRINT# Print register bitfields in debug
# output.  Adds ~215k to driver.
options ADAPTIVE_GIANT  # Giant mutex is adaptive.

device  apic# I/O APIC

# Bus support.  Do not remove isa, even if you have no isa slots
device  isa
#device eisa
device  pci

# Floppy drives
#device fdc

# ATA and ATAPI devices
device  ata
#device atadisk # ATA disk drives
#device ataraid # ATA RAID drives
device  atapicd # ATAPI CDROM drives
#device atapifd # ATAPI floppy drives
#device atapist # ATAPI tape drives
options ATA_STATIC_ID   # Static device numbering

# SCSI Controllers
#device ahb # EISA AHA1742 family
#device ahc # AHA2940 and onboard AIC7xxx devices
#device ahd # AHA39320/29320 and onboard AIC79xx devices
#device amd # AMD 53C974 (Tekram DC-390(T))
#device isp # Qlogic family
#device mpt # LSI-Logic MPT-Fusion
#device ncr # NCR/Symbios Logic
#device sym # NCR/Symbios Logic (newer chipsets + those of 
`ncr')
#device trm # Tekram DC395U/UW/F DC315U adapters

#device adv # Advansys SCSI adapters
#device adw # Advansys wide SCSI adapters
#device aha # Adaptec 154x SCSI adapters
#device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
#device bt  # Buslogic/Mylex MultiMaster SCSI adapters

#device ncv # NCR 53C500
#device nsp # Workbit Ninja SCSI-3
#device stg # TMC 18C30/18C50

# SCSI peripherals
device  scbus   # SCSI bus (required for SCSI)
device  ch  # SCSI media changers
device  da  # Direct Access (disks)
#device sa  # Sequential Access (tape etc)
#dev

Re: apache+mod_ssl signal 4

2005-04-03 Thread Chuck Swiger
Uzi Klein wrote:
[ ... ]
I see, when i disable mod_php everything works...
Is there a conflict i don't know?
The answer may be yes.  It's not your fault-- if people wrote portable 
software, /usr/ports would still be useful but not require nearly as much work.

php is also compiled ( from source, not ports ) with openssl support.
Signal 4's are a good sign of a binary compiled for the wrong architecture; a 
signal 11 could mean a program bug (you are using PHP, after all), or it could 
mean marginal hardware.

Try using PHP from the ports and see whether that runs better.  If it does, 
well, take a look at what the port changes, and you've probably located the 
source of your current problems.

--
-Chuck
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: apache+mod_ssl signal 4

2005-04-03 Thread Uzi Klein
Doug White wrote:
On Sat, 2 Apr 2005, Barney Wolff wrote:

On Fri, Apr 01, 2005 at 06:59:11PM -0800, Doug White wrote:
pid 62364 (httpd), uid 0: exited on signal 4 (core dumped)
Apr  1 11:48:45 www kernel: pid 62364 (httpd), uid 0: exited on signal 4
(core dumped)
Signal 4 is SIGABRT, which is a software-initiated abort.
Well, no, it's ILL, indicating perhaps code compiled for a different
cpu model than it's being run on, or a trashed library.

oops. heh. I really need to get into the habit of checking signal(3) more
often.
Yeah, SIGILL would imply the library was improperly compiled. Since
libcrypto will generate CPU-specific assembly based on the CPUTYPE
setting, setting it to the wrong CPU type will cause Wierd Problems.
I see, when i disable mod_php everything works...
Is there a conflict i don't know?
php is also compiled ( from source, not ports ) with openssl support.
php configure:
./configure \
 --prefix=/usr/local \
 --with-layout=GNU \
 --without-sqlite \
 --disable-debug \
 --disable-rpath \
 --disable-ipv6 \
 --with-apxs=/usr/local/sbin/apxs \
 --with-config-file-path=/etc \
 --with-mysql=/usr/local \
 --with-pcre-regex \
 --with-regex=php \
 --with-bz2=/usr -with-zlib-dir=/usr \
 --with-zlib=/usr \
 --with-zip=/usr/local \
 --with-gd \
 --enable-gd-native-ttf \
 --with-freetype-dir=/usr/local \
 --with-png-dir=/usr/local \
 --with-jpeg-dir=/usr/local \
 --with-t1lib=/usr/local \
 --with-ttf \
 --with-libxml-dir=/usr/local \
 --with-dom=/usr/local \
 --with-xsl=/usr/local \
 --enable-xml \
 --enable-dom \
 --with-openssl=/usr \
 --with-mcrypt=/usr/local \
 --with-mhash=/usr/local \
 --with-curl=/usr/local \
 --with-curlwrappers \
 --with-tsrm-pthreads \
 --enable-bcmath \
 --enable-cli \
 --enable-memory-limit \
 --enable-overload \
 --enable-pear \
 --enable-static \
 --enable-shared \
 --enable-soap \
 --enable-sockets \
 --enable-versioning
--
Uzi Klein
BMBY Software Systems Ltd
http://www.bmby.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: apache+mod_ssl signal 4

2005-04-03 Thread Uzi Klein
Hi
I rebuilt world last nite... didnt help much...
attached my kernel, make.conf and dmesg output
Doug White wrote:
> On Sat, 2 Apr 2005, Barney Wolff wrote:
>
>
>> On Fri, Apr 01, 2005 at 06:59:11PM -0800, Doug White wrote:
>>
 pid 62364 (httpd), uid 0: exited on signal 4 (core dumped)
 Apr  1 11:48:45 www kernel: pid 62364 (httpd), uid 0: exited on 
signal 4
 (core dumped)
>>>
>>>
>>> Signal 4 is SIGABRT, which is a software-initiated abort.
>>
>>
>> Well, no, it's ILL, indicating perhaps code compiled for a different
>> cpu model than it's being run on, or a trashed library.
>
>
>
> oops. heh. I really need to get into the habit of checking signal(3) more
> often.
>
> Yeah, SIGILL would imply the library was improperly compiled. Since
> libcrypto will generate CPU-specific assembly based on the CPUTYPE
> setting, setting it to the wrong CPU type will cause Wierd Problems.
>

Now it exist on signal 11
BTW, it hangs  with the default httpd.conf (without any cert loaded) as 
well.

--
Uzi Klein
BMBY Software Systems Ltd
http://www.bmby.com
machine i386

cpu I486_CPU
cpu I586_CPU
cpu I686_CPU

ident   BMBY

# To statically compile in device wiring instead of /boot/device.hints
#hints  "GENERIC.hints" # Default places to look for devices.

options SMP # Multi-Processor
options SCHED_4BSD  # 4BSD scheduler
options INET# InterNETworking
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options MD_ROOT # MD is a potential root device
options CD9660  # ISO 9660 Filesystem
options PROCFS  # Process filesystem (requires PSEUDOFS)
options PSEUDOFS# Pseudo-filesystem framework
options GEOM_GPT# GUID Partition Tables.
options COMPAT_43   # Compatible with BSD 4.3 [KEEP THIS!]
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
options KTRACE  # ktrace(1) support
options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time 
extensions
options KBD_INSTALL_CDEV# install a CDEV entry in /dev
#optionsAHC_REG_PRETTY_PRINT# Print register bitfields in debug
# output.  Adds ~128k to driver.
#optionsAHD_REG_PRETTY_PRINT# Print register bitfields in debug
# output.  Adds ~215k to driver.
options ADAPTIVE_GIANT  # Giant mutex is adaptive.

device  apic# I/O APIC

# Bus support.  Do not remove isa, even if you have no isa slots
device  isa
#device eisa
device  pci

# Floppy drives
#device fdc

# ATA and ATAPI devices
device  ata
#device atadisk # ATA disk drives
#device ataraid # ATA RAID drives
device  atapicd # ATAPI CDROM drives
#device atapifd # ATAPI floppy drives
#device atapist # ATAPI tape drives
options ATA_STATIC_ID   # Static device numbering

# SCSI Controllers
#device ahb # EISA AHA1742 family
#device ahc # AHA2940 and onboard AIC7xxx devices
#device ahd # AHA39320/29320 and onboard AIC79xx devices
#device amd # AMD 53C974 (Tekram DC-390(T))
#device isp # Qlogic family
#device mpt # LSI-Logic MPT-Fusion
#device ncr # NCR/Symbios Logic
#device sym # NCR/Symbios Logic (newer chipsets + those of 
`ncr')
#device trm # Tekram DC395U/UW/F DC315U adapters

#device adv # Advansys SCSI adapters
#device adw # Advansys wide SCSI adapters
#device aha # Adaptec 154x SCSI adapters
#device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
#device bt  # Buslogic/Mylex MultiMaster SCSI adapters

#device ncv # NCR 53C500
#device nsp # Workbit Ninja SCSI-3
#device stg # TMC 18C30/18C50

# SCSI peripherals
device  scbus   # SCSI bus (required for SCSI)
device  ch  # SCSI media changers
device  da  # Direct Access (dis

Re: apache+mod_ssl signal 4

2005-04-02 Thread Doug White
On Sat, 2 Apr 2005, Barney Wolff wrote:

> On Fri, Apr 01, 2005 at 06:59:11PM -0800, Doug White wrote:
> > >
> > > pid 62364 (httpd), uid 0: exited on signal 4 (core dumped)
> > > Apr  1 11:48:45 www kernel: pid 62364 (httpd), uid 0: exited on signal 4
> > > (core dumped)
> >
> > Signal 4 is SIGABRT, which is a software-initiated abort.
>
> Well, no, it's ILL, indicating perhaps code compiled for a different
> cpu model than it's being run on, or a trashed library.

oops. heh. I really need to get into the habit of checking signal(3) more
often.

Yeah, SIGILL would imply the library was improperly compiled. Since
libcrypto will generate CPU-specific assembly based on the CPUTYPE
setting, setting it to the wrong CPU type will cause Wierd Problems.

-- 
Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED]  |  www.FreeBSD.org
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: apache+mod_ssl signal 4

2005-04-01 Thread Barney Wolff
On Fri, Apr 01, 2005 at 06:59:11PM -0800, Doug White wrote:
> >
> > pid 62364 (httpd), uid 0: exited on signal 4 (core dumped)
> > Apr  1 11:48:45 www kernel: pid 62364 (httpd), uid 0: exited on signal 4
> > (core dumped)
> 
> Signal 4 is SIGABRT, which is a software-initiated abort.

Well, no, it's ILL, indicating perhaps code compiled for a different
cpu model than it's being run on, or a trashed library.

-- 
Barney Wolff http://www.databus.com/bwresume.pdf
I never met a computer I didn't like.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: apache+mod_ssl signal 4

2005-04-01 Thread Doug White
On Fri, 1 Apr 2005, Uzi Klein wrote:

> I Installed a fresh apache-moddssl port
> (using portinstall www/apache13-modssl)
>
> When i start apache using "apachectl start" everything works just fine,
> but when i try "apachectl startssl" i have some errors i have no idea
> what to do with
>
> httpd-error log gives me :
>
> [Fri Apr  1 11:40:24 2005] [info] mod_unique_id: using ip addr 127.0.0.1
> [Fri Apr  1 11:40:25 2005] [info] (2)No such file or directory:
> make_sock: for port 443, setsockopt: (SO_ACCEPTFILTER)
> [Fri Apr  1 11:40:25 2005] [info] (2)No such file or directory:
> make_sock: for port 80, setsockopt: (SO_ACCEPTFILTER)

Those should be OK, you don't have accept filters installed.

> system logs gives me :
>
> pid 62364 (httpd), uid 0: exited on signal 4 (core dumped)
> Apr  1 11:48:45 www kernel: pid 62364 (httpd), uid 0: exited on signal 4
> (core dumped)

Signal 4 is SIGABRT, which is a software-initiated abort.

> i run "gdb httpd httpd.core" in /usar/local ang got :
>
> ...
>
> Reading symbols from /libexec/ld-elf.so.1...done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0  0x28474fe5 in RSA_new_method () from /lib/libcrypto.so.3
> (gdb) where
> #0  0x28474fe5 in RSA_new_method () from /lib/libcrypto.so.3
> #1  0x28474d2e in RSA_new () from /lib/libcrypto.so.3
> #2  0x28493aa6 in RSAPrivateKey_asn1_meth () from /lib/libcrypto.so.3
> #3  0x284a24e0 in ASN1_item_ex_new () from /lib/libcrypto.so.3
> #4  0x284a22c0 in ASN1_item_ex_new () from /lib/libcrypto.so.3
> #5  0x2849cf20 in ASN1_item_ex_d2i () from /lib/libcrypto.so.3
> #6  0x2849c785 in ASN1_item_d2i () from /lib/libcrypto.so.3
> #7  0x28493b25 in d2i_RSAPrivateKey () from /lib/libcrypto.so.3
> #8  0x2837bc73 in ssl_init_TmpKeysHandle () from
> /usr/local/libexec/apache/libssl.so
> #9  0x2837b752 in ssl_init_Module () from
> /usr/local/libexec/apache/libssl.so
> #10 0x08056e50 in ap_init_modules ()
> #11 0x080611a0 in standalone_main ()
> #12 0x08061ab2 in main ()

This isn't that useful without a debugging copy of libcrypto,
unfortunately.  It appears something goes wrong in the RSA key generation
and it tanks. How did you generate your certificates?

> www# uname -a
> FreeBSD www.bmby.co.il 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #2: Tue Feb
> 22 16:47:08 UTC 2005
> [EMAIL PROTECTED]:/usr/obj/usr/src/sys/BMBY-STABLE  i386

-- 
Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED]  |  www.FreeBSD.org
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


apache+mod_ssl signal 4

2005-04-01 Thread Uzi Klein
Hi
I Installed a fresh apache-moddssl port
(using portinstall www/apache13-modssl)
When i start apache using "apachectl start" everything works just fine,
but when i try "apachectl startssl" i have some errors i have no idea 
what to do with

httpd-error log gives me :
[Fri Apr  1 11:40:24 2005] [info] mod_unique_id: using ip addr 127.0.0.1
[Fri Apr  1 11:40:25 2005] [info] (2)No such file or directory: 
make_sock: for port 443, setsockopt: (SO_ACCEPTFILTER)
[Fri Apr  1 11:40:25 2005] [info] (2)No such file or directory: 
make_sock: for port 80, setsockopt: (SO_ACCEPTFILTER)

system logs gives me :
pid 62364 (httpd), uid 0: exited on signal 4 (core dumped)
Apr  1 11:48:45 www kernel: pid 62364 (httpd), uid 0: exited on signal 4 
(core dumped)

i run "gdb httpd httpd.core" in /usar/local ang got :
...
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x28474fe5 in RSA_new_method () from /lib/libcrypto.so.3
(gdb) where
#0  0x28474fe5 in RSA_new_method () from /lib/libcrypto.so.3
#1  0x28474d2e in RSA_new () from /lib/libcrypto.so.3
#2  0x28493aa6 in RSAPrivateKey_asn1_meth () from /lib/libcrypto.so.3
#3  0x284a24e0 in ASN1_item_ex_new () from /lib/libcrypto.so.3
#4  0x284a22c0 in ASN1_item_ex_new () from /lib/libcrypto.so.3
#5  0x2849cf20 in ASN1_item_ex_d2i () from /lib/libcrypto.so.3
#6  0x2849c785 in ASN1_item_d2i () from /lib/libcrypto.so.3
#7  0x28493b25 in d2i_RSAPrivateKey () from /lib/libcrypto.so.3
#8  0x2837bc73 in ssl_init_TmpKeysHandle () from 
/usr/local/libexec/apache/libssl.so
#9  0x2837b752 in ssl_init_Module () from 
/usr/local/libexec/apache/libssl.so
#10 0x08056e50 in ap_init_modules ()
#11 0x080611a0 in standalone_main ()
#12 0x08061ab2 in main ()

www# uname -a
FreeBSD www.bmby.co.il 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #2: Tue Feb 
22 16:47:08 UTC 2005 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/BMBY-STABLE  i386


Please help if you can
Thanks
--
Uzi Klein
BMBY Software Systems Ltd
P: +972 4  959 79 89
F: +972 3  617 93 36
http://www.bmby.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"