Closed Bug 717800 Opened 14 years ago Closed 14 years ago

PHP errors - Undefined index in line 518 and 514 of Kohana.php

Categories

(Socorro :: Webapp, task)

task
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: laura)

References

()

Details

Attachments

(1 file)

While it's not 100% reproducible, on https://crash-stats.allizom.org/report/list?range_value=7&range_unit=days&date=2012-01-11&signature=mozalloc_abort%20|%20__swrite%20|%20dexDataMapAlloc&version=FennecAndroid%3A11.0a2 (and other pages -- it seems to come and go), we get: Notice: Undefined index: warning in /data/socorro/htdocs/system/core/Kohana.php on line 514 Notice: Undefined index: warning in /data/socorro/htdocs/system/core/Kohana.php on line 518 Notice: Undefined index: warning in /data/socorro/htdocs/system/core/Kohana.php on line 514 Notice: Undefined index: warning in /data/socorro/htdocs/system/core/Kohana.php on line 518 ERROR: No reports generated on 20120112 for FennecAndroid 11.0a2. Looked at http://people.mozilla.com/crash_analysis/20120112/20120112_FennecAndroid_11.0a2-interesting-modules-with-versions.txt and http://people.mozilla.com/crash_analysis/20120112/20120112_FennecAndroid_11.0a2-interesting-modules-with-versions.txt.gz and also: Notice: Undefined index: warning in /data/socorro/htdocs/system/core/Kohana.php on line 514 Notice: Undefined index: warning in /data/socorro/htdocs/system/core/Kohana.php on line 518 Fatal error: Allowed memory size of 402653184 bytes exhausted (tried to allocate 4097 bytes) in /data/socorro/htdocs/application/libraries/Correlation.php on line 117
Hm so system/core/Kohana.php:514 is not code we added (we did add line 518), and the array in question is the core Kohana config object, which should always be available.. *Maybe* this is related to the correlation report process running out of memory, not sure though. This is hard to repro locally. Not a 2.4 regression, and pretty sure this has been broken in similar ways since I have been here. We have bugs on file to rewrite the correlation report system (it's super inefficient), bump the memory up again etc. but I don't think we have time for 2.4
Target Milestone: --- → 2.4.1
Target Milestone: 2.4.1 → 2.4.2
Assignee: nobody → laura
Severity: normal → minor
I see the root cause here. In system/core/Kohana.php L45: private static $log_levels = array ( 'error' => 1, 'alert' => 2, 'info' => 3, 'debug' => 4, ); In system/core/Kohana.php L514: if (self::$log_levels[$type] <= self::$configuration['core']['log_threshold']) $type is passed in as a parameter: when we try to log messages of level 'warning' Kohana is barfing because it doesn't recognize that as a log level. Next, I'll try and work out where we're generating a warning and make it an info instead.
Commits pushed to master at https://github.com/mozilla/socorro https://github.com/mozilla/socorro/commit/8bfa517f57b08992e73111c51d257112cd8f53ed Fixes bug 717800, change unexpected error level 'warning' to expected 'alert' so Kohana logging doesn't choke https://github.com/mozilla/socorro/commit/57e0fc30fed7bf4c14119b8a9ab7e7e35304a73e Merge pull request #319 from lauraxt/717800 Fixes bug 717800, change unexpected error level 'warning' to expected 'alert' so Kohana doesn't choke
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Bumping to QA verified on dev. I am unable to reproduce the behavior noted in comment 0. Please reopen if you see the errors again.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: