[Bug 68932] Occasional 404 or 500 errors

2024-05-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

--- Comment #9 from Nathan  ---
(In reply to Nathan from comment #8)
> I will try other versoins like 8.5.100 later. It is truely difficult to
> reproduce this bug in other applications in test environment. Here is some
> infos.
> 
> 1.We use the same url path (e.g /test/foo ,not the real uri, I will deal
> with params in my application), so i think it has nothing to do with HTTP
> specification compliance.Also I don't think there is any sort of pattern in
> url.
> And I don't test it in websocket or http2. 
> 2.It is deployed in standalone type. I didn't pay attention to the embedding
> type yet.And we didn't use ROOT or manager, just put applications into
> webapps directoty.
> 
> Additionally, I came across a phenomenon during debugging in ide. When I
> debug in ide, It will go into timeout method, and it will return 404. After
> that, It will return 404 forever. But in product environment, I don't think
> it will happen.
> 
> 
> --
> org.apache.tomcat.util.net.NioEndpoint$Poller#run()
>   // Process timeouts
>   timeout(keyCount,hasEvents);
> 
> --
> org.apache.tomcat.util.net.NioEndpoint$Poller#timeout(int keyCount, boolean
> hasEvents)
> 
> } else if (!processSocket(socketWrapper, SocketEvent.ERROR, true)) {
> cancelledKey(key, socketWrapper);
> }
> --

Sorry, correct the description above:

 Additionally, I came across a phenomenon during debugging in ide. When I
 debug in ide, It will go into timeout method, and it will return 404. After
 that, the Poller thread  [http-nio-8080-Poller] will invoke the code every
time a request comes in in 60 seconds, while the browser get a 200 response .

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68932] Occasional 404 or 500 errors

2024-05-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

--- Comment #8 from Nathan  ---
I will try other versoins like 8.5.100 later. It is truely difficult to
reproduce this bug in other applications in test environment. Here is some
infos.

1.We use the same url path (e.g /test/foo ,not the real uri, I will deal with
params in my application), so i think it has nothing to do with HTTP
specification compliance.Also I don't think there is any sort of pattern in
url.
And I don't test it in websocket or http2. 
2.It is deployed in standalone type. I didn't pay attention to the embedding
type yet.And we didn't use ROOT or manager, just put applications into webapps
directoty.

Additionally, I came across a phenomenon during debugging in ide. When I debug
in ide, It will go into timeout method, and it will return 404. After that, It
will return 404 forever. But in product environment, I don't think it will
happen.


--
org.apache.tomcat.util.net.NioEndpoint$Poller#run()
  // Process timeouts
  timeout(keyCount,hasEvents);

--
org.apache.tomcat.util.net.NioEndpoint$Poller#timeout(int keyCount, boolean
hasEvents)

} else if (!processSocket(socketWrapper, SocketEvent.ERROR, true)) {
cancelledKey(key, socketWrapper);
}
--

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68932] Occasional 404 or 500 errors

2024-04-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #7 from Mark Thomas  ---
There is insufficient information in this report for the Tomcat team to
investigate the issue.

Given the lower rate of errors this could just be a small number of invalid
requests. Tomcat has generally become more strict about HTTP specification
compliance over time. It is possible that 9.0.x will reject requests that 8.5.x
would have permitted.

Unless sufficient information is provided for the Tomcat team to reproduce the
issue, this report will eventually be closed as WORKSFORME.

Additional ideas for providing more information over and above the ideas
already presented:
- Provide more details about the application (does it use async, WebSocket,
HTTP/2, JSP, etc)
- How is the application deployed?
- Is there a ROOT application deployed?
- If 8.5.100 also shows these errors, do a binary search to find out which
version they start to appear with
- What requests trigger the errors? Is there any sort of pattern?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68932] Occasional 404 or 500 errors

2024-04-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

--- Comment #6 from Michael Osipov  ---
(In reply to Christopher Schultz from comment #5)
> Surely, Michael meant to suggest upgrading to the latest 9.0.88 that was
> just released.

No, I wanted to know wether this problem is in 8 or 9 first. It is easier to
diff latest version of 8 and 9 instead of ancient ones.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68932] Occasional 404 or 500 errors

2024-04-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

--- Comment #5 from Christopher Schultz  ---
Surely, Michael meant to suggest upgrading to the latest 9.0.88 that was just
released.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68932] Occasional 404 or 500 errors

2024-04-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

--- Comment #4 from Michael Osipov  ---
You should first upgrade to 8.5.100 and see whether the error is present there
as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68932] Occasional 404 or 500 errors

2024-04-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

--- Comment #3 from Nathan  ---
This issue has already arisen in projects across different departments.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68932] Occasional 404 or 500 errors

2024-04-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

Nathan  changed:

   What|Removed |Added

 CC||ningj...@163.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68932] Occasional 404 or 500 errors

2024-04-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

--- Comment #2 from Nathan  ---
This is 500 error stack info below:
org.apache.coyote.http11.Http11Ppocessor.service Error processing request
java.lang.Nul1PointerException
at org.apache.tomcat.util.buf.MessageBytes.toChars(MessageBytes.java:322)
at org.apache.catalina.mapper.Mapper.map(Mapper.java:664)
at
org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:692)
atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:338)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
at
org.apache.tomcat.util.net.Nio2Endpoint$5ocketProcessor.doRun(Nio2Endpoint.java
:1713)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at
org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1288)
at
org.apache.tomcat.uti1.net.Nio2Endpoint$Nio2Socketwrapper$2.completed(Nio2Endpoint.java:641)
at
org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:619)
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishRead(UnixAs ynchronous
SocketChannelImpl.java:432)
at sun.nio.ch.UnixAsynchronousSocketChannelImp1.finish(UnixAs
ynchronousSocketChannelImpl.java:191)
at sun.nio.ch.UnixAsynchronousSocketChannelImp1.onEvent(UnixAs
ynchronousSocketChannelImpl.java:213)
at sun.nio.ch.EPol1Port$EventHandlerTask.run(EPol1Port.java: 293)
at
sun.nio.ch.AsynchronousChannelGroupImp1$1.run(AsynchronousChannelGroupImpl.java:112)
at
java.uti1,concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker .run
(ThreadPoolExecutor.java:624)
at java.Lang.Thread.run(Thread.java:750)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68932] Occasional 404 or 500 errors

2024-04-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68932

Nathan  changed:

   What|Removed |Added

Version|9.0.83  |9.0.76

--- Comment #1 from Nathan  ---
This is code snippet in StandardHostValve:
Context context = request.getContext();
if (context == null) {
if (!response.isError()) {
response.sendError(404);//here is 404 error
}
return;
}

..

This is stack info below:
at org.apache.coyote.Response.setStatus(Response.java:229)
at org.apache.catalina.connector.Response.sendError(Response.java:1276) 
at org.apache.catalina.connector.Response.sendError(Response.java:1249)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:102) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
 
at
org.apache.catalina.core.standardEngineValve.invoke(StandardEngineValve.java:74)
 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
 
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
 
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
 
at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
 
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 
at java.lang.Thread.run(Thread.java:750)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org