bugThe Circle - Bugs: bug #3655, file_server_poller crashes on...

 
 

bug #3655: file_server_poller crashes on certain files

Submitted by:  ThomasV <thomasV>
Submitted on:  Sat 17 May 2003 03:43:22 PM UTC  
 
Category: InternalSeverity: 3 - Ordinary
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 25 May 2003 09:15:03 AM UTC, comment #7:

I commited the new files sent by Thomas Mangin.
This fixes it.

ThomasV <thomasV>
Project Administrator
Tue 20 May 2003 05:47:04 PM UTC, comment #6:

thanks for the file Thomas.
I'll check it out soon.
good to see you again here...

ThomasV <thomasV>
Project Administrator
Tue 20 May 2003 03:15:10 PM UTC, comment #5:

Fixed another "out of limit" read access. Please update, this should now work. download the files from :
http://thomas.mangin.me.uk/data/source/magic.tar.bz2

/Thomas

Anonymous
Tue 20 May 2003 03:01:08 PM UTC, comment #4:

Have to replace :
if ord(extract[0]) == 0 or limit > 100:
with :
if ord(extract[0]) == 0 or ord(extract[0]) == ord('\n') or limit > 100:

As the /b of string/b is not implemented the result will be "client.sh: a /bin/sh script text executable" and not "client.sh: Bourne shell script text executable".

However there is possibly still a bug so please do not update yet, I am still investigating.

Anonymous
Tue 20 May 2003 02:27:05 PM UTC, comment #3:

#!/ files are coded as "string/b" into the magic file which is not done yet, but I am sure there is something else on top of that.

Anonymous
Tue 20 May 2003 02:00:35 PM UTC, comment #2:

A more recent version of the code available at
http://www.slhan.org/software/python.html. it contain few bug fixes.

Circle code have a wrapper file so it should just be a matter of replacing magic.py and convert.py with the new files when I fixed the bug.

Feel free to contact me should you want to understand the code.

AFAI can see, it seems that the problems come from changes in python with version 2.2 (the self check of convert.py fail so I should expect some issues).

I am looking at the problem now.

/Thomas

Anonymous
Tue 20 May 2003 04:14:44 AM UTC, comment #1:

I'm putting a try: except: block around the classify call to catch errors until ThomasM can take a look.

Paul Harrison <pfh>
Project Administrator
Sat 17 May 2003 03:43:22 PM UTC, original submission:

fileserver_poller crashes for a magic reason:

Traceback (most recent call last):
File "/home/voegtlin/circle/circlelib/utility.py", line 746, in run
apply(self.function,(self.manager,) + self.parameters)
File "/home/voegtlin/circle/circlelib/utility.py", line 863, in applier_task
apply(func,param)
File "/home/voegtlin/circle/circlelib/file_server.py", line 794, in file_server_poller
result = build_entry(item[0],server.entries.get(item[0],None),item[1],server.cache,new_cache)
File "/home/voegtlin/circle/circlelib/file_server.py", line 745, in build_entry
result = build_file(path, mtime,flags,old_cache,new_cache)
File "/home/voegtlin/circle/circlelib/file_server.py", line 674, in build_file
information = classify.classifier.information(path)
File "/home/voegtlin/circle/circlelib/classify.py", line 55, in information
result['generic']=self.magic['linux'].classify(file)
File "/home/voegtlin/circle/circlelib/magic.py", line 537, in classify
if ord(extract[0]) == 0 or limit > 100:
IndexError: string index out of range

the crash occurs when a given file is in my shared directory. the file in question is called client.sh

Here is the content of this file:

[voegtlin@localhost circle]$ cat ../shared/client.sh
#!/bin/sh
/usr/bin/circled get "circle-file:"$URI_DATA
exit;

I do not understand the code in magic.py quite well.
the reason might be obvious. any idea?

ThomasV <thomasV>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 25 May 2003 09:15:03 AM UTCthomasVStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)
Tue 20 May 2003 04:14:44 AM UTCpfhSeverity5 - Important: no release until fixed=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1