[Bug 69527] Resource missing caused by mishandling of the cachedContentLength value in tomcat cache

2025-01-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69527

--- Comment #9 from Vigneshwaran N  ---
(In reply to Remy Maucherat from comment #7)

> Use of putIfAbsent in getResource should make sure your "Thread 2" uses the
> same instance as "Thread 1". Then CachedResource.webResource cannot be null
> unless Cache.getResources was called. And even if the two threads are not
> using the same instance, evict will not reset webResource back to null or
> anything so that is clearly not normal.

The issue here is webResource is not yet initialized. The initialization of the
webResource is done only when validate() for thread 1 is invoked, but before
that thread 2 tried to delete. So, cachedContentLength() is called, webResouce
is null in that case and stored value as 0 in cachedContentLength. 
That said, the issue described will be completely avoided with the changes
proposed in the patch you mentioned.


> However:
> - 636017459a88befe1c5f1fd9d8f31ff2f13f74f6 looks very fishy since nothing
> else is synced. Assuming I leave the sync, and since webResource being null
> is basically an odd special case, I would think cachedContentLength should
> not be set to 0 in that case (should simply return 0 instead, and I don't
> understand why it would need to be done in the sync block),
> - nextCheck being initialized to 0 is also meh. Should probably use the
> value set in validateResource(s) instead. I understand that
> System.currentTimeMillis() is rather expensive though.

Yes, what you’ve mentioned aligns with my understanding 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 69527] Resource missing caused by mishandling of the cachedContentLength value in tomcat cache

2025-01-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69527

--- Comment #10 from Vigneshwaran N  ---
(In reply to Remy Maucherat from comment #8)
> Created attachment 39966 [details]
> Proposed patch

Thanks. That would help to resolve the issue.

-- 
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



Buildbot failure in on tomcat-11.0.x

2025-01-11 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/1470
Blamelist: remm 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch 11.0.x] 3fc44630f751564cf4d05af2572b26131825830d


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  shell_6: 0

  compile: 1

  shell_7: 0

  shell_8: 0

  shell_9: 0

  shell_10: 0

  Rsync docs to nightlies.apache.org: 0

  shell_11: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_12: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



Buildbot failure in on tomcat-12.0.x

2025-01-11 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/120/builds/317
Blamelist: remm 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch main] 6863bc912b2da71d3aab58a488864979dcf29a34


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  shell_6: 0

  compile: 1

  shell_7: 0

  shell_8: 0

  shell_9: 0

  shell_10: 0

  Rsync docs to nightlies.apache.org: 0

  shell_11: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_12: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



[Bug 69534] SPAM SPAM SPAM SPAM

2025-01-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69534

Christopher Schultz  changed:

   What|Removed |Added

Summary|Toxinfreeglow7  |SPAM SPAM SPAM SPAM
 Status|NEW |RESOLVED
 Resolution|--- |INVALID
URL|https://toxinfreeglow.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 69533] SPAM SPAM SPAM SPAM

2025-01-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69533

Christopher Schultz  changed:

   What|Removed |Added

Summary|Toxinfreeglow7  |SPAM SPAM SPAM SPAM
 Resolution|--- |INVALID
URL|https://toxinfreeglow.com/  |
 Status|NEW |RESOLVED

-- 
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