On Thu, Mar 15, 2018 at 03:27:47PM +0100, Martin Pieuchot wrote:
> On 05/03/18(Mon) 21:26, Hiltjo Posthuma wrote:
> > > [...]
> > > I tried your patch on a source build of about 25 februari on amd64. I
> > > still
> > > notice mpv hanging when I try to close it or when the video ends.
>
> Thanks for reporting. This is a different issue.
>
> > > Let me know how/if I can help you further with testing.
>
> Could you tell me how to reproduce the problem?
>
> > Updated to source of ~4 March:
> >
> > OpenBSD ren.laptop 6.3 GENERIC.MP#0 amd64
> >
> > When I do a backtrace on the hanged mpv I get:
> >
> >
> > $ gdb mpv pid
> > $ bt
>
> Could you get the backtrace of all the threads?
>
> Something like: 'thr apply all bt'
>
> > #0 _thread_sys___thrsleep () at -:3
> > #1 0x0000117420965ea4 in _sem_wait (sem=0x1174219ffc40, tryonly=564132932,
> > abstime=0x0,
> > delayed_cancel=0x11738fa402f0) at
> > /usr/src/lib/librthread/rthread_sem.c:74
> > #2 0x00001174209650bf in pthread_join (thread=0x1174219ffc40, retval=0x0)
> > at /usr/src/lib/librthread/rthread.c:304
> > #3 0x00001173ec0a9d5b in SDL_WaitThread_REAL () from
> > /usr/local/lib/libSDL2.so.0.4
> > #4 0x00001173ec05b64a in close_audio_device () from
> > /usr/local/lib/libSDL2.so.0.4
> > #5 0x00001173ec05a1e2 in SDL_AudioQuit_REAL () from
> > /usr/local/lib/libSDL2.so.0.4
> > #6 0x00001173ec05703b in SDL_QuitSubSystem_REAL () from
> > /usr/local/lib/libSDL2.so.0.4
> > #7 0x000011713bf135e9 in ao_uninit (ao=0x11740b004740) at
> > ../audio/out/ao.c:336
> > #8 0x000011713bf561fe in uninit_audio_out (mpctx=0x1173a2d8b840) at
> > ../player/audio.c:280
> > #9 0x000011713bf6efd2 in mp_destroy (mpctx=0x1173a2d8b840) at
> > ../player/main.c:166
> > #10 0x000011713bf6fbe1 in mpv_main (argc=Variable "argc" is not available.
> > ) at ../player/main.c:243
> > #11 0x000011713bf03156 in _start () from /usr/local/bin/mpv
> > #12 0x0000000000000000 in ?? ()
> > (gdb)
>
Hi,
I rebuild base and xenocara from source yesterday and rebuild and reinstalled
mpv.
The hang always happens after a video ends. I've not had any issues with other
programs I think. When the hang happens mpv doesn't response to SIGTERM,
so SIGKILL is needed.
Below is the backtrace with "thr apply all bt" after attaching to mpv:
Thread 5 (thread 474306):
#0 futex () at -:3
#1 0x00001ac8e7dd8957 in _rthread_mutex_timedlock (mutexp=Variable "mutexp" is
not available.
) at atomic.h:94
#2 0x00001ac85c492eae in SDL_LockMutex_REAL () from
/usr/local/lib/libSDL2.so.0.5
#3 0x00001ac85c3d4f01 in SDL_RunAudio () from /usr/local/lib/libSDL2.so.0.5
#4 0x00001ac85c42141d in SDL_RunThread () from /usr/local/lib/libSDL2.so.0.5
#5 0x00001ac85c492929 in RunThread () from /usr/local/lib/libSDL2.so.0.5
#6 0x00001ac850f6466e in _rthread_start (v=Variable "v" is not available.
) at /usr/src/lib/librthread/rthread.c:96
#7 0x00001ac8e7dd6b7b in __tfork_thread ()
at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75
#8 0x0000000000000000 in ?? ()
Thread 4 (thread 223700):
#0 _thread_sys___thrsleep () at -:3
#1 0x00001ac850f64de4 in _sem_wait (sem=0x1ac8fb647e70, tryonly=-77300108,
abstime=0x0,
delayed_cancel=0x1ac8ea182308) at /usr/src/lib/librthread/rthread_sem.c:74
#2 0x00001ac850f650e6 in sem_wait (semp=Variable "semp" is not available.
) at /usr/src/lib/librthread/rthread_sem.c:251
#3 0x00001ac61cad31a8 in screensaver_thread (arg=0x1ac8a553b840)
at ../video/out/x11_common.c:512
#4 0x00001ac850f6466e in _rthread_start (v=Variable "v" is not available.
) at /usr/src/lib/librthread/rthread.c:96
#5 0x00001ac8e7dd6b7b in __tfork_thread ()
at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75
#6 0x0000000000000000 in ?? ()
Thread 3 (thread 563920):
#0 _thread_sys_poll () at -:3
#1 0x00001ac8e7dc7f64 in _libc_poll_cancel (fds=Variable "fds" is not
available.
) at /usr/src/lib/libc/sys/w_poll.c:27
#2 0x00001ac61cad842f in vo_x11_wait_events (vo=Variable "vo" is not available.
) at ../video/out/x11_common.c:1943
#3 0x00001ac61caca538 in vo_thread (ptr=Variable "ptr" is not available.
) at ../video/out/vo.c:632
#4 0x00001ac850f6466e in _rthread_start (v=Variable "v" is not available.
) at /usr/src/lib/librthread/rthread.c:96
#5 0x00001ac8e7dd6b7b in __tfork_thread ()
at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75
#6 0x0000000000000000 in ?? ()
Thread 2 (thread 490011):
#0 _thread_sys_poll () at -:3
#1 0x00001ac8e7dc7f64 in _libc_poll_cancel (fds=Variable "fds" is not
available.
) at /usr/src/lib/libc/sys/w_poll.c:27
#2 0x00001ac61cad8b13 in terminal_thread (ptr=Variable "ptr" is not available.
) at ../osdep/terminal-unix.c:394
#3 0x00001ac850f6466e in _rthread_start (v=Variable "v" is not available.
) at /usr/src/lib/librthread/rthread.c:96
#4 0x00001ac8e7dd6b7b in __tfork_thread ()
at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75
#5 0x0000000000000000 in ?? ()
Thread 1 (thread 334254):
#0 _thread_sys___thrsleep () at -:3
#1 0x00001ac850f64de4 in _sem_wait (sem=0x1ac8ea183840, tryonly=-367511484,
abstime=0x0,
delayed_cancel=0x1ac8e804d860) at /usr/src/lib/librthread/rthread_sem.c:74
#2 0x00001ac850f6416f in pthread_join (thread=0x1ac8ea183840, retval=0x0)
at /usr/src/lib/librthread/rthread.c:304
#3 0x00001ac85c42175b in SDL_WaitThread_REAL () from
/usr/local/lib/libSDL2.so.0.5
#4 0x00001ac85c3d480a in close_audio_device () from
/usr/local/lib/libSDL2.so.0.5
#5 0x00001ac85c3d33a2 in SDL_AudioQuit_REAL () from
/usr/local/lib/libSDL2.so.0.5
#6 0x00001ac85c3d00fb in SDL_QuitSubSystem_REAL () from
/usr/local/lib/libSDL2.so.0.5
#7 0x00001ac61ca135e9 in ao_uninit (ao=0x1ac89542ba40) at ../audio/out/ao.c:336
#8 0x00001ac61ca561fe in uninit_audio_out (mpctx=0x1ac8a8bad840) at
../player/audio.c:280
#9 0x00001ac61ca6efd2 in mp_destroy (mpctx=0x1ac8a8bad840) at
../player/main.c:166
#10 0x00001ac61ca6fbe1 in mpv_main (argc=Variable "argc" is not available.
) at ../player/main.c:243
#11 0x00001ac61ca03156 in _start () from /usr/local/bin/mpv
#12 0x0000000000000000 in ?? ()
mpv.conf:
vo = opengl
cache = 32768
softvol-max = 1000
softvol = yes
sub-scale = 0.5
audio-channels = 2
# limit youtube quality:
ytdl-format=bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best
Below is also my dmesg (just in case):
OpenBSD 6.3 (GENERIC.MP) #0: Thu Mar 15 19:29:48 CET 2018
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4123258880 (3932MB)
avail mem = 3991851008 (3806MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe65a0 (50 entries)
bios0: vendor Acer version "V1.21" date 08/09/2012
bios0: Acer Aspire 5750
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP ASF! HPET APIC MCFG SLIC SSDT BOOT ASPT SSDT SSDT
acpi0: wakeup devices P0P1(S4) GLAN(S0) EHC1(S3) HDEF(S0) PXSX(S4) RP01(S4)
PXSX(S4) PXSX(S4) PXSX(S4) RP04(S4) PXSX(S4) PXSX(S4) PXSX(S4) PXSX(S4)
PEG0(S4) PEGP(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz, 2394.89 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
acpihpet0: recalibrated TSC frequency 2394552551 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz, 2394.55 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz, 2394.55 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz, 2394.55 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 2 (RP01)
acpiprt3 at acpi0: bus 3 (RP02)
acpiprt4 at acpi0: bus -1 (RP03)
acpiprt5 at acpi0: bus -1 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus -1 (RP07)
acpiprt9 at acpi0: bus -1 (RP08)
acpiprt10 at acpi0: bus -1 (PEG0)
acpiprt11 at acpi0: bus -1 (PEG1)
acpiprt12 at acpi0: bus -1 (PEG2)
acpiprt13 at acpi0: bus -1 (PEG3)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(350@104 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(350@104 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(350@104 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(350@104 mwait.1@0x20), C1(1000@1 mwait.1), PSS
"INT3F0D" at acpi0 not configured
"ETD0500" at acpi0 not configured
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 not present
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: LID0
acpibtn2 at acpi0: SLPB
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"INT340E" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD03
cpu0: Enhanced SpeedStep 2394 MHz: speeds: 2401, 2400, 2000, 1800, 1600, 1400,
1200, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1366x768, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x04: apic 0 int 16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
addr 1
azalia0 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x04: msi
azalia0: codecs: Realtek ALC269, Intel/0x2805, using Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb4: msi
pci1 at ppb0 bus 2
2:0:0: mem address conflict 0xfffff800/0x800
bge0 at pci1 dev 0 function 0 "Broadcom BCM57785" rev 0x10, BCM57765 B0
(0x57785100): msi, address b8:70:f4:e4:c3:7d
brgphy0 at bge0 phy 1: BCM57765 10/100/1000baseT PHY, rev. 4
sdhc0 at pci1 dev 0 function 1 "Broadcom SD Host Controller" rev 0x10: apic 0
int 17
sdhc0: SDHC 2.0, 50 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed, dma
vendor "Broadcom", unknown product 0x16be (class system subclass miscellaneous,
rev 0x10) at pci1 dev 0 function 2 not configured
vendor "Broadcom", unknown product 0x16bf (class system subclass miscellaneous,
rev 0x10) at pci1 dev 0 function 3 not configured
ppb1 at pci0 dev 28 function 1 "Intel 6 Series PCIE" rev 0xb4: msi
pci2 at ppb1 bus 3
athn0 at pci2 dev 0 function 0 "Atheros AR9287" rev 0x01: apic 0 int 17
athn0: AR9287 rev 2 (2T2R), ROM rev 4, address d0:df:9a:ee:56:c5
ehci1 at pci0 dev 29 function 0 "Intel 6 Series USB" rev 0x04: apic 0 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
addr 1
pcib0 at pci0 dev 31 function 0 "Intel HM65 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 6 Series AHCI" rev 0x04: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, CT250BX100SSD1, MU02> SCSI3 0/direct fixed
naa.500a0751f00662d9
sd0: 238475MB, 512 bytes/sector, 488397168 sectors, thin
cd0 at scsibus1 targ 1 lun 0: <PIONEER, DVD-RW DVRTD11RS, 1.01> ATAPI 5/cdrom
removable
ichiic0 at pci0 dev 31 function 3 "Intel 6 Series SMBus" rev 0x04: apic 0 int 19
iic0 at ichiic0
spdmem0 at iic0 addr 0x52: 4GB DDR3 SDRAM PC3-12800 SO-DIMM
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pms0: Elantech Touchpad, version 3, firmware 0x450f01
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
uhub2 at uhub0 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev
2.00/0.00 addr 2
uvideo0 at uhub2 port 3 configuration 1 interface 0 "Alcor Micro, Corp. 1.3M HD
WebCam" rev 2.00/73.58 addr 3
video0 at uvideo0
uhub3 at uhub1 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev
2.00/0.00 addr 2
uhidev0 at uhub3 port 3 configuration 1 interface 0 "Razer Razer DeathAdder"
rev 2.00/1.00 addr 3
uhidev0: iclass 3/1
ums0 at uhidev0: 7 buttons, Z dir
wsmouse1 at ums0 mux 0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> SCSI2 0/direct fixed
sd1: 212868MB, 512 bytes/sector, 435955377 sectors
root on sd1a (c122593cd8131f27.a) swap on sd1b dump on sd1b
Thanks,
--
Kind regards,
Hiltjo