pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   hgutch
Date:           Sun Dec  8 23:08:15 UTC 2024

Modified Files:
        pkgsrc/devel/libowfat: Makefile distinfo
        pkgsrc/doc: CHANGES-2024
        pkgsrc/mail/qsmtp: Makefile
        pkgsrc/net/opentracker: Makefile
Added Files:
        pkgsrc/devel/libowfat/patches: patch-io_io__waituntil2.c

Log Message:
Fix kqueue use in libowfat.

Without this, libowfat does not handle kqueue read/write events on
file descriptors correctly.  A typical result of this is a consumer
spinning at 100% CPU instead of blocking until data is available for
reading.

Reported upstream and fixed there in CVS, so hopefully this patch
can be removed with the next release.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/devel/libowfat/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/devel/libowfat/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/libowfat/patches/patch-io_io__waituntil2.c
cvs rdiff -u -r1.7495 -r1.7496 pkgsrc/doc/CHANGES-2024
cvs rdiff -u -r1.10 -r1.11 pkgsrc/mail/qsmtp/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/net/opentracker/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/libowfat/Makefile
diff -u pkgsrc/devel/libowfat/Makefile:1.13 pkgsrc/devel/libowfat/Makefile:1.14
--- pkgsrc/devel/libowfat/Makefile:1.13 Sat Nov  9 17:05:46 2024
+++ pkgsrc/devel/libowfat/Makefile      Sun Dec  8 23:08:15 2024
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.13 2024/11/09 17:05:46 schmonz Exp $
+# $NetBSD: Makefile,v 1.14 2024/12/08 23:08:15 hgutch Exp $
 
 DISTNAME=      libowfat-0.34
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${HOMEPAGE}
 EXTRACT_SUFX=  .tar.xz

Index: pkgsrc/devel/libowfat/distinfo
diff -u pkgsrc/devel/libowfat/distinfo:1.15 pkgsrc/devel/libowfat/distinfo:1.16
--- pkgsrc/devel/libowfat/distinfo:1.15 Sat Nov  9 17:05:46 2024
+++ pkgsrc/devel/libowfat/distinfo      Sun Dec  8 23:08:15 2024
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.15 2024/11/09 17:05:46 schmonz Exp $
+$NetBSD: distinfo,v 1.16 2024/12/08 23:08:15 hgutch Exp $
 
 BLAKE2s (libowfat-0.34.tar.xz) = 033749d597626b35b39d759bc5e019331cee8d5eba823f0a95d12ecd41fcc053
 SHA512 (libowfat-0.34.tar.xz) = 5be668f78d86c8591c8f2b8067f8ce41a38891b977ab239ee64602c37232aa85c396e07fedd378be12c6730080ca2ada08964cebd6e844191fce0c8cff57bb47
 Size (libowfat-0.34.tar.xz) = 223960 bytes
 SHA1 (patch-GNUmakefile) = 5f7cbfd30e151957b18439bb3bacabe17c292d47
 SHA1 (patch-io_io__sendfile.c) = b275fadf236220207cd90e2a44f739d91656b253
+SHA1 (patch-io_io__waituntil2.c) = 6648ee2cb43feac30ee71ca187bb1dc78905ec78
 SHA1 (patch-mmap_mmap__readat.c) = bd0c8bb8a9c74e51ad55153ad9e855fb64be6f2e
 SHA1 (patch-scan_scan__httpdate.c) = e6e4ddfc82796ac57cc2962d387b96534f8c445b
 SHA1 (patch-scan_scan__iso8601.c) = 97690d6dd13f60548a29b3b175dfa1aaf6d0c48e

Index: pkgsrc/doc/CHANGES-2024
diff -u pkgsrc/doc/CHANGES-2024:1.7495 pkgsrc/doc/CHANGES-2024:1.7496
--- pkgsrc/doc/CHANGES-2024:1.7495      Sun Dec  8 22:39:24 2024
+++ pkgsrc/doc/CHANGES-2024     Sun Dec  8 23:08:15 2024
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-2024,v 1.7495 2024/12/08 22:39:24 wiz Exp $
+$NetBSD: CHANGES-2024,v 1.7496 2024/12/08 23:08:15 hgutch Exp $
 
 Changes to the packages collection and infrastructure in 2024:
 
@@ -11280,3 +11280,4 @@ Changes to the packages collection and i
        Updated editors/tp-note to 1.24.11 [pin 2024-12-08]
        Updated sysutils/yazi to 0.4.0 [pin 2024-12-08]
        Updated devel/py-configobj to 5.0.9nb1 [wiz 2024-12-08]
