You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/05/03 16:57:45 UTC

[Bug 54923] New: nsapi_redirect.so does not work with iPlanet on Solaris 11 when running as root

https://issues.apache.org/bugzilla/show_bug.cgi?id=54923

            Bug ID: 54923
           Summary: nsapi_redirect.so does not work with iPlanet on
                    Solaris 11 when running as root
           Product: Tomcat Connectors
           Version: 1.2.37
          Hardware: PC
                OS: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nsapi
          Assignee: dev@tomcat.apache.org
          Reporter: dopey@moonteeth.com
    Classification: Unclassified

When starting iPlanet installed as root on Solaris 11, nsapi_redirect.so fails
to init.

[18/Feb/2013:22:37:24] failure (20669): CORE2254: Error running Init function
jk_init 

Root cause is this line:
            s = systhread_start(SYSTHREAD_DEFAULT_PRIORITY,
                                0, init_workers_on_other_threads, init_map);
fails to start the thread.

Oracle claims that SYSTHREAD_DEFAULT_PRIORITY results in a native thread
priority outside of the allowed range and claim that PR_PRIORITY_NORMAL or
PR_PRIORITY_LOW should work.


@ When running as root, the provided priority of SYSTHREAD_DEFAULT_PRIORITY
@ gets cast to an NSPR value of PR_PRIORITY_URGENT, which is finally
mapped to
@ a native priority value of 85, which in turn happens to be outside the
@ allowed priority ranges as per system configuration. The provided priority
@ value is unused when running as non-root, and hence the issue is not seen.
@ .
@ In more detail:
@ .
@ This issue happens due to the specified thread priority falling
outside the
@ configured limits in the system. "priocntl -l" displays the priority
ranges
@ allowed:
@ .
@ ...
@ TS (Time Sharing)
@ Configured TS User Priority Range: -60 through 60
@ ...
@ .
@ The systhread_start() API internally calls NSPR's PR_CreateThread().
@ The value of SYSTHREAD_DEFAULT_PRIORITY is 16, and this is cast to the
NSPR
@ priority of PR_PRIORITY_URGENT.
@ .
@ PR_CreateThread() ultimately calls pthread_create(). Before doing so,
@ PR_CreateThread() updates the new thread's attributes with the provided
@ priority, and more importantly, this is done only if root privileges are
@ available. In the case of a non-root user, the provided priority is
not used.
@ .
@ Now the problem with PR_PRIORITY_URGENT is the following: NSPR maps
the same
@ to a native priority number (85) before using it to update the new
thread's
@ attributes. 85 is outside the allowed priority ranges as reported by
@ "priocntl -l", and hence the pthread_create() ends up failing.
@ .
@ The customer has the following options:
@ .
@ 1. Use PR_PRIORITY_LOW instead of SYSTHREAD_DEFAULT_PRIORITY.
@ PR_PRIORITY_NORMAL might work, too.
@ 2. Check with Solaris team on how to change the system configuration
to tweak
@ the allowed range of thread priorities

-- 
You are receiving this mail because:
You are the assignee for the bug.

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