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 792930 - Crash on startup in ephy_gsb_utils_rice_delta_decode
Crash on startup in ephy_gsb_utils_rice_delta_decode
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-26 12:44 UTC by Michael Catanzaro
Modified: 2018-01-27 11:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsb-utils: Handle missing firstValue in RiceDeltaEncoding object (1.70 KB, patch)
2018-01-26 23:10 UTC, Gabriel Ivașcu
committed Details | Review

Description Michael Catanzaro 2018-01-26 12:44:35 UTC
There is a comment in ephy_gsb_utils_rice_delta_decode:

  /* This field is never missing. */
  first_value_str = json_object_get_string_member (rde, "firstValue");

Evidently that's not true; my Epiphany was crashing on startup today due to this, until I moved away my gsb-threats.db. Attaching it here.

(epiphany:6): Json-CRITICAL **: 06:26:16.431: json_object_get_string_member: assertion 'node != NULL' failed

Thread 9 "pool" received signal SIGSEGV, Segmentation fault.

Thread 140675874023168 (LWP 17)

  • #0 __GI_____strtoul_l_internal
    at /usr/src/debug/glibc/2.24-r0/git/stdlib/strtol_l.c line 293
  • #1 __GI___strtoul_l
    at /usr/src/debug/glibc/2.24-r0/git/stdlib/strtol_l.c line 548
  • #2 g_ascii_strtoull
    at gstrfuncs.c line 1165
  • #3 ephy_gsb_utils_rice_delta_decode
    at ../lib/safe-browsing/ephy-gsb-utils.c line 492
  • #4 ephy_gsb_storage_delete_hash_prefixes
    at ../lib/safe-browsing/ephy-gsb-storage.c line 1090
  • #5 ephy_gsb_service_update_thread
    at ../lib/safe-browsing/ephy-gsb-service.c line 321
  • #6 g_task_thread_pool_thread
    at gtask.c line 1331
  • #7 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #8 g_thread_proxy
    at gthread.c line 784
  • #9 start_thread
    at /usr/src/debug/glibc/2.24-r0/git/nptl/pthread_create.c line 456
  • #10 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 105

Comment 1 Michael Catanzaro 2018-01-26 12:57:40 UTC
It's too big for Bugzilla: https://people.gnome.org/~mcatanzaro/gsb-threats.db
Comment 2 Michael Catanzaro 2018-01-26 16:23:55 UTC
It's hitting users on IRC. Must be a new rule.
Comment 3 Gabriel Ivașcu 2018-01-26 22:56:14 UTC
(In reply to Michael Catanzaro from comment #1)
> It's too big for Bugzilla:
> https://people.gnome.org/~mcatanzaro/gsb-threats.db

A missing "firstValue" field in a RiceDeltaEncoding object [0] has nothing to do with the local database. Those are received from the server when updating the database, via the threatListUpdates:fetch method [1]. Seems that I was a bit too naive thinking that "firstValue" will always be present.

[0] https://developers.google.com/safe-browsing/v4/reference/rest/v4/threatListUpdates/fetch#ricedeltaencoding
[1] https://developers.google.com/safe-browsing/v4/reference/rest/v4/threatListUpdates/fetch
Comment 4 Gabriel Ivașcu 2018-01-26 23:10:46 UTC
Created attachment 367491 [details] [review]
gsb-utils: Handle missing firstValue in RiceDeltaEncoding object
Comment 5 Michael Catanzaro 2018-01-27 02:00:38 UTC
Review of attachment 367491 [details] [review]:

Thanks!
Comment 6 Gabriel Ivașcu 2018-01-27 11:52:22 UTC
Attachment 367491 [details] pushed as eccbca2 - gsb-utils: Handle missing firstValue in RiceDeltaEncoding object