[FTBFS] Segmentation fault during tests

Bug #1008537 reported by Andrew Starr-Bochicchio
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
sphinx (Ubuntu)
Fix Released
High
Unassigned
Quantal
Fix Released
High
Chris J Arges

Bug Description

Succeeds in an i386 pbuilder for me and in an amd64 pbuilder for dholbach, but fails on the buildds. Seems like a segfault with xvfb? (perhaps transitory?)

https://launchpadlibrarian.net/106847094/buildlog_ubuntu-quantal-i386.sphinx_1.1.3%2Bdfsg-4ubuntu1_FAILEDTOBUILD.txt.gz

Copying and converting sources to build/py3/tests...
Running Sphinx test suite...
cd build/py3/ && rm -rf tests/ sphinx/pycode/Grammar.pickle
xvfb-run ./debian/jstest/run-tests
Xlib: extension "RANDR" missing on display ":99".

** (run-tests:26480): WARNING **: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file '/var/lib/dbus/machine-id': No such file or directory

** (run-tests:26480): WARNING **: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file '/var/lib/dbus/machine-id': No such file or directory

** (run-tests:26480): WARNING **: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file '/var/lib/dbus/machine-id': No such file or directory

** (run-tests:26480): WARNING **: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file '/var/lib/dbus/machine-id': No such file or directory

** (run-tests:26480): WARNING **: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file '/var/lib/dbus/machine-id': No such file or directory
test_n_highlights (jstest.TestCase('example')) ... ok
test_n_links (jstest.TestCase('example')) ... ok
test_n_results (jstest.TestCase('example')) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.000s

OK
Segmentation fault
make: *** [build-stamp] Error 139
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Tags: ftbfs
tags: added: ftbfs
Revision history for this message
Daniel Holbach (dholbach) wrote :

I started a test build against precise in https://launchpad.net/~dholbach/+archive/ppa/+build/3547669

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

And it builds on precise.... I don't see any changes in xvfb between precise and quantal that could cause this. The same dbus related warnings also happen on the successful precise build.

Revision history for this message
Chris J Arges (arges) wrote :
Download full text (4.6 KiB)

Here's the backtrace:

