Bug 16516 - Evince segfaults on document search
Summary: Evince segfaults on document search
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: x86_64 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA5-64-OK advisory
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2015-08-01 06:24 CEST by Herbert Poetzl
Modified: 2015-08-26 22:37 CEST (History)
6 users (show)

See Also:
Source RPM: evince-3.14.0-1.mga5.src.rpm
CVE:
Status comment:


Attachments
Evnince Screen Print (546.67 KB, application/vnd.oasis.opendocument.text)
2015-08-13 20:34 CEST, Brian Rockwell
Details

Description Herbert Poetzl 2015-08-01 06:24:09 CEST
Description of problem:
When searching for almost anything in this particular PDF file evince segfaults.

Version-Release number of selected component (if applicable):
GNOME Document Viewer 3.14.0

How reproducible:
Always

Steps to Reproduce:
1. evince http://islab.soe.uoguelph.ca/sareibi/TEACHING_dr/XILINX_VIVADO_dr/ug892-vivado-design-flows-overview.pdf
2. press CTRL-F
3. enter a few letters
4. watch evince segfault

Program received signal SIGSEGV, Segmentation fault.
append_escaped_text (length=<optimized out>, text=<optimized out>, str=0x8390e0) at gmarkup.c:2163
2163	      next = g_utf8_next_char (p);
(gdb) where
#0  0x00007ffff574d4f0 in g_markup_escape_text (length=<optimized out>, text=<optimized out>, str=0x8390e0) at gmarkup.c:2163
#1  0x00007ffff574d4f0 in g_markup_escape_text (text=<optimized out>, length=<optimized out>) at gmarkup.c:2239
#2  0x00007ffff574d825 in g_markup_vprintf_escaped (format=<optimized out>, args=args@entry=0x7fffffffd878) at gmarkup.c:2492
#3  0x00007ffff574d98c in g_markup_printf_escaped (format=<optimized out>) at gmarkup.c:2551
#4  0x0000000000422558 in process_matches_idle ()
#5  0x00007ffff5748b7d in g_main_context_dispatch (context=0x6a9990) at gmain.c:3111
#6  0x00007ffff5748b7d in g_main_context_dispatch (context=context@entry=0x6a9990) at gmain.c:3710
#7  0x00007ffff5748f18 in g_main_context_iterate (context=context@entry=0x6a9990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#8  0x00007ffff5748fbc in g_main_context_iteration (context=0x6a9990, context@entry=0x0, may_block=may_block@entry=1) at gmain.c:3842
#9  0x00007ffff5d0071c in g_application_run (application=0x861120 [EvApplication], argc=0, argv=0x0) at gapplication.c:2282
#10 0x000000000041c373 in main ()


Reproducible: 

Steps to Reproduce:
Comment 1 Jani Välimaa 2015-08-01 09:11:56 CEST
I think we should update it to the latest one in 3.14 series. There seems to be some bug fixes related to similar issues.

https://download.gnome.org/sources/evince/3.14/evince-3.14.1.news
https://download.gnome.org/sources/evince/3.14/evince-3.14.2.news
Comment 2 Jani Välimaa 2015-08-01 18:17:58 CEST
Pushed evince 3.14.2 to core/updates_testing. Please test it.

CC: (none) => jani.valimaa

Comment 3 Jani Välimaa 2015-08-01 18:41:11 CEST
RPMS:
evince-3.14.2-1.mga5
evince-dvi-3.14.2-1.mga5
lib(64|)evdocument3_4-3.14.2-1.mga5
lib(64|)evview3_3-3.14.2-1.mga5
lib(64|)evince-devel-3.14.2-1.mga5
lib(64|)evince-gir3.0-3.14.2-1.mga5

SRPM:
evince-3.14.2-1.mga5
Comment 4 Herbert Poetzl 2015-08-01 19:30:29 CEST
Enabled 'Core Updates Testing' here, but urpmi still says that evince-3.14.0-1.mga5.x86_64.rpm is the latest.

