PDA

View Full Version : malloc error


quwax
03-24-2009, 11:59 PM
Hello
SuperDuper! stops copying because of an malloc error:
08:09:15 AM | Error | SDCopy(96507) malloc: *** mmap(size=2097152) failed (error code=12)
| 08:09:15 AM | Error | *** error: can't allocate region
| 08:09:15 AM | Error | *** set a breakpoint in malloc_error_break to debug

the error occured now 2 days in a row.
This is a automatic copy.
any idea?
thanks

dnanian
03-25-2009, 07:10 AM
This is due to damage on the source drive. If you have Disk Warrior, use it to repair the source.

quwax
03-25-2009, 10:15 PM
Dave,
could you be a bit more specific, what might be broken?
The drive is the starup volume of my server and a SoftRAID drive.
I dont have diskwarrior.

Btw, how can a malloc error be related to an error on the drive?
A malloc error is a problem with an unreleased handle/pointer/object or addressing a pointer which doesn't exist or stuff like that and this has imho nothing to do with the hardware.

thanks
-mat

dnanian
03-26-2009, 07:10 AM
Mat,

You didn't give me much information here -- but I never said this was a "hardware" problem. I said you should repair the source drive. (And I know what a malloc error is, really.)

What's going on is that a structure in the file system has a bad/damaged size or invalid structure, typically in its extended attributes (which includes ACLs), and the OS X calls we're using to copy the data are getting confused by that and doing something wrong. The actual failure is pretty deep in the file system copy calls.

Are you running with 10.4.11 server? If so, there are a number of bugs in ACL handling in 10.4.11 that can cause this problem (Apple fixed these issues in Leopard, although in some situations they can still happen, hence the repair request).

But, try turning off the ACL copying checkbox in the Advanced tab of Options.

quwax
03-26-2009, 10:23 AM
Dave,
sorry, yes I should have given you more infos ...
So this is a Leopard Server installation (10.5.6), with updated amavis etc, the drive is mirrored with SoftRAID and it says there is no problem. I'll switch the ACL thing off for the moment.
Do you think that DiskWarrior is worth the price and would be able to fix such problems? Reinstalling would be a real pain, as the box is pretty old (G4 dual) and the Apple Software won't be able to fix a SoftRAID drive.
anyway thanks for the info and I was very sure you know what a malloc error is ;-)
all the best
-mat

dnanian
03-26-2009, 10:56 AM
In the few other situations we've seen this, Mat, Disk Warrior was able to locate and correct the problem (and Disk Utility wasn't). Of course, I can't guarantee that'll be the case, but it's nearly certain to be a problem with the source drive structure.

Turning off ACL copying might help, if the problem is in an ACL and not some other EA (ACLs are stored as EAs).

quwax
03-26-2009, 09:50 PM
Dave,
turning off ACLs dind't help. I meanwhile ordered DiskWarrior and will check that out next week. I'll let you know, as soon as I did it.
-mat

dnanian
03-27-2009, 12:24 AM
Please do.

quwax
04-08-2009, 06:59 AM
Hello,
DiskWarrior's DVD is hanging, if I start it from the FW drive it exits with an error .... so now I would need a Backup and then I could reformat the SoftRAID drive and copy my backup back.
Any idea to do that without data loss. The bos is still running without complains.
thanks
-mat

dnanian
04-08-2009, 07:05 AM
This is their brand new DVD? You should contact DW's support -- hopefully they'll be able to help you determine what's wrong.

quwax
04-08-2009, 10:16 AM
Yes it is their brand DVD and I did contact them several times. First they answered in this standard technical support way, which sounded like from a knowledge base (on your harddisk you find a folder applications and inside blablabla) and now they don't answer at all :(
I should have reformatted that drive immediately and copy my harddisk back. But I errouniously thought this is a bug in SuperDuper! and went in a wrong direction. I still think it's a bug, an enduser shouldn't see such kind of error - it leads to wrong assumptions.
SuperDuper! just stops working with that malloc Error, it would be better, if SuperDuper! would report which file makes the trouble and just leaves the problematic thing out and continues copying.
The problem is that I now have a backup in an unknown state, which will cause me to do much more work on that then would have been initially necessary.
Maybe I should try it with CCC or rsync, the later I probably can also control with a cron job.
best
-mat

dnanian
04-08-2009, 10:39 AM
I'm sorry you're frustrated, Mat - it's frustrating at this end, too, since we call an API to copy the EAs and ACLs here and it crashes. But if you can get DW working (and they should be able to help you), it should fix the errors on the drive.

quwax
04-08-2009, 11:05 AM
This is an unnecessary waste of time, but what frustrates me is, that I buy a software, which should fix the problem, the software is crashing and the support is unresponsive (opposite to you :-). Can't you maybe work around that crash, by putting the call in a separate thread and catch the exception? That would give you the possibility to log the problem as an error and continue work. I'm not sure, if this would be really possible with API you're using.
cheers,
-mat

dnanian
04-08-2009, 11:14 AM
We could probably catch the exception, but we'd still fail basically the same way. Continuing isn't really an option, because the error is due to damage to the source drive, and it's best to fix the problem rather than copy when you know there's some damage (which could affect the copy silently).

quwax
04-08-2009, 11:51 AM
yes you're right. Therefore an interface would be required, like a confirm ... there's an error with this file blabla and ask the user what to do. An enhanced loggin option would maybe already be helpful. For example in the moment I don't know, which files were copied and which were not copied.
Btw, meanwhile the DW support wrote me, claiming my memory would be bad, because freshclam was crashing in one try (saturday) - it did, b/c the plist was bad - the last time I ran memtest everything was OK, now running it again.
good nite
-mat

quwax
04-10-2009, 04:28 AM
I just made a copy of the drive with Carbon Copy Cloner and it went through without any error. DW support again doesn't answer, they need approximately 1 week answering 1 mail and I have the impression, that their technical support doesn't really know much, besides using a knowledge database. My impression in the moment, I wasted a 100 bugs.
cheers,
-mat

dnanian
04-10-2009, 08:07 AM
CCC might be using different APIs, Mat (or not copying some of the more obscure data that Backup Bouncer doesn't test), and I've never heard of Disk Warrior offering poor support - it's a pretty unusual occurrence, and very strange...

(One other thing - which I should have mentioned when I originally wrote this response - we could be recovering poorly from damaged EAs/ACLs, and that could cause the error, whereas CCC could be recovering gracefully from the same situation. But, in every case we've seen, the underlying issue is with a damaged source volume.)

quwax
04-10-2009, 11:40 AM
Dave,
well CCC at least copies everything, which is necessary to reconstruct the thing if I want to reformat it. About the Disk Warrior support, I'm just telling you what I experience. I send a mail and wait at least 5 days to one week until I get an answer and the answers until now where not really helpful more of the knowledge database style. In the last mail the guy told me my memory is defect, memtest shows different results and I don't experience any problems, which would point towards a defect ram-chip. So, what would you think, if someone tells you something like that ... ?
have a nice easter weekend
-mat

dnanian
04-10-2009, 11:46 AM
I'd be frustrated as well, Mat, no question. Alsoft has always had a reputation of being a good company, and I've had good experiences with them (and I know their program does a better job of fixing subtle directory damage than any other), so I'm just surprised and disappointed that they've treated you poorly.