2 Replies Latest reply on Jun 19, 2008 5:28 AM by Andrei Markavtsov

    FileUpload 100% CPU, infinite loop

    Anton Kuranov Newbie

      Hello,

      FileUpload (3.2.1 GA) has infinite loop in the following code:

      org.ajax4jsf.request.MultipartRequest.parseRequest(MultipartRequest.java:355)

      InputStream input = request.getInputStream();
       if (!shouldStop) {
      
       int read = input.read(buffer);
       int pos = 0;
      
       Param p = null;
      
       while (read != -1) {
       for (int i = 0; i < read; i++) {
      


      I found this problem in production, dumping threads when CPU was 100% note that one thread working for a long time

      org.ajax4jsf.request.MultipartRequest.parseRequest(MultipartRequest.java:355)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:330)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)

      Couldn't reproduce.

      Best regards,
      Ian