Skip to content

Instantly share code, notes, and snippets.

Avatar
🌏
Learn to talk

Lin Gao gaol

🌏
Learn to talk
  • Red Hat
  • Beijing, China
View GitHub Profile
View failed_exception.java
but some elements were not expected:
[Stream{groupId='org.codehaus.woodstox', artifactId='stax2-api', version='4.2.1', versionPattern=null, versionComparator=org.wildfly.channel.version.FixedVersionMatcher@6e4566f1},
Stream{groupId='org.wildfly.core', artifactId='wildfly-core-model-test-framework', version='19.0.0.Beta11', versionPattern=null, versionComparator=org.wildfly.channel.version.FixedVersionMatcher@51acdf2e},
Stream{groupId='org.wildfly.core', artifactId='wildfly-jar-boot', version='19.0.0.Beta11', versionPattern=null, versionComparator=org.wildfly.channel.version.FixedVersionMatcher@5143c662},
Stream{groupId='org.wildfly.galleon-plugins', artifactId='wildfly-config-gen', version='6.0.0.Alpha6', versionPattern=null, versionComparator=org.wildfly.channel.version.FixedVersionMatcher@78383390}]
View check_pass.js
check_password = Module.cwrap("login", "number", ["string"]);
function check_nums_on(pass, idx, len) {
for (var i = 0; i < 10; i ++) {
pass[idx] = i;
if (idx + 1 < len) {
check_nums_on(pass, idx + 1, len);
} else {
var pass_to_verify = "RH_CTF{" + pass.join("") + "}";
console.log("the last bit, checking the password: " + pass_to_verify);
result = check_password(pass_to_verify);
@gaol
gaol / An_Issue_description.md
Last active Jun 1, 2022
OpenJDK 17.0.2 - Cgroup v1 initialization causes NullPointerException when cgroup path does not start with the mount root
View An_Issue_description.md

When I ran wildfly testsuite on JDK 17 within a podman container, I got NPE for all tests, please refer to NPE.stacktrace.java below on the stack trace, all work fine if I run it on base metal.

It relates to JDK issue: https://bugs.openjdk.java.net/browse/JDK-8272124, but this demostrates another case when the cgroup path does not start with the mount root.

In this case /proc/self/cgroup has the following line:

9:memory:/user.slice/user-1000.slice/session-3.scope
@gaol
gaol / gist:7593cebcb2d1328d4ed50ece5ee1ac70
Last active Mar 11, 2022
Should EventBusOptions.setClusterPublicPort(-1) fail ?
View gist:7593cebcb2d1328d4ed50ece5ee1ac70
@Test
public void testEventBusOptions() {
VertxOptions vertxOptions1 = new VertxOptions();
JsonObject json = vertxOptions1.toJson();
VertxOptions vertxOptions2 = new VertxOptions(json);
assertEquals(json, vertxOptions2.toJson());
}
// ========================
@gaol
gaol / github_pr_demo
Created Apr 20, 2021
github pull request demo
View github_pr_demo
(base) [lgao@lgao vertx-eventbus-bridge-clients]$ git remote -v
fork git@github.com:gaol/vertx-eventbus-bridge-clients.git (fetch) ## << here is my fork
fork git@github.com:gaol/vertx-eventbus-bridge-clients.git (push)
origin https://github.com/vert-x3/vertx-eventbus-bridge-clients (fetch) ## << here is the official vert-x3 repo
origin https://github.com/vert-x3/vertx-eventbus-bridge-clients (push)
So maybe try this:
git checkout master
git pull
@gaol
gaol / client.stack
Created Nov 9, 2020
Multinode client stack trace with security manager enabled with wildfly-httpclient:1.1.3.Final
View client.stack
2020-11-09 19:11:10
Full thread dump OpenJDK 64-Bit Server VM (25.222-b10 mixed mode):
"Attach Listener" #410 daemon prio=9 os_prio=0 tid=0x00007f7a8c028000 nid=0x1b0e waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"ServerService Thread Pool -- 81" #407 prio=5 os_prio=0 tid=0x00007f7a582d8800 nid=0x184b waiting on condition [0x00007f7a28bd1000]
@gaol
gaol / gist:957a50e9c28b23a80d983a944a318e30
Created Jun 15, 2017
Example for query by nested resources
View gist:957a50e9c28b23a80d983a944a318e30
JBoss Mojo page: https://developer.jboss.org/wiki/ProposedRequirementsForImprovingQueryOperationForNestedChildResourcesAndComplexAttributes
Steps to create data source valid checker:
===
> /subsystem=datasources/data-source=ExampleDS:write-attribute(name=valid-connection-checker-class-name,value=org.jboss.jca.adapters.jdbc.extensions.novendor.SQLExceptionValidConnectionChecker)
> :reload
> /subsystem=datasources/data-source=ExampleDS:write-attribute(name=valid-connection-checker-properties, value={reason=>NoReason})
> :reload
@gaol
gaol / gist:b38189b8493df5b5c6b779c510ba64f7
Created Mar 9, 2017
long-running-servlet-without-shutdownNow
View gist:b38189b8493df5b5c6b779c510ba64f7
11:06:22,998 DEBUG [io.undertow.request] (default I/O-3) Matched prefix path /long-running-servlet for path /long-running-servlet/HeavyProcessing
11:06:23,007 DEBUG [io.undertow.request.security] (default task-1) Attempting to authenticate HttpServerExchange{ GET /long-running-servlet/HeavyProcessing request {Accept=[*/*], User-Agent=[curl/7.51.0], Host=[127.0.0.1:8080]} response {X-Powered-By=[Undertow/1], Server=[WildFly/10]}}, authentication required: false
11:06:23,008 DEBUG [io.undertow.request.security] (default task-1) Authentication outcome was NOT_ATTEMPTED with method io.undertow.security.impl.CachedAuthenticatedSessionMechanism@3e39fda2 for HttpServerExchange{ GET /long-running-servlet/HeavyProcessing request {Accept=[*/*], User-Agent=[curl/7.51.0], Host=[127.0.0.1:8080]} response {X-Powered-By=[Undertow/1], Server=[WildFly/10]}}
11:06:23,008 DEBUG [io.undertow.request.security] (default task-1) Authentication result was ATTEMPTED for HttpServerExchange{ GET /long-running-servlet/HeavyProcessing re
@gaol
gaol / gist:feebbd48d37f347060c32a31c4523519
Created Mar 8, 2017
shutdown by interrupt long running servlet
View gist:feebbd48d37f347060c32a31c4523519
18:30:25,628 DEBUG [io.undertow.request] (default I/O-1) Matched prefix path /long-running-servlet for path /long-running-servlet/HeavyProcessing
18:30:25,651 DEBUG [io.undertow.request.security] (default task-1) Attempting to authenticate HttpServerExchange{ GET /long-running-servlet/HeavyProcessing request {Accept=[*/*], User-Agent=[curl/7.51.0], Host=[127.0.0.1:8080]} response {X-Powered-By=[Undertow/1], Server=[WildFly/10]}}, authentication required: false
18:30:25,653 DEBUG [io.undertow.request.security] (default task-1) Authentication outcome was NOT_ATTEMPTED with method io.undertow.security.impl.CachedAuthenticatedSessionMechanism@76806308 for HttpServerExchange{ GET /long-running-servlet/HeavyProcessing request {Accept=[*/*], User-Agent=[curl/7.51.0], Host=[127.0.0.1:8080]} response {X-Powered-By=[Undertow/1], Server=[WildFly/10]}}
18:30:25,653 DEBUG [io.undertow.request.security] (default task-1) Authentication result was ATTEMPTED for HttpServerExchange{ GET /long-running-servlet/HeavyProcessing re
@gaol
gaol / Message is stored to page only
Created May 4, 2016
Message is stored to page only
View Message is stored to page only
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveMQ Artemis Integration Tests 1.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ integration-tests ---
[INFO] Deleting /sources/activemq-artemis/tests/integration-tests/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ integration-tests ---