Please advise how to test.

Thanks,
Herbert

CC: (none) => herbert

Comment 5 Jani Välimaa 2015-08-01 19:45:23 CEST
You'll have to wait a bit more until the mirror you're using syncs with main mirror. It takes from 20 mins to 1 day.
Comment 6 Herbert Poetzl 2015-08-02 11:32:06 CEST
Just verified, same issue (as you can probably test easily yourself)

Starting program: /usr/bin/evince http://islab.soe.uoguelph.ca/sareibi/TEACHING_dr/XILINX_VIVADO_dr/ug892-vivado-design-flows-overview.pdf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffebd30700 (LWP 10192)]
[New Thread 0x7fffea4b7700 (LWP 10193)]
[New Thread 0x7fffe9cb6700 (LWP 10194)]
[New Thread 0x7fffdbfff700 (LWP 10195)]
[New Thread 0x7fffdb7fe700 (LWP 10199)]
[New Thread 0x7fffdaffd700 (LWP 10203)]
[Thread 0x7fffdb7fe700 (LWP 10199) exited]

(evince:10186): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 29: Invalid UTF-8 encoded text in name â not valid '\x84E\x85\u000f\x81@\xb0\x83f×½\u0005'

Program received signal SIGSEGV, Segmentation fault.
append_escaped_text (length=<optimized out>, text=<optimized out>, str=0x842300) at gmarkup.c:2163
2163	      next = g_utf8_next_char (p);
(gdb) where
#0  0x00007ffff574d4f0 in g_markup_escape_text (length=<optimized out>, text=<optimized out>, str=0x842300) at gmarkup.c:2163
#1  0x00007ffff574d4f0 in g_markup_escape_text (text=<optimized out>, length=<optimized out>) at gmarkup.c:2239
#2  0x00007ffff574d825 in g_markup_vprintf_escaped (format=<optimized out>, args=args@entry=0x7fffffffd878) at gmarkup.c:2492
#3  0x00007ffff574d98c in g_markup_printf_escaped (format=<optimized out>) at gmarkup.c:2551
#4  0x00000000004226b8 in process_matches_idle ()
#5  0x00007ffff5748b7d in g_main_context_dispatch (context=0x6aa990) at gmain.c:3111
#6  0x00007ffff5748b7d in g_main_context_dispatch (context=context@entry=0x6aa990) at gmain.c:3710
#7  0x00007ffff5748f18 in g_main_context_iterate (context=context@entry=0x6aa990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#8  0x00007ffff5748fbc in g_main_context_iteration (context=0x6aa990, context@entry=0x0, may_block=may_block@entry=1) at gmain.c:3842
#9  0x00007ffff5d0071c in g_application_run (application=0x86e120 [EvApplication], argc=0, argv=0x0) at gapplication.c:2282
#10 0x000000000041c4d3 in main ()
Comment 7 Jani Välimaa 2015-08-02 15:19:40 CEST
Digged this a bit more and looks like the segfault is caused by a slight mistake in glib [1]. Added patch from newer glib (same as mentioned in [1]) and pushed new glib release to core/updates_testing which hopefully fixes the evince segfaults. Please test new glib [2] when it reaches the mirrors.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=631597
[2] glib2.0-2.42.1-2.1.mga5
Comment 8 Jani Välimaa 2015-08-02 15:23:19 CEST
Glib RPMS:
glib2.0-common-2.42.1-2.1.mga5
lib(64|)glib2.0_0-2.42.1-2.1.mga5
lib(64|)gio2.0_0-2.42.1-2.1.mga5
lib(64|)glib2.0-devel-2.42.1-2.1.mga5
lib(64|)glib2.0-static-devel-2.42.1-2.1.mga5
glib-gettextize-2.42.1-2.1.mga5

