[JBoss JIRA] (WFCORE-3706) Performance issue in audit endpoints
by Jan Kalina (JIRA)
Jan Kalina created WFCORE-3706:
----------------------------------
Summary: Performance issue in audit endpoints
Key: WFCORE-3706
URL: https://issues.jboss.org/browse/WFCORE-3706
Project: WildFly Core
Issue Type: Bug
Components: Security
Affects Versions: 4.0.0.Alpha2
Reporter: Jan Kalina
Assignee: Jan Kalina
Priority: Critical
Synchronization in audit endpoint implementations leads to a great performance drop.
We see the issue in {{FileAuditEndpoint.accept(EventPriority, String)}}, but similar code is also in the {{SyslogAuditEndpoint}}.
Check the attached recording (FlightRecorder) in jmc (Java Mission Control).
It can be seen in these tabs
- Threads > Contention
- Threads > Thread Dumps
- Threads > Lock Instances
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (ELY-1550) Performance issue in audit endpoints
by Jan Kalina (JIRA)
[ https://issues.jboss.org/browse/ELY-1550?page=com.atlassian.jira.plugin.s... ]
Jan Kalina moved WFCORE-3706 to ELY-1550:
-----------------------------------------
Project: WildFly Elytron (was: WildFly Core)
Key: ELY-1550 (was: WFCORE-3706)
Component/s: Audit
(was: Security)
Affects Version/s: 1.2.4.Final
(was: 4.0.0.Alpha2)
> Performance issue in audit endpoints
> ------------------------------------
>
> Key: ELY-1550
> URL: https://issues.jboss.org/browse/ELY-1550
> Project: WildFly Elytron
> Issue Type: Bug
> Components: Audit
> Affects Versions: 1.2.4.Final
> Reporter: Jan Kalina
> Assignee: Jan Kalina
> Priority: Critical
>
> Synchronization in audit endpoint implementations leads to a great performance drop.
> We see the issue in {{FileAuditEndpoint.accept(EventPriority, String)}}, but similar code is also in the {{SyslogAuditEndpoint}}.
> Check the attached recording (FlightRecorder) in jmc (Java Mission Control).
> It can be seen in these tabs
> - Threads > Contention
> - Threads > Thread Dumps
> - Threads > Lock Instances
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-10081) mod_cluster Proxy: Deterministic failover algorithm discrepancy between undertow and httpd
by Radoslav Husar (JIRA)
[ https://issues.jboss.org/browse/WFLY-10081?page=com.atlassian.jira.plugin... ]
Radoslav Husar moved JBEAP-8965 to WFLY-10081:
----------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-10081 (was: JBEAP-8965)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: mod_cluster
(was: Web (Undertow))
Target Release: (was: 7.backlog.GA)
Affects Version/s: 12.0.0.Final
(was: 7.1.0.DR12)
> mod_cluster Proxy: Deterministic failover algorithm discrepancy between undertow and httpd
> ------------------------------------------------------------------------------------------
>
> Key: WFLY-10081
> URL: https://issues.jboss.org/browse/WFLY-10081
> Project: WildFly
> Issue Type: Bug
> Components: mod_cluster
> Affects Versions: 12.0.0.Final
> Reporter: Michal Karm Babacek
> Assignee: Radoslav Husar
> Labels: mod_cluster
>
> Deterministic failover as first implemented in Apache HTTP Server's mod_cluster module [MODCLUSTER-550] does a simple sequence of steps to pick a worker:
> * it gathers a list of valid candidates
> * it uses the currently handled session id string to calculate an integer value
> * it uses this integer value to do modulo to the number of valid candidates
> * result is an index to the list of valid candidates
> Both Apache HTTP Server and Undertow implementations stick to this algorithm. The discrepancy lies in calculating the integer value from session id string.
> h3. Apache HTTP Server mod_cluster implementation
> Simply adds up ordinals, [source|https://github.com/modcluster/mod_proxy_cluster/pull/8/files#diff-...]
> {code}
> int hash = 0;
> ...
> for (i = 0; session_id[i] != 0; ++i) {
> hash += session_id[i];
> }
> mycandidate = workers[hash % workers_length];
> {code}
> h3. Undertow mod_cluster proxy implementation
> For some unknown reason (to me), this implementation leverages Java's String hashCode method, {{sessionId.hashCode()}}, [source|https://github.com/undertow-io/undertow/blob/1.4.x/core/src/main/j...]:
> {code}
> int index = (int) (Math.abs((long) sessionId.hashCode()) % candidates.size());
> Collections.sort(candidates);
> String electedRoute = candidates.get(index);
> {code},
> you see, the hashCode on String does more than counting ordinals, it multiplies with a prime number, [source|http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/sha...]:
> {code}
> for (int i = 0; i < value.length; i++) {
> h = 31 * h + val[i];
> }
> {code}
> h3. Call to action
> I would like to either to see the argumentation on why it is OK for these two implementations to be deterministically picking different workers, or I would like to have these implementations aligned. I don't have a preference as to whether C implementation should be altered after the Java one or vise versa. My only preference is that they must yield the same results unless there is a very good reason not to.
> WDYT?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFCORE-3705) Allow dependencies on JDK modules
by David Lloyd (JIRA)
David Lloyd created WFCORE-3705:
-----------------------------------
Summary: Allow dependencies on JDK modules
Key: WFCORE-3705
URL: https://issues.jboss.org/browse/WFCORE-3705
Project: WildFly Core
Issue Type: Feature Request
Components: Modules
Reporter: David Lloyd
Assignee: David Lloyd
Allow dependencies on JDK modules in Java 9 and higher. Emulate the set of Java 9 JDK modules on Java 8.
Deprecate old JDK aggregation modules such as {{javax.api}} and {{sun.jdk}}, and start moving towards their standard replacements.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (ELY-1547) SPNEGO: missing negstat field in the first reply for expired token
by Jan Kalina (JIRA)
[ https://issues.jboss.org/browse/ELY-1547?page=com.atlassian.jira.plugin.s... ]
Jan Kalina updated ELY-1547:
----------------------------
Component/s: Authentication Mechanisms
> SPNEGO: missing negstat field in the first reply for expired token
> ------------------------------------------------------------------
>
> Key: ELY-1547
> URL: https://issues.jboss.org/browse/ELY-1547
> Project: WildFly Elytron
> Issue Type: Bug
> Components: Authentication Mechanisms, HTTP
> Affects Versions: 1.2.4.Final
> Reporter: Jan Kalina
> Assignee: Jan Kalina
>
> When the client sends an initial SPNEGO token with Kerberos as preferred mechanism and includes an invalid kerberos token, then client expects to see the {{WWW-Authenticate}} HTTP header with SPNEGO response {{negTokenResp[ negState = reject ]}}.
> As stated in [SPNEGO specification|https://tools.ietf.org/html/rfc4178#section-4.2.2] negstat is required in first reply:
> {code:borderStyle=dashed}
> negState
> ...
> This field is REQUIRED in the first reply from the target, and is
> OPTIONAL thereafter. When negState is absent, the actual state
> should be inferred from the state of the negotiated mechanism
> context.
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month