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 769982 - Document search fails with ICU error: unorm_normalize: U_BUFFER_OVERFLOW_ERROR
Document search fails with ICU error: unorm_normalize: U_BUFFER_OVERFLOW_ERROR
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2016-08-16 13:07 UTC by Olivier Crête
Modified: 2016-11-03 13:53 UTC
See Also:
GNOME target: ---
GNOME version: 3.19/3.20


Attachments
libtracker-data: Handle overflows on libicu-based normalization (4.08 KB, patch)
2016-11-03 13:49 UTC, Carlos Garnacho
committed Details | Review

Description Olivier Crête 2016-08-16 13:07:01 UTC
Version: gnome-documents-3.20.0-2.fc24.x86_64


ICU error: unorm_normalize: U_BUFFER_OVERFLOW_ERROR


my LANG is en_CA.utf8 so nothing weird

I may have a very very long list of documents...

Also, the label with this error in the "Unable to fetch documents" error is not selectable, so it makes it harder to copy-paste it.
Comment 1 Olivier Crête 2016-08-17 13:28:32 UTC
Seems like a Tracker bug, here is the relevant stack trace from where it printf's that error:


gdb) frame 
  • #0 function_sparql_unaccent
    at tracker-db-interface-sqlite.c line 874
  • #0 function_sparql_unaccent
    at tracker-db-interface-sqlite.c line 874
  • #1 sqlite3VdbeExec
    at sqlite3.c line 78355
  • #2 sqlite3_step
    at sqlite3.c line 75131
  • #3 sqlite3_step
    at sqlite3.c line 9656
  • #4 db_cursor_iter_next
    at tracker-db-interface-sqlite.c line 1074
  • #5 db_cursor_iter_next
    at tracker-db-interface-sqlite.c line 2396
  • #6 tracker_db_cursor_iter_next_thread
    at tracker-db-interface-sqlite.c line 2188
  • #7 g_task_thread_pool_thread
    at gtask.c line 1288
  • #8 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #9 g_thread_proxy
    at gthread.c line 780
  • #10 start_thread
    at pthread_create.c line 333
  • #11 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Comment 2 Cosimo Cecchi 2016-10-30 23:56:21 UTC
-> tracker

Reassigning
Comment 3 Carlos Garnacho 2016-11-03 13:49:56 UTC
Created attachment 339029 [details] [review]
libtracker-data: Handle overflows on libicu-based normalization

We allocate by default double the string size, which is a pretty
generous allotment most usually. If that is not enough for storing
the normalized string, just reallocate the buffer with the given
expected size and try again.

Also, refactor string normalization to a separate function, so
it's shared by both tracker:normalize and tracker:unaccent.
Comment 4 Carlos Garnacho 2016-11-03 13:53:00 UTC
Pushing the fix to master and tracker-1.10.

Attachment 339029 [details] pushed as bc73a48 - libtracker-data: Handle overflows on libicu-based normalization