After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724097 - gnome-weather search provider crashing
gnome-weather search provider crashing
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-11 04:50 UTC by darkxst
Modified: 2014-02-19 16:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace (6.20 KB, application/octet-stream)
2014-02-11 04:50 UTC, darkxst
  Details
context: enter request before GC in gjs_context_dispose (699 bytes, patch)
2014-02-11 04:53 UTC, darkxst
committed Details | Review
context: enter request before GC in gjs_context_dispose (948 bytes, patch)
2014-02-14 03:00 UTC, darkxst
accepted-commit_now Details | Review

Description darkxst 2014-02-11 04:50:18 UTC
Created attachment 268754 [details]
backtrace

gnome-weather search provider is crashing in gjs on cleanup.

Looks like the GC is running outside of a Request.
Comment 1 darkxst 2014-02-11 04:53:00 UTC
Created attachment 268756 [details] [review]
context: enter request before GC in gjs_context_dispose
Comment 2 Colin Walters 2014-02-11 12:34:00 UTC
Review of attachment 268756 [details] [review]:

Ah, sounds right.  Thanks!
Comment 3 darkxst 2014-02-11 22:25:00 UTC
Attachment 268756 [details] pushed as adb6c1f - context: enter request before GC in gjs_context_dispose
Comment 4 Colin Walters 2014-02-13 13:47:49 UTC
This causes the test suite and derived programs like gnome-continuous to fail for me (RHEL7, x86_64, jhbuild).
Comment 5 Colin Walters 2014-02-13 13:51:23 UTC
I have reverted it on master for now.

Here's the trace:

(gdb) bt
  • #0 js::DestroyContext
    at /home/walters/src/js24-24.2.0/js/src/jscntxt.cpp line 346
  • #1 JS_DestroyContext
    at /home/walters/src/js24-24.2.0/js/src/jsapi.cpp line 1240
  • #2 gjs_context_dispose
    at gjs/context.cpp line 358
  • #3 g_object_unref
    at gobject.c line 3077
  • #4 main
    at gjs/console.cpp line 154

Then if you look at the code:

    if (cx->outstandingRequests != 0)
        MOZ_CRASH();

So...can you get me a trace of gnome-weather's crash?
Comment 6 Giovanni Campagna 2014-02-13 14:13:21 UTC
The trace is in the first comment.

I think we need a request around JS_GC(), but not around JS_DestroyContext(), so we can't use JSAutoRequest.
Comment 7 darkxst 2014-02-14 03:00:22 UTC
Created attachment 269092 [details] [review]
context: enter request before GC in gjs_context_dispose

updated patch to only enter request for JS_GC. I can't reproduce any crashes with this
patch.
Comment 8 Colin Walters 2014-02-19 16:26:34 UTC
Review of attachment 269092 [details] [review]:

Yes, thank you!