Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-415

WatchServiceFileSystemWatcher swallows some events

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.8.9.Final
    • 3.8.8.Final
    • nio-impl
    • None

      There is an intermittent failure in undertow in DefaultServletCachingListenerTestCase.testWelcomePages. After a lot of time testing and sending some debugging versions to the github CI it was detected that the index.html creation was simply not received by the listener and therefore the cache was not updated:

      2022-10-20T12:35:14.6923456Z Starting test testWelcomePages
      2022-10-20T12:35:14.6976283Z status=404
      2022-10-20T12:35:14.6989750Z ServletPathMatches.listener ADDED:range_not_in_cache.html
      2022-10-20T12:35:24.7003914Z status=404
      2022-10-20T12:35:34.7028187Z status=404
      2022-10-20T12:35:44.7052840Z status=404
      ...
      2022-10-20T12:40:14.7825970Z status=404
      2022-10-20T12:40:14.7827329Z ServletPathMatches.listener ADDED:9OfqBvhHmLCHL_rFlnE88pLWTw9HDM-3dytzjLEP.html
      2022-10-20T12:40:24.7860996Z ServletPathMatches.listener REMOVED:9OfqBvhHmLCHL_rFlnE88pLWTw9HDM-3dytzjLEP.html
      2022-10-20T12:40:24.7868417Z ServletPathMatches.listener ADDED:hello.html
      2022-10-20T12:40:24.7869101Z ServletPathMatches.listener MODIFIED:hello.html
      2022-10-20T12:40:24.8042582Z ServletPathMatches.listener MODIFIED:hello.html
      2022-10-20T12:40:24.8062487Z ServletPathMatches.listener REMOVED:hello.html
      2022-10-20T12:40:24.8076786Z ServletPathMatches.listener ADDED:range.html
      2022-10-20T12:40:24.8078421Z ServletPathMatches.listener MODIFIED:range.html
      2022-10-20T12:40:24.8106452Z ServletPathMatches.listener ADDED:hello.txt
      2022-10-20T12:40:24.8108050Z ServletPathMatches.listener MODIFIED:hello.txt
      2022-10-20T12:40:24.8280616Z ServletPathMatches.listener MODIFIED:hello.txt
      2022-10-20T12:40:24.8323558Z ServletPathMatches.listener REMOVED:hello.txt
      2022-10-20T12:40:24.8325915Z ServletPathMatches.listener REMOVED:range_not_in_cache.html
      2022-10-20T12:40:24.8330004Z ServletPathMatches.listener REMOVED:index.html
      2022-10-20T12:40:24.8330617Z ServletPathMatches.listener REMOVED:range.html
      

      The testWelcomePages test starts but ADDED event for index.html is not received. Nevertheless the REMOVED is correctly printed later. So this make me suspect that the problem was in XNIO implementation of the listener. It sometimes swallows a event.

      After creating a specific test it's certified that the WatchServiceFileSystemWatcher swallows events in its implementation. Let's see if this fixes the undertow test definitely.

              rhn-support-rmartinc Ricardo Martin Camarero
              rhn-support-rmartinc Ricardo Martin Camarero
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: