Skip to content

Instantly share code, notes, and snippets.

View gaol's full-sized avatar
🌏
Learn to talk

Lin Gao gaol

🌏
Learn to talk
  • Red Hat
  • Beijing, China
  • 04:27 (UTC +08:00)
View GitHub Profile
11:56:09,312 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "vertx-demos-kafka-web-0.0.1.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"vertx-demos-kafka-web-0.0.1.war\".WeldStartService" => "Failed to start service
Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
Exception 0 :
org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class io.vertx.mutiny.core.Vertx
at [email protected]//org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:193)
at [email protected]//org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:201)
at [email protected]//org.jboss.weld.manager.BeanManagerImpl.createAnnotatedType(BeanManagerImpl.java:1176)
at [email protected]//org.jboss.weld.util.Forwardi
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}]
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 June 1, 2022 09:38
OpenJDK 17.0.2 - Cgroup v1 initialization causes NullPointerException when cgroup path does not start with the mount root

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 March 11, 2022 08:39
Should EventBusOptions.setClusterPublicPort(-1) fail ?
@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 April 20, 2021 01:23
github pull request demo
(base) [lgao@lgao vertx-eventbus-bridge-clients]$ git remote -v
fork [email protected]:gaol/vertx-eventbus-bridge-clients.git (fetch) ## << here is my fork
fork [email protected]: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 November 9, 2020 12:28
Multinode client stack trace with security manager enabled with wildfly-httpclient:1.1.3.Final
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 June 15, 2017 01:44
Example for query by nested resources
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 March 9, 2017 03:10
long-running-servlet-without-shutdownNow
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 March 8, 2017 10:34
shutdown by interrupt long running servlet
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