2

I have an EC2 server running that I use to process image uploads. i have a flash swf that handles uploading to the server from my local disk - while uploading about 130 images (a total of about 650MB) I got the following error in my server log file after about the 45th image.

  • glibc detected /usr/sbin/httpd: double free or corruption (!prev): 0x85a6b990 **

What does this error mean?

The server has stopped responding so I will restart it. Where should I begin to find the cause of this problem?

thanks

some info -

Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 mod_ssl/2.2.9 OpenSSL/0.9.8b configured Fedora 8

undefined
  • 654
  • 2
  • 8
  • 18
  • NB before placing this question here I asked it on Stack Overflow - http://stackoverflow.com/questions/3469191/what-does-glibc-detected-httpd-double-free-or-corruption-mean – undefined Aug 12 '10 at 17:00

1 Answers1

4

This message means that there is a bug either in httpd, one in of its loaded modules or in its execution environment (libraries, OS, hardware).

The technical explanation of the bug is that part of the httpd process kept a pointer to a block of memory around even though the memory had already been freed for other use. In this instance, the error was caught, and did not cause any harm, because the block of memory happened not to have been reused for something else. But if you see this error, it's very likely that it arises in other cases where the block of memory is reused, and then the error is impossible to detect.

Ideally, you would find a way to reproduce this bug, and send a bug report to the Apache development team (unless you think the bug has been fixed in a subsequent version, but for a bug like this it would be hard to tell). Unfortunately, this kind of bug is hard to reproduce. You may want to search on the Apache web site if the development team has preferences regarding the report of such bugs, ask on some Apache mailing list (I don't know which one would be appropriate). Of course, if the error is in a third-party module, or in a library, you should contact its development team instead. There is no miracle method to find this out unless you can reproduce the bug.

Just to rule out a hardware problem, you might want to run a memory test.

  • Thanks Gilles - actually I can reproduce this. It happens every time I repeat the same task without fail. The task that caused the problem was uploading a large-ish number of photos. I select 130 images and by the time the server has processed about 40 (140MB worth) it crashes and I see this error in the error log. This machine is an Amazon Cent-OS image and I have noticed that there is a later version so I am considering rebuilding it to see if the problem still exists. I am using amazon cloudwatch monitoring tools to check performance, should this be sufficient re memory test? – undefined Aug 13 '10 at 10:43
  • @undefined: You can try the latest version. The problem is that if the message goes away, you can't know whether the bug has gone away or it is now undetected. If you have the time, it would be good (both for your peace of mind and for the quality of apache) to investigate the bug a little more. I don't have any apache-specific help to offer, so unless someone else pipes in here, you should check Apache literature (FAQs, bug database, mailing list archives) and perhaps ask for advice on an Apache user list or forum. – Gilles 'SO- stop being evil' Aug 13 '10 at 12:13
  • 1
    Well I rebuilt the server and this seems to have solved my problem, the server no longer crashes and all 130 photos uploaded ok. I still have the old configuration as a machine image on Amazon so can always start it up again and investigate further in the future, unfortunately I am pushed for time to get a working system developed. – undefined Aug 13 '10 at 15:41