Closed Bug 460242 Opened 16 years ago Closed 16 years ago

Intermittent xpcshell SEGV when running "test_storage/unit/test_connection_executeAsync.js"

Categories

(Toolkit :: Storage, defect)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 458998

People

(Reporter: MatsPalmgren_bugz, Unassigned)

Details

(Keywords: crash)

From Firefox Tinderbox "Linux mozilla-central moz2-linux-slave07":
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1224127404.1224130716.2354.gz#err0

/builds/slave/trunk_linux-7/build/tools/test-harness/xpcshell-simple/test_all.sh: line 111: 16586 Segmentation fault      (core dumped) NATIVE_TOPSRCDIR="$native_topsrcdir" TOPSRCDIR="$topsrcdir" $xpcshell -j -s $headfiles -f $t $tailfiles 2>$t.log 1>&2
NEXT ERROR TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js | test failed, see log

Also occurs in SeaMonkey Tinderbox "Linux comm-central dep unit test":
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1224115485.1224120424.10138.gz#err0
Component: XPConnect → Storage
Product: Core → Toolkit
QA Contact: xpconnect → storage
I'm pretty sure this is bug 458998
of course, I cannot be sure without a stack trace.  If someone could get that, that'd be awesome.
We're seeing this on Thunderbird Linux, a couple of times a week (at least, but probably not more than once a day).
Blocks: 438871
Summary: xpcshell SEGV when running "test_storage/unit/test_connection_executeAsync.js" → Intermittent xpcshell SEGV when running "test_storage/unit/test_connection_executeAsync.js"
I just ran this a few times on a Thunderbird Linux debug build (todays). After a few successes and then leaving it for a while and going back again, I got a failure with this output:

/home/cltbld/comm/main/mozilla/tools/test-harness/xpcshell-simple/test_all.sh: line 111: 29878 Aborted                 (core dumped) NATIVE_TOPSRCDIR="$native_topsrcdir" TOPSRCDIR="$topsrcdir" $xpcshell -j -s $headfiles -f $t $tailfiles 2>$t.log 1>&2
TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_storage_statement_executeAsync.js | test failed, see log
../../_tests/xpcshell-simple/test_storage/unit/test_storage_statement_executeAsync.js.log:
>>>>>>>
*** Storage Tests: Trying to close!
*** Storage Tests: Trying to remove file!
*** test pending
*** Storage Tests: Trying to close!
*** Storage Tests: Trying to remove file!
test_create_table()
*** test pending
*** test finished
*** running event loop
handleCompletion(0);
test_add_data()
*** test pending
test_get_data()
*** test pending
test_tuple_out_of_bounds()
*** test pending
test_no_listener_works_on_success()
test_no_listener_works_on_results()
test_partial_listener_works()
test_immediate_cancelation()
*** test pending
test_double_cancelation()
*** test pending
WARNING: NS_ENSURE_TRUE(mState == PENDING || mState == COMPLETED) failed: file /home/cltbld/comm/main/mozilla/storage/src/mozStorageEvents.cpp, line 454
test_double_execute()
*** test pending
*** test pending
*** test finished
handleCompletion(0);
*** test finished
handleResult([xpconnect wrapped mozIStorageResultSet @ 0x86921a8 (native @ 0x8696fa0)]);
handleCompletion(0);
*** test finished
handleResult([xpconnect wrapped mozIStorageResultSet @ 0x868cea0 (native @ 0x8694f88)]);
handleCompletion(0);
*** test finished
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "'JavaScript component does not have a method named: "handleCompletion"' when calling method: [mozIStorageStatementCallback::handleCompletion]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "<unknown>"  data: no]
************************************************************
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "'JavaScript component does not have a method named: "handleCompletion"' when calling method: [mozIStorageStatementCallback::handleCompletion]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "<unknown>"  data: no]
************************************************************
handleCompletion(1);
*** test finished
handleCompletion(1);
*** test finished
handleResult([xpconnect wrapped mozIStorageResultSet @ 0x8693390 (native @ 0x868cbd8)]);
handleCompletion(0);
*** test finished
handleResult([xpconnect wrapped mozIStorageResultSet @ 0x869fe80 (native @ 0x863c3e0)]);
handleCompletion(0);
*** test finished
*** exiting
*** PASS ***
###!!! ASSERTION: Still pending events!: 'mPendingEvents.Count() == 0', file /home/cltbld/comm/main/mozilla/storage/src/mozStorageEvents.cpp, line 480
UNKNOWN [/home/cltbld/comm/tb/mozilla/dist/bin/components/libstoragecomps.so +0x0001AEC0]
UNKNOWN [/home/cltbld/comm/tb/mozilla/dist/bin/components/libstoragecomps.so +0x00018381]
UNKNOWN [/home/cltbld/comm/tb/mozilla/dist/bin/components/libxpconnect.so +0x00046B13]
UNKNOWN [../../dist/bin/libmozjs.so +0x000666C9]
JS_GC+0x0000006B [../../dist/bin/libmozjs.so +0x000183AB]
UNKNOWN [../../dist/bin/xpcshell +0x00004752]
__libc_start_main+0x000000DC [/lib/libc.so.6 +0x00015DEC]

