You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Doğacan Güney (JIRA)" <ji...@apache.org> on 2007/06/19 08:01:41 UTC

[jira] Created: (NUTCH-502) Bug in SegmentReader causes infinite loop

Bug in SegmentReader causes infinite loop
-----------------------------------------

                 Key: NUTCH-502
                 URL: https://issues.apache.org/jira/browse/NUTCH-502
             Project: Nutch
          Issue Type: Bug
            Reporter: Doğacan Güney
            Assignee: Doğacan Güney
            Priority: Minor
             Fix For: 1.0.0


A small bug in SegmentReader.get() may lead to an infinite loop.

...
    int cnt = 0;
    do {
      try {
        Thread.sleep(5000);
      } catch (Exception e) {};
      it = threads.iterator();
      while (it.hasNext()) {
        if (((Thread)it.next()).isAlive()) cnt++;
      }
      if ((cnt > 0) && (LOG.isDebugEnabled())) {
        LOG.debug("(" + cnt + " to retrieve)");
....

      }
    } while (cnt > 0); 


If cnt ever becomes non-zero, SegmentReader gets stuck in that loop.

This bug is discovered by Ilya Vishnevsky.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NUTCH-502) Bug in SegmentReader causes infinite loop

Posted by "Doğacan Güney (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NUTCH-502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doğacan Güney updated NUTCH-502:
--------------------------------

    Attachment: segment_reader_hang.patch

Patch is contributed by Ilya Vishnevsky.

I will give this a couple of hours and then commit it if there are no objections.

> Bug in SegmentReader causes infinite loop
> -----------------------------------------
>
>                 Key: NUTCH-502
>                 URL: https://issues.apache.org/jira/browse/NUTCH-502
>             Project: Nutch
>          Issue Type: Bug
>            Reporter: Doğacan Güney
>            Assignee: Doğacan Güney
>            Priority: Minor
>             Fix For: 1.0.0
>
>         Attachments: segment_reader_hang.patch
>
>
> A small bug in SegmentReader.get() may lead to an infinite loop.
> ...
>     int cnt = 0;
>     do {
>       try {
>         Thread.sleep(5000);
>       } catch (Exception e) {};
>       it = threads.iterator();
>       while (it.hasNext()) {
>         if (((Thread)it.next()).isAlive()) cnt++;
>       }
>       if ((cnt > 0) && (LOG.isDebugEnabled())) {
>         LOG.debug("(" + cnt + " to retrieve)");
> ....
>       }
>     } while (cnt > 0); 
> If cnt ever becomes non-zero, SegmentReader gets stuck in that loop.
> This bug is discovered by Ilya Vishnevsky.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (NUTCH-502) Bug in SegmentReader causes infinite loop

Posted by "Doğacan Güney (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NUTCH-502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doğacan Güney resolved NUTCH-502.
---------------------------------

    Resolution: Fixed

Committed in rev. 548666.

> Bug in SegmentReader causes infinite loop
> -----------------------------------------
>
>                 Key: NUTCH-502
>                 URL: https://issues.apache.org/jira/browse/NUTCH-502
>             Project: Nutch
>          Issue Type: Bug
>            Reporter: Doğacan Güney
>            Assignee: Doğacan Güney
>            Priority: Minor
>             Fix For: 1.0.0
>
>         Attachments: segment_reader_hang.patch
>
>
> A small bug in SegmentReader.get() may lead to an infinite loop.
> ...
>     int cnt = 0;
>     do {
>       try {
>         Thread.sleep(5000);
>       } catch (Exception e) {};
>       it = threads.iterator();
>       while (it.hasNext()) {
>         if (((Thread)it.next()).isAlive()) cnt++;
>       }
>       if ((cnt > 0) && (LOG.isDebugEnabled())) {
>         LOG.debug("(" + cnt + " to retrieve)");
> ....
>       }
>     } while (cnt > 0); 
> If cnt ever becomes non-zero, SegmentReader gets stuck in that loop.
> This bug is discovered by Ilya Vishnevsky.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.