Copying files from a failing drive I have a 2008 iMac in which the drive is failing. SMART status seems ok although AHT reported 4hdd/11/40000000 SATA (0,0) which is the code for disk failure AFAIK. Normal boot fails, Firewire target disk mode works, however after a certain amount of disk access the drive stops responding - for example in the middle of a large file transfer it never get beyond a certain point.  After this folder listing stops working and all I can do is reboot the iMac.

I have read similar questions that suggest using Ddrescue. However the behaviour of my drive is that it doesn't report failure, it just never finishes. Will Ddrescue cope with this? 

Update: I've made the question title less specific so hopefully more people find this thread - be sure to check all comments below for some useful tips.
Since you're having problems with the drive after using it for a while, no tool may be of help completely. Depending on what's actually failing on the drive, trying to re-read the same sections for a long time could possibly aggravate and expand the problem to other areas. So I would not recommend ddrescue as the first option.

Since there may not be a single solution that is guaranteed to work for this case, I would suggest a combination of different approaches:


Try to copy small sections at a time (starting with the most valuable data, leaving aside OS, Applications and Application Preferences that can be redone later with some time on hand) and give it some rest in between.
Try the freezer trick to see if it helps


  
  Remove the hard drive from the computer.
  Place the hard drive inside of a zip top freezer bag. (don't buy a
  cheap bag.)
  Place the wrapped hard drive inside of ANOTHER zip top freezer bag.
  (yes, you need to do this)
  Place the double wrapped hard drive in the coldest part of your
  freezer.
  Leave the hard drive in the freezer for 12 hours at least. You want
  it good and cold! (see figure 2 below)
  Once very chilled, install the hard drive in your computer and
  start pulling off data. Begin with the most valuable data.
  At some point, the hard drive will fail again. When it does, mark
  the last successfully copied data, pull out the hard drive, double wrap
  it again and stick it in the Chill Chest for another 12 hours.
  You may need to do this a number of times to get all the data you
  want, or until the hard drive stops working completely.
  

For any data that you are able to copy out, do a quick verification and back it up elsewhere. You can never have too many backups!
Depending on the drive's manufacturer, download the hard drive test tool from the manufacturer's site, install it on a USB thumb drive and run it. This may help in detecting the actual issue better while at the same time marking bad sectors so that they're hidden (the latter is possible without these tools as well).
As a final measure, use ddrescue to see what you can recover before throwing or recycling the drive.


In the future, ensure you regularly use Time Machine in conjunction with a disk cloning utility (Clonezilla, Carbon Copy Cloner or SuperDuper!)