Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: sys/uvideo: avoid using queue.h
To:
Marcus Glocker <marcus@nazgul.ch>
Cc:
tech@openbsd.org
Date:
Sun, 09 Mar 2025 15:17:38 +0100

Download raw body.

Thread
  • Kirill A. Korinsky:

    sys/uvideo: avoid using queue.h

  • On Sun, 09 Mar 2025 08:05:53 +0100,
    Marcus Glocker <marcus@nazgul.ch> wrote:
    > 
    > Is this arm64 specific or do you see this also on amd64?
    
    I've used two machines to test it, and arm64 has many more cores and much
    faster than amd64, but the last one has GPU.
    
    1. I was able to reproduce the infinity loop inside uvideo_vs_free_frame on
    amd64 by detaching this webcam only once over few dozen attempts. I stop
    count after 25. It was reproduced only by ffmpeg into null. It was on the
    kernel without my or your diff. With your and my diff I wasn't able. Thus,
    it was 3840x2160 60fps stream only.
    
    2. I was able to reproduce the infinity loop on arm64 with your diff, with
    probability 1 out of 5 attempts, and I wasn't able to reproduce it with my
    diff because here no queue.
    
    3. Each attempt to kill ffplay (by Ctr-C or from pkill in console) leads to
    frozen machine on arm64, and I was able to get amd64 frozen also, but only
    one or two times. If I kill it from console, I see that kernel prints:
    
            video1 detached
            uvideo1 detached
    
    before it is completley frozen. On both machines. Here no ddb, no reply to
    ping, bo reaction to anything. I had tried to wait few minutes... Nothing.
    
    Thus, this had happened with both diff on arm64, and I with my diff on
    amd64.
    
    4. If I enable debug, chances to reproduce issues decreases, and if I wasn't
    able reproduce issue with enabled debug and increased debug level on any of
    machines.
    
    5. In the case of amd64 I need to use 60 fps stream, and 30 fps is enough
    for arm64. But the tricky part: I do have another 4k webcam which produces
    30 fps stream as well, and I can't reproduce any isse by it.
    
    But, frankly, I hadn't tried so hard.
    
    6. ffplay had frozen picture on 60 fps stream almost instantly, but with my
    diff it works, with lags for like 10 seconds before it is fronzen.
    
    Here, if I add -noframedrop, it works as expected but with delay, and it
    just works (I mean 60 fps stream) on mplayer.
    
    -- 
    wbr, Kirill
    
    
  • Kirill A. Korinsky:

    sys/uvideo: avoid using queue.h