Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHnO0Js7BiCe2TBoW=+1UTUkHQPyf749TjBzidAPQSX9srYt7w@mail.gmail.com>
Date: Wed, 7 Nov 2018 18:53:33 -0500
From: Barry Flartus <barry.flartus@...il.com>
To: musl@...ts.openwall.com
Subject: Re: Problems with pthreads from a shared object?

>
> OK. Can you run strace -f ./launch (or whatever the launch program
> executable is called) and post the output?
>
> Rich
>

Here you go!

$ strace -f ./launch
execve("./launch", ["./launch"], [/* 22 vars */]) = 0
brk(NULL)                               = 0xe44000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=42286, ...}) = 0
mmap(NULL, 42286, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fcda3aa9000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/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\240\r\0\0\0\0\0\0"..., 832)
= 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14608, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fcda3aa8000
mmap(NULL, 2109680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7fcda368b000
mprotect(0x7fcda368e000, 2093056, PROT_NONE) = 0
mmap(0x7fcda388d000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fcda388d000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/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\0P\t\2\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7fcda32c1000
mprotect(0x7fcda3481000, 2097152, PROT_NONE) = 0
mmap(0x7fcda3681000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7fcda3681000
mmap(0x7fcda3687000, 14752, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fcda3687000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fcda3aa7000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fcda3aa6000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fcda3aa5000
arch_prctl(ARCH_SET_FS, 0x7fcda3aa6700) = 0
mprotect(0x7fcda3681000, 16384, PROT_READ) = 0
mprotect(0x7fcda388d000, 4096, PROT_READ) = 0
mprotect(0x600000, 4096, PROT_READ)     = 0
mprotect(0x7fcda3ab4000, 4096, PROT_READ) = 0
munmap(0x7fcda3aa9000, 42286)           = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
brk(NULL)                               = 0xe44000
brk(0xe65000)                           = 0xe65000
write(1, "\n", 1
)                       = 1
write(1, "Launching test...\n", 18Launching test...
)     = 18
open("./test.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\240!\0\0\0\0\0\0"..., 832)
= 832
fstat(3, {st_mode=S_IFREG|0755, st_size=40152, ...}) = 0
getcwd("/vagrant/test/wtf/public", 128) = 25
mmap(NULL, 2128504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7fcda30b9000
mprotect(0x7fcda30c0000, 2093056, PROT_NONE) = 0
mmap(0x7fcda32bf000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fcda32bf000
close(3)                                = 0
mprotect(0x7fcda32bf000, 4096, PROT_READ) = 0
write(1, "Starting Execution\n", 19Starting Execution
)    = 19
write(1, "Starting the thread\n", 20Starting the thread
)   = 20
write(1, "start_thread returned 38\n", 25start_thread returned 38
) = 25
write(1, "pthread_create() returned an err"..., 46pthread_create() returned
an error. Aborting.
) = 46
exit_group(0)                           = ?
+++ exited with 0 +++

$ ltrace -f ./launch
[pid 13508] __libc_start_main(0x400746, 1, 0x7ffff030bbc8, 0x4007b0
<unfinished ...>
[pid 13508] puts("\nLaunching test..."
Launching test...
)
                                     = 19
[pid 13508] dlopen("./test.so", 2Starting Execution
Starting the thread
start_thread returned 38
pthread_create() returned an error. Aborting.
)
                                          = 0x12d6440
[pid 13508] dlerror()

 = nil
[pid 13508] +++ exited (status 0) +++

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.