Subject: pkg/36653: editors/emacs consistently deadlocks if compiled with gtk
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: David H. Gutteridge <dhgutteridge@sympatico.ca>
List: pkgsrc-bugs
Date: 07/16/2007 05:35:00
>Number:         36653
>Category:       pkg
>Synopsis:       editors/emacs consistently deadlocks if compiled with gtk
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 16 05:35:00 +0000 2007
>Originator:     David H. Gutteridge
>Release:        NetBSD 3.1
>Organization:
>Environment:


System: NetBSD arcusv.nonus-porta.net 3.1 NetBSD 3.1 (ARCUSV) #0: Sat May 12 
18:56:15 EDT 2007 
root@arcusv.nonus-porta.net:/usr/src/sys/arch/macppc/compile/ARCUSV macppc
Architecture: powerpc
Machine: macppc
>Description:
If compiled with the gtk toolkit option, emacs always deadlocks.
I can reproduce this consistently on 3.1/i386 and 3.1/macppc with more
than one version of gtk (including the latest in pkgsrc).

No matter how long I leave it running for, it simply consumes all the
CPU it can and never breaks out of its deadlock.

Here is one backtrace from a core dump after I aborted the process:

(gdb) bt full
#0  0xbd2f430b in kill () from /usr/lib/libc.so.12
No symbol table info available.
#1  0x080f0054 in jpeg_resync_to_restart ()
No symbol table info available.
#2  0xbd48f477 in pthread__signal_deferred () from /usr/lib/libpthread.so.0
No symbol table info available.

(Probably not too useful though...)

I also ktraced the process, here is a sample of what it's doing when
it deadlocks:

26860 emacs    CALL  gettimeofday(0xffffcb10,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  select(5,0xffffcc10,0,0,0xffffcc50)
26860 emacs    RET   select 1
26860 emacs    CALL  gettimeofday(0xffffcaa0,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  getpid
26860 emacs    RET   getpid 26860/0x68ec
26860 emacs    CALL  kill(0x68ec, SIGIO)
26860 emacs    RET   kill 0
26860 emacs    CALL  gettimeofday(0xffffcc50,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  gettimeofday(0xffffcb10,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  select(5,0xffffcc10,0,0,0xffffcc50)
26860 emacs    RET   select 1
26860 emacs    CALL  gettimeofday(0xffffcaa0,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  getpid
26860 emacs    RET   getpid 26860/0x68ec
26860 emacs    CALL  kill(0x68ec, SIGIO)
26860 emacs    RET   kill 0
26860 emacs    CALL  gettimeofday(0xffffcc50,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  gettimeofday(0xffffcb10,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  select(5,0xffffcc10,0,0,0xffffcc50)
26860 emacs    RET   select 1
26860 emacs    CALL  gettimeofday(0xffffcaa0,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  getpid
26860 emacs    RET   getpid 26860/0x68ec
26860 emacs    CALL  kill(0x68ec, SIGIO)
26860 emacs    RET   kill 0
26860 emacs    CALL  gettimeofday(0xffffcc50,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  gettimeofday(0xffffcb10,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  select(5,0xffffcc10,0,0,0xffffcc50)
26860 emacs    RET   select 1
26860 emacs    CALL  gettimeofday(0xffffcaa0,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  getpid
26860 emacs    RET   getpid 26860/0x68ec
26860 emacs    CALL  kill(0x68ec, SIGIO)
26860 emacs    RET   kill 0
26860 emacs    CALL  gettimeofday(0xffffcc50,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  gettimeofday(0xffffcb10,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  select(5,0xffffcc10,0,0,0xffffcc50)
26860 emacs    RET   select 1
26860 emacs    CALL  gettimeofday(0xffffcaa0,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  getpid
26860 emacs    RET   getpid 26860/0x68ec
26860 emacs    CALL  kill(0x68ec, SIGIO)
26860 emacs    RET   kill 0
26860 emacs    CALL  gettimeofday(0xffffcc50,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  gettimeofday(0xffffcb10,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  select(5,0xffffcc10,0,0,0xffffcc50)
26860 emacs    RET   select 1
26860 emacs    CALL  gettimeofday(0xffffcaa0,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  getpid
26860 emacs    RET   getpid 26860/0x68ec
26860 emacs    CALL  kill(0x68ec, SIGIO)
26860 emacs    RET   kill 0
26860 emacs    CALL  gettimeofday(0xffffcc50,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  gettimeofday(0xffffcb10,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  select(5,0xffffcc10,0,0,0xffffcc50)
26860 emacs    RET   select 1
26860 emacs    CALL  gettimeofday(0xffffcaa0,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  getpid
26860 emacs    RET   getpid 26860/0x68ec
26860 emacs    CALL  kill(0x68ec, SIGIO)
26860 emacs    RET   kill 0
26860 emacs    CALL  gettimeofday(0xffffcc50,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  gettimeofday(0xffffcb10,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  select(5,0xffffcc10,0,0,0xffffcc50)
26860 emacs    RET   select 1
26860 emacs    CALL  gettimeofday(0xffffcaa0,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  getpid
26860 emacs    RET   getpid 26860/0x68ec
26860 emacs    CALL  kill(0x68ec, SIGIO)
26860 emacs    RET   kill 0
26860 emacs    CALL  gettimeofday(0xffffcc50,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  gettimeofday(0xffffcb10,0)
26860 emacs    RET   gettimeofday 0
26860 emacs    CALL  select(5,0xffffcc10,0,0,0xffffcc50)
26860 emacs    RET   select 1


>How-To-Repeat:
Compile emacs with gtk support.  Try doing anything that involves
scrolling.

Additionally, trying to just select a menu item can cause an entire
Gnome session to freeze.  (The problem seems to be the same.)

>Fix:
No idea at present.


>Unformatted: