Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash as detailed below #187

Closed
ietf-svn-bot opened this issue Jul 10, 2013 · 11 comments
Closed

Crash as detailed below #187

ietf-svn-bot opened this issue Jul 10, 2013 · 11 comments
Labels

Comments

@ietf-svn-bot
Copy link

keyword_crash_output owner:ietf@augustcellars.com resolution_fixed type_defect | by elwynd@dial.pipex.com


Traceback from running online version 2.4.2.

The attached file generates the traceback below. It clearly has a few issues with long lines but generates output OK with the old version (1.36) - I have attached the 1.36 output as well.

Warnings exist
Generating Text output in ASCII format
Expanding internal references and generating Text

Using XML_LIBRARY=/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml2:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml4:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml5
Parsing file INPUT
Resolving entity... /usr/local/lib/python2.7/dist-packages/xml2rfc/templates/rfc2629.dtd
Resolving entity... /usr/local/lib/python2.7/dist-packages/xml2rfc/templates/rfc2629-xhtml.ent
Resolving entity... /usr/local/lib/python2.7/dist-packages/xml2rfc/templates/rfc2629-other.ent
Resolving entity... /usr/local/lib/python2.7/dist-packages/xml2rfc/templates/rfc2629.dtd
Resolving entity... /usr/local/lib/python2.7/dist-packages/xml2rfc/templates/rfc2629-xhtml.ent
Resolving entity... /usr/local/lib/python2.7/dist-packages/xml2rfc/templates/rfc2629-other.ent
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.2119.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.3031.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.5036.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.5561.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.6348.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.6388.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.6512.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3/reference.I-D.ietf-mpls-ldp-multi-topology.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3/reference.I-D.wijnands-mpls-mldp-node-protection.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3/reference.I-D.ietf-rtgwg-mrt-frr-architecture.xml
Resolving include... /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3/reference.I-D.enyedi-rtgwg-mrt-frr-algorithm.xml

WARNING: Output line (from source around line 297) is 75 characters; longer than 72. Excess characters: 'SR)':
' | R4 | | R5 | (Downstream LSR)'

WARNING: Output line (from source around line 513) is 75 characters; longer than 72. Excess characters: 'SR)':
' | R4 | | R5 | (Downstream LSR)'

WARNING: Output line (from source around line 598) is 73 characters; longer than 72. Excess characters: '1':
' 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1'

WARNING: Output line (from source around line 599) is 75 characters; longer than 72. Excess characters: '+-+':
' +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

WARNING: Output line (from source around line 600) is 75 characters; longer than 72. Excess characters: ' |':
' |1|0| mLDP Based MP Prot.(IANA) | Length (= 2) |'

WARNING: Output line (from source around line 601) is 75 characters; longer than 72. Excess characters: '+-+':
' +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

WARNING: Output line (from source around line 633) is 74 characters; longer than 72. Excess characters: ' 1':
' 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1'

WARNING: Output line (from source around line 634) is 75 characters; longer than 72. Excess characters: '+-+':
' +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

WARNING: Output line (from source around line 635) is 75 characters; longer than 72. Excess characters: ' |':
' |mLDP FRR Type=3| Length | Reserved |'

WARNING: Output line (from source around line 636) is 75 characters; longer than 72. Excess characters: '+-+':
' +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

WARNING: Output line (from source around line 637) is 75 characters; longer than 72. Excess characters: ' ~':
' ~ PLR Node Address ~'

WARNING: Output line (from source around line 638) is 75 characters; longer than 72. Excess characters: '+-+':
' +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

WARNING: Output line (from source around line 688) is 75 characters; longer than 72. Excess characters: ' 9;':
' Length: If the Address Family is IPv4, the Address Length MUST be 9;'

WARNING: Output line (from source around line 689) is 76 characters; longer than 72. Excess characters: ' 33.':
' if the Address Family is IPv6, the Address Length MUST be 33.'

WARNING: Output line (from source around line 702) is 83 characters; longer than 72. Excess characters: 'ic's on PLR':
' N Bit: Node Failure Required Flag, the occasion of switching traffic's on PLR'

WARNING: Output line (from source around line 703) is 91 characters; longer than 72. Excess characters: 'ts the node failure':
' 1 = 'Y', switch traffic to backup path only when PLR detects the node failure'

WARNING: Output line (from source around line 704) is 77 characters; longer than 72. Excess characters: 'ilure':
' 0 = 'N', switch traffic to backup path when PLR detects failure'

