In nut-2.4.0 installed from the sysutils/nut port, upssched appears to be non-functional (SEGV's when attempting to schedule an event.) How-To-Repeat: Perform the following steps as root 1. Install nut-2.4.0 from ports. 2. Execute the following commands: mkdir /var/db/nut/upssched chown uucp:uucp /var/db/nut/upssched 3. If the upssched directory already existed, remove it's contents to avoid permissions or locking problems: rm /var/db/nut/upssched/* 4. Create the file /usr/local/etc/nut/upssched.conf with the following contents: ======cut here========== CMDSCRIPT /usr/bin/true PIPEFN /var/db/nut/upssched/upssched.pipe LOCKFN /var/db/nut/upssched/upssched.lock AT ONBATT * START-TIMER mytimer 5 ======cut here========== 5. Simulate upsched being called by upsmon by executing the command: sh -c 'UPSNAME=test NOTIFYTYPE=ONBATT /usr/local/sbin/upssched "UPS on battery"' 6. Observe that upssched hangs for a while trying to start the daemon, and then SEGV's 7. Execute the command tail /var/log/messages 8. Observe the log messages indicating that repeated attempts to fork the daemon resulted in SEGV. 9. Tidy up after ourselves: rm /var/db/nut/upssched/*
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear Roy, thanks for reporting this issue. Can you verify that the procedure you mentioned in the PR works correct for nut-2.2.0 or earlier and is not working since your upgrade to 2.4.0? Any additional informations are much appreciated. Thanks a lot and kind regards Joerg - -- The beginning is the most important part of the work. -Plato -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iD8DBQFJnU4WSPOsGF+KA+MRAkKgAJ9ADnJo7mFAIoYX8j1/M+39qdv5uACfXVOc oL096UFSDU2Pq2zTAnfx2dU= =pquq -----END PGP SIGNATURE-----
Joerg> thanks for reporting this issue. Can you verify that the Joerg> procedure you mentioned in the PR works correct for Joerg> nut-2.2.0 or earlier and is not working since your upgrade Joerg> to 2.4.0? I tested the above procedure on a 6.3-RELEASE-p3 machine running nut-2.0.4 and it completed without error. And on that machine I also replaced the call to /usr/bin/true with a script that logs something and verified that the script really did get run 5 seconds after issuing the upssched command. So I'm reasonably confident that the above test procedure is valid. -roy
Responsible Changed From-To: freebsd-ports-bugs->beat I'll take it.
State Changed From-To: open->closed Fixed by maintainer with ports/131885. Please update your portstree and update sysutils/nut. Thanks for reporting this problem!