Wednesday, October 04, 2006

Sguil and Tcl_FinalizeNotifier: notifier pipe not initialized

If you are trying to get Sguil working, and you run into the error:

Tcl_FinalizeNotifier: notifier pipe not initialized

then it's likely you have a threads enabled Tcl installed. Recompile Tcl without threads enabled, and the error should go away upon restart. This will at least impact both the sensor agent and the sguild server.

This also manifests itself within the client as showing, under the sensor status tab, that the sensor agent is connected to the server, but barnyard (BY column) is not, and there are no events appearing.

On an RPM based system, grab the source rpm (src.rpm, tcl-8.4.13-1.1.src.rpm as of this writing).

1. Install it with:

# rpm -ivh tcl-8.4.13-1.1.src.rpm
1:tcl warning: user brewbuilder does not exist - using root
warning: group brewbuilder does not exist - using root
warning: user brewbuilder does not exist - using root
warning: group brewbuilder does not exist - using root
warning: user brewbuilder does not exist - using root
warning: group brewbuilder does not exist - using root
warning: user brewbuilder does not exist - using root
warning: group brewbuilder does not exist - using root
warning: user brewbuilder does not exist - using root
warning: group brewbuilder does not exist - using root
warning: user brewbuilder does not exist - using root
warning: group brewbuilder does not exist - using root
warning: user brewbuilder does not exist - using root
warning: group brewbuilder does not exist - using root
warning: user brewbuilder does not exist - using root
warning: group brewbuilder does not exist - using root
########################################### [100%]

which will place a number of files in /usr/src/redhat/* (the user and group warnings are safe to ignore).

2. Next, edit the spec file, which is /usr/src/redhat/SPECS/tcl.spec.
In the %build section, remove:

--enable-threads

from the line:

%configure --enable-threads

Optionally, edit the line:

Release: 1.1

to be:

Release: 1.1nothreads

to make it easier to remember that the tcl package has threading disabled.

Save your changes to the file.

3. Next, rebuild the rpm:

# rpmbuild -ba tcl.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.45757
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ /bin/mkdir -p tcl-8.4.13
+ cd tcl-8.4.13
+ /bin/gzip -dc /usr/src/redhat/SOURCES/tcl8.4.13-src.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'

[snip]

Wrote: /usr/src/redhat/SRPMS/tcl-8.4.13-1.1nothreads.src.rpm
Wrote: /usr/src/redhat/RPMS/i386/tcl-8.4.13-1.1nothreads.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/tcl-devel-8.4.13-1.1nothreads.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/tcl-html-8.4.13-1.1nothreads.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.72451
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd tcl-8.4.13
+ rm -rf /var/tmp/tcl-8.4.13-1.1nothreads-root
+ exit 0

(if you get rpmbuild: command not found, then you need to run:

yum install rpm-build

to install the rpmbuild binary and supporting files)

4. Replace the current tcl with your new threads-disabled version:

# rpm -Uvh --force /usr/src/redhat/RPMS/i386/tcl-8.4.13-1.1nothreads.i386.rpm
Preparing... ########################################### [100%]
1:tcl ########################################### [100%]

Enjoy.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home