Core was generated by `/usr/bin/python ./debian/jstest/run-tests'.
Program terminated with signal 11, Segmentation fault.
#0 0xf4bc7075 in webkitWebViewRegisterForIconNotification (webView=0x9242000, shouldRegister=false) at ../Source/WebKit/gtk/webkit/webkitwebview.cpp:5108
5108 if (!g_signal_handler_is_connected(database, webView->priv->iconLoadedHandler))
(gdb) bt
#0 0xf4bc7075 in webkitWebViewRegisterForIconNotification (webView=0x9242000, shouldRegister=false) at ../Source/WebKit/gtk/webkit/webkitwebview.cpp:5108
#1 0xf4bcc974 in webkitWebViewIconLoaded (database=0x925e060, frameURI=0x92663e0 "http://127.0.0.1:35484/search.html?q=examples", webView=0x9242000)
    at ../Source/WebKit/gtk/webkit/webkitwebview.cpp:5097
#2 0xf6f6227a in g_cclosure_marshal_VOID__STRING () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#3 0xf6f5f624 in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#4 0xf6f72029 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#5 0xf6f7a87f in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#6 0xf6f7aa83 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#7 0xf4ba1eb8 in webkitFaviconDatabaseDispatchDidReceiveIcon (database=0x925e060, frameURI=0x9266050 "http://127.0.0.1:35484/search.html?q=examples")
    at ../Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp:297
#8 0xf4b95788 in dispatchDidReceiveIcon (this=0xf181cd00) at ../Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:783
#9 WebKit::FrameLoaderClient::dispatchDidReceiveIcon (this=0xf181cd00) at ../Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:772
#10 0xf516230d in WebCore::IconLoader::notifyFinished (this=0xef5e91e0, resource=0xee953b40) at ../Source/WebCore/loader/icon/IconLoader.cpp:98
#11 0xf5119a0b in checkNotify (this=0xee953b40) at ../Source/WebCore/loader/cache/CachedResource.cpp:237
#12 WebCore::CachedResource::checkNotify (this=0xee953b40) at ../Source/WebCore/loader/cache/CachedResource.cpp:230
#13 0xf5119b59 in WebCore::CachedResource::data (this=0xee953b40, allDataReceived=true) at ../Source/WebCore/loader/cache/CachedResource.cpp:246
#14 0xf5117c15 in WebCore::CachedRawResource::data (this=0xee953b40, data=..., allDataReceived=true) at ../Source/WebCore/loader/cache/CachedRawResource.cpp:68
#15 0xf5183c29 in didFinishLoading (finishTime=0, this=0xee72e900) at ../Source/WebCore/loader/SubresourceLoader.cpp:276
#16 WebCore::SubresourceLoader::didFinishLoading (this=0xee72e900, finishTime=0) at ../Source/WebCore/loader/SubresourceLoader.cpp:263
#17 0xf5179555 in WebCore::ResourceLoader::didFinishLoading (this=0xee72e900, finishTime=0) at ../Source/WebCore/loader/ResourceLoader.cpp:451
#18 0xf52b65fa in WebCore::readCallback (source=0x9251af8, asyncResult=0x925ea48, data=0xef5e91f0) at ../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:670
#19 0xf66db098 in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#20 0xf66f0cd0 in g_simple_async_result_complete () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#21 0xf4401706 in ?? () from /usr/lib/i386-linux-gnu/libsoup-2.4.so.1
#22 0xf4400c75 in ?? () from /usr/lib/i38...

Read more...

Revision history for this message
Chris J Arges (arges) wrote :

Looks like webView->priv has a bogus memory address:

(gdb) l
5103
5104 void webkitWebViewRegisterForIconNotification(WebKitWebView* webView, bool shouldRegister)
5105 {
5106 WebKitFaviconDatabase* database = webkit_get_favicon_database();
5107 if (shouldRegister) {
5108 if (!g_signal_handler_is_connected(database, webView->priv->iconLoadedHandler))
5109 webView->priv->iconLoadedHandler = g_signal_connect(database, "icon-loaded",
5110 G_CALLBACK(webkitWebViewIconLoaded), webView);
5111 } else
5112 if (g_signal_handler_is_connected(database, webView->priv->iconLoadedHandler))
(gdb) p webView
$1 = (WebKitWebView *) 0x9242000
(gdb) p webView->priv
$2 = (WebKitWebViewPrivate *) 0xaaaaaaaa
(gdb) p webView->priv->iconLoadedHandler
Cannot access memory at address 0xaaaaab7a

Revision history for this message
Chris J Arges (arges) wrote :

Also if you run:
xvfb-run ./debian/jstest/run-tests

After the failure in the build, it works.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Bug 968308 might be a similar problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sphinx (Ubuntu):
status: New → Confirmed
Changed in webkit (Ubuntu):
status: New → Confirmed
Changed in sphinx (Ubuntu):
importance: Undecided → High
Revision history for this message
Chris J Arges (arges) wrote :

This patch fixes the issue.

no longer affects: webkit (Ubuntu)
Changed in sphinx (Ubuntu):
assignee: nobody → Chris J Arges (christopherarges)
Revision history for this message
Barry Warsaw (barry) wrote :

Patch looks okay to me. It builds fine locally without it, but that just confirms the original bug description, and it's definitely ftbfs in quantal. I'll go ahead and sponsor the patch and we'll cross our fingers. :)

Changed in sphinx (Ubuntu):
assignee: Chris J Arges (christopherarges) → Barry Warsaw (barry)
milestone: none → quantal-alpha-2
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

i wonder if it's reproducible in the ppa...

Revision history for this message
Chris J Arges (arges) wrote :

@barry, dmitrijs.ledkov:

I was able to build it locally with sbuild without the patch. However, I tested this patch in my PPA and it built with this new patch.

Revision history for this message
Chris J Arges (arges) wrote :

@barry,
Also thanks for sponsoring. : )

Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Barry Warsaw (barry) wrote :

Indeed. :( Chris, I've assigned it back to you. Maybe you can try some additional debugging in a PPA? If you get it working, I'll happily sponsor the fix for you.

Changed in sphinx (Ubuntu):
assignee: Barry Warsaw (barry) → Chris J Arges (christopherarges)
Changed in sphinx (Ubuntu Quantal):
milestone: quantal-alpha-2 → quantal-alpha-3
Jeremy Bícha (jbicha)
Changed in sphinx (Ubuntu Quantal):
status: Confirmed → Fix Released
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Marking as fixed since it built successfully in Quantal.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

So did someone just kick this again, and it just managed to build with out segfaulting? Or did someone figure the root problem? I'm just wondering for the next time we need to update sphinx...

Thanks!

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

This bug is still here. When I was uploading 1.1.3+dfsg-7ubuntu1, it also caught segmentation fault in tests. We had to retry the build 3 times before it succeeded.

Changed in sphinx (Ubuntu):
status: Fix Released → Triaged
assignee: Chris J Arges (arges) → nobody
milestone: quantal-alpha-3 → none
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Here is a trivial patch that makes the script use libwebkitgtk-3.0-0 (through introspection) instead of libwebkitgtk-1.0-0, the issue may be fixed in the new version.

http://paste.ubuntu.com/5557394/

If anybody is able to reproduce that locally (I am not), please test the patch.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Dear Chris,

Are you able to reproduce this crash locally (as it doesn't seem to even happen in PPA builds)? If yes, can you please test it with my patch applied?

Revision history for this message
Chris J Arges (arges) wrote :

@mitya57
This patch fails to build for me in raring in a local schroot.

Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
error: Function not implemented
make: *** [build-stamp] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2
Sessions still open, not unmounting

Revision history for this message
Chris J Arges (arges) wrote :

Also quantal sphinx_1.1.3+dfsg-4ubuntu3 builds fine in my quantal schroot.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

The latest merge with Debian (currently in the Sponsoring queue) finally gets the tests ported to libwebkitgtk-3.0-0. If the problem won't appear in the next two uploads, I will close this bug.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Built twice fine, looks like switching to new webkit fixed that.

Changed in sphinx (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.