Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8 #86

Closed
Zhupro opened this issue Apr 27, 2022 · 29 comments
Closed

Comments

@Zhupro
Copy link

Zhupro commented Apr 27, 2022

hello,I use version 9.20, the following error will appear when starting, what is the problem? thanks
ERROR in ch.qos.logback.core.joran.spi.Interpreter@108:16 - RuntimeException in Action for tag [appender] java.lang.IllegalStateException: AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:318)
... 24 more

@tkowalcz
Copy link
Owner

Hi,

thank's for reporting this. Is this happening every time? There is no stacktrace from inside Tjahzi logger, but I think I know what might be the problem. If you have that stacktrace I would appreciate if you add it to the ticket.

I will try to trigger that condition and release a fix shortly.

@Zhupro
Copy link
Author

Zhupro commented Apr 27, 2022

Yes.An error will be reported at startup. I checked the problem, because there is a problem with the initialization of the constructor of StandardMonitoringModule. I currently rewrite the constructor in this class, but I am not sure if there are other problems.
this class pl.tkowalcz.tjahzi.stats.StandardMonitoringModule
Your implementation is like this:
public StandardMonitoringModule() {
StatsDumpingThread thread = new StatsDumpingThread(this);
if (thread.isEnabled()) {
thread.start();
}

    distinctErrorLog = new DistinctErrorLog(
            new UnsafeBuffer(new byte[ERROR_LOG_CAPACITY]),
            new SystemEpochClock()
    );

    distinctErrorLog.record(new NullPointerException());
}

I rewrite it like this:

public StandardMonitoringModule() {
StatsDumpingThread thread = new StatsDumpingThread(this);
if (thread.isEnabled()) {
thread.start();
}
ByteBuffer byteBuffer = ByteBuffer.allocateDirect(ERROR_LOG_CAPACITY);
UnsafeBuffer unsafeBuffer = new UnsafeBuffer(new byte[ERROR_LOG_CAPACITY]);

    unsafeBuffer.wrap(byteBuffer);

    this.distinctErrorLog = new DistinctErrorLog(unsafeBuffer, new SystemEpochClock());
    this.distinctErrorLog.record(new NullPointerException());
}

this is my error logger:
Logging system failed to initialize using configuration from 'classpath:logback-XXXX.xml'
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@111:16 - RuntimeException in Action for tag [appender] java.lang.IllegalStateException: AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:318)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:288)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:212)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:117)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:74)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)

15:42:53.076 [preorder-gateway-service,,,] [main] ERROR o.springframework.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@111:16 - RuntimeException in Action for tag [appender] java.lang.IllegalStateException: AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:324)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:288)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:212)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:117)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:74)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)

Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@111:16 - RuntimeException in Action for tag [appender] java.lang.IllegalStateException: AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:318)
... 24 common frames omitted
15:42:53.080 [preorder-gateway-service,,,] [main] ERROR o.springframework.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@111:16 - RuntimeException in Action for tag [appender] java.lang.IllegalStateException: AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:324)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:288)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:212)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:117)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:74)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)

Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@111:16 - RuntimeException in Action for tag [appender] java.lang.IllegalStateException: AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:318)
... 24 common frames omitted
Exception in thread "main" java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@111:16 - RuntimeException in Action for tag [appender] java.lang.IllegalStateException: AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:324)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:288)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:212)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:117)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:74)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)

Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@111:16 - RuntimeException in Action for tag [appender] java.lang.IllegalStateException: AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:318)
... 24 more

@Zhupro
Copy link
Author

Zhupro commented Apr 27, 2022

After I rewrite it, it can be used normally. If you use your previous writing method, you will always report an error.

@Zhupro
Copy link
Author

Zhupro commented Apr 27, 2022

