New xffm bug(s)

Mike Makonnen mtm at identd.net
Mon Apr 7 14:08:01 CEST 2003


On Mon, 7 Apr 2003 11:17:01 +0200
Benedikt Meurer <Benedikt.Meurer at unix-ag.uni-siegen.de> wrote:

> The warnings are generated on xffm startup, but I could not determine
> the source of the problems yet.

Did you get these on FreeBSD?
If so, you can make most malloc warnings fatal (with coredump) by using the
A flag for malloc.conf:
	# ln -s A /etc/malloc.conf

Anyways, here's a trace:


#0  0x288b98e3 in kill () from /usr/lib/libc.so.5
#1  0x28920297 in abort () from /usr/lib/libc.so.5
#2  0x2891eabe in tcflow () from /usr/lib/libc.so.5
#3  0x2891eaeb in tcflow () from /usr/lib/libc.so.5
#4  0x2891f5df in malloc () from /usr/lib/libc.so.5
#5  0x2886148e in _thread_fd_table_init () from /usr/lib/libc_r.so.5
#6  0x2885ba9b in _open () from /usr/lib/libc_r.so.5
#7  0x28908ff3 in __opendir2 () from /usr/lib/libc.so.5
#8  0x28908f77 in opendir () from /usr/lib/libc.so.5
#9  0x288b0e96 in globfree () from /usr/lib/libc.so.5
#10 0x288b08fd in glob () from /usr/lib/libc.so.5
#11 0x288b0896 in glob () from /usr/lib/libc.so.5
#12 0x288b06eb in glob () from /usr/lib/libc.so.5
#13 0x288b05be in glob () from /usr/lib/libc.so.5
#14 0x288aff7c in glob () from /usr/lib/libc.so.5
#15 0x2809e64c in cleanup_tmpfiles () at misc.c:83
#16 0x0805f38b in finishit (sig=0) at main.c:65
#17 0x28857cd1 in _thread_sig_handler () from /usr/lib/libc_r.so.5
#18 0x28857b37 in _thread_sig_handler () from /usr/lib/libc_r.so.5
#19 <signal handler called>
#20 0x288b98e3 in kill () from /usr/lib/libc.so.5
#21 0x2891eabe in tcflow () from /usr/lib/libc.so.5
#22 0x2891eaeb in tcflow () from /usr/lib/libc.so.5
#23 0x2891f538 in tcflow () from /usr/lib/libc.so.5
#24 0x2891f768 in free () from /usr/lib/libc.so.5
#25 0x28102934 in g_free () from /usr/local/lib/libglib-2.0.so.200
#26 0x0805e3f9 in add_roots (treeview=0x81a2b80, home=0x8083b20 "/home/mtm")
    at treeview.c:335
#27 0x0805eb58 in create_treeview (path=0x8083b20 "/home/mtm")
    at treeview.c:552
#28 0x0805f314 in init_xffm (argc=1, argv=0xbfbff728) at treeview.c:709
#29 0x0805f56b in main (argc=1, argv=0xbfbff728) at main.c:178
#30 0x0804f6a5 in _start (ap=0xbfbff824 "xffm")
    at /a/current/src/lib/csu/i386-elf/crt1.c:104

The problem seems to be in frame #26. Also, notice that there's a second fatal
signal (frame #0) caused by frame #15. It seems cleanup_tmpfiles() calls
glob(3), which calls malloc(2). This is unsafe to do from a signal handler. I
don't know about linux but on FreeBSD you can see sigaction(2) for an idea of
the functions that are safe to call from a signal handler. 

Cheers.
-- 
Mike Makonnen  | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm at identd.net | D228 1A6F C64E 120A A1C9  A3AA DAE1 E2AF DBCC 68B9
mtm at FreeBSD.Org | FreeBSD - The Power To Serve



More information about the Xfce4-dev mailing list