Mochitest framework doesn't load (xpcshell-based HTTP server doesn't load)

RESOLVED WORKSFORME

Status

Testing
Mochitest
--
blocker
RESOLVED WORKSFORME
8 years ago
8 years ago

People

(Reporter: Ehsan, Unassigned)

Tracking

({regression})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
This has started since yesterday for me, on OS X 10.6, on two separate trees with different tips and different mq's, and different objdirs.  Here is what I get on the command line when I try to run the Mochitest suite:

host-209:src ehsanakhgari$ make -C ../obj-ff-dbg/ mochitest-plainrm -f ./mochitest-plain.log && /usr/bin/python2.5 _tests/testing/mochitest/runtests.py --autorun --close-when-done --console-level=INFO --log-file=./mochitest-plain.log --file-level=INFO --symbols-path=./dist/crashreporter-symbols  
INFO | runtests.py | Server pid: 91244
*** Registering components in: xpconnect
*** Registering components in: nsUConvModule
*** Registering components in: nsI18nModule
*** Registering components in: nsChardetModule
*** Registering components in: nsUniversalCharDetModule
*** Registering components in: necko
*** Registering components in: nsCookieModule
*** Registering components in: nsPermissionsModule
*** Registering components in: nsAuthModule
*** Registering components in: nsJarModule
*** Registering components in: ZipWriterModule
*** Registering components in: nsPrefModule
*** Registering components in: nsSecurityManagerModule
*** Registering components in: nsRDFModule
*** Registering components in: nsXPIntlModule
*** Registering components in: nsWindowDataSourceModule
*** Registering components in: nsParserModule
*** Registering components in: nsGfxModule
*** Registering components in: nsWidgetMacModule
*** Registering components in: nsImageLib2Module
*** Registering components in: nsIconDecoderModule
*** Registering components in: nsPluginModule
*** Registering components in: nsLayoutModule
*** Registering components in: docshell_provider
*** Registering components in: embedcomponents
*** Registering components in: Browser_Embedding_Module
*** Registering components in: nsAccessibilityModule
*** Registering components in: appshell
*** Registering components in: nsTransactionManagerModule
*** Registering components in: nsComposerModule
*** Registering components in: nsChromeModule
*** Registering components in: application
*** Registering components in: nsFindComponent
*** Registering components in: Apprunner
*** Registering components in: CommandLineModule
*** Registering components in: mozStorageModule
*** Registering components in: nsPlacesModule
*** Registering components in: tkAutoCompleteModule
*** Registering components in: satchel
*** Registering components in: PKI
*** Registering components in: nsToolkitCompsModule
*** Registering components in: nsSoftwareUpdate
*** Registering components in: JavaScript_Debugger
*** Registering components in: BOOT
*** Registering components in: NSS
*** Registering components in: nsAutoConfigModule
*** Registering components in: mozSpellCheckerModule
*** Registering components in: nsOSXProxyModule
*** Registering components in: jsctypes
*** registering nsHandlerService.js: [ Handler Service ]
*** registering nsWebHandlerApp.js: [ A web handler for protocols and content ]
*** registering NetworkGeolocationProvider.js: [ A component that returns a geolocation based on WIFI ]
*** registering GPSDGeolocationProvider.js: [ Returns a geolocation from a GPSD source ]
*** registering nsBadCertHandler.js: [ XMLHttpRequest Bad Cert Handler ]
*** registering jsconsole-clhandler.js: [ jsConsoleHandler ]
*** registering nsContentPrefService.js: [ Content Pref Service, Hostname Grouper ]
*** registering nsLoginManager.js: [ LoginManager ]
*** registering nsLoginManagerPrompter.js: [ LoginManagerPromptFactory, LoginManagerPrompter ]
*** registering nsLoginInfo.js: [ LoginInfo ]
*** registering storage-Legacy.js: [ LoginManagerStorage_legacy ]
*** registering storage-mozStorage.js: [ LoginManagerStorage_mozStorage ]
*** registering crypto-SDR.js: [ LoginManagerCrypto_SDR ]
*** registering nsURLFormatter.js: [ Application URL Formatter Service ]
*** registering nsTryToClose.js: [ tryToClose Service ]
*** loading ISO8601DateUtils
*** registering FeedProcessor.js: [ Feed Processor, Feed Result, Feed, Feed Entry, Feed Text Construct, Feed Generator, Feed Person ]
*** registering nsSearchSuggestions.js: [ Remote Search Suggestions ]
*** registering nsDownloadManagerUI.js: [ Used to show the Download Manager's UI to the user ]
*** registering nsFormAutoComplete.js: [ FormAutoComplete ]
*** registering nsLivemarkService.js: [ Livemark Service ]
*** registering nsTaggingService.js: [ Places Tagging Service, Places Tag AutoComplete ]
*** registering nsPlacesDBFlush.js: [ Used to synchronize the temporary and permanent tables of Places ]
*** registering nsPlacesExpiration.js: [ Used to expire obsolete data from Places ]
*** registering nsPlacesAutoComplete.js: [ AutoComplete result generator for Places. ]
*** registering nsExtensionManager.js: [ Extension Manager, Extension Manager Data Source, Update Item ]
*** registering nsBlocklistService.js: [ Blocklist Service ]
*** registering nsAddonRepository.js: [ Addon Repository ]
*** registering nsContentDispatchChooser.js: [ Used to handle different types of content ]
*** registering nsUpdateService.js: [ Update Service, Update Checker, Update Prompt, Update Manager ]
*** registering nsUpdateTimerManager.js: [ Timer Manager ]
*** registering nsUpdateServiceStub.js: [ Update Service Stub ]
*** Registering components in: nsTestDynamicModule
*** Registering components in: MyService
*** Registering components in: nsSampleModule
*** Deferring registration of sample JS components
*** Registering components in: nsAlertsServiceModule
*** registering fuelApplication.js: [ Application ]
*** registering nsMicrosummaryService.js: [ Microsummary Service ]
*** registering FeedWriter.js: [ Feed Writer ]
*** registering WebContentConverter.js: [ Web Content Handler Registrar ]
*** registering nsPrivateBrowsingService.js: [ PrivateBrowsing Service ]
*** registering nsSessionStore.js: [ Browser Session Store Service ]
*** registering nsSessionStartup.js: [ Browser Session Startup Service ]
*** registering nsPlacesTransactionsService.js: [ Places Transaction Manager ]
*** registering PlacesProtocolHandler.js: [ Places Protocol Handler ]
*** registering nsSetDefaultBrowser.js: [ Default Browser Cmdline Handler ]
*** Registering components in: nsBrowserCompsModule
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: file:///Users/ehsanakhgari/moz/obj-ff-dbg/dist/bin/components/nsBrowserContentHandler.js :: mod_regself :: line 799"  data: no]
************************************************************
*** registering nsBrowserGlue.js: [ Firefox Browser Glue Service, Geolocation Prompting Component ]
*** Registering sample JS components
*** Registering components in: xpconnect
*** Registering components in: nsUConvModule
*** Registering components in: nsI18nModule
*** Registering components in: nsChardetModule
*** Registering components in: nsUniversalCharDetModule
*** Registering components in: necko
*** Registering components in: nsCookieModule
*** Registering components in: nsPermissionsModule
*** Registering components in: nsAuthModule
*** Registering components in: nsJarModule
*** Registering components in: ZipWriterModule
*** Registering components in: nsPrefModule
*** Registering components in: nsSecurityManagerModule
*** Registering components in: nsRDFModule
*** Registering components in: nsXPIntlModule
*** Registering components in: nsWindowDataSourceModule
*** Registering components in: nsParserModule
*** Registering components in: nsGfxModule
*** Registering components in: nsWidgetMacModule
*** Registering components in: nsImageLib2Module
*** Registering components in: nsIconDecoderModule
*** Registering components in: nsPluginModule
*** Registering components in: nsLayoutModule
*** Registering components in: docshell_provider
*** Registering components in: embedcomponents
*** Registering components in: Browser_Embedding_Module
*** Registering components in: nsAccessibilityModule
*** Registering components in: appshell
*** Registering components in: nsTransactionManagerModule
*** Registering components in: nsComposerModule
*** Registering components in: nsChromeModule
*** Registering components in: application
*** Registering components in: nsFindComponent
*** Registering components in: Apprunner
*** Registering components in: CommandLineModule
*** Registering components in: mozStorageModule
*** Registering components in: nsPlacesModule
*** Registering components in: tkAutoCompleteModule
*** Registering components in: satchel
*** Registering components in: PKI
*** Registering components in: nsToolkitCompsModule
*** Registering components in: nsSoftwareUpdate
*** Registering components in: JavaScript_Debugger
*** Registering components in: BOOT
*** Registering components in: NSS
*** Registering components in: nsAutoConfigModule
*** Registering components in: mozSpellCheckerModule
*** Registering components in: nsOSXProxyModule
*** Registering components in: jsctypes
*** registering nsHandlerService.js: [ Handler Service ]
*** registering nsWebHandlerApp.js: [ A web handler for protocols and content ]
*** registering NetworkGeolocationProvider.js: [ A component that returns a geolocation based on WIFI ]
*** registering GPSDGeolocationProvider.js: [ Returns a geolocation from a GPSD source ]
*** registering nsBadCertHandler.js: [ XMLHttpRequest Bad Cert Handler ]
*** registering jsconsole-clhandler.js: [ jsConsoleHandler ]
*** registering nsContentPrefService.js: [ Content Pref Service, Hostname Grouper ]
*** registering nsLoginManager.js: [ LoginManager ]
*** registering nsLoginManagerPrompter.js: [ LoginManagerPromptFactory, LoginManagerPrompter ]
*** registering nsLoginInfo.js: [ LoginInfo ]
*** registering storage-Legacy.js: [ LoginManagerStorage_legacy ]
*** registering storage-mozStorage.js: [ LoginManagerStorage_mozStorage ]
*** registering crypto-SDR.js: [ LoginManagerCrypto_SDR ]
*** registering nsURLFormatter.js: [ Application URL Formatter Service ]
*** registering nsTryToClose.js: [ tryToClose Service ]
*** registering FeedProcessor.js: [ Feed Processor, Feed Result, Feed, Feed Entry, Feed Text Construct, Feed Generator, Feed Person ]
*** registering nsSearchSuggestions.js: [ Remote Search Suggestions ]
*** registering nsDownloadManagerUI.js: [ Used to show the Download Manager's UI to the user ]
*** registering nsFormAutoComplete.js: [ FormAutoComplete ]
*** registering nsLivemarkService.js: [ Livemark Service ]
*** registering nsTaggingService.js: [ Places Tagging Service, Places Tag AutoComplete ]
*** registering nsPlacesDBFlush.js: [ Used to synchronize the temporary and permanent tables of Places ]
*** registering nsPlacesExpiration.js: [ Used to expire obsolete data from Places ]
*** registering nsPlacesAutoComplete.js: [ AutoComplete result generator for Places. ]
*** registering nsExtensionManager.js: [ Extension Manager, Extension Manager Data Source, Update Item ]
*** registering nsBlocklistService.js: [ Blocklist Service ]
*** registering nsAddonRepository.js: [ Addon Repository ]
*** registering nsContentDispatchChooser.js: [ Used to handle different types of content ]
*** registering nsUpdateService.js: [ Update Service, Update Checker, Update Prompt, Update Manager ]
*** registering nsUpdateTimerManager.js: [ Timer Manager ]
*** registering nsUpdateServiceStub.js: [ Update Service Stub ]
*** Registering components in: nsTestDynamicModule
*** Registering components in: MyService
*** Registering components in: nsSampleModule
*** Registering sample JS components
*** Registering components in: nsAlertsServiceModule
*** registering fuelApplication.js: [ Application ]
*** registering nsMicrosummaryService.js: [ Microsummary Service ]
*** registering FeedWriter.js: [ Feed Writer ]
*** registering WebContentConverter.js: [ Web Content Handler Registrar ]
*** registering nsPrivateBrowsingService.js: [ PrivateBrowsing Service ]
*** registering nsSessionStore.js: [ Browser Session Store Service ]
*** registering nsSessionStartup.js: [ Browser Session Startup Service ]
*** registering nsPlacesTransactionsService.js: [ Places Transaction Manager ]
*** registering PlacesProtocolHandler.js: [ Places Protocol Handler ]
*** registering nsSetDefaultBrowser.js: [ Default Browser Cmdline Handler ]
*** Registering components in: nsBrowserCompsModule
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: file:///Users/ehsanakhgari/moz/obj-ff-dbg/dist/bin/components/nsBrowserContentHandler.js :: mod_regself :: line 799"  data: no]
************************************************************
*** registering nsBrowserGlue.js: [ Firefox Browser Glue Service, Geolocation Prompting Component ]
WARNING: failed to bind socket: file /Users/ehsanakhgari/moz/src/netwerk/base/src/nsServerSocket.cpp, line 317
uncaught exception: 2147746065
WARNING: nsExceptionService ignoring thread destruction after shutdown: file /Users/ehsanakhgari/moz/src/xpcom/base/nsExceptionService.cpp, line 194
nsXPConnect::CommenceShutdown()
nsStringStats
 => mAllocCount:           3233
 => mReallocCount:            1
 => mFreeCount:            3233
 => mShareCount:            173
 => mAdoptCount:            748
 => mAdoptFreeCount:        748
Timed out while waiting for server startup.
make: *** [mochitest-plain] Error 1
host-209:src ehsanakhgari$ 

It seems to be timing out waiting for the xpcshell running the HTTP server to show up, and then timing out.  Here's the ps log I see during the wait period (which happens exactly before the timeout error line):

host-209:mozilla-central ehsanakhgari$  ps aux | grep xpcshell | grep -v grep
ehsanakhgari 91269   0.0  0.0        0      0 s000  Z+    9:16pm   0:00.00 (xpcshell)

Here is the common denominator revision on the two trees:

http://hg.mozilla.org/mozilla-central/rev/973dab910358

I have tried multiple rebuilds, and a clobber build, but nothing has fixed the problem for me.  This is currently blocking my work, as I can't run any tests locally.

The chrome, browser-chrome and a11y tests suites are also affected with the same problem.

I have also tried to run the browser with the mochitest profile created by the python script, and it runs just fine, so I'm pretty sure this is something broken in xpcshell.
Have you tried running xpcshell with the commandline that runtests.py uses? (You could stick a print statement in there if you can't determine the exact commandline it uses.) It's possible that it's hitting an error, but we don't print anything from its output.
(Reporter)

Comment 2

8 years ago
Here is the direct output of the xpcshell run from the command line.  I grabbed the parameters by printing them out from runtests.py.

host-209:mochitest ehsanakhgari$ pwd/Users/ehsanakhgari/moz/obj-ff-dbg/_tests/testing/mochitest
host-209:mochitest ehsanakhgari$ /Users/ehsanakhgari/moz/obj-ff-dbg/dist/bin/xpcshell -g /Users/ehsanakhgari/moz/obj-ff-dbg/dist/bin -v 170 -f ./httpd.js -f ./server.js
*** Registering components in: xpconnect
*** Registering components in: nsUConvModule
*** Registering components in: nsI18nModule
*** Registering components in: nsChardetModule
*** Registering components in: nsUniversalCharDetModule
*** Registering components in: necko
*** Registering components in: nsCookieModule
*** Registering components in: nsPermissionsModule
*** Registering components in: nsAuthModule
*** Registering components in: nsJarModule
*** Registering components in: ZipWriterModule
*** Registering components in: nsPrefModule
*** Registering components in: nsSecurityManagerModule
*** Registering components in: nsRDFModule
*** Registering components in: nsXPIntlModule
*** Registering components in: nsWindowDataSourceModule
*** Registering components in: nsParserModule
*** Registering components in: nsGfxModule
*** Registering components in: nsWidgetMacModule
*** Registering components in: nsImageLib2Module
*** Registering components in: nsIconDecoderModule
*** Registering components in: nsPluginModule
*** Registering components in: nsLayoutModule
*** Registering components in: docshell_provider
*** Registering components in: embedcomponents
*** Registering components in: Browser_Embedding_Module
*** Registering components in: nsAccessibilityModule
*** Registering components in: appshell
*** Registering components in: nsTransactionManagerModule
*** Registering components in: nsComposerModule
*** Registering components in: nsChromeModule
*** Registering components in: application
*** Registering components in: nsFindComponent
*** Registering components in: Apprunner
*** Registering components in: CommandLineModule
*** Registering components in: mozStorageModule
*** Registering components in: nsPlacesModule
*** Registering components in: tkAutoCompleteModule
*** Registering components in: satchel
*** Registering components in: PKI
*** Registering components in: nsToolkitCompsModule
*** Registering components in: nsSoftwareUpdate
*** Registering components in: JavaScript_Debugger
*** Registering components in: BOOT
*** Registering components in: NSS
*** Registering components in: nsAutoConfigModule
*** Registering components in: mozSpellCheckerModule
*** Registering components in: nsOSXProxyModule
*** Registering components in: jsctypes
*** registering nsHandlerService.js: [ Handler Service ]
*** registering nsWebHandlerApp.js: [ A web handler for protocols and content ]
*** registering NetworkGeolocationProvider.js: [ A component that returns a geolocation based on WIFI ]
*** registering GPSDGeolocationProvider.js: [ Returns a geolocation from a GPSD source ]
*** registering nsBadCertHandler.js: [ XMLHttpRequest Bad Cert Handler ]
*** registering jsconsole-clhandler.js: [ jsConsoleHandler ]
*** registering nsContentPrefService.js: [ Content Pref Service, Hostname Grouper ]
*** registering nsLoginManager.js: [ LoginManager ]
*** registering nsLoginManagerPrompter.js: [ LoginManagerPromptFactory, LoginManagerPrompter ]
*** registering nsLoginInfo.js: [ LoginInfo ]
*** registering storage-Legacy.js: [ LoginManagerStorage_legacy ]
*** registering storage-mozStorage.js: [ LoginManagerStorage_mozStorage ]
*** registering crypto-SDR.js: [ LoginManagerCrypto_SDR ]
*** registering nsURLFormatter.js: [ Application URL Formatter Service ]
*** registering nsTryToClose.js: [ tryToClose Service ]
*** loading ISO8601DateUtils
*** registering FeedProcessor.js: [ Feed Processor, Feed Result, Feed, Feed Entry, Feed Text Construct, Feed Generator, Feed Person ]
*** registering nsSearchSuggestions.js: [ Remote Search Suggestions ]
*** registering nsDownloadManagerUI.js: [ Used to show the Download Manager's UI to the user ]
*** registering nsFormAutoComplete.js: [ FormAutoComplete ]
*** registering nsLivemarkService.js: [ Livemark Service ]
*** registering nsTaggingService.js: [ Places Tagging Service, Places Tag AutoComplete ]
*** registering nsPlacesDBFlush.js: [ Used to synchronize the temporary and permanent tables of Places ]
*** registering nsPlacesExpiration.js: [ Used to expire obsolete data from Places ]
*** registering nsPlacesAutoComplete.js: [ AutoComplete result generator for Places. ]
*** registering nsExtensionManager.js: [ Extension Manager, Extension Manager Data Source, Update Item ]
*** registering nsBlocklistService.js: [ Blocklist Service ]
*** registering nsAddonRepository.js: [ Addon Repository ]
*** registering nsContentDispatchChooser.js: [ Used to handle different types of content ]
*** registering nsUpdateService.js: [ Update Service, Update Checker, Update Prompt, Update Manager ]
*** registering nsUpdateTimerManager.js: [ Timer Manager ]
*** registering nsUpdateServiceStub.js: [ Update Service Stub ]
*** Registering components in: nsTestDynamicModule
*** Registering components in: MyService
*** Registering components in: nsSampleModule
*** Deferring registration of sample JS components
*** Registering components in: nsAlertsServiceModule
*** registering fuelApplication.js: [ Application ]
*** registering nsMicrosummaryService.js: [ Microsummary Service ]
*** registering FeedWriter.js: [ Feed Writer ]
*** registering WebContentConverter.js: [ Web Content Handler Registrar ]
*** registering nsPrivateBrowsingService.js: [ PrivateBrowsing Service ]
*** registering nsSessionStore.js: [ Browser Session Store Service ]
*** registering nsSessionStartup.js: [ Browser Session Startup Service ]
*** registering nsPlacesTransactionsService.js: [ Places Transaction Manager ]
*** registering PlacesProtocolHandler.js: [ Places Protocol Handler ]
*** registering nsSetDefaultBrowser.js: [ Default Browser Cmdline Handler ]
*** Registering components in: nsBrowserCompsModule
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: file:///Users/ehsanakhgari/moz/obj-ff-dbg/dist/bin/components/nsBrowserContentHandler.js :: mod_regself :: line 799"  data: no]
************************************************************
*** registering nsBrowserGlue.js: [ Firefox Browser Glue Service, Geolocation Prompting Component ]
*** Registering sample JS components
WARNING: failed to bind socket: file /Users/ehsanakhgari/moz/src/netwerk/base/src/nsServerSocket.cpp, line 317
uncaught exception: 2147746065
WARNING: nsExceptionService ignoring thread destruction after shutdown: file /Users/ehsanakhgari/moz/src/xpcom/base/nsExceptionService.cpp, line 194
nsXPConnect::CommenceShutdown()
nsStringStats
 => mAllocCount:           1979
 => mReallocCount:            1
 => mFreeCount:            1979
 => mShareCount:            173
 => mAdoptCount:            743
 => mAdoptFreeCount:        743


The error code 2147746065 is 0x80040111, which is NS_ERROR_NOT_AVAILABLE.  Does this give you any useful info?
(Reporter)

Comment 3

8 years ago
This is The Most Embarrassing Bug Filed By Me!

Some weird application had chosen to open port 8888.  I think we should have better prompting when we can't bind to a port, but this is WORKSFORME anyways.  I'll file a new bug about showing a better error message when this port is open by another application.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
It's ok, we all have those moments. :) We should definitely make runtests.py give an informative error in this case, instead of making you go crazy.
You need to log in before you can comment on or make changes to this bug.