Public bug reported:

Claude suggested to send this bug report with also those informations:

$ sudo dmidecode -s system-product-name
Dell XPS 13 9350

$ uname -r
6.17.0-1012-oem

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.4 LTS
Release: 24.04
Codename: noble

$ dpkg -l libcamhal0 libcamhal-ipu7x gstreamer1.0-icamera | awk 'NR>5{print 
$2,$3}'
gstreamer1.0-icamera 0git202509260937.4fb31dbubuntu24.04.5
libcamhal-ipu7x 0git202510170946.ec24db2-1ubuntu24.04.1
libcamhal0 0git202506270118.c933525ubuntu24.04.5

$ sudo dmesg | grep -iE "ipu7|ovti|sensor|camera"
[ 2.859223] hid-generic 001F:8087:0AC2.0005: hidraw4: SENSOR HUB HID v2.00 
Device [hid-ishtp 8087:0AC2] on
[ 2.880248] hid-generic 001F:8087:0AC2.0006: hidraw5: SENSOR HUB HID v2.00 
Device [hid-ishtp 8087:0AC2] on
[ 2.888787] hid-generic 001F:8087:0AC2.0007: hidraw6: SENSOR HUB HID v2.00 
Device [hid-ishtp 8087:0AC2] on
[ 3.150927] int3472-discrete INT3472:00: GPIO type 0x02 unknown; the sensor may 
not work
[ 3.313970] intel-ipu7 0000:00:05.0: enabling device (0000 -> 0002)
[ 3.313980] intel-ipu7 0000:00:05.0: Device 0x645d (rev: 0x4)
[ 3.313981] intel-ipu7 0000:00:05.0: IPU7 PCI BAR0 base 0x0000003012000000 BAR2 
base 0x000000301537a000
[ 3.314014] intel-ipu7 0000:00:05.0: IPU7 PCI BAR0 mapped at 000000004ac8b218
[ 3.314085] intel-ipu7 0000:00:05.0: IPU7 SKU 0 in secure mode mask 0x0
[ 3.315397] intel-ipu7 0000:00:05.0: firmware cpd file: intel/ipu/ipu7_fw.bin
[ 3.316477] intel-ipu7 0000:00:05.0: FW binary0 info:
[ 3.316479] intel-ipu7 0000:00:05.0: Name: psys
[ 3.316480] intel-ipu7 0000:00:05.0: Version: 1.1.9.240627135220
[ 3.316481] intel-ipu7 0000:00:05.0: Timestamp: build_id:331942702
[ 3.316481] intel-ipu7 0000:00:05.0: Commit: commit_id:d84f5c35
[ 3.316482] intel-ipu7 0000:00:05.0: FW binary1 info:
[ 3.316482] intel-ipu7 0000:00:05.0: Name: isys
[ 3.316483] intel-ipu7 0000:00:05.0: Version: 1.1.9.240627135318
[ 3.316483] intel-ipu7 0000:00:05.0: Timestamp: build_id:3823931988
[ 3.316484] intel-ipu7 0000:00:05.0: Commit: commit_id:d84f5c35
[ 3.333017] intel-ipu7 0000:00:05.0: Found supported sensor OVTI02C1:00
[ 3.333087] intel-ipu7 0000:00:05.0: Connected 1 cameras
[ 3.334550] intel-ipu7 0000:00:05.0: Sending BOOT_LOAD to CSE
[ 3.398483] intel-ipu7 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[ 3.428863] intel-ipu7 0000:00:05.0: CSE authenticate_run done
[ 3.468259] ov02c10 i2c-OVTI02C1:00: failed to find sensor: -6
[ 4.201899] hid-sensor-hub 001F:8087:0AC2.0005: hidraw4: SENSOR HUB HID v2.00 
Device [hid-ishtp 8087:0AC2] on
[ 4.253780] hid-sensor-hub 001F:8087:0AC2.0006: hidraw5: SENSOR HUB HID v2.00 
Device [hid-ishtp 8087:0AC2] on
[ 4.268600] hid-sensor-hub 001F:8087:0AC2.0007: hidraw6: SENSOR HUB HID v2.00 
Device [hid-ishtp 8087:0AC2] on
[ 4.686727] intel_ipu7_psys.psys intel_ipu7.psys.40: IPU psys probe done.

Other data:

Recognized request to switch language to EnglishThe user wants the key
points summary in English.FattoHere are the key findings to include in
the bug report:

The device /dev/media0 is opened correctly (openat = 4, openat = 5)
MEDIA_IOC_DEVICE_INFO succeeds on both file descriptors
Both file descriptors are closed before fstat() is called
fstat(4) after close(4) reads data from a recycled fd → st_rdev=0
The HAL then constructs the path /sys/dev/char/0:0 instead of 
/sys/dev/char/237:0
/sys/dev/char/237:0 exists and correctly points to the IPU7 PCI device
As a secondary error: shmget(0x43414d, 8192, 0640) = EACCES
The sensor OVTI02C1 is correctly detected by the kernel driver (intel-ipu7 
0000:00:05.0: Found supported sensor - OVTI02C1:00) but never reached by the 
HAL due to the above failure
No known Launchpad bug exists for this issue at the time of reporting
System info:

CPU: Intel Core Ultra 9 288V (Lunar Lake)
Kernel: 6.17.0-1012-oem
OS: Ubuntu 24.04 LTS
Packages: libcamhal0, libcamhal-ipu7x, gstreamer1.0-icamera


$ strace -e trace=openat,close,fstat gst-launch-1.0 icamerasrc ! autovideosink 
2>&1 | grep -E "media0|close(4)|close(5)|fstat(4|fstat(5" | head -20
fstat(4, {st_mode=S_IFDIR|0755, st_size=100, ...}) = 0
close(4) = 0
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(4) = 0
fstat(4, {st_mode=S_IFDIR|0755, st_size=6580, ...}) = 0
close(4) = 0
close(4) = 0
openat(AT_FDCWD, "/dev/media0", O_RDWR) = 4
openat(AT_FDCWD, "/dev/media0", O_RDWR) = 5
close(5) = 0
close(4) = 0
close(4) = 0
close(4) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=31376, ...}) = 0
close(4) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=451152, ...}) = 0
close(4) = 0

** Affects: ubuntu
     Importance: Undecided
         Status: New

** Attachment added: "strace_camhal.txt"
   
https://bugs.launchpad.net/bugs/2143130/+attachment/5949827/+files/strace_camhal.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2143130

Title:
  use-after-close: fstat() called after close() on /dev/media0 fd,
  causes readlink /sys/dev/char/0:0 ENOENT #36

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/2143130/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to