WARNING: Output line (from source around line 712) is 97 characters; longer than 72. Excess characters: ' definition in [RFC6388].':
' Opaque Value: One or more MP opaque value elements, which is the same definition in [RFC6388].'

WARNING: Output line (from source around line 713) is 79 characters; longer than 72. Excess characters: 'encoded':
' For the FRR mLDP FEC element, the Opaque Value MUST be encoded'

WARNING: Output line (from source around line 714) is 88 characters; longer than 72. Excess characters: '6512]. The value':
' as the Recursive Opaque Value, which is defined in [RFC6512]. The value'

WARNING: Output line (from source around line 715) is 82 characters; longer than 72. Excess characters: 'al primary':
' fields of the Recursive Opaque Value contain the original primary'

WARNING: Output line (from source around line 722) is 96 characters; longer than 72. Excess characters: '], is shown in Figure 5.':
' The encoding for this Recursive Opaque Value, as defined in [RFC6512], is shown in Figure 5.'

Traceback (most recent call last):
File "/usr/local/bin/xml2rfc", line 224, in
main()
File "/usr/local/bin/xml2rfc", line 209, in main
pagedwriter.write(filename)
File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/base.py", line 1088, in write
self.post_rendering()
File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/paginated_txt.py", line 286, in post_rendering
self.emit([''] * remainder)
File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/paginated_txt.py", line 164, in emit
if self.page_length ## 1 and text.strip() '':
AttributeError: 'list' object has no attribute 'strip'


Issue migrated from trac:187 at 2022-02-05 12:34:00 +0000

@ietf-svn-bot
Copy link
Author

@elwynd@dial.pipex.com uploaded file draft-zhao-mpls-mldp-protections-04-2013-06-26.xml (35.6 KiB)

Source file that causes the crash

@ietf-svn-bot
Copy link
Author

@elwynd@dial.pipex.com uploaded file draft-zhao-mpls-mldp-protections-04-2013-06-26.txt (38.5 KiB)

Output from running v1.36 on the file.

@ietf-svn-bot
Copy link
Author

@elwynd@dial.pipex.com commented


I have now edited this document to remove the overlong lines and the tab characters in the figures.

This has fixed the crash.

The revised doc is also attached.

Elwyn.

@ietf-svn-bot
Copy link
Author

@elwynd@dial.pipex.com uploaded file draft-zhao-mpls-mldp-protections-04-2013-06-26-fixed.xml (36.0 KiB)

Source file modified now no longer crashes xml2rfc (removed overlong lines and tabs)

@ietf-svn-bot
Copy link
Author

@arusso@amsl.com commented


The RPC has gotten this error as well. Also, R. Raymond reported it on the list 24 June ([xml2rfc] bug in XML2RFC AttributeError: 'list' object has no attribute 'strip').

The last lines of Elwyn's report are the same as the error we get (except it's python 2.6 on our system):

File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/base.py", line 1088, in write
self.post_rendering()
File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/paginated_txt.py", line 286, in post_rendering
self.emit([] * remainder)

File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/paginated_txt.py", line 164, in emit
if self.page_length ## 1 and text.strip() :

AttributeError?: 'list' object has no attribute 'strip'

It seems to be:

  • corrected by removing a line in artwork that is over 72 chars.
  • intermittent. i.e., not always re-creatable w/ the same file.

@ietf-svn-bot
Copy link
Author

@arusso@amsl.com changed _comment0 which not transferred by tractive

@ietf-svn-bot
Copy link
Author

@ietf@augustcellars.com changed owner from Elwyn Davies to ietf@augustcellars.com

@ietf-svn-bot
Copy link
Author

@ietf@augustcellars.com commented


Problem located. I have a fix for the main problem and and now tracking down other issues.

If the emission ended having just emitted a footer/header pair but no lines of text, then it sent in a large array of blank lines which then blows up. I have a fix for this, but still need to keep it from generating that last empty page.

@ietf-svn-bot
Copy link
Author

@ietf@augustcellars.com changed status from new to closed

@ietf-svn-bot
Copy link
Author

@ietf@augustcellars.com changed resolution from `` to fixed

@ietf-svn-bot
Copy link
Author

@ietf@augustcellars.com commented


Fixed in version 938

The problem appears to only occur if the final page is going to be blank, in this case a long list of empty strings is pushed out. There may be other cases where arrays of strings were pushed out and the fix deals with that case as well.

There may be an issue for nroff files where an extra .bp will be emitted at the end of the file and not removed. It did not occur for this test file so I did not put in code to force it to be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant