php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8464 PHP SIGABRT's using pspell functions
Submitted: 2000-12-28 16:48 UTC Modified: 2001-04-03 09:02 UTC
From: schu at schu dot net Assigned:
Status: Closed Package: Pspell related
PHP Version: 4.0.4 OS: Solaris 8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: schu at schu dot net
New email:
PHP Version: OS:

 

 [2000-12-28 16:48 UTC] schu at schu dot net
Ok, here is all the info ;)

PHP info:

OS, Solaris 8 Generic February 2000
PHP, php-4.04
aspell, aspell-.32.6
pspell,  pspell-.11.2
apache, apache_1.3.14
gcc, gcc version 2.95.2 19991024 (release)

Compile switches:
'./configure' '--with-mysql' '--enable-track-vars' '--enable-trans-sid'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-ftp' '--with-imap' '--with-pspell' '--enable-debug'

Link to phpinfo()
http://schu.net/phpinfo.php

Code that causes failure:

<?
$pspell_link = pspell_new ("en");

if (pspell_check ($pspell_link, "testt")) {
    echo "This is a valid spelling";
} else {
    echo "Sorry, wrong spelling";
}
?>

Could not get it to spit out a core, so I ran httpd in gdb, here is the backtrace:

#0  0xef69a034 in _libc_kill () from /usr/lib/libc.so.1
#1  0xef63512c in abort () from /usr/lib/libc.so.1
#2  0xef52af00 in __default_terminate ()
   from /usr/local/apache/libexec/libphp4.so
#3  0xef52af30 in __terminate () from /usr/local/apache/libexec/libphp4.so
#4  0xef52bc28 in __throw () from /usr/local/apache/libexec/libphp4.so
#5  0xef01881c in autil::ConfigData::throw_file_exception (this=0x132de8, 
    file=0x1410d8 "/root/.aspell.conf") at config_data.cc:30
#6  0xeefeb470 in aspell::Config::read_in (this=0x141350, override=0x140408)
    at ../util/config_data.hh:163
#7  0xef004810 in aspell::Manager::setup (this=0x140db4, override=@0x140408)
    at manager.cc:562
#8  0xef146c64 in pspell_aspell::PA_Manager::PA_Manager (this=0x140d90, 
    config=0x140408, h=0x0) at manager.cc:189
#9  0xef147cac in libpspell_aspell_LTX_new_pspell_manager_class (
    config=0x140408, h=0x0) at manager.cc:308
#10 0xef2c1594 in new_pspell_manager_class (config=0x140408)
    at manager_impl.cc:45
#11 0xef2c2440 in new_pspell_manager (c=0x140932) at manager_impl.cc:254
#12 0xef420364 in php_if_pspell_new (ht=1, return_value=0x141468, 
    this_ptr=0x0, return_value_used=1) at pspell.c:155
#13 0xef377b54 in execute () from /usr/local/apache/libexec/libphp4.so
#14 0xef3907d0 in zend_execute_scripts (type=8, file_count=3) at zend.c:729
---Type <return> to continue, or q <return> to quit---
#15 0xef3b52d0 in php_execute_script (primary_file=0xeffff6e8) at main.c:1221
#16 0xef3aeb70 in apache_php_module_main (r=0x139078, display_source_mode=0)
    at sapi_apache.c:89
#17 0xef3afe34 in send_php (r=0x139078, display_source_mode=0, 
    filename=0x13aaf8 "/home/www/schu/test2.html") at mod_php4.c:506
#18 0xef3afe78 in send_parsed_php (r=0x139078) at mod_php4.c:517
#19 0x414c8 in ap_invoke_handler ()
#20 0x5e700 in process_request_internal ()
#21 0x5e784 in ap_process_request ()
#22 0x520dc in child_main ()
#23 0x52398 in make_child ()
#24 0x525b4 in startup_children ()
#25 0x52fa4 in standalone_main ()
#26 0x53bb8 in main ()

Lemme know if there is any more information I can give,

thanks for the best app server out there,

schu

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-23 19:51 UTC] schu at schu dot net
After looking at bug 8133 I decided to play with it a little, here is what I found:

I noticed that the aspell docs suggested that you have a /etc/aspell.conf so I made a conf file that contained:

personal        /root/.aspell.english.pws
repl            /root/.aspell.english.prepl

Then I symlinked /root/.aspell.conf to /etc/aspell.conf.  When running another backtrace I found that it was now looking for /usr/local/etc/aspell.conf so I symlinked that to /etc/aspell.conf as well.  After trying again, I got an error about not being able to open /usr/local/lib/aspell/english.dat.  I noticed that the file was in /usr/local/share/aspell/english.dat so I made another symlink.

After all that I am stuck again, but now have more backtrace data to analyze.

I should also note that I am almost certain that bug 8133 and 8464 are the same problem on different platforms.

thanks
schu

Backtrace output:

#0  0xef69a034 in _libc_kill () from /usr/lib/libc.so.1
#1  0xef63512c in abort () from /usr/lib/libc.so.1
#2  0xef52af00 in __default_terminate ()
   from /usr/local/apache/libexec/libphp4.so
#3  0xef52af30 in __terminate () from /usr/local/apache/libexec/libphp4.so
#4  0xef52bc28 in __throw () from /usr/local/apache/libexec/libphp4.so
#5  0xef019210 in autil::open_file (in=@0x132e60, file=@0xefffd808,
    mode=-284925040) at file_util.cc:24
#6  0xeefeda18 in aspell::Language::setup (this=0xefffd930, lang={
      static npos = 4294967295, static nilRep = {len = 0, res = 0, ref = 1,
        selfish = false}, dat = 0x1432f8 "english"}, config=0x1437b0)
    at language.cc:110
#7  0xeeff63ac in aspell::DataSet::set_check_lang (this=0x1443b0,
    l=@0xefffd9d0, config=0x1437b0) at inc/language.hh:56
#8  0xeeffa424 in aspell_default_readonly_ws::ReadOnlyWS::load (this=0x1443b0 ,
    fn=@0xefffdac0, config=0x1437b0) at readonly_ws.cc:317
#9  0xeeff87b0 in aspell::add_data_set (file_name=@0x1443b0, config=@0x1437b0 ,
    manager=0x143214, local_info=0xefffdbd4, allowed=4294967040) at data.cc:3 08
#10 0xef0112fc in aspell::MultiWS::load (this=0x131180, fn=@0xefffdd30,
    config=0x1437b0, manager=0x143214, li=0xefffdbd4) at multi_ws.cc:61
#11 0xeeff87b0 in aspell::add_data_set (file_name=@0x131180, config=@0x1437b0 ,
    manager=0x143214, local_info=0x0, allowed=4294967040) at data.cc:308
#12 0xef004a50 in aspell::Manager::real_setup (this=0x143214) at manager.cc:5 76
---Type <return> to continue, or q <return> to quit---
#13 0xef004818 in aspell::Manager::setup (this=0x143214, override=@0x142868)
    at manager.cc:563
#14 0xef146c64 in pspell_aspell::PA_Manager::PA_Manager (this=0x1431f0,
    config=0x142868, h=0x0) at manager.cc:189
#15 0xef147cac in libpspell_aspell_LTX_new_pspell_manager_class (
    config=0x142868, h=0x0) at manager.cc:308

#16 0xef2c1594 in new_pspell_manager_class (config=0x142868)
    at manager_impl.cc:45
#17 0xef2c2440 in new_pspell_manager (c=0x142d92) at manager_impl.cc:254
#18 0xef420364 in php_if_pspell_new (ht=1, return_value=0x1438b8,
    this_ptr=0x0, return_value_used=1) at pspell.c:155
#19 0xef377b54 in execute () from /usr/local/apache/libexec/libphp4.so
#20 0xef3907d0 in zend_execute_scripts (type=8, file_count=3) at zend.c:729
#21 0xef3b52d0 in php_execute_script (primary_file=0xeffff6e8) at main.c:1221
#22 0xef3aeb70 in apache_php_module_main (r=0x139078, display_source_mode=0)
    at sapi_apache.c:89
#23 0xef3afe34 in send_php (r=0x139078, display_source_mode=0,
    filename=0x13ab10 "/home/www/schu/spell.html") at mod_php4.c:506
#24 0xef3afe78 in send_parsed_php (r=0x139078) at mod_php4.c:517
#25 0x414c8 in ap_invoke_handler ()
#26 0x5e700 in process_request_internal ()
#27 0x5e784 in ap_process_request ()
#28 0x520dc in child_main ()
---Type <return> to continue, or q <return> to quit---
#29 0x52398 in make_child ()
#30 0x525b4 in startup_children ()
#31 0x52fa4 in standalone_main ()
#32 0x53bb8 in main ()



 [2001-02-26 18:43 UTC] vlad@php.net
