mcrypt hanging during encryption process
Bug #130181 reported by
Simon Hayward
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php-mcrypt (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 7.04 x86
Using mcrypt in ECB mode, and passing the IV size to the mcrypt_generic_init function, the encryption process hangs intermittently, sometimes for up to 10-12 seconds.
$td = mcrypt_
$iv = mcrypt_
$expected_key_size = mcrypt_
$encString = substr(
mcrypt_
It was noticed that IV is ignored in ECB, so $iv was set to a zero integer and performance times returned to normal.
To post a comment you must log in.
Hi! We use mcrypt and php on Ubuntu 7.10 server for our MySQL Forge (forge1.mysql.com is a staging domain). We've noticed this same bug as well, and it cripples the website when it strikes. I notice that about 1 out of every ten invocations of the mcrypt library will hang and the Apache process gets zombied. Here is a test page I've been using. On my localhost, everything works well. On the production server, about one in every 10 page requests seems to hang:
http:// forge1. mysql.com/ tests/test_ crypto. php
The code is almost identical as the original poster's code, but wrapped in a class... if someone could advise on specific tests or output I could provide, I would be happy to do so, but I'm currently drawing a blank as to how to track down the source of this issue...
Thanks much!
Jay