<<<<<<<
^[[ATEST-PASS | ../../_tests/xpcshell-simple/test_storage/unit/test_storage_statement.js | all tests passed
TEST-PASS | ../../_tests/xpcshell-simple/test_storage/unit/test_storage_statement_wrapper.js | all tests passed
TEST-PASS | ../../_tests/xpcshell-simple/test_storage/unit/test_storage_value_array.js | all tests passed
TEST-PASS | ../../_tests/xpcshell-simple/test_storage/unit/test_unicode.js | all tests passed
make: *** [check] Error 1
make: Leaving directory `/home/cltbld/comm/tb/mozilla/storage/test'

Not sure this is the same as what we're seeing on the tinderboxes, but still a failure whilst running the test.
Maybe bug 458998?  Can you try the patch there?
(In reply to comment #5)
> Maybe bug 458998?  Can you try the patch there?

I set up a test to repeatedly run 'make -C mozilla/storage/test check', on the second run after applying that patch I got:

TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js | test failed, see log
../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js.log:
>>>>>>>
*** Storage Tests: Trying to close!
*** Storage Tests: Trying to remove file!
*** test pending
*** Storage Tests: Trying to close!
*** Storage Tests: Trying to remove file!
test_create_and_add()
*** test pending
test_transaction_created()
*** test pending
*** test finished
*** running event loop
handleCompletion(0)
*** test finished
handleResults([xpconnect wrapped mozIStorageResultSet @ 0x9cd9d40 (native @ 0x9cbc140)])
*** exiting
*** TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js | unexpected results obtained!
JS frame :: /home/cltbld/comm/main/mozilla/tools/test-harness/xpcshell-simple/head.js :: do_throw :: line 101
JS frame :: ../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js :: anonymous :: line 150
handleResults([xpconnect wrapped mozIStorageResultSet @ 0x9cdbba0 (native @ 0x9cc0710)])
*** exiting
*** TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js | unexpected results obtained!
JS frame :: /home/cltbld/comm/main/mozilla/tools/test-harness/xpcshell-simple/head.js :: do_throw :: line 101
JS frame :: ../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js :: anonymous :: line 150
handleCompletion(0)
*** exiting
*** TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js | 2 == 0
JS frame :: /home/cltbld/comm/main/mozilla/tools/test-harness/xpcshell-simple/head.js :: do_throw :: line 101
JS frame :: /home/cltbld/comm/main/mozilla/tools/test-harness/xpcshell-simple/head.js :: do_check_eq :: line 120
JS frame :: ../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js :: anonymous :: line 159
*** FAIL ***
WARNING: nsExceptionService ignoring thread destruction after shutdown: file /home/cltbld/comm/main/mozilla/xpcom/base/nsExceptionService.cpp, line 194
nsStringStats
 => mAllocCount:            883
 => mReallocCount:            6
 => mFreeCount:             881  --  LEAKED 2 !!!
 => mShareCount:           1525
 => mAdoptCount:              6
 => mAdoptFreeCount:          6

<<<<<<<

I got similar errors after repeatedly running for 5 mins as well.
So, given the stack in comment 4, this is absolutely caused by bug 458998 (thanks for the stack).  I really don't know how the test is failing as in comment 6, but that is a different issue (and should be a new bug).
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Version: unspecified → Trunk
No longer blocks: 438871
You need to log in before you can comment on or make changes to this bug.