thomasvs / morituri

For those about to RIP - a Unix CD ripper preferring accuracy over speed
GNU General Public License v3.0
301 stars 42 forks source link

"rip cd rip" crash #57

Open tlc opened 10 years ago

tlc commented 10 years ago
...
Ripping track 15 of 15: 15. Elvis Costello - Last Boat Leaving.flac
Checksums match for track 15                       
Peak level: 90.97 %
Rip quality: 100.00 %
AccurateRip URL http://www.accuraterip.com/accuraterip/9/4/0/dBAR-015-00243049-01993143-dd0f210f.bin
9 AccurateRip reponses found
Traceback (most recent call last):
  File "/usr/local/bin/rip", line 41, in <module>
    sys.exit(main.main(sys.argv[1:]))
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 45, in main
    ret = c.parse(argv)
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 123, in parse
    logcommand.LogCommand.parse(self, argv)
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 401, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 401, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 363, in parse
    ret = self.do(args)
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/cd.py", line 157, in do
    self.doCommand()
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/cd.py", line 510, in doCommand
    self.program.verifyImage(self.runner, responses)
  File "/usr/local/lib/python2.7/site-packages/morituri/common/program.py", line 628, in verifyImage
    verifytask = image.ImageVerifyTask(cueImage)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 220, in __init__
    path = image.getRealPath(index.path)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 65, in getRealPath
    return self.cue.getRealPath(path)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/cue.py", line 186, in getRealPath
    return common.getRealPath(self._path, path)
  File "/usr/local/lib/python2.7/site-packages/morituri/common/common.py", line 247, in getRealPath
    if path == os.path.abspath(path):
  File "/usr/lib/python2.7/posixpath.py", line 345, in abspath
    cwd = os.getcwdu()
OSError: [Errno 2] No such file or directory
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 70, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
OSError: [Errno 2] No such file or directory

Original exception was:
Traceback (most recent call last):
  File "/usr/local/bin/rip", line 41, in <module>
    sys.exit(main.main(sys.argv[1:]))
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 45, in main
    ret = c.parse(argv)
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 123, in parse
    logcommand.LogCommand.parse(self, argv)
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 401, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 401, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 363, in parse
    ret = self.do(args)
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/cd.py", line 157, in do
    self.doCommand()
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/cd.py", line 510, in doCommand
    self.program.verifyImage(self.runner, responses)
  File "/usr/local/lib/python2.7/site-packages/morituri/common/program.py", line 628, in verifyImage
    verifytask = image.ImageVerifyTask(cueImage)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 220, in __init__
    path = image.getRealPath(index.path)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 65, in getRealPath
    return self.cue.getRealPath(path)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/cue.py", line 186, in getRealPath
    return common.getRealPath(self._path, path)
  File "/usr/local/lib/python2.7/site-packages/morituri/common/common.py", line 247, in getRealPath
    if path == os.path.abspath(path):
  File "/usr/lib/python2.7/posixpath.py", line 345, in abspath
    cwd = os.getcwdu()
OSError: [Errno 2] No such file or directory
tlc commented 10 years ago

This has happened twice in 100+ CDs. In both cases, the CD ripped fine on the next try.

It appears that when rip threw this exception, everything was written except the log file. Googling errors associated with os.getcwdu(), I read about problems when the directory is missing due to a threading issue.

Could there be a race condition between writing the log and renaming the directories?

tlc commented 10 years ago

Five times in < 200 CDs.