Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152606 - net-im/pidgin-2.2.2 will not run correctly on big endian 64bit systems
Summary: net-im/pidgin-2.2.2 will not run correctly on big endian 64bit systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: High normal (vote)
Assignee: ppc64 architecture team
URL: http://developer.pidgin.im/ticket/5887
Whiteboard:
Keywords:
: 189781 (view as bug list)
Depends on:
Blocks: 189781
  Show dependency tree
 
Reported: 2006-10-23 16:10 UTC by gent_bz
Modified: 2009-03-13 22:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gaim-2.0.0_beta5-r1_strace.txt (gaim-2.0.0_beta5-r1_strace.txt,268.65 KB, text/plain)
2006-12-21 09:54 UTC, Markus Rothe (RETIRED)
Details
Fixes the lockup on ppc64 (savedstatuses_ppc64.patch,5.67 KB, patch)
2008-05-21 13:31 UTC, Joe Jezak (RETIRED)
Details | Diff
Fixes the lockup on ppc64 (version submitted upstream) (savedstatuses_ppc64.patch,3.83 KB, patch)
2008-05-21 19:56 UTC, Joe Jezak (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gent_bz 2006-10-23 16:10:43 UTC
Emerges with no problems, but runs very, very slowly - if I run it, a blank space appears in the system tray, minutes later an icon appears, minutes later a blank window appears, minutes later I get bored and kill it.

This happens whether my ~/.gaim dir is present or not.


Portage 2.1.2_pre3-r7 (default-linux/ppc/ppc64/2006.0/64bit-userland/970/pmac, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo ppc64)
=================================================================
System uname: 2.6.18-gentoo ppc64 PPC970FX, altivec supported
Gentoo Base System version 1.12.5
Last Sync: Sun, 22 Oct 2006 22:00:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="ppc64 ~ppc64"
AUTOCLEAN="yes"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -mtune=970 -mcpu=970 -mabi=altivec -pipe"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -mtune=970 -mcpu=970 -mabi=altivec -pipe"
DISTDIR="/mnt/shared/distfiles"
FEATURES="autoconfig metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="ppc64 X alsa altivec apache2 apm berkdb bitmap-fonts cli cracklib cups dbus dlloader dri elibc_glibc emboss encode foomaticdb fortran gdbm gif gnome gpm gstreamer gtk hal imlib input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog jpeg kde kernel_linux libg++ libwww mad mikmod motif mp3 mpeg ncurses nls nptl offensive ogg opengl oss pam pcre perl png pppd python qt3 quicktime readline reflection samba sdl session spell spl ssl tcpd tiff truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_ati video_cards_dummy video_cards_fbdev video_cards_mga video_cards_nv video_cards_sisusb video_cards_v4l vorbis xml xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 gent_bz 2006-10-23 16:15:24 UTC
I should really get more sleep...
Comment 2 gent_bz 2006-10-23 16:21:33 UTC
Runs fine in a 32bit chroot.  (i.e. ppc)
Comment 3 Markus Rothe (RETIRED) gentoo-dev 2006-10-25 01:10:48 UTC
I can confirm this (stable system - gcc-3.4, glibc-2.3.6). Though I don't know how to debug.

amd64: could one of you please try if this also happens in your 64bit userland (nomultilib profile)? If not, then I guess it is a toolchain issue.
Comment 4 gent_bz 2006-10-25 01:35:42 UTC
Runs fine on amd64.
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-10-25 12:50:26 UTC
Runs fine here in 64-bit userland:

Portage 2.1.2_pre3-r7 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-ck1-dfg3 x86_64)