hmmm... Too bad I don't have Solaris (or free time) to play with this. But I've got one question: Do pspell and aspell work on your solaris machine at all? It seems that the failures you observe in php would be exactly the same if you use aspell and pspell without php, and the fault lies within pspell, not within php module.

Can you try to compile the examples provided with pspell *and* try to run them? They are located in pspell/examples directory. Do:

: cd pspell-.11.2/examples
: make example-c
: ./example-c en
and then do something 's hullow' and see if that works. Please, tell me if that failed. I have a feeling we'll have to ask the author of aspell/pspell (Kevin Atkinson) to fix a few issues on solaris.

thanks,

Vlad

 [2001-02-26 21:17 UTC] schu at schu dot net
Vlad,

Here is the output of the commands that you requested:

*************************************************
[schu@untied:examples]$ make example-c
gcc -DPACKAGE=\"pspell\" -DVERSION=\".11.2\"  -I. -I.  -I/usr/local/include    -g -O2 -c example-c.c
/bin/sh ../libtool --mode=link gcc  -g -O2  -o example-c  example-c.o -L/usr/local/lib -lpspell
mkdir .libs
gcc -g -O2 -o example-c example-c.o  -L/usr/local/lib /usr/local/lib/libpspell_aspell.so -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2 -L/usr/ccs/bin -L/usr/ccs/lib /usr/local/lib/libaspell.so /usr/local/lib/libpspell-impl.so /usr/local/lib/libpspell.so /usr/local/lib/libpspell-modules.so -lstdc++ -R/usr/local/lib -R/usr/local/lib

[schu@untied:examples]$ ./example-c en
Using: en---aspell

Type "h" for help.

s hullow

hallow
hollow
Hull
hull
hull ow
hull-ow
hello
Harlow
Hall
Hill
hall
hallows
halo
hell
hill
hollows
hula
hulls
hurl

x

[schu@untied:examples]$ 
*************************************************

As you can see the example works just fine.  Any other ideas?

I am glad to help in any way I can.

thanks

schu
 [2001-04-03 09:02 UTC] sniper@php.net
I can't reproduce this. Please check bug #10129 if that's what is the problem in your system. Also, try the latest CVS
snapshot from http://snaps.php.net/

Reopen if problem still persists.

--Jani

 [2002-04-14 09:42 UTC] bounty_arz at hotmail dot com
I have the same Problem on SuSe Linux 7.3 Kernel 2.4.16-4GB 
APACHE 1.3.22
PHP 4.1.2
gcc-2.95.3-124

 './configure' '--with-prefix=/usr/local/php' '--with-apxs=/usr/local/apache/bin/apxs' '--with-openssl=/usr' '--with-bz2=/usr' '--with-mm=/usr' '--with-curl=/usr/local/curl' '--with-imap=/usr/local' '--with-gmp' '--with-ncurses' '--with-esoob=/usr/local/easysoft/oob/client' '--with-unixODBC=/usr/local/easysoft/unixODBC' '--with-java=/usr/lib/java' '--with-oci8=/opt/oracle/OraHome1' '--with-mysql=/usr/local/mysql' '--with-zlib-dir=/usr' '--with-zlib=/usr' '--with-gd=/usr/local/gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-tiff-dir=/usr' '--with-t1lib=/usr' '--with-libpng=/usr' '--with-ttf=/usr' '--with-freetype-dir=/usr' '--with-fdftk=/usr/local' '--with-swf=/usr/local' '--with-pspell=/usr/local/pspell' '--with-mcal=/usr/local/mcal' '--with-snmp=shared' '--with-mhash=/usr/local/mhash' '--with-ldap=/usr/local/openldap' '--with-pdflib=/usr/local/pdflib' '--with-config-file-path=/usr/local/apache/conf' '--with-exec-dir=/usr/local/bin' '--enable-shared=pdflib' '--enable-gd-native-ttf' '--enable-ucd-snmp-hack' '--enable-bcmath' '--enable-ftp' '--enable-trans-sid' '--enable-versioning' '--enable-track-vars' '--enable-magic-quotes' '--enable-safe-mode' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-inline-optimization' '--enable-thread-safety' 'i386-suse-linux-gnu'

No Problem with configure & make !

Apache error.log :
[notice] child pid 31141 exit signal Aborted (6)

The Child process is getting killed when I call the pspell functions ....
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC