Closed Bug 505708 Opened 15 years ago Closed 15 years ago

random failure of dom/tests/mochitest/localstorage/test_brokenUTF-16.html

Categories

(Toolkit :: Storage, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: dbaron, Assigned: mayhemer)

References

()

Details

(Keywords: intermittent-failure, Whiteboard: [fixed by bug 524144] [cause known, see comment 22])

Attachments

(1 obsolete file)

There are random failures: http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248254820.1248256967.6615.gz WINNT 5.2 mozilla-central test mochitests on 2009/07/22 02:27:00 42342 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/localstorage/test_brokenUTF-16.html | value result using broken key from [] - got null, expected "a value" and there were also some other occurrences reported (incorrectly, I think) in bug 488658 comment 4.
Whiteboard: [orange]
WINNT 5.2 mozilla-1.9.1 unit test on 2009/07/22 19:16:56 http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1248315416.1248323098.5183.gz&fulltext=1 test_brokenUTF-16.html | value result using broken key from getItem - got null, expected "a value" and value result using broken key from [] - got null, expected "a value"
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey2.0/1249411693.1249420049.27935.gz WINNT 5.2 comm-1.9.1 unit test on 2009/08/04 11:48:13 ... | value result using broken key from getItem - got null, expected "a value"
Depends on: 488658
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1249945547.1249953894.30668.gz WINNT 5.2 mozilla-central unit test on 2009/08/10 16:05:47
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1250151001.1250157772.23025.gz WINNT 5.2 mozilla-central unit test on 2009/08/13 01:10:01 42823 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/localstorage/test_brokenUTF-16.html | value result using broken key from getItem - got null, expected "a value" 42825 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/localstorage/test_brokenUTF-16.html | value result using broken key from [] - got null, expected "a value"
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256149122.1256150944.10218.gz Linux mozilla-central test opt mochitests on 2009/10/21 11:18:42 http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256141127.1256144260.31103.gz Linux mozilla-central test mochitests on 2009/10/21 09:05:27
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256173508.1256176392.31926.gz OS X 10.5.2 mozilla-central test mochitests on 2009/10/21 18:05:08 http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256174550.1256176940.5455.gz OS X 10.5.2 mozilla-central test mochitests on 2009/10/21 18:22:30
OS: Windows Server 2003 → All
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256182808.1256185664.3466.gz OS X 10.5.2 mozilla-central test mochitests on 2009/10/21 20:40:08
Looks like this starts to be a regular problem. I'll try to reproduce it locally.
Linux mozilla-central test mochitests-3/5 [testfailed] Started 13:15, finished 13:31 http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256242537.1256243453.3315.gz&fulltext=1
OS X 10.5.2 mozilla-central test opt mochitests-3/5 [testfailed] Started 14:22, finished 14:36 http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256246543.1256247325.13773.gz&fulltext=1
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256252774.1256254607.29099.gz OS X 10.5.2 mozilla-central test debug mochitests-3/5 on 2009/10/22 16:06:14 5994 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/localstorage/test_brokenUTF-16.html | value result using broken key from [] - got null, expected "a value"
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256255535.1256257455.28452.gz Linux mozilla-central test debug mochitests-3/5 on 2009/10/22 16:52:15
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256268007.1256268791.23707.gz OS X 10.5.2 mozilla-central test mochitests-3/5 on 2009/10/22 20:20:07
The problem lies here: [1] http://hg.mozilla.org/mozilla-central/annotate/e0e16a509fb6/db/sqlite3/src/sqlite3.c#l18137 See: [2] http://mxr.mozilla.org/mozilla-central/source/db/sqlite3/src/sqlite3.c#17553 and [3] http://mxr.mozilla.org/mozilla-central/source/db/sqlite3/src/sqlite3.c#17509 Backtrace: > sqlite3.dll!sqlite3VdbeMemTranslate(Mem * pMem=0x06a91d58, unsigned char desiredEnc='') Line 18137 C sqlite3.dll!sqlite3VdbeChangeEncoding(Mem * pMem=0x06a91d58, int desiredEnc=1) Line 46052 + 0xd bytes C sqlite3.dll!bindText(sqlite3_stmt * pStmt=0x06276188, int i=2, const void * zData=0x062803a0, int nData=2, void (void *)* xDel=0xffffffff, unsigned char encoding='') Line 51018 + 0x19 bytes C sqlite3.dll!sqlite3_bind_text16(sqlite3_stmt * pStmt=0x06276188, int i=2, const void * zData=0x062803a0, int nData=2, void (void *)* xDel=0xffffffff) Line 51090 + 0x1b bytes C storagecomps.dll!mozilla::storage::sqlite3_T_text16<mozilla::storage::`anonymous namespace'::BindingColumnData>(mozilla::storage::`anonymous-namespace'::BindingColumnData aData={...}, nsString aValue={...}) Line 108 + 0x35 bytes C++ storagecomps.dll!mozilla::storage::variantToSQLiteT<mozilla::storage::`anonymous namespace'::BindingColumnData>(mozilla::storage::`anonymous-namespace'::BindingColumnData aObj={...}, nsIVariant * aValue=0x06430898) Line 127 + 0x1e bytes C++ storagecomps.dll!mozilla::storage::BindingParams::bind(sqlite3_stmt * aStatement=0x06276188) Line 173 + 0x2c bytes C++ storagecomps.dll!mozilla::storage::Statement::ExecuteStep(int * _moreResults=0x0013dfac) Line 703 + 0x1a bytes C++ gklayout.dll!nsDOMStoragePersistentDB::GetKeyValue(nsDOMStorage * aStorage=0x064aebb0, const nsAString_internal & aKey={...}, nsAString_internal & aValue={...}, int * aSecure=0x0013e0c0) Line 359 + 0x23 bytes C++ Problem is that we pass two-bytes D800 as a string (only the 2 bytes, w/o the terminator), that is broken (half-valid) UTF-16 encoded string. sqlite is trying to read BEHIND the 2 bytes (see [2]) we give it when building the sql statement. So, it reads from random memory area behind the input buffer (therefor the failure is random). This is actually an sqlite3 bug, it should first check the input is valid and fail or sanitize.
The simplest solution is to disable the test at the moment as there is also known problem on solaris with this code.
Whiteboard: [orange] → [orange] [cause known]
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256301095.1256302264.4667.gz WINNT 5.2 mozilla-central test mochitests-3/5 on 2009/10/23 05:31:35
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256269134.1256272171.27033.gz OS X 10.5.2 mozilla-central test opt mochitests-3/5 on 2009/10/22 20:38:54
Assignee: nobody → Jan.Varga
Blocks: 488658
Component: DOM: Mozilla Extensions → SQL
No longer depends on: 488658
QA Contact: general → irixman+bugzilla
Whiteboard: [orange] [cause known] → [orange] [cause known, see comment 22]
Assignee: Jan.Varga → nobody
Component: SQL → Storage
Product: Core → Toolkit
QA Contact: irixman+bugzilla → storage
(In reply to comment #23) > The simplest solution is to disable the test at the moment as there is also > known problem on solaris with this code. By "disable the test", do you mean disable the specific "is()" check that's failing here? or do you mean we should disable the whole file? (i.e. if the solaris issues are unrelated to this particular "is()" check)
I've reported this to the SQLite developers and they are looking into the issue. Thanks for the investigation!
Depends on: SQLite3.6.20
SQLite fixed by this check-in: http://www.sqlite.org/src/vinfo/19064d7cea838e1a93fe63743ed247f440679e97 Changes will appear in the next release (3.6.20).
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256500252.1256501022.8977.gz OS X 10.5.2 mozilla-central test mochitests-3/5 on 2009/10/25 12:50:52
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256500730.1256501434.13215.gz WINNT 5.2 mozilla-central test opt mochitests-3/5 on 2009/10/25 12:58:50
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256750519.1256751000.14580.gz Linux mozilla-central test opt mochitests-3/5 on 2009/10/28 10:21:59
CAUSE OF THIS BUG IS KNOWN, PLEASE STOP ADDING ANY MORE LOG REFERENCES.
Honza, sheriff rules state that when a random orange occurs we're supposed to put the reference in the bug.
(In reply to comment #37) > Honza, sheriff rules state that when a random orange occurs we're supposed to > put the reference in the bug. OK, then we should disable the test for now to save everyone's time.
Attached patch disable the failing test for now (obsolete) (deleted) — Splinter Review
We may revert this patch after bug 524144 is landed.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attachment #409079 - Flags: review?(benjamin)
(In reply to comment #39) > Created an attachment (id=409079) [details] > disable the failing test for now Perhaps it would be better to just disable (comment out) the specific "is()" check that fails here, rather than disabling the whole test? (Probably not a big deal, though, particularly if the fix is coming soon.)
Comment on attachment 409079 [details] [diff] [review] disable the failing test for now I don't own this module, please ask a module owner.
Attachment #409079 - Flags: review?(benjamin)
Attachment #409079 - Flags: review?(kaie)
Attachment #409079 - Flags: review?(kaie) → review?(jst)
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257227236.1257227745.18940.gz OS X 10.5.2 mozilla-central test mochitests-3/5 on 2009/11/02 21:47:16
Attachment #409079 - Attachment is obsolete: true
Attachment #409079 - Flags: review?(jst)
Fixed by bug 524144.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [orange] [cause known, see comment 22] → [fixed by bug 524144] [orange] [cause known, see comment 22]
Target Milestone: --- → mozilla1.9.3a1
(In reply to comment #49) > bhearsum%mozilla.com > http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1296576721.1296579526.1973.gz > WINNT 5.2 mozilla-1.9.1 test mochitests on 2011/02/01 08:12:01 Bug 524144 never landed on 1.9.1, AFAIK.
Whiteboard: [fixed by bug 524144] [orange] [cause known, see comment 22] → [fixed by bug 524144] [cause known, see comment 22]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: