You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Gr...@pfizer.com on 2004/02/23 17:31:42 UTC

jk2 buglets

Hi All,

We have been running into different issues with jk2 concerning shared memory
(on Solaris 8)

Calls to the function jk2_shm_create fail logging the following in the
jk2.log file,

[Mon Feb 23 12:12:00 2004] (error ) [jk_shm.c (199)]  shm.create(): error
creating /tmp/shm.file 2117728 2117992 0x16 
[Mon Feb 23 12:12:00 2004] (error ) [jk_shm.c (274)]  shm.create(): error
mmapping /tmp/shm.file
[Mon Feb 23 12:12:00 2004] (error ) [jk_shm.c (199)]  shm.create(): error
creating /tmp/shm.file 3864680 0 16 
[Mon Feb 23 12:12:00 2004] (error ) [jk_shm.c (274)]  shm.create(): error
mmapping /tmp/shm.file
[Mon Feb 23 12:12:03 2004] (error ) [jk_shm.c (199)]  shm.create(): error
creating /tmp/shm.file 4382816 4383080 0x16 
[Mon Feb 23 12:12:03 2004] (error ) [jk_shm.c (274)]  shm.create(): error
mmapping /tmp/shm.file
[Mon Feb 23 12:12:03 2004] (error ) [jk_shm.c (199)]  shm.create(): error
creating /tmp/shm.file 5124200 0 16 
[Mon Feb 23 12:12:03 2004] (error ) [jk_shm.c (274)]  shm.create(): error
mmapping /tmp/shm.file


On investigation it appears that there are some casting issues in this
function on the line,


    /* Now mmap it
     */
    rc=apr_mmap_create( &aprMmap,  file, (apr_off_t)0,
                        (apr_size_t)finfo.size, APR_MMAP_READ |
APR_MMAP_WRITE,
                        globalShmPool );
    if( rc!=JK_OK ) {
        char error[256];
        apr_strerror( rc, error, 256 );

>>        env->l->jkLog(env, env->l, JK_LOG_ERROR,
>>                      "shm.create(): error creating %s %d %d %#lx %s\n",
>>                      shm->fname, finfo.size, rc, globalShmPool, error );
        shm->privateData=NULL;
        return rc;
    }

 
As some of these fields are long's when build with large file support, on
solaris 2.8,


Changing the code to:


   /* Now mmap it
     */
    rc=apr_mmap_create( &aprMmap,  file, (apr_off_t)0,
                        (apr_size_t)finfo.size, APR_MMAP_READ |
APR_MMAP_WRITE,
                        globalShmPool );
    if( rc!=JK_OK ) {
        char error[256];
        apr_strerror( rc, error, 256 );

>>        env->l->jkLog(env, env->l, JK_LOG_ERROR,
>>                      "shm.create(): error creating %s %d %d %#lx %s\n",
>>                      shm->fname, (int) finfo.size, rc, globalShmPool,
error );
        shm->privateData=NULL;
        return rc;
    }



Reports the error better, but unfortunately it still fails to mmap correctly
(we changed the filename) ????


Mon Feb 23 15:21:42 2004] (error ) [jk_shm.c (199)]  shm.create(): error
creating /tmp/cr.sandwich.pfizer.com_81.shm 2117992 22 0x1f5020 Invalid
argument
[Mon Feb 23 15:21:42 2004] (error ) [jk_shm.c (274)]  shm.create(): error
mmapping /tmp/cr.sandwich.pfizer.com_81.shm
[Mon Feb 23 15:21:42 2004] (error ) [jk_shm.c (199)]  shm.create(): error
creating /tmp/cr.sandwich.pfizer.com_81.shm 0 22 0x1f5020 Invalid argument
[Mon Feb 23 15:21:42 2004] (error ) [jk_shm.c (274)]  shm.create(): error
mmapping /tmp/cr.sandwich.pfizer.com_81.shm
[Mon Feb 23 15:21:46 2004] (error ) [jk_shm.c (199)]  shm.create(): error
creating /tmp/cr.sandwich.pfizer.com_81.shm 4383080 22 0x41e020 Invalid
argument
[Mon Feb 23 15:21:46 2004] (error ) [jk_shm.c (274)]  shm.create(): error
mmapping /tmp/cr.sandwich.pfizer.com_81.shm
[Mon Feb 23 15:21:46 2004] (error ) [jk_shm.c (199)]  shm.create(): error
creating /tmp/cr.sandwich.pfizer.com_81.shm 0 22 0x41e020 Invalid argument
[Mon Feb 23 15:21:46 2004] (error ) [jk_shm.c (274)]  shm.create(): error
mmapping /tmp/cr.sandwich.pfizer.com_81.shm

(We changed the shared memory file name).

Are we doing something wrong, or is this a buglet.

Regards & Thanks.


Greg Cope
GCS Ltd
Assign to: CIT, Sandwich - ISG
Phone: (44) 01304 642040
Fax: (44) 01304 652118

LEGAL NOTICE
     
Unless expressly stated otherwise, this message is confidential and may be
privileged. It is intended for the addresee(s) only. Access to this e-mail
by anyone else is unauthorised. If you are not an addressee, any disclosure
or copying of the contents of this e-mail or any action taken (or not taken)
in reliance on it is unauthorised and may be unlawful. If you are not an
addressee, please inform the sender immediately.
     
Pfizer Limited is registered in England under No. 526209 with its registered
office at Ramsgate Road, Sandwich, Kent CT13 9NJ

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org