I have another question. I use logLevelLabel Loki to receive INFo level logs. What should I configure if I only want to push ERROR logs?Thanks!
My configuration is not working now

    <host>${lokiHost}</host>
    <port>${lokiPort}</port>

    <efficientLayout>
        <pattern>${log.pattern}</pattern>
    </efficientLayout>
    <header>
        <name>X-Org-Id</name>
        <value>${moduleid}</value>
    </header>
    <label>
        <name>${moduleid}</name>
        <value>${HOSTNAME}</value>
    </label>
    <logLevelLabel>
        GATEWAY
    </logLevelLabel>
</appender>

<root level="ERROR">
    <appender-ref ref="Loki"/>
</root>

@Zhupro
Copy link
Author

Zhupro commented May 19, 2022

Hello, sorry for the inconvenience, I don't know why you don't have feedback?

@tkowalcz
Copy link
Owner

Hello, sorry for the inconvenience, I don't know why you don't have feedback?

Hi, I’m very sorry, but I have been pretty busy as of late. I will get to your issue in a few days.

@tkowalcz
Copy link
Owner

tkowalcz commented May 19, 2022

Regarding your question about log level filtering - I created branch where I added test that uses configuration similar to yours (here):

<configuration debug="true">
    <appender name="Loki" class="pl.tkowalcz.tjahzi.logback.LokiAppender">
        <host>${loki.host}</host>
        <port>${loki.port}</port>

        <efficientLayout>
            <pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
        </efficientLayout>

        <header>
            <name>X-Org-Id</name>
            <value>Circus</value>
        </header>

        <label>
            <name>server</name>
            <value>127.0.0.1</value>
        </label>

        <logLevelLabel>
            GATEWAY
        </logLevelLabel>
    </appender>

    <root level="ERROR">
        <appender-ref ref="Loki"/>
    </root>
</configuration>

The test class logs two messages with level error and info. Only error is being logged in the test so looks like configuration works.

@tkowalcz
Copy link
Owner

Regarding your error - what is the JVM, OS and CPU platform you are running on? Is it 32bit?

@Zhupro
Copy link
Author

Zhupro commented May 22, 2022

OK,
Thank you very much. I think I know why. I started it in the local Windows environment, and I will have no problem publishing it to the Linux environment. Thank you for your support

@tkowalcz
Copy link
Owner

@Zhupro so you get that error on windows? I would like to fix it, but I don't have windows computer to test on.

I might just use your proposed code change just in case it's enough.

@Zhupro
Copy link
Author

Zhupro commented May 27, 2022

Yes, I used the idea to start it on the windows system. For compatibility with the system, I wrote it like this.
//Windows操作系统
if (os != null && os.toLowerCase().startsWith("windows")) {
ByteBuffer byteBuffer = ByteBuffer.allocateDirect(ERROR_LOG_CAPACITY);
UnsafeBuffer unsafeBuffer = new UnsafeBuffer(new byte[ERROR_LOG_CAPACITY]);
unsafeBuffer.wrap(byteBuffer);

        distinctErrorLog = new DistinctErrorLog(unsafeBuffer, new SystemEpochClock());
    } else {//Linux操作系统
        distinctErrorLog = new DistinctErrorLog(
                new UnsafeBuffer(new byte[ERROR_LOG_CAPACITY]),
                new SystemEpochClock()
        );
    }

@Zhupro
Copy link
Author

Zhupro commented May 27, 2022

   String os = System.getProperty("os.name");
    //Windows
    if (os != null && os.toLowerCase().startsWith("windows")) {
        ByteBuffer byteBuffer = ByteBuffer.allocateDirect(ERROR_LOG_CAPACITY);
        UnsafeBuffer unsafeBuffer = new UnsafeBuffer(new byte[ERROR_LOG_CAPACITY]);
        unsafeBuffer.wrap(byteBuffer);

        distinctErrorLog = new DistinctErrorLog(unsafeBuffer, new SystemEpochClock());
    } else {//Linux
        distinctErrorLog = new DistinctErrorLog(
                new UnsafeBuffer(new byte[ERROR_LOG_CAPACITY]),
                new SystemEpochClock()
        );
    }

