php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39885 memory leak when doing loads of INSERT's and there are duplicate key errors
Submitted: 2006-12-19 13:45 UTC Modified: 2006-12-27 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: jacques@php.net Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 5.2.0 OS: Redhat Linux RHEL4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jacques@php.net
New email:
PHP Version: OS:

 

 [2006-12-19 13:45 UTC] jacques@php.net
Description:
------------
When doing loads of INSERT INTO table VALUES (col1,col2,col3,...) VALUES (value1, value2, value3, ....) and the row primary key already exists, the mysql extension leaks memory.  If the row does not exist, the mysql extension does not leak memory.

It uses more than 1.2G+ of RAM.

I've tried using references to the result set etc. and it makes no difference to the memory utilization.

Reproduce code:
---------------
Working on getting reproduce to contain nothing proprietary.

Expected result:
----------------
I would expect it to continue using around 7Mb of RAM, not 1.2Gb+.

Actual result:
--------------
24968 mysql_ad  16   0 1179m 616m 1188 S 19.0 30.4   1:42.77 php
...
24968 mysql_ad  16   0 1211m 649m 1188 S  5.0 32.0   1:45.73 php
...
24968 mysql_ad  16   0 1284m 721m 1188 R 41.0 35.6   1:52.29 php
...
24968 mysql_ad  16   0 1442m 877m 1188 R 20.6 43.3   2:06.87 php
...
24968 mysql_ad  16   0 1554m 847m 1164 S 38.9 41.8   2:16.74 php
...
24968 mysql_ad  16   0 1601m 894m 1164 S 36.6 44.2   2:20.88 php
...
24968 mysql_ad  16   0 1646m 939m 1164 S 46.6 46.3   2:24.70 php
...
24968 mysql_ad  16   0 2304m 904m 1124 S 62.0 44.7   3:19.94 php
...
24968 mysql_ad  16   0 2359m 960m 1124 S 62.5 47.4   3:24.56 php
...
24968 mysql_ad  16   0 2403m 1.0g 1124 S 61.8 49.6   3:28.30 php
...
24968 mysql_ad  16   0 2436m 1.0g 1124 R 64.2 51.2   3:31.10 php
...
24968 mysql_ad  16   0 2481m 1.1g 1124 R 62.5 53.4   3:34.84 php

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-19 13:50 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2006-12-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-05-01 16:24 UTC] brunobg at gmail dot com
I'm getting a similar behavior, but using mysqli. I'm trying to isolate the cause and create a test program that reproduces this bug. Please let me know if I can help with any other information. I'm running slackware 11.0, instead of RHEL4, with kernel 2.6.17.13, php 5.2.0, mysql 5.0.24a.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC