Closed Bug 1614278 Opened 4 years ago Closed 3 years ago

New JACK port crashes firefox

Categories

(Core :: Audio/Video: cubeb, defect, P5)

72 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: aliyuchang33, Assigned: bugzilla.mozilla)

References

Details

(Keywords: crash)

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

Open serval youtube videos with firefox from Archlinux installed with JACK audio kit.

Actual results:

When I open a new youtube tab, the browser may crash depends on the number of jack ports opened.

Expected results:

No crashes. I saved serval coredumps if needed. They are too big to upload.

Component: Untriaged → Audio/Video: cubeb
Keywords: crash
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64

Are the crashes recorded in about:crashes? It'd be useful to get a stack trace for the crash.

Marking this P5 since JACK is unsupported/unmaintained. We'd take patches to fix this, of course.

Priority: -- → P5
Attached file stacktrace
Nope. It is not recorded.
```

```

Maybe not a new port issue but definitely a jack issue. Crashed more times and more frequently.

Compiled nightly. Got a new stacktrace. Hint: You are currently not seeing messages from other users and the system.
Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
Pass -q to turn off this notice.
PID: 310619 (firefox)
UID: 1000 (hork)
GID: 985 (users)
Signal: 24 (XCPU)
Timestamp: Thu 2020-02-13 21:50:15 CST (13min ago)
Command Line: ./firefox
Executable: /home/hork/firefox/firefox
Control Group: /user.slice/user-1000.slice/session-1.scope
Unit: session-1.scope
Slice: user-1000.slice
Session: 1
Owner UID: 1000 (hork)
Boot ID: e43755f983b64798bde9862051cee259
Machine ID: 4497b8b45e5e4f908261e4d80d19b4e5
Hostname: DimensionPalace
Storage: /var/lib/systemd/coredump/core.firefox.1000.e43755f983b64798bde9862051cee259.310619.1581601815000000000000.lz4
Message: Process 310619 (firefox) of user 1000 dumped core.

            Stack trace of thread 311348:
            #0  0x00007fc16fe7678d n/a (/home/hork/firefox/libxul.so + 0x553178d)
            #1  0x00007fc154dc62aa n/a (libjack.so.0 + 0x142aa)
            #2  0x00007fc154dc5a08 n/a (libjack.so.0 + 0x13a08)
            #3  0x00007fc154ddeb1d n/a (libjack.so.0 + 0x2cb1d)
            #4  0x00007fc17ade946f start_thread (libpthread.so.0 + 0x946f)
            #5  0x00007fc17a9cb3d3 __clone (libc.so.6 + 0xff3d3)
            
            Stack trace of thread 310684:
            #0  0x00007fc17adefcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
            #1  0x0000557fb5af0584 n/a (/home/hork/firefox/firefox + 0x73584)
            #2  0x0000557fb5af05fe n/a (/home/hork/firefox/firefox + 0x735fe)
            #3  0x00007fc170cdca23 n/a (/home/hork/firefox/libxul.so + 0x6397a23)
            #4  0x00007fc170cd75e5 n/a (/home/hork/firefox/libxul.so + 0x63925e5)
            #5  0x00007fc170cef044 n/a (/home/hork/firefox/libxul.so + 0x63aa044)
            #6  0x00007fc17ade946f start_thread (libpthread.so.0 + 0x946f)
            #7  0x00007fc17a9cb3d3 __clone (libc.so.6 + 0xff3d3)
            
            Stack trace of thread 310722:
            #0  0x00007fc17adefcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
            #1  0x0000557fb5af0584 n/a (/home/hork/firefox/firefox + 0x73584)
            #2  0x0000557fb5af05fe n/a (/home/hork/firefox/firefox + 0x735fe)
            #3  0x00007fc16c5fcb97 n/a (/home/hork/firefox/libxul.so + 0x1cb7b97)
            #4  0x00007fc16c5fcaf1 n/a (/home/hork/firefox/libxul.so + 0x1cb7af1)
            #5  0x00007fc16c61ed52 n/a (/home/hork/firefox/libxul.so + 0x1cd9d52)
            #6  0x00007fc16c6147cf n/a (/home/hork/firefox/libxul.so + 0x1ccf7cf)
            #7  0x00007fc16c617d31 n/a (/home/hork/firefox/libxul.so + 0x1cd2d31)
            #8  0x00007fc16cc9df0d n/a (/home/hork/firefox/libxul.so + 0x2358f0d)
            #9  0x00007fc16cc28801 n/a (/home/hork/firefox/libxul.so + 0x22e3801)
            #10 0x00007fc16cc2875a n/a (/home/hork/firefox/libxul.so + 0x22e375a)
            #11 0x00007fc16c6127c5 n/a (/home/hork/firefox/libxul.so + 0x1ccd7c5)
            #6  0x00007fc16c6147cf n/a (/home/hork/firefox/libxul.so + 0x1ccf7cf)
            #7  0x00007fc16c617d31 n/a (/home/hork/firefox/libxul.so + 0x1cd2d31)
            #8  0x00007fc16cc9df0d n/a (/home/hork/firefox/libxul.so + 0x2358f0d)
            #9  0x00007fc16cc28801 n/a (/home/hork/firefox/libxul.so + 0x22e3801)
            #10 0x00007fc16cc2875a n/a (/home/hork/firefox/libxul.so + 0x22e375a)
            #11 0x00007fc16c6127c5 n/a (/home/hork/firefox/libxul.so + 0x1ccd7c5)
            #12 0x00007fc17a8b3ee0 n/a (/home/hork/firefox/libnspr4.so + 0x28ee0)
            #13 0x00007fc17ade946f start_thread (libpthread.so.0 + 0x946f)
            #14 0x00007fc17a9cb3d3 __clone (libc.so.6 + 0xff3d3)
            
            Stack trace of thread 310680:
            #0  0x00007fc17adefcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
            #1  0x0000557fb5af0584 n/a (/home/hork/firefox/firefox + 0x73584)
            #2  0x0000557fb5af05fe n/a (/home/hork/firefox/firefox + 0x735fe)
            #3  0x00007fc170cdca23 n/a (/home/hork/firefox/libxul.so + 0x6397a23)
            #4  0x00007fc170cd75e5 n/a (/home/hork/firefox/libxul.so + 0x63925e5)
            #5  0x00007fc170cef044 n/a (/home/hork/firefox/libxul.so + 0x63aa044)
            #6  0x00007fc17ade946f start_thread (libpthread.so.0 + 0x946f)
            #7  0x00007fc17a9cb3d3 __clone (libc.so.6 + 0xff3d3)
            
            Stack trace of thread 310668:
            #0  0x00007fc17a9c0abf __poll (libc.so.6 + 0xf4abf)
            #1  0x00007fc17928e120 n/a (libglib-2.0.so.0 + 0x6c120)
            #2  0x00007fc17928f0c3 g_main_loop_run (libglib-2.0.so.0 + 0x6d0c3)
            #3  0x00007fc17906fbc8 n/a (libgio-2.0.so.0 + 0x59bc8)
            #4  0x00007fc17926abb1 n/a (libglib-2.0.so.0 + 0x48bb1)
            #5  0x00007fc17ade946f start_thread (libpthread.so.0 + 0x946f)
            #6  0x00007fc17a9cb3d3 __clone (libc.so.6 + 0xff3d3)
            
            Stack trace of thread 310784:
            #0  0x00007fc17a9c5f8d syscall (libc.so.6 + 0xf9f8d)
            #1  0x00007fc1722f6eb4 n/a (/home/hork/firefox/libxul.so + 0x79b1eb4)
            #2  0x00007fc1722eb1fc n/a (/home/hork/firefox/libxul.so + 0x79a61fc)
            #3  0x00007fc1722eb045 n/a (/home/hork/firefox/libxul.so + 0x79a6045)
            #4  0x00007fc1722ead07 n/a (/home/hork/firefox/libxul.so + 0x79a5d07)
            #5  0x00007fc1722b9fc1 n/a (/home/hork/firefox/libxul.so + 0x7974fc1)
            #6  0x00007fc1722b9e6d n/a (/home/hork/firefox/libxul.so + 0x7974e6d)
            #7  0x00007fc1722ba6e7 n/a (/home/hork/firefox/libxul.so + 0x79756e7)
            #8  0x00007fc17229c629 n/a (/home/hork/firefox/libxul.so + 0x7957629)
            #9  0x00007fc172257a1d n/a (/home/hork/firefox/libxul.so + 0x7912a1d)
            #10 0x00007fc173288da3 n/a (/home/hork/firefox/libxul.so + 0x8943da3)
            #11 0x00007fc173288d7c n/a (/home/hork/firefox/libxul.so + 0x8943d7c)
            #12 0x00007fc1732876cf n/a (/home/hork/firefox/libxul.so + 0x89426cf)
            #13 0x00007fc173287d40 n/a (/home/hork/firefox/libxul.so + 0x8942d40)
            #14 0x00007fc1732878f1 n/a (/home/hork/firefox/libxul.so + 0x89428f1)
            #15 0x00007fc1738b8019 n/a (/home/hork/firefox/libxul.so + 0x8f73019)
            #16 0x00007fc173288d3c n/a (/home/hork/firefox/libxul.so + 0x8943d3c)
            #17 0x00007fc173287e30 n/a (/home/hork/firefox/libxul.so + 0x8942e30)
            #18 0x00007fc173287841 n/a (/home/hork/firefox/libxul.so + 0x8942841)
            #19 0x00007fc17329d85a n/a (/home/hork/firefox/libxul.so + 0x895885a)
            #20 0x00007fc173287460 n/a (/home/hork/firefox/libxul.so + 0x8942460)
            #21 0x00007fc173287c68 n/a (/home/hork/firefox/libxul.so + 0x8942c68)
            #22 0x00007fc1732878b9 n/a (/home/hork/firefox/libxul.so + 0x89428b9)
            #23 0x00007fc17329a970 n/a (/home/hork/firefox/libxul.so + 0x8955970)
            #24 0x00007fc173288cdb n/a (/home/hork/firefox/libxul.so + 0x8943cdb)
            #25 0x00007fc17328761b n/a (/home/hork/firefox/libxul.so + 0x894261b)
            #26 0x00007fc173287db8 n/a (/home/hork/firefox/libxul.so + 0x8942db8)
            #27 0x00007fc173287809 n/a (/home/hork/firefox/libxul.so + 0x8942809)
            #28 0x00007fc17326f211 n/a (/home/hork/firefox/libxul.so + 0x892a211)
            #29 0x00007fc17224d135 n/a (/home/hork/firefox/libxul.so + 0x7908135)
            #30 0x00007fc1738bacf6 n/a (/home/hork/firefox/libxul.so + 0x8f75cf6)
            #31 0x00007fc1738b9b60 n/a (/home/hork/firefox/libxul.so + 0x8f74b60)
            #32 0x00007fc17329aad1 n/a (/home/hork/firefox/libxul.so + 0x8955ad1)
            #33 0x00007fc17329a9a0 n/a (/home/hork/firefox/libxul.so + 0x89559a0)
            #34 0x00007fc1738b83de n/a (/home/hork/firefox/libxul.so + 0x8f733de)
            #35 0x00007fc172fed559 n/a (/home/hork/firefox/libxul.so + 0x86a8559)
            #36 0x00007fc17329aa21 n/a (/home/hork/firefox/libxul.so + 0x8955a21)
            #37 0x00007fc17327d460 n/a (/home/hork/firefox/libxul.so + 0x8938460)
            #38 0x00007fc172fbe42f n/a (/home/hork/firefox/libxul.so + 0x867942f)
            #39 0x00007fc172fec210 n/a (/home/hork/firefox/libxul.so + 0x86a7210)