I have gotten several random crashes, but that's not abnormal for 64-bit gaim.
Comment 6 Markus Rothe (RETIRED) gentoo-dev 2006-10-25 13:58:32 UTC
amd64: thanks for testing. removing you fron CC again.
Comment 7 Jory A. Pratt 2006-12-19 18:00:15 UTC
(In reply to comment #3)
> I can confirm this (stable system - gcc-3.4, glibc-2.3.6). Though I don't know
> how to debug.
> 
> amd64: could one of you please try if this also happens in your 64bit userland
> (nomultilib profile)? If not, then I guess it is a toolchain issue.
> 

If you would please emerge strace if not already installed and get me an strace to follow.
Comment 8 Markus Rothe (RETIRED) gentoo-dev 2006-12-21 09:54:07 UTC
Created attachment 104523 [details]
gaim-2.0.0_beta5-r1_strace.txt

this is a backtrace of gaim running for about 3 minutes ( or that is to say: eating up my cpu for about 3 minutes ;-) ). then I killed it. don't know if this helps.
Comment 9 Olivier Crete (RETIRED) gentoo-dev 2007-05-01 03:54:16 UTC
I dont see much.. can you try net-im/pidgin ?
Comment 10 gent_bz 2007-05-01 06:02:18 UTC
Problem persists with net-im/pidgin-2.0.0_beta7
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-06-30 15:17:30 UTC
(In reply to comment #10)
> Problem persists with net-im/pidgin-2.0.0_beta7

Still a problem w/ pidgin-2.0.2 ?

Comment 12 Brent Baude (RETIRED) gentoo-dev 2007-07-05 15:26:17 UTC
Yeah, problem still exists with net-im/pidgin-2.0.2
Comment 13 Olivier Crete (RETIRED) gentoo-dev 2007-07-05 15:31:47 UTC
can someone from ppc64 investigate?
Comment 14 Brent Baude (RETIRED) gentoo-dev 2007-07-05 18:28:26 UTC
Well two of us that reported it are on the ppc64 team.  I looked at it today and nothing jumped out at me.  It does seem like bizarre behavior.  Any advice on how you want us to investigate?
Comment 15 Joe Jezak (RETIRED) gentoo-dev 2007-08-22 12:20:47 UTC
Still happening with pidgin 2.1.0.  I ran it in gdb and broke after it "locked".  A backtrace shows:
#0  0x0000040000beda80 in .g_hash_table_lookup () from /usr/lib/libglib-2.0.so.0
#1  0x0000040000d1e298 in .purple_savedstatus_new () from /usr/lib/libpurple.so.0
#2  0x0000040000d1e5e4 in .purple_savedstatus_get_default () from /usr/lib/libpurple.so.0
#3  0x0000040000d1e834 in .purple_savedstatus_get_current () from /usr/lib/libpurple.so.0
#4  0x00000000100ae654 in .pidgin_status_box_new ()
#5  0x00000000100af318 in .pidgin_status_box_new ()
#6  0x00000000100b0360 in .pidgin_status_box_new ()
#7  0x0000040000b577f4 in .g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
#8  0x0000040000b384c4 in .g_object_set () from /usr/lib/libgobject-2.0.so.0
#9  0x0000040000b3660c in .g_object_newv () from /usr/lib/libgobject-2.0.so.0
#10 0x0000040000b37278 in .g_object_new_valist () from /usr/lib/libgobject-2.0.so.0
#11 0x0000040000b37388 in .g_object_new () from /usr/lib/libgobject-2.0.so.0
#12 0x00000000100ae248 in .pidgin_status_box_new ()
#13 0x0000000010048110 in .pidgin_blist_refresh ()
#14 0x0000000000000000 in ?? ()

So, perhaps an issue with the hashtable lookup?  I'll keep digging.
Comment 16 Olivier Crete (RETIRED) gentoo-dev 2007-09-30 16:50:10 UTC
Could you provide a strace log with -tt (ie timing info)..
This bug is really strange.
Comment 17 SpanKY gentoo-dev 2007-10-01 07:40:28 UTC
may be a compiler thing where an infinite loop is generated ... i just ran it on my machine, and after all while, strace stops printing and pidgin starts chewing the cpu ... which means there's some code being executed in a tight loop w/out system calls ...
Comment 18 Olivier Crete (RETIRED) gentoo-dev 2007-10-28 00:12:03 UTC
Did you make any progress? Or is there some ppc64 machine on which I could test?
Comment 19 Markus Rothe (RETIRED) gentoo-dev 2007-10-28 07:10:48 UTC
(In reply to comment #18)
> Did you make any progress? Or is there some ppc64 machine on which I could
> test?
> 

No, no progress. Just yesterday I tested pidgin 2.2.2 with some new versions of gcc/glibc etc, but it still fails.

The ppc64 machine hosted at OSL is currently being replaced and I'm not sure, what the status is. You might want to join #gentoo-ppc64 and ask ranger, if he knows when the new machine comes online.
Comment 20 Joe Jezak (RETIRED) gentoo-dev 2007-11-05 06:03:08 UTC
So, here's where I'm at with this bug, just to get it set in bugzilla:

glib returns a hash reference, even when the item requested isn't currently hashed.  This incorrect behavior is what causes the infinite looping.  It doesn't appear to be a bug in pidgin, as far as I can tell.
Comment 21 Olivier Crete (RETIRED) gentoo-dev 2008-02-16 19:49:49 UTC
*** Bug 189781 has been marked as a duplicate of this bug. ***
Comment 22 Joe Jezak (RETIRED) gentoo-dev 2008-05-21 13:31:28 UTC
Created attachment 153843 [details, diff]
Fixes the lockup on ppc64

This patch fixes the bug, but upstream wants a different approach.  I'll update the bug once I've got something that's okay with upstream.
Comment 23 Joe Jezak (RETIRED) gentoo-dev 2008-05-21 13:34:12 UTC
The actual problem is that the hash table implementation they're using uses int types for the hash keys, but in pidgin, they're using time_t.  On 32 bit systems, this is fine, but on 64 bit systems, the value is truncated.  On LE 64 bit systems, due to byte ordering, the least significant 32 bits are used, which is fine for the hash. On 64 bit systems, the most significant 32 bits are used, which causes it to loop for a *very* long time when adding new hash elements.
Comment 24 Joe Jezak (RETIRED) gentoo-dev 2008-05-21 19:56:37 UTC
Created attachment 153873 [details, diff]
Fixes the lockup on ppc64 (version submitted upstream)
Comment 25 SpanKY gentoo-dev 2008-05-31 05:47:45 UTC
hmm, so ppc64 is really the only arch we'd see this problem with huh ... no one really runs mips64/s390x/sparc64 64bit userlands let alone glib based packages like pidgin ... sucks to be ppc64 :)
Comment 26 Joe Jezak (RETIRED) gentoo-dev 2009-03-13 22:08:16 UTC
Upstream included a variation on this patch with version 2.5.5, marked ~ppc64.