Closed Bug 1692877 Opened 4 years ago Closed 1 year ago

LD_PRELOAD with dlsym() of sysconf() hangs Firefox

Categories

(Core :: Memory Allocator, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: mail, Unassigned)

Details

Attachments

(3 files)

431 bytes, text/plain
Details
13.19 KB, text/plain
Details
13.19 KB, text/plain
Details
Attached file lib.c

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_3_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.47 Safari/537.36

Steps to reproduce:

Attached is a minimal library to intercept system calls (lib.so)

When starting Firefox with this library preloaded, it hangs:

LD_PRELOAD=./lib.so firefox

strace show it hangs at:

futex(0x7f74540c10c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x56461fc104e8, FUTEX_WAIT_PRIVATE, 2, NULL

This looks very similar to https://bugzilla.mozilla.org/show_bug.cgi?id=435683 but that was fixed 11 years ago.

Any thoughts?

Actual results:

Firefox hangs

Expected results:

Firefox should start

Hi Niek,

Thank you for your report.

I'll add this ticket to the "Core: Widget Cocoa" component in the hope someone from their team can take a look at this one and give their insights.

Regards,
Virginia

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
Attachment #9203237 - Attachment mime type: text/x-csrc → text/plain

Could sandboxing factor in here?

Flags: needinfo?(haftandilian)
Whiteboard: [mac:hang]

This appears to be on Linux (given that Niek is using LD_PRELOAD and strace). I'll ask on our #osint-team channel for the best category.

Component: Widget: Cocoa → General
Flags: needinfo?(haftandilian)
Whiteboard: [mac:hang]

Moving bug to Core::Memory Allocator per :glandium's recommendation.

@Niek, could you provide a stack trace from the process when the hang occurs?

Component: General → Memory Allocator
Flags: needinfo?(mail)
Attached file strace.log
Here is an strace dump, does that help @haik? ```bash ```
Attached file strace.txt
Here is an strace dump, does that help @haik? ```bash ```

Here is an strace dump, does that help @haik?

$ LD_PRELOAD=lib.so strace firefox
execve("/usr/bin/firefox", ["firefox"], 0x7ffd358000c0 /* 23 vars */) = 0
brk(NULL)                               = 0x55effa7c0000
arch_prctl(0x3001 /* ARCH_??? */, 0x7fffb51cea20) = -1 EINVAL (Invalid argument)
openat(AT_FDCWD, "/home/browser/fakevalues.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\21\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=16632, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f887b3c6000
mmap(NULL, 16488, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f887b3c1000
mmap(0x7f887b3c2000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f887b3c2000
mmap(0x7f887b3c3000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f887b3c3000
mmap(0x7f887b3c4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f887b3c4000
close(3)                                = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26954, ...}) = 0
mmap(NULL, 26954, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f887b3ba000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\215\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0~\303\347M\250B\312<j\233\242\v!0<\341"..., 68, 880) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=1995896, ...}) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 2004064, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f887b1d0000
mprotect(0x7f887b1f6000, 1810432, PROT_NONE) = 0
mmap(0x7f887b1f6000, 1495040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f887b1f6000
mmap(0x7f887b363000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x193000) = 0x7f887b363000
mmap(0x7f887b3b0000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1df000) = 0x7f887b3b0000
mmap(0x7f887b3b6000, 13408, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f887b3b6000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \22\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=18816, ...}) = 0
mmap(NULL, 20752, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f887b1ca000
mmap(0x7f887b1cb000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f887b1cb000
mmap(0x7f887b1cd000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f887b1cd000
mmap(0x7f887b1ce000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f887b1ce000
close(3)                                = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f887b1c7000
arch_prctl(ARCH_SET_FS, 0x7f887b1c7740) = 0
mprotect(0x7f887b3b0000, 12288, PROT_READ) = 0
mprotect(0x7f887b1ce000, 4096, PROT_READ) = 0
mprotect(0x7f887b3c4000, 4096, PROT_READ) = 0
mprotect(0x55eff9cbb000, 8192, PROT_READ) = 0
mprotect(0x7f887b3f6000, 4096, PROT_READ) = 0
munmap(0x7f887b3ba000, 26954)           = 0
getuid()                                = 0
getgid()                                = 0
getpid()                                = 651
rt_sigaction(SIGCHLD, {sa_handler=0x55eff9cb0c30, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f887b211950}, NULL, 8) = 0
geteuid()                               = 0
brk(NULL)                               = 0x55effa7c0000
brk(0x55effa7e1000)                     = 0x55effa7e1000
getppid()                               = 648
stat("/root", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat(".", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/usr/bin/firefox", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10)                   = 10
close(3)                                = 0
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
geteuid()                               = 0
getegid()                               = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x55eff9cb0c30, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f887b211950}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f887b211950}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f887b211950}, NULL, 8) = 0
read(10, "#!/bin/sh\n\nset -e\n\n# Firefox lau"..., 8192) = 2679
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f887b1c7a10) = 652
close(4)                                = 0
read(3, "/usr/bin/firefox\n", 128)      = 17
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=652, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 652
faccessat(AT_FDCWD, "/usr/lib/firefox-trunk/firefox-trunk", X_OK) = 0
execve("/usr/lib/firefox-trunk/firefox-trunk", ["/usr/lib/firefox-trunk/firefox-t"...], 0x55effa7c1c28 /* 24 vars */) = 0
brk(NULL)                               = 0x55ef0e7cd000
arch_prctl(0x3001 /* ARCH_??? */, 0x7fff5f5bea40) = -1 EINVAL (Invalid argument)
openat(AT_FDCWD, "/home/browser/fakevalues.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\21\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=16632, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9104f09000
mmap(NULL, 16488, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9104f04000
mmap(0x7f9104f05000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f9104f05000
mmap(0x7f9104f06000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f9104f06000
mmap(0x7f9104f07000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f9104f07000
close(3)                                = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26954, ...}) = 0
mmap(NULL, 26954, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9104efd000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\201\0\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0{\324M\31\306%'\265\343\356k%\214\217\2035"..., 68, 824) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=151232, ...}) = 0
mmap(NULL, 136272, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9104edb000
mmap(0x7f9104ee2000, 65536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f9104ee2000
mmap(0x7f9104ef2000, 20480, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f9104ef2000
mmap(0x7f9104ef7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7f9104ef7000
mmap(0x7f9104ef9000, 13392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9104ef9000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \22\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=18816, ...}) = 0
mmap(NULL, 20752, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9104ed5000
mmap(0x7f9104ed6000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f9104ed6000
mmap(0x7f9104ed8000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f9104ed8000
mmap(0x7f9104ed9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f9104ed9000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\341\t\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1952928, ...}) = 0
mmap(NULL, 1968128, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9104cf4000
mprotect(0x7f9104d8a000, 1286144, PROT_NONE) = 0
mmap(0x7f9104d8a000, 983040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x96000) = 0x7f9104d8a000
mmap(0x7f9104e7a000, 299008, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x186000) = 0x7f9104e7a000
mmap(0x7f9104ec4000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1cf000) = 0x7f9104ec4000
mmap(0x7f9104ed2000, 10240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9104ed2000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\363\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1369352, ...}) = 0
mmap(NULL, 1368336, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9104ba5000
mmap(0x7f9104bb4000, 684032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7f9104bb4000
mmap(0x7f9104c5b000, 618496, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb6000) = 0x7f9104c5b000
mmap(0x7f9104cf2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14c000) = 0x7f9104cf2000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3405\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=104984, ...}) = 0
mmap(NULL, 107592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9104b8a000
mmap(0x7f9104b8d000, 73728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f9104b8d000
mmap(0x7f9104b9f000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f9104b9f000
mmap(0x7f9104ba3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f9104ba3000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\215\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0~\303\347M\250B\312<j\233\242\v!0<\341"..., 68, 880) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=1995896, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9104b88000
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 2004064, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f910499e000
mprotect(0x7f91049c4000, 1810432, PROT_NONE) = 0
mmap(0x7f91049c4000, 1495040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f91049c4000
mmap(0x7f9104b31000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x193000) = 0x7f9104b31000
mmap(0x7f9104b7e000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1df000) = 0x7f9104b7e000
mmap(0x7f9104b84000, 13408, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9104b84000
close(3)                                = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f910499b000
arch_prctl(ARCH_SET_FS, 0x7f910499b780) = 0
mprotect(0x7f9104b7e000, 12288, PROT_READ) = 0
mprotect(0x7f9104ba3000, 4096, PROT_READ) = 0
mprotect(0x7f9104cf2000, 4096, PROT_READ) = 0
mprotect(0x7f9104ec4000, 45056, PROT_READ) = 0
mprotect(0x7f9104ed9000, 4096, PROT_READ) = 0
mprotect(0x7f9104ef7000, 4096, PROT_READ) = 0
mprotect(0x7f9104f07000, 4096, PROT_READ) = 0
mprotect(0x55ef0d483000, 8192, PROT_READ) = 0
mprotect(0x7f9104f39000, 4096, PROT_READ) = 0
munmap(0x7f9104efd000, 26954)           = 0
set_tid_address(0x7f910499ba50)         = 651
set_robust_list(0x7f910499ba60, 24)     = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7f9104ee2b90, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f9104eefbb0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7f9104ee2c30, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f9104eefbb0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
futex(0x7f9104eda0c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x55ef0d4854e8, FUTEX_WAIT_PRIVATE, 2, NULL

It hangs at the last line (futex).

Can you attach gdb and get a backtrace?

Sorry for the delay, here you go:

# LD_PRELOAD=./lib.so firefox -g    
GNU gdb (Ubuntu 9.2-0ubuntu2) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/firefox-trunk/firefox-trunk...
(No debugging symbols found in /usr/lib/firefox-trunk/firefox-trunk)
(gdb) run
Starting program: /usr/lib/firefox-trunk/firefox-trunk 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
^C
Program received signal SIGINT, Interrupt.
__lll_lock_wait (futex=futex@entry=0x5555556194e0, private=0) at lowlevellock.c:52
52      lowlevellock.c: No such file or directory.
(gdb) trace
Tracepoint 1 at 0x7ffff7fac8f0: file lowlevellock.c, line 52.
(gdb) backtrace
#0  __lll_lock_wait (futex=futex@entry=0x5555556194e0, private=0) at lowlevellock.c:52
#1  0x00007ffff7fa4a95 in __GI___pthread_mutex_lock (mutex=0x5555556194e0) at ../nptl/pthread_mutex_lock.c:135
#2  0x000055555556a0da in ?? ()
#3  0x000055555556abf9 in ?? ()
#4  0x0000555555568bbc in ?? ()
#5  0x00007ffff7f94c3f in _dlerror_run (operate=operate@entry=0x7ffff7f944a0 <dlsym_doit>, args=args@entry=0x7fffffffd5b0) at dlerror.c:148
#6  0x00007ffff7f9452d in __dlsym (handle=<optimized out>, name=0x7ffff7fbd000 "sysconf") at dlsym.c:70
#7  0x00007ffff7fbc21c in sysconf () from ./lib.so
#8  0x000055555556a4e8 in ?? ()
#9  0x00005555555691ad in ?? ()
#10 0x000055555557a2bd in ?? ()
#11 0x0000555555565885 in ?? ()
#12 0x0000555555565a2c in malloc ()
#13 0x00007ffff7e58c1a in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#14 0x00007ffff7fdfdbe in ?? () from /lib64/ld-linux-x86-64.so.2
#15 0x00007ffff7fdfea8 in ?? () from /lib64/ld-linux-x86-64.so.2
#16 0x00007ffff7fcf10a in ?? () from /lib64/ld-linux-x86-64.so.2
#17 0x0000000000000001 in ?? ()
#18 0x00007fffffffe70c in ?? ()
#19 0x0000000000000000 in ?? ()

Let me know if you need anything else!

Flags: needinfo?(mail)

This looks exactly what's expected from the patch you indicated: https://hg.mozilla.org/mozilla-central/rev/2c3644af7354#l1.14

Your change makes sysconf() call dlsym(), instead of mmap(), but everything else applies. Don't think is can reasonably considered our bug. Handling wonky dsp wrappers (i.e. ALSA/Pulse stuff) is one thing, but this seems to be entirely custom.

Closing as per comment 10.

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

Attachment

General

Creator:
Created:
Updated:
Size: