debugging - File is locked by Python debugger -


i have problem understanding strange file locking behavior in python debugger.

i have 2tb image file, script reads. works perfect, until want read same file different hex editor. if file opened in hex editor before start script, fine. if try open file during script paused @ breakpoint, system hangs , becomes slow. can kill pyhon , hex editor terminal, slow , takes 10 minutes.

the same problem apperares after stop script , extensively kill python instances. disk, image situated remained locked , it's not possible unmount (only diskutil force command), system hangs if try open file anywhere else.

also can't start scripts 1 after another, next scripts stops working , hangs system.

i have wait 10 minutes able work file again.

i tried find process locks file "sudo lsof +d" command doesn't list anything.

here more details: — system mac os x 10.9. python 3.4. use eclipse pydev develop script. — use open('image.dmg', mode='rb') command open file in python , close()to close it. — the file 2tb disk image on external exfat formatted drive. other files don't have such problems. file write-protected in finder settings.

can direct me in proper direction locate source of problem?

i never worked mac os imagine this:

  • maybe python locks file on open , hex-editor failing if try open afterwards.
  • the system hangs , slow (even after killing processes) -> think thats kind of caching fill memory till computer starts using harddisk memory (and turns slow)

i think should try find out how files open python on mac os (if there kind of lock) , should take care large file never stored complete in memory (there different methods how read large files in chunks).

greetings kuishi

ps: apologize english. isnt native language.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -