Opened 9 years ago

Closed 8 years ago

#2568 closed defect (user disappeared)

IOError: [Errno 36] File name too long:

Reported by: stars Owned by: mikeperry
Priority: Medium Milestone:
Component: Core Tor/Torflow Version:
Severity: Keywords:
Cc: aagbsn@… Actual Points:
Parent ID: Points: 3
Reviewer: Sponsor:



I have tested the last git Torflow and it crash anytime due to a too long file name.

INFO[Tue Feb 15 13:23:02 2011]:Completed read
INFO[Tue Feb 15 13:23:02 2011]:Completed HTTP Reqest for:
ERROR[Tue Feb 15 13:23:02 2011]:An unexpected error occured.
Traceback (most recent call last):

File "./", line 3225, in <module>


File "./", line 3166, in main

result = test.run_test()

File "./", line 1502, in run_test

result = self.check_js(url)

File "./", line 1599, in check_js

ret = self.check_http_nodynamic(address)

File "./", line 1133, in check_http_nodynamic

content_file = open(content_prefix+'.content', 'w')

IOError: [Errno 36] File name too long: './data/soat/http/content/pshared.5min.com_Scripts_ThumbSeed.js_sid_527_displayBorder_false_layout_700X180_backgroundColor_White_displayHeader_false_displayFooter_false_videoCount_3_fallbackType_featured_fallback_0.content'
INFO[Tue Feb 15 13:23:02 2011]:Resetting LeaveStreamsUnattached=0 and FetchUselessDescriptors=1

git commit 0a7bdc32c0e5e3d4ab3c03269bcc3dcae4e87575

on kubuntu LTS 10.04 x86 64

Best regards


Child Tickets

Change History (7)

comment:1 Changed 9 years ago by mikeperry

Points: 3

Hrmm. So we basically want to cut down the filename size to the os max. Doing this is probably easy. Doing it while avoiding path collision issues is a little harder.

comment:2 Changed 9 years ago by aagbsn

Cc: aagbsn@… added

comment:3 Changed 9 years ago by aagbsn

todo: need to figure out how to determine what the OS limits are, or handle obscure cases gracefully. see:
for example of obscure case.

the majority of operating systems have a 255 character filename limit:

the fix could assume a limitation of 255 and raise a warning and discard the result if open() fails with these assumptions.

comment:4 Changed 9 years ago by aagbsn

I am having trouble reproducing this bug. Steps I've tried:

  1. find a long url
export TARGET='http://some_host_here/xxxxxxxxxxxxxxxxxxxx/xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.html
  1. scan this target
python --http --targ $TARGET >& ./data/soat.log
  1. check output files
  1. check output filename lengths
    >>> s="/data/soat/http/content/some_host_here_xxxxxxxxxxxxxxxxxxxx_xxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.content"
    >>> len(s)

Perhaps the error is an ubuntu bug? It seems the length of the filename you provide are also less than 255

>>> s="./data/soat/http/content/pshared.5min.com_Scripts_ThumbSeed.js_sid_527_displayBorder_false_layout_700X180_backgroundColor_White_displayHeader_false_displayFooter_false_videoCount_3_fallbackType_featured_fallback_0.content"
>>> len(s)

comment:5 in reply to:  4 Changed 9 years ago by aagbsn

oops, #3 should be:

python --http --target $TARGET >& data/soat.log

comment:6 Changed 9 years ago by aagbsn

Status: newneeds_review

comment:7 Changed 8 years ago by aagbsn

Resolution: user disappeared
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.