[OPSEC] [IETF Successes and Failures] #4 (component1): text.py: endless loop in function paginate

opsec issue tracker <trac@tools.ietf.org> Fri, 08 January 2021 11:59 UTC

Return-Path: <trac@tools.ietf.org>
X-Original-To: opsec@ietfa.amsl.com
Delivered-To: opsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B9B4A3A0B05 for <opsec@ietfa.amsl.com>; Fri, 8 Jan 2021 03:59:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bYhaTjf0ntMR for <opsec@ietfa.amsl.com>; Fri, 8 Jan 2021 03:58:59 -0800 (PST)
Received: from zinfandel.tools.ietf.org (zinfandel.tools.ietf.org [64.170.98.42]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0859E3A0B01 for <opsec@ietf.org>; Fri, 8 Jan 2021 03:58:58 -0800 (PST)
Received: from localhost ([127.0.0.1]:43938 helo=zinfandel.tools.ietf.org ident=www-data) by zinfandel.tools.ietf.org with esmtp (Exim 4.80) (envelope-from <trac@tools.ietf.org>) id 1kxqPy-0006bu-BK; Fri, 08 Jan 2021 03:58:58 -0800
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
From: opsec issue tracker <trac@tools.ietf.org>
X-Trac-Version: 0.12.5
Precedence: bulk
Cc: opsec@ietf.org
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12.5, by Edgewall Software
To: roger@rogerprice.org
X-Trac-Project: IETF Successes and Failures
Date: Fri, 08 Jan 2021 11:58:58 -0000
Reply-To: opsec@ietf.org
X-URL: http://tools.ietf.org/misc/outcomes/
X-Trac-Ticket-URL: https://trac.tools.ietf.org/misc/outcomes/ticket/4
Message-ID: <068.8503b924659b96e8b3debadbeb5df9ce@tools.ietf.org>
X-Trac-Ticket-ID: 4
X-SA-Exim-Connect-IP: 127.0.0.1
X-SA-Exim-Rcpt-To: roger@rogerprice.org, opsec@ietf.org
X-SA-Exim-Mail-From: trac@tools.ietf.org
X-SA-Exim-Scanned: No (on zinfandel.tools.ietf.org); SAEximRunCond expanded to false
X-Clacks-Overhead: GNU Terry Pratchett
Archived-At: <https://mailarchive.ietf.org/arch/msg/opsec/mYPbPh2-5u-Vn2zN4bXFE6PxHBQ>
Subject: [OPSEC] [IETF Successes and Failures] #4 (component1): text.py: endless loop in function paginate
X-BeenThere: opsec@ietf.org
X-Mailman-Version: 2.1.29
List-Id: opsec wg mailing list <opsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/opsec>, <mailto:opsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/opsec/>
List-Post: <mailto:opsec@ietf.org>
List-Help: <mailto:opsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/opsec>, <mailto:opsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Jan 2021 11:59:01 -0000

#4: text.py: endless loop in function paginate

 Function paginate got into an endless loop so I added some calls to print,
 let it run and stopped the loop with a Ctl-c. I saw this attached output:

 {{{

 text.py: start_lineno=0 textlen=999 page=1
 text.py: break_lineno=52 break_target=52
 text.py: olen=7 wlen=1 blen=8 elem.tag=t
 text.py: start_lineno=45 textlen=999 page=2
 text.py: break_lineno=93 break_target=93
 text.py: olen=4 wlen=119 blen=123 elem.tag=t
 text.py: start_lineno=93 textlen=999 page=3
 text.py: break_lineno=141 break_target=141
 text.py: olen=52 wlen=71 blen=123 elem.tag=t
 text.py: start_lineno=141 textlen=999 page=4
 text.py: break_lineno=189 break_target=189
 text.py: olen=100 wlen=23 blen=123 elem.tag=t
 text.py: start_lineno=189 textlen=999 page=5
 text.py: break_lineno=237 break_target=237
 text.py: olen=0 wlen=6 blen=6 elem.tag=section
 text.py: range(block.beg=237, break_target=237)
 text.py: start_lineno=237 textlen=999 page=6
 text.py: break_lineno=285 break_target=285
 text.py: olen=6 wlen=1 blen=7 elem.tag=section
 text.py: range(block.beg=279, break_target=285)
 text.py: start_lineno=279 textlen=999 page=7
 text.py: break_lineno=327 break_target=327
 text.py: olen=0 wlen=4 blen=4 elem.tag=section
 text.py: range(block.beg=327, break_target=327)
 text.py: start_lineno=327 textlen=999 page=8
 text.py: break_lineno=375 break_target=375
 text.py: block=None
 text.py: start_lineno=374 textlen=999 page=9
 text.py: break_lineno=422 break_target=422
 text.py: block=None
 text.py: start_lineno=423 textlen=999 page=10
 text.py: break_lineno=471 break_target=471
 text.py: block=None
 text.py: start_lineno=472 textlen=999 page=11
 text.py: break_lineno=520 break_target=520
 text.py: olen=0 wlen=1 blen=1 elem.tag=dt
 text.py: start_lineno=520 textlen=999 page=12
 text.py: break_lineno=568 break_target=568
 text.py: olen=32 wlen=78 blen=110 elem.tag=section
 text.py: range(block.beg=536, break_target=568)
 text.py: start_lineno=536 textlen=999 page=13
 text.py: break_lineno=584 break_target=584
 text.py: olen=48 wlen=62 blen=110 elem.tag=section
 text.py: range(block.beg=536, break_target=584)
 text.py: start_lineno=536 textlen=999 page=14
 text.py: break_lineno=584 break_target=584
 text.py: olen=48 wlen=62 blen=110 elem.tag=section
 text.py: range(block.beg=536, break_target=584)
 text.py: start_lineno=536 textlen=999 page=15
 text.py: break_lineno=584 break_target=584
 text.py: olen=48 wlen=62 blen=110 elem.tag=section
 text.py: range(block.beg=536, break_target=584)
 text.py: start_lineno=536 textlen=999 page=16
 ...
 text.py: break_lineno=584 break_target=584
 text.py: olen=48 wlen=62 blen=110 elem.tag=section
 text.py: range(block.beg=536, break_target=584)
 text.py: start_lineno=536 textlen=999 page=9621
 text.py: break_lineno=584 break_target=584
 text.py: olen=48 wlen=62 blen=110 elem.tag=section
 text.py: range(block.beg=536, break_target=584)
 Traceback (most recent call last):
   File "/usr/bin/xml2rfc", line 11, in <module>
     sys.exit(main())
   File "/mnt/home/rprice/.local/lib/python3.5/site-
 packages/xml2rfc/run.py",
        line 739, in main writer.write(filename)
   File "/mnt/home/rprice/.local/lib/python3.5/site-
 packages/xml2rfc/writers/text.py",
        line 343, in write text = self.process()
   File "/mnt/home/rprice/.local/lib/python3.5/site-
 packages/xml2rfc/writers/text.py",
        line 305, in process lines = self.paginate(lines)
   File "/mnt/home/rprice/.local/lib/python3.5/site-
 packages/xml2rfc/writers/text.py",
        line 461, in paginate paginated += lines[start_lineno:break_lineno]
 KeyboardInterrupt

 }}}

 Roger
 Attached file draft-rprice-UPS-management-protocol-00.rfc

-- 
-----------------------------------+----------------------
 Reporter:  roger@rogerprice.org   |      Owner:  somebody
     Type:  defect                 |     Status:  new
 Priority:  major                  |  Milestone:
Component:  component1             |    Version:
 Keywords:  text.py paginate loop  |
-----------------------------------+----------------------

Ticket URL: <https://trac.tools.ietf.org/misc/outcomes/ticket/4>
IETF Successes and Failures <http://tools.ietf.org/misc/outcomes/>
IETF Successes and Failures