lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <SLXP216MB11483F38D23A5BDFC47068EAED0EA@SLXP216MB1148.KORP216.PROD.OUTLOOK.COM>
Date: Wed, 10 Sep 2025 06:59:28 +0000
From: jackson.lee <jackson.lee@...psnmedia.com>
To: Nicolas Dufresne <nicolas.dufresne@...labora.com>, "mchehab@...nel.org"
	<mchehab@...nel.org>, "hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>,
	"bob.beckett@...labora.com" <bob.beckett@...labora.com>
CC: "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, lafley.kim
	<lafley.kim@...psnmedia.com>, "b-brnich@...com" <b-brnich@...com>,
	"hverkuil@...all.nl" <hverkuil@...all.nl>, Nas Chung
	<nas.chung@...psnmedia.com>
Subject: RE: [PATCH v3 0/4] Performance improvement of decoder

Hi Nicolas

> -----Original Message-----
> From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
> Sent: Wednesday, September 10, 2025 6:34 AM
> To: jackson.lee <jackson.lee@...psnmedia.com>; mchehab@...nel.org;
> hverkuil-cisco@...all.nl; bob.beckett@...labora.com
> Cc: linux-media@...r.kernel.org; linux-kernel@...r.kernel.org; lafley.kim
> <lafley.kim@...psnmedia.com>; b-brnich@...com; hverkuil@...all.nl; Nas
> Chung <nas.chung@...psnmedia.com>
> Subject: Re: [PATCH v3 0/4] Performance improvement of decoder
> 
> Le mardi 09 septembre 2025 à 06:16 +0000, jackson.lee a écrit :
> > > I tried and reproduce your results. I've used an ISOMP4 file,
> > > nothing big, 720p 10min video. After 30s of seeking back and forth
> > > I've got a deadlock, with the following kernel log:
> > >
> > > vdec 4210000.video-codec: wave5_vpu_firmware_command_queue_error_check:
> > > still running: 0x1000
> > >
> > > I don't know if its worse then before, but the bug is severe enough
> > > to be concern. To reproduce easily, I pick a longer video, seek
> > > forward close to the end, and then seek back (gst-play so smaller
> > > steps back) very quickly till it reaches position 0, and repeat.
> > >
> > > This happened without resolution change happening concurrent to
> > > seeks, just a flat, single resolution video. Once I do the same test
> > > with an agressive DRC in place, I hit kernel crash. I will share in
> > > private email the DRC H.264 sample I'm using, and how to make it
> > > bigger so its manually seekable.
> > >
> >
> > I tried to reproduce this problem, but I am seeing a different
> phenomenon.
> > Can you let me know your Gstreamer version you are using ?
> 
> GStreamer 1.26.5. I retested today and did not reproduce the crash this
> time, but did get the "still running" message and stall (recoverable
> though). You have to try really hard, it might be worth automating a tests,
> so it can be more agressive.
> 

I have reproduced the stall problem, I can see it with the latest Gstreamer version.
The root cause is we checked an incorrect return value while flushing, so in spite of not finished flushing, the checking loop if the flushing was finished was exited.
When stop streaming was called and the instance queue count was 1,  the checking function put infinite loop, so the stall problem happened.

The below patch should be needed.

diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c
index edbe69540ef1..2e0128cd0e4d 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c
@@ -52,6 +52,7 @@ int wave5_vpu_init_with_bitcode(struct device *dev, u8 *bitcode, size_t size)
 int wave5_vpu_flush_instance(struct vpu_instance *inst)
 {
        int ret = 0;
+       int mutex_ret = 0;
        int retry = 0;

        ret = mutex_lock_interruptible(&inst->dev->hw_lock);
@@ -80,9 +81,9 @@ int wave5_vpu_flush_instance(struct vpu_instance *inst)

                        mutex_unlock(&inst->dev->hw_lock);
                        wave5_vpu_dec_get_output_info(inst, &dec_info);
-                       ret = mutex_lock_interruptible(&inst->dev->hw_lock);
-                       if (ret)
-                               return ret;
+                       mutex_ret = mutex_lock_interruptible(&inst->dev->hw_lock);
+                       if (mutex_ret)
+                               return mutex_ret;
                        if (dec_info.index_frame_display > 0)
                                wave5_vpu_dec_set_disp_flag(inst, dec_info.index_frame_display);
                }

Thanks
Jackson




> Nicolas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