Bug 1862376

Summary: Removal of webcam causes hot loop in /usr/bin/pipewire-media-session
Product: [Fedora] Fedora Reporter: Ralf Ertzinger <redhat-bugzilla>
Component: pipewireAssignee: Wim Taymans <wtaymans>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: brunovern.a, wtaymans
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-31 10:56:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ralf Ertzinger 2020-07-31 09:41:31 UTC
Description of problem:
Unplugging a webcam (046d:085c Logitech, Inc. C922 Pro Stream Webcam) causes the "/usr/bin/pipewire-media-session -d bluez5" process to go into a hot loop trying to read from the sound control associated with the camera (the camera has a microphone):

strace:
```
[...]
read(19, 0x7ffd068ca9d0, 72)            = -1 ENODEV (No such device)
epoll_wait(3, [{EPOLLERR|EPOLLNVAL, {u32=2591091504, u64=94169749056304}}], 32, -1) = 1
read(19, 0x7ffd068ca9d0, 72)            = -1 ENODEV (No such device)
epoll_wait(3, [{EPOLLERR|EPOLLNVAL, {u32=2591091504, u64=94169749056304}}], 32, -1) = 1
read(19, 0x7ffd068ca9d0, 72)            = -1 ENODEV (No such device)
epoll_wait(3, [{EPOLLERR|EPOLLNVAL, {u32=2591091504, u64=94169749056304}}], 32, -1) = 1
read(19, 0x7ffd068ca9d0, 72)            = -1 ENODEV (No such device)
epoll_wait(3, [{EPOLLERR|EPOLLNVAL, {u32=2591091504, u64=94169749056304}}], 32, -1) = 1
read(19, 0x7ffd068ca9d0, 72)            = -1 ENODEV (No such device)
epoll_wait(3, [{EPOLLERR|EPOLLNVAL, {u32=2591091504, u64=94169749056304}}], 32, -1) = 1
read(19, 0x7ffd068ca9d0, 72)            = -1 ENODEV (No such device)
epoll_wait(3, [{EPOLLERR|EPOLLNVAL, {u32=2591091504, u64=94169749056304}}], 32, -1) = 1
[...]
```

lsof:
```
[...]
pipewire- 17308  sun   17u     unix 0x00000000e80db616      0t0   383573 type=STREAM
pipewire- 17308  sun   18u     unix 0x00000000368e9d3c      0t0   383574 type=STREAM
pipewire- 17308  sun   19u      CHR             116,13      0t0   299728 /dev/snd/controlC1 (deleted)
pipewire- 17308  sun   20u     unix 0x00000000c8abce84      0t0   383566 type=STREAM
pipewire- 17308  sun   21u     unix 0x00000000c8abce84      0t0   383566 type=STREAM
[...]
```

both /usr/bin/pipewire and /usr/bin/pipewire-media-session need to be killed to recover.

Version-Release number of selected component (if applicable):
pipewire-0.3.7-2.fc32.x86_64

How reproducible:
Always

Comment 1 Wim Taymans 2020-07-31 10:56:10 UTC

*** This bug has been marked as a duplicate of bug 1861733 ***