use-after-close: fstat() called after close() on /dev/media0 fd, causes readlink /sys/dev/char/0:0 ENOENT
- Dominant language
- C++
- Stars
- 10
- Forks
- 26
- Avg merge
- 11h 47m
- Merged PRs (30d)
- 1
Description
This is the strace
> $ 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
Contributor guide
Research direction
No source file or test is named. Start by reproducing with the supplied strace command and inspect the /dev/media0 file-descriptor lifecycle in the camera HAL. Done means the reported fstat() after close() sequence no longer occurs and the readlink /sys/dev/char/0:0 ENOENT failure is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100