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 520266 - Crash when viewing glibc manual
Crash when viewing glibc manual
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: Info Pages
2.22.x
Other All
: Normal critical
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-04 10:20 UTC by Sam Morris
Modified: 2008-08-30 11:25 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Patch for crash (1.10 KB, patch)
2008-08-14 12:20 UTC, J.H.M. Dassen (Ray)
none Details | Review

Description Sam Morris 2008-03-04 10:20:45 UTC
Steps to reproduce:
1. Run 'yelp info:libc'

Stack trace:
$ gdb yelp
(no debugging symbols found)
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".

(gdb) run info:libc
Starting program: /usr/bin/yelp info:libc
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb60696c0 (LWP 6615)]
[New Thread 0xb5b6db90 (LWP 6618)]
[New Thread 0xb515bb90 (LWP 6619)]
[New Thread 0xb4959b90 (LWP 6620)]
[New Thread 0xb4158b90 (LWP 6629)]

***MEMORY-ERROR***: yelp[6615]: GSlice: assertion failed: sinfo->n_allocated > 0

Program received signal SIGABRT, Aborted.

Thread 3029703568 (LWP 6620)

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/i686/cmov/libc.so.6
  • #2 abort
    from /lib/i686/cmov/libc.so.6
  • #3 mem_error
    at /tmp/buildd/glib2.0-2.14.6/glib/gslice.c line 1197
  • #4 slab_allocator_free_chunk
    at /tmp/buildd/glib2.0-2.14.6/glib/gslice.c line 1079
  • #5 magazine_cache_push_magazine
    at /tmp/buildd/glib2.0-2.14.6/glib/gslice.c line 614
  • #6 private_thread_memory_cleanup
    at /tmp/buildd/glib2.0-2.14.6/glib/gslice.c line 712
  • #7 __nptl_deallocate_tsd
    from /lib/i686/cmov/libpthread.so.0
  • #8 start_thread
    from /lib/i686/cmov/libpthread.so.0
  • #9 clone
    from /lib/i686/cmov/libc.so.6

(gdb) quit
The program is running.  Exit anyway? (y or n) y


Other information:
Comment 1 Sam Morris 2008-03-04 10:28:00 UTC
Better backtrace:

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/i686/cmov/libc.so.6
  • #2 abort
    from /lib/i686/cmov/libc.so.6
  • #3 IA__g_slice_free1
    at /tmp/buildd/glib2.0-2.14.6/glib/gslice.c line 859
  • #4 gtk_tree_iter_free
    from /usr/lib/libgtk-x11-2.0.so.0
  • #5 g_hash_nodes_destroy
    at /tmp/buildd/glib2.0-2.14.6/glib/ghash.c line 874
  • #6 IA__g_hash_table_remove_all
    at /tmp/buildd/glib2.0-2.14.6/glib/ghash.c line 483
  • #7 IA__g_hash_table_destroy
    at /tmp/buildd/glib2.0-2.14.6/glib/ghash.c line 224
  • #8 yelp_info_parser_parse_file
    at yelp-info-parser.c line 687
  • #9 info_process
    at yelp-info.c line 385
  • #10 g_thread_create_proxy
    at /tmp/buildd/glib2.0-2.14.6/glib/gthread.c line 635
  • #11 start_thread
    from /lib/i686/cmov/libpthread.so.0
  • #12 clone
    from /lib/i686/cmov/libc.so.6

Comment 2 Claude Paroz 2008-05-02 15:13:37 UTC
I'm not sure, but this might be a rarian problem when the info file is not found (there is no libc info file on my system, so I'm getting the same result with whatever non-existent name I put after info).

(gdb) run info:libc
Starting program: /opt/gnome2/bin/yelp info:libc
[Thread debugging using libthread_db enabled]
[New Thread 0xb5dfc720 (LWP 20216)]
[New Thread 0xb584fb90 (LWP 20219)]
[New Thread 0xb43a8b90 (LWP 20222)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5dfc720 (LWP 20216)]
0xb6f9c94d in rrn_info_find_from_uri (uri=0x842615d "libc", section=0x0)
    at rarian-info.c:623
623	  return best_result->reg;
Comment 3 Claude Paroz 2008-05-02 15:48:17 UTC
Here is the corresponding rarian bug:
https://bugs.freedesktop.org/show_bug.cgi?id=15274

Sam, could you check that the file /usr/share/info/libc.info.gz exists on the system where you can reproduce the crash?
Comment 4 Sam Morris 2008-05-05 12:53:55 UTC
Yes, /usr/share/info/libc.info.gz does exist.
Comment 5 Matthias Clasen 2008-07-28 22:50:05 UTC
The real problem here is that yelp-info-parser.c:process_page allocates tree iters with g_malloc and then stuffs them in a hash table that later frees them with gtk_tree_iter_free, which uses g_slice_free.
Comment 6 J.H.M. Dassen (Ray) 2008-08-14 12:20:18 UTC
Created attachment 116568 [details] [review]
Patch for crash

This problem was reproducible for me when running under valgrind. With this
patch, it is no longer reproducible.

Is this OK to commit?
Comment 7 J.H.M. Dassen (Ray) 2008-08-30 11:25:09 UTC
Taking silence as approval, I've now commited this as
	http://svn.gnome.org/viewvc/yelp?view=revision&revision=3181