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 91536 - Segfault on Alpha
Segfault on Alpha
Status: VERIFIED INCOMPLETE
Product: Pan
Classification: Other
Component: general
0.13.0
Other Linux
: Normal major
: 0.13.3
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2002-08-23 17:01 UTC by jcnbulk
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
one of the articles that crashes Pan (96.53 KB, text/plain)
2002-08-24 11:25 UTC, Christophe Lambin
Details

Description jcnbulk 2002-08-23 17:01:44 UTC
I've said 0.13.0 (CVS) but the bug exists in the 0.12 serie.
 Pan opens correctly but when you want to view some messages (not all the
kind of messages) it segvs, This is reliable in the sense that when you are
able to open a message you are always able to do so and when a message
makes pan hang it always does.

 /usr/local/src/pan/pan$gdb ./pan
GNU gdb 2002-04-01-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "alpha-linux"...
(gdb) run
Starting program: /usr/local/src/pan/pan/pan 
[New Thread 1024 (LWP 1503)]
[New Thread 2049 (LWP 1505)]
[New Thread 1026 (LWP 1506)]
[New Thread 2051 (LWP 1507)]
[New Thread 3076 (LWP 1508)]
[New Thread 4101 (LWP 1509)]
[New Thread 5126 (LWP 1510)]
[New Thread 6151 (LWP 1511)]
[New Thread 7176 (LWP 1519)]
[New Thread 8201 (LWP 1521)]

Program received signal SIGSEGV, Segmentation fault.

Thread 1024 (LWP 1503)

  • #0 g_type_fundamental
    at gtype.c line 2593
  • #1 g_object_new
    at gobject.c line 585
  • #2 g_mime_object_new_type
    at gmime-object.c line 252
  • #3 parser_construct_multipart
    at gmime-parser.c line 1152
  • #4 parser_construct_message
    at gmime-parser.c line 1265
  • #5 pan_g_mime_parser_construct_message
    at util-mime.c line 947
  • #6 acache_get_message
    at acache.c line 713

Otherwise, you told GDB there was a function where there isn't one, or
(more likely) you have encountered a bug in GDB.
(gdb) quit
A debugging session is active.
Do you still want to close the debugger?(y or n) y
/usr/local/src/pan/pan$
Comment 1 Christophe Lambin 2002-08-23 22:14:31 UTC
Could you add one message that consistenly crashes Pan here as an
attachment ? http://bugzilla.gnome.org/createattachment.cgi?id=91536

Comment 2 jcnbulk 2002-08-24 10:43:34 UTC
pretty tricky to do that as as soon as I select it Pan crashes, gonna
try to save it with mozilla
Comment 3 Christophe Lambin 2002-08-24 11:25:38 UTC
Created attachment 10691 [details]
one of the articles that crashes Pan
Comment 4 Charles Kerr 2002-09-17 17:54:06 UTC
Fejj: I'm reassigning to GMime tickets that look like GMime errors,
and CC'ing you, but leaving in Pan, tickets where I'm not sure.
Let me know if you want me to stop doing either of these things...
Comment 5 Jeffrey Stedfast 2002-09-17 20:45:20 UTC
charles: no prob. I'll take a look at this tonight when I get home.
Comment 6 Jeffrey Stedfast 2002-09-18 02:31:02 UTC
both gmime's test-parser and test-mbox work fine on this without a
crash. I presume the problem is probably memory corruption in some
unrelated section of code?

how can I import this into Pan?
Comment 7 jcnbulk 2002-09-19 16:47:14 UTC
Can I help by doing some test on the Alpha ?
From what I've seen on the ddd debuging session (I'm not an expert)
The hangig occurs at a message-part object creation, the parameters
becoming random string instead of a valid mime type. 
Comment 8 Christophe Lambin 2002-10-10 23:59:50 UTC
Bumped remaining bugs to 0.13.2.
Comment 9 Charles Kerr 2002-10-17 17:07:38 UTC
jcnbulk@free.fr: does this problem persist in 0.13.1?
Comment 10 jcnbulk 2002-10-17 20:04:11 UTC
Yes I'm afraid so, I've just tried with the current CVS version
Comment 11 jcnbulk 2002-10-18 20:36:07 UTC
I'm following where it segfaults with ddd

I think the problem is in this function

