[ 
https://issues.apache.org/jira/browse/JSPF-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17851538#comment-17851538
 ] 

aleksey commented on JSPF-110:
------------------------------

Good morning, my dear friend. Yes, your last PR is good. It will avoid harm to 
the server and at the same time clarify a bit the reason for what happened. 
Also, maybe we should teach SPFSession to report its state (toString()) to 
improve understanding of the situation?

> Infinite loop in the handleError method
> ---------------------------------------
>
>                 Key: JSPF-110
>                 URL: https://issues.apache.org/jira/browse/JSPF-110
>             Project: James jSPF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: master
>         Environment: Java: 21
> Spring Boot: 3.2.4
>            Reporter: aleksey
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hello, my dear friends!
> I use your library to check SPF in my work.
> {code:java}
> <dependency>
>     <groupId>org.apache.james.jspf</groupId>
>     <artifactId>apache-jspf-resolver</artifactId>
>     <version>1.0.3</version>
> </dependency> {code}
> Here's an exact example of how I use it:
> {code:java}
> SPF spfChecker = new DefaultSPF();
> spfChecker.setUseBestGuess(true);
> SPFResult spfResult = spfChecker.checkSPF(ipAddress, from, hostname);
> return spfResult.getResult();{code}
> And I have encountered a problem with the AsynchronousSPFExecutor:
> {code:java}
> "Thread-145410" #2022286 [1208634] daemon prio=5 os_prio=0 cpu=1337200.37ms 
> elapsed=1431.06s tid=0x00007f38240a8d20 nid=1208634 runnable  
> [0x00007f38353e1000]
>    java.lang.Thread.State: RUNNABLE
>         at 
> org.apache.james.jspf.executor.AsynchronousSPFExecutor.handleError(AsynchronousSPFExecutor.java:99)
>         at 
> org.apache.james.jspf.executor.AsynchronousSPFExecutor.lambda$execute$0(AsynchronousSPFExecutor.java:69)
>         at 
> org.apache.james.jspf.executor.AsynchronousSPFExecutor$$Lambda/0x00007f3838a5ea48.accept(Unknown
>  Source)
>         at 
> java.util.concurrent.CompletableFuture$UniAccept.tryFire(java.base@21.0.1/CompletableFuture.java:718)
>         at 
> java.util.concurrent.CompletableFuture.postComplete(java.base@21.0.1/CompletableFuture.java:510)
>         at 
> java.util.concurrent.CompletableFuture.postFire(java.base@21.0.1/CompletableFuture.java:614)
>         at 
> java.util.concurrent.CompletableFuture$UniCompose.tryFire(java.base@21.0.1/CompletableFuture.java:1163)
>         at 
> java.util.concurrent.CompletableFuture$Completion.run(java.base@21.0.1/CompletableFuture.java:482)
>         at java.lang.Thread.runWith(java.base@21.0.1/Thread.java:1596)
>         at java.lang.Thread.run(java.base@21.0.1/Thread.java:1583) {code}
> This infinite loop is affecting the server.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to