@Zhupro
Copy link
Author

Zhupro commented Jun 11, 2022

hi,My loki is configured with an invalid Host, which will cause my service to start reporting an error. Is there any solution? Because after I consider going online, if Loki hangs, I don't want it to affect the service. Looking forward to your reply, thank you.
image

@tkowalcz
Copy link
Owner

Hello,

I would like to look into this issue but need more data to understand what is happening. I see that Logback cannot stop the plugin - Tjahzi internally cannot stop the LogShipper thread. This is something I am looking at. But how did you arrive at that state?

You configured Loki (Tjahzi?) with invalid 'host' config - right? Then the service started and Logback could not start? I don't know where that first line ("Failed to initialize using configuration from") comes from. Can you share your config and some steps to reproduce?

Thanks

@akshu90
Copy link

akshu90 commented Sep 1, 2023

Hi,
I have got 'AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8' error and found that it happens when I run the JVM on 32-bit. No errors found when I run on 64-bit. Because of some dependencies, I need to run it on 32-bit. Can you suggest me what I can do here? It is bit urgent!!

Note: I am using log4j2 appender ''pl.tkowalcz.tjahzi:log4j2-appender:0.9.31''

@tkowalcz
Copy link
Owner

tkowalcz commented Sep 1, 2023

Which JVM are you using and how do you run in 32bit mode? I can't find any JDK that will work with the -d32 parameter.

@akshu90
Copy link

akshu90 commented Sep 1, 2023

I am currently using Intellij and in that I am choosing alternate JRE and selecting the version as shown below:
image

@tkowalcz
Copy link
Owner

tkowalcz commented Sep 1, 2023

What is the output of java -version?

@tkowalcz
Copy link
Owner

tkowalcz commented Sep 1, 2023

Try configuring Tjahzi to not use off heap buffers:

<useOffHeapBuffer>false</useOffHeapBuffer>

@akshu90
Copy link

akshu90 commented Sep 1, 2023

What is the output of java -version?

image
image

@akshu90
Copy link

akshu90 commented Sep 1, 2023

Try configuring Tjahzi to not use off heap buffers:

<useOffHeapBuffer>false</useOffHeapBuffer>

I tried, but error is still there.
image
image

@tkowalcz
Copy link
Owner

tkowalcz commented Sep 1, 2023

I'm sorry, but I don't know how to run a 32bit JVM. I'll try to think more about this. Why is that urgent?

@akshu90
Copy link

akshu90 commented Sep 1, 2023

It is urgent because of the delivery dead line. I had tested it earlier on 64 bit and committed the changes and just realized that the prod environment would need 32-bit support.

tkowalcz added a commit that referenced this issue Sep 1, 2023
tkowalcz added a commit that referenced this issue Sep 1, 2023
@tkowalcz
Copy link
Owner

tkowalcz commented Sep 1, 2023

I did something that might help (I have no way of verifying this). The version 0.9.32 should be up in maven central in a few hours.

@tkowalcz
Copy link
Owner

tkowalcz commented Sep 7, 2023

Hi @akshu90. I would greatly appreciate feedback on the new version. Does it solve your problem?

@akshu90
Copy link

akshu90 commented Sep 12, 2023

n 0.9.32 sh

thank you! I will test it and get back to you!

@akshu90
Copy link

akshu90 commented Sep 12, 2023

ut I don't know how to run a 32bit JVM. I'll try to think more about this. Wh

Tested with new version 0.9.32. The problem is solved now. Error is not seen anymore.
Thanks a lot!! Appreciate your time!
Also, apologies for the delayed response from my end.

@tkowalcz
Copy link
Owner

Thanks for verifying. Was happy to help.

@tkowalcz
Copy link
Owner

FYI: @Zhupro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants