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 627448 - gedit crashes when manipulating 2.8GB text file
gedit crashes when manipulating 2.8GB text file
Status: VERIFIED WONTFIX
Product: gedit
Classification: Applications
Component: general
2.30.x
Other Linux
: High critical
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-19 23:19 UTC by rusivi
Modified: 2010-08-24 15:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb gedit (8.06 KB, text/plain)
2010-08-20 02:23 UTC, rusivi
Details

Description rusivi 2010-08-19 23:19:49 UTC
Downstream bug may be found at:
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/620764

Binary package hint: gedit

1) lsb_release -rd
Description: Ubuntu 10.04.1 LTS
Release: 10.04

2) apt-cache policy gedit
gedit:
  Installed: 2.30.3-0ubuntu0.1
  Candidate: 2.30.3-0ubuntu0.1
  Version table:
 *** 2.30.3-0ubuntu0.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        100 /var/lib/dpkg/status
     2.30.0git20100413-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ lucid/main Packages

3) What I expected to happen is that when I open up a 2.8GB text file with gedit, it will allow me to migrate around the file without crashing.

4) What happened instead is that the file initially opens successfully. However, each of three times it gets about 1/2 the way through loading, the window just closes without my having closed it.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gedit 2.30.3-0ubuntu0.1
ProcVersionSignature: Ubuntu 2.6.32-24.39-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic i686
Architecture: i386
Date: Thu Aug 19 18:47:57 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: gedit
Comment 1 Fabio Durán Verdugo 2010-08-19 23:26:46 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 rusivi 2010-08-20 01:45:13 UTC
I just did an initial test where I ran it from a terminal (see below). I'll review the link and post the stack trace soon:

name@name-laptop:~/Desktop/id$ gedit CLI-output.txt

GLib-ERROR **: (NULL) message
aborting...
Aborted
name@name-laptop:~/Desktop/id$
Comment 3 rusivi 2010-08-20 02:23:15 UTC
Created attachment 168348 [details]
gdb gedit

Stack trace of gedit crashing in the middle of loading 2.8GB file.
Comment 4 Fabio Durán Verdugo 2010-08-20 14:12:05 UTC
GLib-ERROR **: (NULL) message
aborting...
Paste here the attach traceback


Program received signal SIGABRT, Aborted.
0x0012d422 in __kernel_vsyscall ()
(gdb) thread apply all bt

Thread 1 (Thread 0xb7fd9750 (LWP 23630))

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #2 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #3 IA__g_logv
    at /build/buildd/glib2.0-2.24.1/glib/gmessages.c line 549
  • #4 IA__g_log
    at /build/buildd/glib2.0-2.24.1/glib/gmessages.c line 569
  • #5 IA__g_malloc
    at /build/buildd/glib2.0-2.24.1/glib/gmem.c line 136
  • #6 _gtk_char_segment_new
  • #7 _gtk_text_btree_insert
  • #8 gtk_text_buffer_real_insert_text
  • #9 ??
    from /usr/lib/libgtksourceview-2.0.so.0
  • #10 _gtk_marshal_VOID__BOXED_STRING_INT
    at /build/buildd/gtk+2.0-2.20.1/gtk/gtkmarshalers.c line 1423
  • #11 g_type_class_meta_marshal
    at /build/buildd/glib2.0-2.24.1/gobject/gclosure.c line 878
  • #12 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #13 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3286
  • #14 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2981
  • #15 IA__g_signal_emit
    at /build/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3038
  • #16 gtk_text_buffer_emit_insert
  • #17 ??
  • #18 IA__g_output_stream_write
    at /build/buildd/glib2.0-2.24.1/gio/goutputstream.c line 217
  • #19 ??
  • #20 async_ready_callback_wrapper
  • #21 IA__g_simple_async_result_complete
    at /build/buildd/glib2.0-2.24.1/gio/gsimpleasyncresult.c line 588
  • #22 complete_in_idle_cb_for_thread
    at /build/buildd/glib2.0-2.24.1/gio/gsimpleasyncresult.c line 653
  • #23 g_idle_dispatch
    at /build/buildd/glib2.0-2.24.1/glib/gmain.c line 4065
  • #24 g_main_dispatch
    at /build/buildd/glib2.0-2.24.1/glib/gmain.c line 1960
  • #25 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.24.1/glib/gmain.c line 2513
  • #26 g_main_context_iterate
    at /build/buildd/glib2.0-2.24.1/glib/gmain.c line 2591
  • #27 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.24.1/glib/gmain.c line 2799
  • #28 IA__gtk_main
    at /build/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 1219
  • #29 main

Comment 5 Steve Frécinaux 2010-08-24 10:59:02 UTC
It would not be possible to open a 2.8GB file in a 32 bits system, whatever the application is, if it reads it completely as gedit does.

The reason for that is simple: on a 32bits architecture, a process can only map 3 GB of memory. If you consider 2.8GB of content, with all the required bookkeeping information (like the btree used for storing the files lines), the libraries and so on would be much over the 3GB limit.

Hence the error message here:
    0x89689c "%s: failed to allocate %u bytes", args1=0xbfffeb0c "pi\211")

Which itself cannot be displayed (the "NULL" you see) because the final message cannot be allocated...

I suggest either you split your file or you use another adapted text reader (which won't need to allocate the entirety of the file, as opposed to a full-fledged editor) to read it properly...
Comment 6 rusivi 2010-08-24 15:39:02 UTC
Steve:

Thank you for addressing this bug. I did use Vi to manipulate the file, which itself creates a full, temporary copy of the file while the file is being edited.   However, it would be nice if gedit had some provision to deal with "large" files. Could we keep this open as a low priority, low severity, wishlist bug?