I compiled git version of JACK and the issue seemed to be solved. Not sure if i should mark it resolved.

Well, not resolved yet. Another core dump.
Hint: You are currently not seeing messages from other users and the system.
Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
Pass -q to turn off this notice.
PID: 194133 (firefox)
UID: 1000 (hork)
GID: 985 (users)
Signal: 24 (XCPU)
Timestamp: Sat 2020-02-15 17:43:18 CST (6s ago)
Command Line: ./firefox
Executable: /home/hork/firefox-debug/firefox
Control Group: /user.slice/user-1000.slice/session-1.scope
Unit: session-1.scope
Slice: user-1000.slice
Session: 1
Owner UID: 1000 (hork)
Boot ID: 43961c959471486c97f2451ba7423c35
Machine ID: 4497b8b45e5e4f908261e4d80d19b4e5
Hostname: DimensionPalace
Storage: /var/lib/systemd/coredump/core.firefox.1000.43961c959471486c97f2451ba7423c35.194133.1581759798000000000000.lz4
Message: Process 194133 (firefox) of user 1000 dumped core.

            Stack trace of thread 194885:
            #0  0x00007faf453f1792 n/a (/home/hork/firefox-debug/libxul.so + 0x5531792)
            #1  0x00007faf2b2312ca _ZN4Jack10JackClient19CallProcessCallbackEv (libjack.so.0 + 0x142ca)
            #2  0x00007faf2b230a28 _ZN4Jack10JackClient7ExecuteEv (libjack.so.0 + 0x13a28)
            #3  0x00007faf2b249bdd _ZN4Jack15JackPosixThread13ThreadHandlerEPv (libjack.so.0 + 0x2cbdd)
            #4  0x00007faf5036446f start_thread (libpthread.so.0 + 0x946f)
            #5  0x00007faf4ff463d3 __clone (libc.so.6 + 0xff3d3)
            
            Stack trace of thread 194181:
            #0  0x00007faf4ff40f8d syscall (libc.so.6 + 0xf9f8d)
            #1  0x00007faf42c550bf n/a (/home/hork/firefox-debug/libxul.so + 0x2d950bf)
            #2  0x00007faf42c5711a n/a (/home/hork/firefox-debug/libxul.so + 0x2d9711a)
            #3  0x00007faf42c5925b n/a (/home/hork/firefox-debug/libxul.so + 0x2d9925b)
            #4  0x00007faf42c7b7d3 n/a (/home/hork/firefox-debug/libxul.so + 0x2dbb7d3)
            #5  0x00007faf4245781e n/a (/home/hork/firefox-debug/libxul.so + 0x259781e)
            #6  0x00007faf422df3a8 n/a (/home/hork/firefox-debug/libxul.so + 0x241f3a8)
            #7  0x00007faf422166e3 n/a (/home/hork/firefox-debug/libxul.so + 0x23566e3)
            #8  0x00007faf4221564b n/a (/home/hork/firefox-debug/libxul.so + 0x235564b)
            #9  0x00007faf42215cbf n/a (/home/hork/firefox-debug/libxul.so + 0x2355cbf)
            #10 0x00007faf42215f9b n/a (/home/hork/firefox-debug/libxul.so + 0x2355f9b)
            #11 0x00007faf421a399e n/a (/home/hork/firefox-debug/libxul.so + 0x22e399e)
            #12 0x00007faf421a3f31 n/a (/home/hork/firefox-debug/libxul.so + 0x22e3f31)