GMimeObject *
g_mime_object_new_type (const char *type, const char *subtype)
{
        struct _type_bucket *bucket;
        GMimeObject *object;
        GType obj_type;
        
        g_return_val_if_fail (type != NULL, NULL);
        
        type_registry_init ();
        
        bucket = g_hash_table_lookup (type_hash, type);
        if (!bucket) {
                bucket = g_hash_table_lookup (type_hash, "*");
                obj_type = bucket ? bucket->object_type : 0;
        } else {
                obj_type = GPOINTER_TO_INT (g_hash_table_lookup
(bucket->subtype_hash, subtype));


HERE
GPointer is 64 bits on Alpha
Is the hint useful ?


                if (!obj_type)
                        obj_type = GPOINTER_TO_INT
(g_hash_table_lookup (bucket->subtype_hash, "*"));
        }
        
        if (!obj_type) {
                /* use the default mime object */
                bucket = g_hash_table_lookup (type_hash, "*");
                if (bucket)
                        obj_type = GPOINTER_TO_INT
(g_hash_table_lookup (bucket->subtype_hash, "*"));
                
                if (!obj_type)
                        return NULL;
        }
        
        object = g_object_new (obj_type, NULL, NULL);
        
        GMIME_OBJECT_GET_CLASS (object)->init (object);
        
        return object;
}
    
    
Comment 12 Christophe Lambin 2002-11-13 20:52:56 UTC
Bumped remaining bugs to 0.13.3.
Comment 13 Charles Kerr 2002-11-18 21:28:19 UTC
fejj: did your 64bit cleanliness patches fix this?
Comment 14 Jeffrey Stedfast 2002-11-18 21:54:29 UTC
I think so but I'm not sure
Comment 15 Charles Kerr 2002-11-18 21:59:55 UTC
jcnbulk@free.fr: Could you give 0.13.2.90 a spin when it comes out
later this week and see if the problem is resolved?
Comment 16 Charles Kerr 2002-12-04 02:09:57 UTC
jcnbulk@free.fr: ping
Comment 17 jcnbulk 2002-12-04 17:22:02 UTC
hi, sorry for the late answer
Last time I check (last week) it was broken but I can't say pam is
still broken coz it segfaulted in libglib (libglib is currently broken
in Alpha Debian sid. I gonna try to fis the glib pb and try the last
CVS pam
Comment 18 jcnbulk 2002-12-08 11:05:23 UTC
It's still the same : hangs in libglib
I've appended a ldd output


Program received signal SIGSEGV, Segmentation fault.

Thread 16384 (LWP 1683)

  • #0 g_str_hash
    from /usr/lib/libglib-2.0.so.0
  • #1 g_hash_table_lookup
    from /usr/lib/libglib-2.0.so.0
  • #2 pango_x_list_subfonts
    from /usr/lib/libpangox-1.0.so.0
  • #3 find_char
    from /usr/lib/pango/1.0.0/modules/pango-basic-x.so
  • #4 find_char
    from /usr/lib/pango/1.0.0/modules/pango-basic-x.so
  • #5 pango_x_face_get_coverage
    from /usr/lib/libpangox-1.0.so.0



ldd /usr/local/src/pan/pan/pan
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0
(0x000002000002a000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0
(0x0000020000358000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00000200003f2000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0
(0x0000020000416000)
        libm.so.6.1 => /lib/libm.so.6.1 (0x0000020000442000)
        libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0
(0x00000200004cc000)
        libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0
(0x000002000050a000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0
(0x000002000052e000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0
(0x0000020000586000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0
(0x00000200005ec000)
        libdl.so.2.1 => /lib/libdl.so.2.1 (0x0000020000600000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x0000020000614000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00000200006b4000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00000200007b8000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0
(0x00000200007dc000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00000200007f2000)
        libc.so.6.1 => /lib/libc.so.6.1 (0x000002000089a000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x0000020000a14000)
        libXft.so.1 => /usr/X11R6/lib/libXft.so.1 (0x0000020000a30000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1
(0x0000020000a76000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x0000020000a8e000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x0000020000ab4000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000020000bcc000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0000020000000000)
Comment 19 jcnbulk 2002-12-08 11:23:50 UTC
Ok I fixed the pango/glib thing by upgrading. But I'm sorry to say
that there is the same (gmime) bug at the same place.
here is the backtrace



Program received signal SIGSEGV, Segmentation fault.

Thread 16384 (LWP 1794)

  • #0 g_type_fundamental
    from /usr/lib/libgobject-2.0.so.0
  • #1 g_object_new
    from /usr/lib/libgobject-2.0.so.0
  • #2 g_mime_object_new_type
  • #3 parser_construct_multipart
  • #4 parser_construct_message
  • #5 pan_g_mime_parser_construct_message

Comment 20 Jeffrey Stedfast 2002-12-08 15:34:49 UTC
as long as gpointer >= to the size of a gint, it shouldn't matter :-(

I don't really understand the problem here.
Comment 21 Jeffrey Stedfast 2002-12-08 15:53:19 UTC
okay, I was wrong. GINT_TO_POINTER() and GPOINTER_TO_INT() on 64bit
archs cast to/from 32bit ints and that's why this doesn't work.

Fixed in gmime CVS (should be as easy as copying the new
gmime-object.c file over to pan)