Glib SRPM:
glib2.0-2.42.1-2.1.mga5
Comment 9 Shlomi Fish 2015-08-02 16:49:10 CEST
(In reply to Jani Välimaa from comment #8)
> Glib RPMS:
> glib2.0-common-2.42.1-2.1.mga5
> lib(64|)glib2.0_0-2.42.1-2.1.mga5
> lib(64|)gio2.0_0-2.42.1-2.1.mga5
> lib(64|)glib2.0-devel-2.42.1-2.1.mga5
> lib(64|)glib2.0-static-devel-2.42.1-2.1.mga5
> glib-gettextize-2.42.1-2.1.mga5
> 
> Glib SRPM:
> glib2.0-2.42.1-2.1.mga5

These updates_testing packages seem to have fixed it. Thanks!

CC: (none) => shlomif

Jani Välimaa 2015-08-03 17:44:25 CEST

Assignee: bugsquad => qa-bugs

Comment 10 claire robinson 2015-08-03 18:41:37 CEST
Advisory needed Jani please
Comment 11 Herbert Poetzl 2015-08-03 19:36:12 CEST
Yep, I can confirm, the updated glib2 seems to fix this issue.

Thanks!

Best,
Herbert
Comment 12 Lewis Smith 2015-08-07 21:22:36 CEST
@Shlomi @Herbert
Please can you add as appropriate to the Whiteboard: MGA5-32-OK or MGA5-64-OK.

BTAIM I try my own test: Mageia 5 x64.
Thanks to Herbert in Description for the succint details. Oh that every update test was so neatly defined!

BEFORE:
 evince-3.14.0-1.mga5
 lib64evdocument3_4-3.14.0-1.mga5
 lib64evince-gir3.0-3.14.0-1.mga5
 lib64evview3_3-3.14.0-1.mga5

 glib2.0-common-2.42.1-2.mga5
 lib64gio2.0_0-2.42.1-2.mga5   [Overlooked, guessed]
 lib64glib2.0_0-2.42.1-2.mga5

$ /usr/bin/evince http://islab.soe.uoguelph.ca/sareibi/TEACHING_dr/XILINX_VIVADO_dr/ug892-vivado-design-flows-overview.pdf

Not only did this work, but did so with no errors. Find operations worked fine. No segfault! Could this be due to the fact that glib2 was already sufficiently advanced? Evince itself was certainly not at fault.

AFTER:
 evince-3.14.2-1.mga5
 lib64evdocument3_4-3.14.2-1.mga5
 lib64evince-gir3.0-3.14.2-1.mga5
 lib64evview3_3-3.14.2-1.mga5

 glib2.0-common-2.42.1-2.1.mga5
 lib64glib2.0_0-2.42.1-2.1.mga5

The same test worked OK, various Finds included. BUT this time there were errors:
 "(evince:29499): Gtk-WARNING **: Failed to set text from markup due to error
 parsing markup: Gwall ar linell 1 golofn 11: Testun annilys wedi ei amgodio fel
 UTF-8 yn yr enw - '\xd0\xd5' annilys"
repeated 5 times. It is in Welsh, complaining about Line 1 Column 11, the quoted string being invalid.
However, re-running the test with various Finds went OK without errors - until an arbitrary search string threw the same errors (line 1 col 10). No idea what triggered the errors.

Does this matter? Or can I OK the update?

CC: (none) => lewyssmith

Comment 13 Shlomi Fish 2015-08-08 11:58:13 CEST
Adding MGA5-64-OK per the request.

Whiteboard: (none) => MGA5-64-OK

Comment 14 Brian Rockwell 2015-08-13 20:21:35 CEST
$ cat /etc/release
Mageia release 5 (Official) for i586

I don't think this is fixed.

evince ug892-vivado-design-flows-overview.pdf

(evince:5875): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 13: Invalid UTF-8 encoded text in name - not valid '\x98\xc8|\xb6'

(evince:5875): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 13: Invalid UTF-8 encoded text in name - not valid '\x98\xc8|\xb6'

(evince:5875): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 13: Invalid UTF-8 encoded text in name - not valid '\x98\xc8|\xb6'

(evince:5875): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 13: Invalid UTF-8 encoded text in name - not valid '\x98\xc8|\xb6'

(evince:5875): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 13: Invalid UTF-8 encoded text in name - not valid '\x98\xc8|\xb6'

(evince:5875): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 13: Invalid UTF-8 encoded text in name - not valid '\x98\xc8|\xb6'

(evince:5875): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 13: Invalid UTF-8 encoded text in name - not valid '\x98\xc8|\xb6'

(evince:5875): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 13: Invalid UTF-8 encoded text in name - not valid '\x98\xc8|\xb6'

(evince:5875): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 13: Invalid UTF-8 encoded text in name - not valid '\x98\xc8|\xb6'
Segmentation fault

CC: (none) => brtians1

Comment 15 Brian Rockwell 2015-08-13 20:34:01 CEST
Created attachment 6925 [details]
Evnince Screen Print
Comment 16 Herbert Poetzl 2015-08-13 20:37:53 CEST
(In reply to Brian Rockwell from comment #14)
> $ cat /etc/release
> Mageia release 5 (Official) for i586

Hey Brian, 

Double check the glib2 and evince versions

$ rpm -q --whatprovides glib2
lib64glib2.0_0-2.42.1-2.1.mga5
$ rpm -q --whatprovides evince
evince-3.14.2-1.mga5

> I don't think this is fixed.

It seems to be working fine here, maybe give some info what exactly you are searching for or what steps to reproduce.

Thanks,
Herbert
Comment 17 Brian Rockwell 2015-08-13 20:42:13 CEST
$ rpm -q --whatprovides glib2
libglib2.0_0-2.42.1-2.mga5

$ rpm -q --whatprovides evince
evince-3.14.2-1.mga5


Curious if that .1.mga5 is needed.

Is that what I did wrong?
Comment 18 Brian Rockwell 2015-08-13 20:50:23 CEST
yes going to .1.mga5 did resolve it.  Hmm  - interesting.  Made need to make that a dependency.
Comment 19 Samuel Verschelde 2015-08-21 11:16:18 CEST
Jani, please provide an advisory such as https://wiki.mageia.org/en/Update_Advisory_Announcement_Example

Thanks!
Comment 20 Jani Välimaa 2015-08-23 08:53:14 CEST
ADVISORY:
####
Updated glib fixes a problem where evince segfaults when one uses search in .pdf document. Evince is also updated to the latest release in 3.14 series to fix several issues reported to upstream bugzilla.

References:
https://bugs.mageia.org/show_bug.cgi?id=16516
https://download.gnome.org/sources/evince/3.14/evince-3.14.1.news
https://download.gnome.org/sources/evince/3.14/evince-3.14.2.news
####

RPMS:
evince-3.14.2-1.mga5
evince-dvi-3.14.2-1.mga5
glib2.0-common-2.42.1-2.1.mga5
glib-gettextize-2.42.1-2.1.mga5
lib(64|)evdocument3_4-3.14.2-1.mga5
lib(64|)evview3_3-3.14.2-1.mga5
lib(64|)evince-devel-3.14.2-1.mga5
lib(64|)evince-gir3.0-3.14.2-1.mga5
lib(64|)glib2.0_0-2.42.1-2.1.mga5
lib(64|)gio2.0_0-2.42.1-2.1.mga5
lib(64|)glib2.0-devel-2.42.1-2.1.mga5
lib(64|)glib2.0-static-devel-2.42.1-2.1.mga5

SRPMS:
evince-3.14.2-1.mga5
glib2.0-2.42.1-2.1.mga5
Comment 21 Rémi Verschelde 2015-08-23 10:01:03 CEST
Thanks, advisory uploaded. Validating.

Keywords: (none) => validated_update
Whiteboard: MGA5-64-OK => MGA5-64-OK advisory
CC: (none) => sysadmin-bugs

Comment 22 Mageia Robot 2015-08-26 22:37:10 CEST
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0102.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.