...skipping...
#0 0x00007faf4ff40f8d syscall (libc.so.6 + 0xf9f8d)
#1 0x00007faf47871eb4 n/a (/home/hork/firefox-debug/libxul.so + 0x79b1eb4)
#2 0x00007faf478661fc n/a (/home/hork/firefox-debug/libxul.so + 0x79a61fc)
#3 0x00007faf47866045 n/a (/home/hork/firefox-debug/libxul.so + 0x79a6045)
#4 0x00007faf47865d07 n/a (/home/hork/firefox-debug/libxul.so + 0x79a5d07)
#5 0x00007faf47834fc1 n/a (/home/hork/firefox-debug/libxul.so + 0x7974fc1)
#6 0x00007faf47834e6d n/a (/home/hork/firefox-debug/libxul.so + 0x7974e6d)
#7 0x00007faf478356e7 n/a (/home/hork/firefox-debug/libxul.so + 0x79756e7)
#8 0x00007faf47817629 n/a (/home/hork/firefox-debug/libxul.so + 0x7957629)
#9 0x00007faf477d2a1d n/a (/home/hork/firefox-debug/libxul.so + 0x7912a1d)
#10 0x00007faf48803da3 n/a (/home/hork/firefox-debug/libxul.so + 0x8943da3)
#11 0x00007faf48803d7c n/a (/home/hork/firefox-debug/libxul.so + 0x8943d7c)
#12 0x00007faf488026cf n/a (/home/hork/firefox-debug/libxul.so + 0x89426cf)
#13 0x00007faf48802d40 n/a (/home/hork/firefox-debug/libxul.so + 0x8942d40)
#14 0x00007faf488028f1 n/a (/home/hork/firefox-debug/libxul.so + 0x89428f1)
#15 0x00007faf48e33019 n/a (/home/hork/firefox-debug/libxul.so + 0x8f73019)
#16 0x00007faf48803d3c n/a (/home/hork/firefox-debug/libxul.so + 0x8943d3c)
#17 0x00007faf48802e30 n/a (/home/hork/firefox-debug/libxul.so + 0x8942e30)
#18 0x00007faf48802841 n/a (/home/hork/firefox-debug/libxul.so + 0x8942841)
#19 0x00007faf4881885a n/a (/home/hork/firefox-debug/libxul.so + 0x895885a)
#20 0x00007faf48802460 n/a (/home/hork/firefox-debug/libxul.so + 0x8942460)
#21 0x00007faf48802c68 n/a (/home/hork/firefox-debug/libxul.so + 0x8942c68)
#22 0x00007faf488028b9 n/a (/home/hork/firefox-debug/libxul.so + 0x89428b9)
#23 0x00007faf48815970 n/a (/home/hork/firefox-debug/libxul.so + 0x8955970)
#24 0x00007faf48803cdb n/a (/home/hork/firefox-debug/libxul.so + 0x8943cdb)
#25 0x00007faf4880261b n/a (/home/hork/firefox-debug/libxul.so + 0x894261b)
#26 0x00007faf48802db8 n/a (/home/hork/firefox-debug/libxul.so + 0x8942db8)
#27 0x00007faf48802809 n/a (/home/hork/firefox-debug/libxul.so + 0x8942809)
#28 0x00007faf487ea211 n/a (/home/hork/firefox-debug/libxul.so + 0x892a211)
#29 0x00007faf477c8135 n/a (/home/hork/firefox-debug/libxul.so + 0x7908135)
#30 0x00007faf48e35cf6 n/a (/home/hork/firefox-debug/libxul.so + 0x8f75cf6)
#31 0x00007faf48e34b60 n/a (/home/hork/firefox-debug/libxul.so + 0x8f74b60)
#32 0x00007faf48815ad1 n/a (/home/hork/firefox-debug/libxul.so + 0x8955ad1)
#33 0x00007faf488159a0 n/a (/home/hork/firefox-debug/libxul.so + 0x89559a0)
#34 0x00007faf48e333de n/a (/home/hork/firefox-debug/libxul.so + 0x8f733de)
#35 0x00007faf48568559 n/a (/home/hork/firefox-debug/libxul.so + 0x86a8559)
#36 0x00007faf48815a21 n/a (/home/hork/firefox-debug/libxul.so + 0x8955a21)
#37 0x00007faf487f8460 n/a (/home/hork/firefox-debug/libxul.so + 0x8938460)
#38 0x00007faf4853942f n/a (/home/hork/firefox-debug/libxul.so + 0x867942f)
#39 0x00007faf48567210 n/a (/home/hork/firefox-debug/libxul.so + 0x86a7210)

(In reply to aliyuchang33 from comment #6)

Unfortunately the stack traces are missing Gecko (libxul) symbols so not much to go on. If you open the compressed coredump in /var/lib/systemd/coredump/core.firefox.1000.43961c959471486c97f2451ba7423c35.194133.1581759798000000000000.lz4 in GDB somehow, "thread apply all backtrace" should give better stack traces.

Although we can guess tid 194885 is cubeb's data_callback from the JACK backend into Gecko, but it's a shallow stack so on the server side of AudioIPC waiting for a content proc to respond.

    Signal: 24 (XCPU)

This is likely due to hitting RT limits, either ours or JACK's (not sure what it does internally). Or your Debug build could be slow enough to cause the limits to be hit with multiple ports open. You could try reproing in a Nightly (opt) build with pref media.cubeb.sandbox set to false before restarting.

This is what I got from gdb coredump:

Thread 1 (Thread 0x7faf28aa5700 (LWP 194885)):
#0 0x00007faf453f1792 in cbjack_process(unsigned int, void*) (nframes=512, arg=0x7faf24e00000) at /usr/local/src/firefox/media/libcubeb/src/cubeb_jack.cpp:347
#1 0x00007faf2b2312ca in () at /usr/lib/libjack.so.0
#2 0x00007faf2b230a28 in () at /usr/lib/libjack.so.0
#3 0x00007faf2b249bdd in () at /usr/lib/libjack.so.0
#4 0x0000000000000000 in ()

It is this line
stm->position += ctx->fragment_size * stm->ratio;

Local variables are here:
(gdb) info local
__vla_expr0 = 2
stm = 0x7fb5a4980038
__vla_expr1 = 0
bufs_out = {0xaaaaaaaaaaaaaaaa, 0xaaaaaaaaaaaaaaaa}
bufs_in = 0x7fb5a2cf8cd0
j = 0
ctx = 0x7fb5a4400000
t_jack_xruns = 16777150
i = 4505233

So t_jack_xruns is too big. I don't know if it is a value be overwritten or something. The number of xruns reported from qjackctl is less than 200.

seems like with media.cubeb.sandbox set to false, no crash any more.

(In reply to aliyuchang33 from comment #9)

It is this line
stm->position += ctx->fragment_size * stm->ratio;

It'll probably be somewhat random since it stops on an XCPU signal.

t_jack_xruns = 16777150

So t_jack_xruns is too big. I don't know if it is a value be overwritten or something. The number of xruns reported from qjackctl is less than 200.

The jack_xruns stuff looks wrong; ctx->jack_xruns is unsigned but t_jack_xruns is signed. cbjack_process subtracts t_jack_xruns * [ready ports] from ctx->jack_xruns, so it'll overflow easily once it's non-zero and there are multiple ports. Fixing this bit of code up to do the right thing would be a good start; I'm not sure what the original intention here was or what JACK requires for this.

(In reply to aliyuchang33 from comment #10)

seems like with media.cubeb.sandbox set to false, no crash any more.

I think this is the root cause; audio remoting might take longer than JACK's realtime budget allows for. It'd be good to confirm that via measurements, though.

Hope there would be a patch for that. Without media.cubeb.sandbox, the client name in jack server seems to vary from -5 to -something. That should originally be something like firefox(Audiostream).

Can confirm this is still an issue and applies to 68 ESR. There are a couple issues with jack related to the recovery that may be outside the scope of this bug entry though they are related. Basically there really isn't any or it's not working correctly.

There is another bug again related to jack where it will not properly connect at all with webrtc until some media is played first outside webrtc. Playing a file locally for example is enough.

Can confirm. Running Firefox 79 with jack2 1.9.14 on Arch Linux

This is nothing new however. Firefox has been crashing on me about twice a day since the ALSA back end was dropped. Or at least ~2 years. I have sadly been forced to switch browsers since then.

There is nothing to be found in about:crashes, the bug does however ?seem? to manifest itself when an xrun occurs. Usually some video playing or similar.
It does however not sound like an xrun!
It usually makes a weird sound for a second or two - sounding more like playing back unaligned audio samples before crashing hard. Or similar to playing back non-interleaved audio samples interleaved.

I have tried to set the jack period down to something that is beyond something my hardware can handle. So far no success in trying to force an instant crash through an xrun. And judging by the sound this issue could also be related to unaligned buffers.

It is sad that users have to choose between doing pro audio work and a good browser.

The number of xrun fragments to skip is added once to ctx->jack_xruns but
then subtracted multiple times (once for each stream) from the same variable.
This causes the unsigned int to "underflow" and wrap around.

  • Use unsigned int in all calculations instead of mixing un/signed.
  • Remove erroneous and useless subtraction logic
  • Replace for loop by simple multiplication
  • Remove unneeded casts to float
Assignee: nobody → bugzilla.mozilla

I added a patch that seems to fix the issue for me. Building from source and playing 2 videos at the same time actually made Firefox crash within a minute or two (with jack_control dps period set to something my hardware can't really handle).

With the patch applied I have not experienced a single crash. And I did let it run with a multitude of videos over night. Still up and running!

The only thing I'm unsure about in the submitted patch is the ctx->jack_xruns = 0; vs the previous ctx->jack_xruns -= t_jack_xruns;. Is there some hidden overloaded C++ magic going on grabbing a mutex? Or is the subtraction just an artefact of the old and seemingly faulty logic?

To be honest, seeing a pthread_mutex_t mutex member in struct cubeb scares me a little. Especially the pthread_mutex_trylock in cbjack_process. But I guess that would be another issue - use a non blocking ringbuf with atomics. Because mixing mutex and audio never ends well.

Depends on: 1663917

Just a note here that the patch, upstreamed in https://github.com/kinetiknz/cubeb/commit/f4c31978941d16414eefb8eadfed463d01c2478d, will land as part of bug 1663917, along with a lot of other patches (mostly windows-related).

Attachment #9172669 - Attachment is obsolete: true

Closing as fixed by bug 1663917.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: