2014-12-17 22:59 EST

View Issue Details Jump to Notes ] Wiki ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0016507mantisbtbugtrackerpublic2014-12-08 02:07
Reporterrombert 
Assigned Todregad 
PriorityhighSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
Product Version1.3.0dev 
Target Version1.3.0-beta.1Fixed in Version 
Summary0016507: Adding a bugnote causes a script timeout
DescriptionAdding a bugnote causes the script to timeout after 30 seconds:

[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 
30 seconds exceeded in /mnt/md/robert/git/mantisbt/library/adodb/adodb.inc.php on line 3565, referer: 
http://localhost/~robert/mantisbt/view.php?id=2615 [^]
[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/~robert/mantisbt/view.php?id=2615 [^]

[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP   1. {main}() /mnt/md/robert/git/mantisbt/bugnote_add.php:0, 
referer: http://localhost/~robert/mantisbt/view.php?id=2615 [^]
[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP   2. bugnote_add() /mnt/md/robert/git/mantisbt/bugnote_add.php:79, 
referer: http://localhost/~robert/mantisbt/view.php?id=2615 [^]
[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP   3. email_bugnote_add() /mnt/md/robert/git/mantisbt/core/bugnote_api.php:270, 
referer: http://localhost/~robert/mantisbt/view.php?id=2615 [^]
[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP   4. email_generic() /mnt/md/robert/git/mantisbt/core/email_api.php:754, 
referer: http://localhost/~robert/mantisbt/view.php?id=2615 [^]
[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP   5. email_collect_recipients() /mnt/md/robert/git/mantisbt/core/email_api.php:580, 
referer: http://localhost/~robert/mantisbt/view.php?id=2615 [^]
[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP   6. db_result() /mnt/md/robert/git/mantisbt/core/email_api.php:287, 
referer: http://localhost/~robert/mantisbt/view.php?id=2615 [^]
[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP   7. db_num_rows() /mnt/md/robert/git/mantisbt/core/database_api.php:548, 
referer: http://localhost/~robert/mantisbt/view.php?id=2615 [^]
[Fri Oct 18 00:37:24 2013] [error] [client 127.0.0.1] PHP   8. ADORecordSet->RecordCount() /mnt/md/robert/git/mantisbt/core/database_api.php:448, 
referer: http://localhost/~robert/mantisbt/view.php?id=2615 [^]


Tested at revision 0deb3b6119403279cc22960d375b340450c9e9df.
TagsNo tags attached.
Attached Files

- Relationships
+ Relationships

-  Notes
User avatar

~0038293

rombert (developer)

Also causes failures in the Travis CI build, see https://travis-ci.org/mantisbt/mantisbt/jobs/12691317 [^]
User avatar

~0038295

dregad (developer)

I am not able to reproduce this on my dev box unfortunately.

Furthermore, I don't understand how the erroring statement which, based on the error log you posted, is just returning a class property [1] could possibly cause a PHP timeout.

Maybe the root cause is in the email_api ?

[1] https://github.com/mantisbt/ADOdb/blob/mantis-1.3/adodb.inc.php#L3565 [^]
User avatar

~0038297

dregad (developer)

Looking at the Travis CI build history, the first occurence of the timeout error out is with build 155 - commit fbd6540

It turns out that this commit modified email_api.php so maybe there's something wrong with that change. I'll have a look.
User avatar

~0038298

atrol (developer)

I got the same problem.
Setting $g_enable_email_notification = OFF; fixed it for me.
Maybe we should change the default in config_defaults_inc.php
User avatar

~0038299

rombert (developer)

I think the current default is fine, the problem is with whatever broke notifications.
User avatar

~0038300

atrol (developer)

The current default would be fine if we had implemented part b) of 0016423
But that's another story.

You are right that it should work also with setting ON as it works also in master-1.2.x with this setting.
User avatar

~0038301

dregad (developer)

Thanks Roland for pointing that one out, I've got a "standard" custom config_inc.php which I used for my local tests where this is set to OFF, that explains it probably.

Now that I know the root cause I think I know where to look.
User avatar

~0038304

dregad (developer)

Infinite loop @ https://github.com/mantisbt/mantisbt/blob/master/core/email_api.php#L287 [^]
User avatar

~0038305

dregad (developer)

I found 2 occurences of a while loop using db_result to retrieve data instead of db_fetch_array.
User avatar

~0038705

govind (reporter)

sdfgdf
User avatar

~0038736

govind (reporter)

xdfjghjgh
+  Notes

+ Related Changesets

- Issue History
Date Modified Username Field Change
2013-10-17 17:47 rombert New Issue
2013-10-17 18:05 rombert Note Added: 0038293
2013-10-17 18:05 rombert Status new => confirmed
2013-10-18 03:37 dregad Note Added: 0038295
2013-10-18 03:43 dregad Note Added: 0038297
2013-10-18 03:51 atrol Note Added: 0038298
2013-10-18 03:56 rombert Note Added: 0038299
2013-10-18 04:05 atrol Note Added: 0038300
2013-10-18 04:14 dregad Note Added: 0038301
2013-10-18 05:03 dregad Note Added: 0038304
2013-10-18 05:03 dregad Assigned To => dregad
2013-10-18 05:03 dregad Status confirmed => assigned
2013-10-18 06:01 dregad Note Added: 0038305
2013-10-18 06:01 dregad Target Version 1.3.0-beta.1 => 1.3.0dev
2013-10-18 06:05 dregad Changeset attached => MantisBT master dc3266a4
2013-10-18 06:05 dregad Status assigned => resolved
2013-10-18 06:05 dregad Resolution open => fixed
2013-10-18 06:05 dregad Fixed in Version => 1.3.0dev
2013-10-18 06:10 dregad Product Version => 1.3.0dev
2013-10-18 17:22 atrol Fixed in Version 1.3.0dev => 1.3.0-beta.1
2013-10-18 17:22 atrol Target Version 1.3.0dev => 1.3.0-beta.1
2013-12-01 22:04 govind Note Added: 0038705
2013-12-01 22:05 govind Note Added: 0038736
2014-11-10 11:09 vboctor Fixed in Version 1.3.0-beta.1 =>
2014-12-08 02:07 atrol Status resolved => closed
+ Issue History