+       Updated devel/libowfat to 0.34nb1 [hgutch 2024-12-08]

Index: pkgsrc/mail/qsmtp/Makefile
diff -u pkgsrc/mail/qsmtp/Makefile:1.10 pkgsrc/mail/qsmtp/Makefile:1.11
--- pkgsrc/mail/qsmtp/Makefile:1.10     Sun Aug 25 06:18:58 2024
+++ pkgsrc/mail/qsmtp/Makefile  Sun Dec  8 23:08:15 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2024/08/25 06:18:58 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2024/12/08 23:08:15 hgutch Exp $
 
 DISTNAME=              Qsmtp-0.39
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            mail
 MASTER_SITES=          ${HOMEPAGE}
 EXTRACT_SUFX=          .tar.xz

Index: pkgsrc/net/opentracker/Makefile
diff -u pkgsrc/net/opentracker/Makefile:1.4 pkgsrc/net/opentracker/Makefile:1.5
--- pkgsrc/net/opentracker/Makefile:1.4 Fri May 14 12:28:10 2021
+++ pkgsrc/net/opentracker/Makefile     Sun Dec  8 23:08:15 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2021/05/14 12:28:10 nia Exp $
+# $NetBSD: Makefile,v 1.5 2024/12/08 23:08:15 hgutch Exp $
 
 DISTNAME=      opentracker-0.0.20180526
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    net
 MASTER_SITES=  # https://erdgeist.org/gitweb/opentracker/
 

Added files:

Index: pkgsrc/devel/libowfat/patches/patch-io_io__waituntil2.c
diff -u /dev/null pkgsrc/devel/libowfat/patches/patch-io_io__waituntil2.c:1.1
--- /dev/null   Sun Dec  8 23:08:15 2024
+++ pkgsrc/devel/libowfat/patches/patch-io_io__waituntil2.c     Sun Dec  8 23:08:15 2024
@@ -0,0 +1,43 @@
+$NetBSD: patch-io_io__waituntil2.c,v 1.1 2024/12/08 23:08:15 hgutch Exp $
+
+- EVFILT_READ/EVFILT_WRITE are magic numbers, not bit flags.  Without
+  this, the EVFILT_READ test always fails on NetBSD (and always
+  succeeds on FreeBSD/OpenBSD) and as a result, calling io_wait()
+  always immediately returns (instead of blocking) even if there is no
+  data to be read.  In practice this means that programs using this
+  will most likely spin at 100% CPU.
+- Fix test for EVFILT_READ instead of EVFILT_WRITE.
+- Fix the test for the whole "e->canread" optimization;  this did not
+  lead to wrong behavior, but this invalidates the whole optimization
+  of libowfat not asking the kernel for additional data to read until
+  the consumer has finally read from this descriptor.
+
+--- io/io_waituntil2.c.orig    2022-03-11 12:07:54.000000000 +0000
++++ io/io_waituntil2.c
+@@ -184,7 +184,7 @@ int64 io_waituntil2(int64 milliseconds) 
+ 
+       /* if we think we can not read, but the kernel tells us that we
+        * can, put this fd in the relevant data structures */
+-      if (!e->canread && (y[i].events&(EPOLLIN|EPOLLPRI|EPOLLRDNORM|EPOLLRDBAND))) {
++      if (y[i].events&(EPOLLIN|EPOLLPRI|EPOLLRDNORM|EPOLLRDBAND)) {
+         if (e->canread) {
+           newevents &= ~EPOLLIN;
+         } else {
+@@ -294,7 +294,7 @@ int64 io_waituntil2(int64 milliseconds) 
+ 
+       /* if we think we can not read, but the kernel tells us that we
+        * can, put this fd in the relevant data structures */
+-      if (!e->canread && (y[n].filter&EVFILT_WRITE)) {
++      if (y[n].filter == EVFILT_READ) {
+         if (e->canread) {
+           newevents &= ~POLLIN;
+           EV_SET(kev+nkev, y[n].ident, EVFILT_READ, EV_DELETE, 0, 0, 0); ++nkev;
+@@ -308,7 +308,7 @@ int64 io_waituntil2(int64 milliseconds) 
+       }
+ 
+       /* if the kernel says the fd is writable, ... */
+-      if (y[i].filter&EVFILT_WRITE) {
++      if (y[i].filter == EVFILT_WRITE) {
+         /* Usually, if the kernel says a descriptor is writable, we
+          * note it and do not tell the kernel not to tell us again.
+          * The idea is that once we notify the caller that the fd is



Home | Main Index | Thread Index | Old Index