From owner-freebsd-ports Tue Jul 22 01:10:08 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id BAA15493 for ports-outgoing; Tue, 22 Jul 1997 01:10:08 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id BAA15474; Tue, 22 Jul 1997 01:10:03 -0700 (PDT) Date: Tue, 22 Jul 1997 01:10:03 -0700 (PDT) Message-Id: <199707220810.BAA15474@hub.freebsd.org> To: freebsd-ports Cc: From: Wolfgang Helbig Subject: Re: ports/3927: xview library fails on -current and on 2.2.x Reply-To: Wolfgang Helbig Sender: owner-freebsd-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR ports/3927; it has been noted by GNATS. From: Wolfgang Helbig To: asami@cs.berkeley.edu (Satoshi Asami) Cc: frankd@yoda.fdt.net, helbig@MX.BA-Stuttgart.De, freebsd-gnats-submit@hub.freebsd.org Subject: Re: ports/3927: xview library fails on -current and on 2.2.x Date: Tue, 22 Jul 1997 10:04:51 +0200 (MET DST) > * I had this problem until Wolfgang built xview-lib and -config for me on > * his -current system. I have a stock 2.2.2 system that I can test fixes on > > Ok, I tried it too. On my system (2.2-stable mid-last week, > 3.0-current yesterday), workman doesn't work. (I only tried as myself > -- not as root.) > > It dies like this: > > === > >> workman > XView warning: Notifier error: Bad file number > XView warning: Notifier error: Bad file number > XView warning: Notifier error: Bad file number > XView warning: Notifier error: Bad file number > XView warning: Notifier error: Bad file number > XView warning: Notifier error: Bad file number > XView warning: Notifier error: Bad file number > Segmentation fault (core dumped) > === > > I compiled xview-*/workman on both the 2.2 and 3.0 systems, even > fetched the ones in ftp.freebsd.org's packages-current. None of them The packages-current on ftp.freebsd.org are symlinked: lrwxrwxrwx 1 569 ftp-Free 30 Jul 18 22:58 xview-clients-3.2.1.tgz -> ../All/xview-clients-3.2.1.tgz lrwxrwxrwx 1 569 ftp-Free 29 Jul 18 22:58 xview-config-3.2.1.tgz -> ../All/xview-config-3.2.1.tgz lrwxrwxrwx 1 569 ftp-Free 26 Jul 18 22:58 xview-lib-3.2.1.tgz -> ../All/xview-lib-3.2.1.tgz The packages-2.2.2 on ftp.freebsd.org are sysmlinked: lrwxrwxrwx 1 569 ftp-Free 30 Jun 12 03:16 xview-clients-3.2.1.tgz -> ../All/xview-clients-3.2.1.tgz lrwxrwxrwx 1 569 ftp-Free 29 Jun 12 03:16 xview-config-3.2.1.tgz -> ../All/xview-config-3.2.1.tgz lrwxrwxrwx 1 569 ftp-Free 26 Jun 12 03:16 xview-lib-3.2.1.tgz -> ../All/xview-lib-3.2.1.tgz So its no use to try both :-) Now here is what is found out so far: Lars Gerhard Kuehl pointed out that the ``crashes are caused by a damaged stack'', return addresses of functions called by notifier_start() are set to 0x0. The *only* difference of the xview-lib built on 2.2.2 vs. built on -current is the value of FD_SETSIZE (256 vs. 1024). I built and installed xview-lib on -current with FD_SETSIZE set to 256 in /usr/include/sys/types.h . Comparing 2.2.2 built with -current built I got: o same sizes of object files in .../lib/libxview/notify o same behaviour of xview-applications, i. e. works if started as nonroot, crashes if started as root. On both systems XFree86-3.3 is installed, I am running fvwm-2.0.45 and the S3 X-Server. So FD_SETSIZE, which controls the size of quite a few local variables in the notifier code, seems to hide the error if set to 1024--at least on my -current, on my 2.2.2 and on Frank's 2.2.2. Adding worse to bad: when I tried the -g CFLAG for debugging, the linker crashed with segmentation fault. I am not in the mood right now to analyse that problem. BTW Satoshi, the big FD_SETSIZE is not yet merged to the 2.2 Branch. Should it? Wolfgang