>Synopsis:      kqueue fails to register VNODE events on ext2
>Category:      kernel
>Environment:
        System      : OpenBSD 5.3
        Details     : OpenBSD 5.3 (GENERIC) #50: Tue Mar 12 18:35:23 MDT 2013
                         
[email protected]:/usr/src/sys/arch/i386/compile/GENERIC

        Architecture: OpenBSD.i386
        Machine     : i386
>Description:
        kqueue fails to register VNODE events if the file descriptor provided
        was opened on an ext2 file system. kevent(2) returns "Invalid argument"

>How-To-Repeat:

        the following program runs without error, but if I change `/tmp/file`
        [ffs] to `/home/eradman/file` [ext2] kevent() returns -1

        #include <sys/param.h>
        #include <sys/event.h>
        #include <err.h>
        #include <errno.h>
        #include <fcntl.h>

        int main() {
                int kq; 
                int fd; 
                struct kevent evSet;

                kq = kqueue(); 

                if ((fd = open("/tmp/file", O_RDONLY)) == -1) 
                    err(errno, "cannot open file");

                EV_SET(&evSet, fd, EVFILT_VNODE, EV_ADD, NOTE_DELETE | 
NOTE_RENAME, 0, NULL);
                if (kevent(kq, &evSet, 1, NULL, 0, NULL) == -1) 
                    err(1, "failed to register VNODE event");

                return 0;
        }


>Fix:
        Unknown



dmesg:
OpenBSD 5.3 (GENERIC) #50: Tue Mar 12 18:35:23 MDT 2013
    [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Mobile Intel(R) Pentium(R) 4 - M CPU 2.40GHz ("GenuineIntel" 686-class) 
2.40 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,CNXT-ID,xTPR,PERF
real mem  = 535818240 (510MB)
avail mem = 516071424 (492MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 07/17/03, BIOS32 rev. 0 @ 0xfd7e0, SMBIOS 
rev. 2.31 @ 0xe0010 (48 entries)
bios0: vendor IBM version "1IET67WW (2.06 )" date 07/17/2003
bios0: IBM 2366QU5
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA BOOT
acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) PCI0(S4) PCI1(S4) DOCK(S4) 
USB0(S3) USB1(S3) USB2(S3) AC97(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (PCI1)
acpicpu0 at acpi0: C3, C2, FVS, 2400, 1200 MHz
acpipwrres0 at acpi0: PUBS
acpitz0 at acpi0: critical temperature is 87 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "IBM-02K7037" serial   469 type LION oem 
"Panasonic"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: DOCK not docked (0)
bios0: ROM list: 0xc0000/0x10000 0xdc000/0x4000! 0xe0000/0x10000
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82845 Host" rev 0x04
intelagp0 at pchb0
agp0 at intelagp0: aperture at 0xe0000000, size 0x4000000
ppb0 at pci0 dev 1 function 0 "Intel 82845 AGP" rev 0x04
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Radeon Mobility M7" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: irq 11
drm0 at radeondrm0
uhci0 at pci0 dev 29 function 0 "Intel 82801CA/CAM USB" rev 0x02: irq 11
uhci1 at pci0 dev 29 function 1 "Intel 82801CA/CAM USB" rev 0x02: irq 11
uhci2 at pci0 dev 29 function 2 "Intel 82801CA/CAM USB" rev 0x02: irq 11
ppb1 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x42
pci2 at ppb1 bus 2
2:0:0: mem address conflict 0x50000000/0x1000
2:0:1: mem address conflict 0x51000000/0x1000
cbb0 at pci2 dev 0 function 0 "TI PCI1520 CardBus" rev 0x01: irq 11
cbb1 at pci2 dev 0 function 1 "TI PCI1520 CardBus" rev 0x01: irq 11
ath0 at pci2 dev 2 function 0 "Atheros AR5212 (IBM MiniPCI)" rev 0x01: irq 11
ath0: AR5213A 5.9 phy 4.3 rf5112a 3.6, WOR01W, address 00:16:cf:43:4d:09
fxp0 at pci2 dev 8 function 0 "Intel PRO/100 VE" rev 0x42, i82562: irq 11, 
address 00:0d:60:39:a8:7b
inphy0 at fxp0 phy 1: i82562ET 10/100 PHY, rev. 0
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 3 device 0 cacheline 0x8, lattimer 0xb0
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 6 device 0 cacheline 0x8, lattimer 0xb0
pcmcia1 at cardslot1
ichpcib0 at pci0 dev 31 function 0 "Intel 82801CAM LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801CAM IDE" rev 0x02: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <HITACHI_DK23FB-60B>
wd0: 16-sector PIO, LBA, 57231MB, 117210240 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
wd1 at pciide0 channel 1 drive 0: <Hitachi HTS541660J9AT00>
wd1: 16-sector PIO, LBA48, 57231MB, 117210240 sectors
wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 "Intel 82801CA/CAM SMBus" rev 0x02: irq 11
iic0 at ichiic0
auich0 at pci0 dev 31 function 5 "Intel 82801CA/CAM AC97" rev 0x02: irq 11, 
ICH3 AC97
ac97: codec id 0x41445348 (Analog Devices AD1881A)
ac97: codec features headphone, Analog Devices Phat Stereo
audio0 at auich0
usb0 at uhci0: USB revision 1.0
uhub0 at usb0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb1 at uhci1: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci2: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics touchpad, firmware 5.9
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt2 at isa0 port 0x3bc/4: polled
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
mtrr: Pentium Pro MTRR support
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
scsibus1 at softraid0: 256 targets
dc0 at cardbus1 dev 0 function 0 "Xircom X3201-3 (21143)" rev 0x03: irq 11, 
address 00:10:a4:7a:9a:ad
tqphy0 at dc0 phy 0: 78Q2120 10/100 PHY, rev. 11
com3 at cardbus1 dev 0 function 1 "Xircom 56k Modem" rev 0x03: irq 11: ti16750, 
64 byte fifo
com3: probed fifo depth: 0 bytes
root on wd0a (bc8d859b39b52c09.a) swap on wd0b dump on wd0b
WARNING: / was not properly unmounted

usbdevs:
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), 
Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), 
Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), 
Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered

Reply via email to