strace output problems solve - linux

I tried to run strace in linux for my Program.
Here is the example Output :
brk(0) = 0x804b000
brk(0x806c000) = 0x806c000
open("test.txt", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=216, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7728000
read(3, "10\n10\n2\t3\t3\t5\t4\t7\t7\t2\t2\t7\t\n8\t3\t1"..., 4096) = 216
read(3, "", 4096) = 0
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7728000, 4096) = 0
**open(NULL, O_RDONLY) = -1 EFAULT (Bad address)**
dup(2) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7728000
**_llseek(3, 0, 0xbfc97a44, SEEK_CUR) = -1 ESPIPE (Illegal seek)**
write(3, "Can't open file!: Bad address\n", 30Can't open file!: Bad address
Why i get some errors in that two line. what **open(NULL, O_RDONLY)** does it means?

**open(NULL, O_RDONLY)
You're passing a NULL string as file name. According to the documentation, EFAULT is generated when the pathname points outside your accessible address space.
_llseek(3, 0, 0xbfc97a44, SEEK_CUR)
You are trying to set the offset of a file descriptor which does not support this function.
In fact, you are trying to move the offset of the STANDARD ERROR (3 is the result of dup(2)), which does not make sense as it is not a real file. According to the documentation, ESPIPE is generated when a file descriptor is associated with a pipe, socket, or FIFO.

Related

(Nextcloud-SNAP) I run a command as ROOT using "SETGUID" on Linux using "C-programm" as a wrapper

Other commands like chown etc. are working so this is somehow related to snap or nextcloud-snap.
I tried the following:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> /* for fork */
#include <sys/types.h> /* for pid_t */
#include <sys/wait.h> /* for wait */
int main()
{
setuid(0);
/*Spawn a child to run the program.*/
pid_t pid=fork();
if (pid==0) { /* child process */
static char *argv[]={"nextcloud.occ","nextcloud.occ files:scan Administrator",NULL};
execv("/snap/bin/nextcloud.occ",argv);
exit(127); /* only if execv fails */
}
else { /* pid!=0; parent process */
waitpid(pid,0,0); /* wait for child to exit */
}
return 0;
}
I ran
gcc -o posttorrent posttorrent.c
sudo chown root posttorrent
sudo chmod ug+s posttorrent
running the program results in:
permanently dropping privs did not work: File exists
then strace of the program results in:
debian-transmission#ubuntu:/transmission-data$ strace ./posttorrent
execve("./posttorrent", ["./posttorrent"], 0xffffd2e7a1e0 /* 13 vars */) = 0
faccessat(AT_FDCWD, "/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
brk(NULL) = 0xaaaafeb52000
fcntl(0, F_GETFD) = 0
fcntl(1, F_GETFD) = 0
fcntl(2, F_GETFD) = 0
faccessat(AT_FDCWD, "/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/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=27061, ...}) = 0
mmap(NULL, 27061, PROT_READ, MAP_PRIVATE, 3, 0) = 0xffffaace6000
close(3) = 0
openat(AT_FDCWD, "/lib/aarch64-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\267\0\1\0\0\0\350A\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1441800, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffaace4000
mmap(NULL, 1510480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffaab4d000
mprotect(0xffffaaca6000, 61440, PROT_NONE) = 0
mmap(0xffffaacb5000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x158000) = 0xffffaacb5000
mmap(0xffffaacbb000, 11344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffffaacbb000
close(3) = 0
mprotect(0xffffaacb5000, 12288, PROT_READ) = 0
mprotect(0xaaaad56ed000, 4096, PROT_READ) = 0
mprotect(0xffffaacef000, 4096, PROT_READ) = 0
munmap(0xffffaace6000, 27061) = 0
setuid(0) = -1 EPERM (Operation not permitted)
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xffffaace4cf0) = 762022
wait4(762022, 2020/12/21 20:27:47.533491 cmd_run.go:994: WARNING: cannot create user data directory: cannot create "/var/lib/transmission-daemon/snap/nextcloud/24943": mkdir /var/lib/transmission-daemon/snap: permission denied
Sorry, home directories outside of /home are not currently supported.
See https://forum.snapcraft.io/t/11209 for details.
NULL, 0, NULL) = 762022
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=762022, si_uid=112, si_status=1, si_utime=2, si_stime=5} ---
exit_group(0) = ?
+++ exited with 0 +++

"Device or resource busy" while adding vlan using vconfig

It has been two days but not getting any clue why I am getting "vconfig: ioctl error for add: Device or resource busy" error while configuring VLAN.
Checklist:
Port is up
Port is not the part of any bridge.
Below is the strace of the command but not getting much pointer for this problem:
# strace vconfig add port00 100
execve("/usr/sbin/vconfig", ["vconfig", "add", "port00", "100"], 0xffcb640c /* 7 vars */) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/usr/bin/busybox", 4096) = 16
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|1<<MAP_HUGE_SHIFT, -1, 0) = 0xf77b0000
open("/lib//libc.so.0", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0775, st_size=653404, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|1<<MAP_HUGE_SHIFT, -1, 0) = 0xf77af000
read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\1\1\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 753664, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf76f7000
mmap2(0xf76f7000, 647324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 7, 0) = 0xf76f7000
mmap2(0xf7796000, 4990, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 7, 0x9e000) = 0xf7796000
mmap2(0xf7798000, 91824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf7798000
close(7) = 0
munmap(0xf77af000, 4096) = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0775, st_size=25388, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|1<<MAP_HUGE_SHIFT, -1, 0) = 0xf77af000
set_thread_area({entry_number=-1, base_addr=0xf77af690, limit=0x0fffff, seg_32bit=1, contents=0, read_exec_only=0, limit_in_pages=1, seg_not_present=0, useable=1}) = 0 (entry_number=12)
gettimeofday({tv_sec=1595835665, tv_usec=909210}, NULL) = 0
mprotect(0x80c4000, 4096, PROT_READ) = 0
mprotect(0xf7796000, 4096, PROT_READ) = 0
mprotect(0xf77b7000, 4096, PROT_READ) = 0
set_tid_address(0xf77af6f8) = 16103
set_robust_list(0xf77af6fc, 12) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0xf775abdb, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0xf7708eed}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0xf775aaf8, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0xf7708eed}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sysname="Linux", nodename="EAGLE-ECE555F60000", ...}) = 0
ioctl(0, TCGETS, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0
getuid32() = 0
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 7
ioctl(7, SIOCSIFVLAN, 0xffb0ceb4) = -1 EBUSY (Device or resource busy)
write(2, "vconfig: ioctl error for add: De"..., 54vconfig: ioctl error for add: Device or resource busy
) = 54
exit_group(1) = ?
+++ exited with 1 +++
#
vconfig is a virtual ethernet configuration program. TCGETS (in the stack trace) is a tty (teletype terminal) configuration - i.e. serial port settings (hence the B115200 (baud rate 115200 in your strace). In other words, you are trying to configure a serial port as a vlan port. Are you sure you want to be doing that ? What is the device that port00 refers to ?

What could break /proc/self/exe?

I have a simple Go program that calls os.Executable(). On older Linux systems (2.6.32), it cannot read /proc/self/exe, as showed by strace -f myexe -v public_html/ |& head -30:
execve("/home/willem/myexe", ["myexe", "-v", "public_html/"], [/* 45 vars */]) = 0
mmap(0x1200000, 13352277, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = 0x1200000
readlink("/proc/self/exe", "/hom/willem/my"..., 4096) = 37
mmap(0x400000, 13463552, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400000
mmap(0x400000, 10254571, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400000
mprotect(0x400000, 10254571, PROT_READ|PROT_EXEC) = 0
mmap(0xfc7000, 938770, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0x9c7000) = 0xfc7000
mprotect(0xfc7000, 938770, PROT_READ|PROT_WRITE) = 0
mmap(0x10ad000, 170408, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x10ad000
munmap(0x1201000, 13348181) = 0
uname({sys="Linux", node="sip5-83.nexcess.net", ...}) = 0
brk(0) = 0x10d7000
brk(0x10d81c0) = 0x10d81c0
arch_prctl(ARCH_SET_FS, 0x10d7880) = 0
set_tid_address(0x10d7b50) = 16193
set_robust_list(0x10d7b60, 24) = 0
rt_sigaction(SIGRTMIN, {0x83c310, [], SA_RESTORER|SA_SIGINFO, 0x83ba20}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x83c3a0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x83ba20}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM64_INFINITY}) = 0
readlink("/proc/self/exe", 0x7ffcfec64dc0, 4096) = -1 ENOENT (No such file or directory)
I don't understand why the first readlink works and the second does not. There's no fork and the executable is not moved. Any ideas?
I can fix it by moving the os.Executable() into the init of my program, but I'd like to understand why it doesn't work as is.
So the cause turned out to be UPX (executable compressor). I hadn't thought of it earlier because it was included in my build pipeline. Apparently, on some systems it doesn't extract to memory but uses a temp file, which caused this error. Am still puzzled why the trace output doesn't show a rename, but alas.

How "rm" command in Linux works?

I want to know how the rm command works in Linux. What system calls does it invoke? Which file operations are used to execute this command?
Sorry if my question looks trivial, but I'm new to Linux file systems.
Questions like this should be easily be answerable by strace(1):
$ touch test
$ strace rm test
execve("/usr/bin/rm", ["rm", "test"], [/* 26 vars */]) = 0
brk(0) = 0xb86000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fabf8423000
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=45618, ...}) = 0
mmap(NULL, 45618, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fabf8417000
close(3) = 0
open("/lib64/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\0\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2107760, ...}) = 0
mmap(NULL, 3932736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fabf7e42000
mprotect(0x7fabf7ff8000, 2097152, PROT_NONE) = 0
mmap(0x7fabf81f8000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7fabf81f8000
mmap(0x7fabf81fe000, 16960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fabf81fe000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fabf8416000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fabf8414000
arch_prctl(ARCH_SET_FS, 0x7fabf8414740) = 0
mprotect(0x7fabf81f8000, 16384, PROT_READ) = 0
mprotect(0x60d000, 4096, PROT_READ) = 0
mprotect(0x7fabf8424000, 4096, PROT_READ) = 0
munmap(0x7fabf8417000, 45618) = 0
brk(0) = 0xb86000
brk(0xba7000) = 0xba7000
brk(0) = 0xba7000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=106065056, ...}) = 0
mmap(NULL, 106065056, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fabf191b000
close(3) = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2502, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fabf8422000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2502
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7fabf8422000, 4096) = 0
open("/usr/lib/locale/UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
newfstatat(AT_FDCWD, "test", {st_mode=S_IFREG|0664, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
geteuid() = 7026
newfstatat(AT_FDCWD, "test", {st_mode=S_IFREG|0664, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
faccessat(AT_FDCWD, "test", W_OK) = 0
unlinkat(AT_FDCWD, "test", 0) = 0
lseek(0, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
close(0) = 0
close(1) = 0
close(2) = 0
exit_group(0) = ?
+++ exited with 0 +++
The decisive call in my case is unlinkat(AT_FDCWD, "test", 0) but the specifics probably depend on the system architecture and rm version.
You can read the source code here:
http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/rm.c
The actual removing of the files happen in:
http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/remove.c
Expanding on ignacio's answer unlink(2) is the primary system call that it will make to actually remove files, and rmdir(2) to remove directories, but there are other system calls that it makes as well including:
open(2)
fstat(2)
lstat(2)
rmdir(2)
fstatfs(2)
unlink(2)
malloc(3)
free(3)
write(2)
fflush(3)
For the complete source of the implementation in OpenBSD see http://bxr.su/openbsd/bin/rm/rm.c
It invokes unlink(2) to remove the filesystem object. Whatever happens from there is delegated to the filesystem driver.
The rm command is provided by coreutils. rm.c is the source for the driver program. remove.c does the actual work. In particular, excise is what you're looking for:
/* Remove the file system object specified by ENT. IS_DIR specifies
whether it is expected to be a directory or non-directory.
Return RM_OK upon success, else RM_ERROR. */
static enum RM_status
excise (FTS *fts, FTSENT *ent, struct rm_options const *x, bool is_dir)
{
int flag = is_dir ? AT_REMOVEDIR : 0;
if (unlinkat (fts->fts_cwd_fd, ent->fts_accpath, flag) == 0)
{
if (x->verbose)
{
printf ((is_dir
? _("removed directory: %s\n")
: _("removed %s\n")), quote (ent->fts_path));
}
return RM_OK;
}
/* The unlinkat from kernels like linux-2.6.32 reports EROFS even for
nonexistent files. When the file is indeed missing, map that to ENOENT,
so that rm -f ignores it, as required. Even without -f, this is useful
because it makes rm print the more precise diagnostic. */
if (errno == EROFS)
{
struct stat st;
if ( ! (lstatat (fts->fts_cwd_fd, ent->fts_accpath, &st)
&& errno == ENOENT))
errno = EROFS;
}
if (ignorable_missing (x, errno))
return RM_OK;
/* When failing to rmdir an unreadable directory, the typical
errno value is EISDIR, but that is not as useful to the user
as the errno value from the failed open (probably EPERM).
Use the earlier, more descriptive errno value. */
if (ent->fts_info == FTS_DNR)
errno = ent->fts_errno;
error (0, errno, _("cannot remove %s"), quote (ent->fts_path));
mark_ancestor_dirs (ent);
return RM_ERROR;
}
As you can see, it uses the unlinkat syscall.
As you possbily know, rm tool is open source and it is part of core-utils package. Henceforth, you can read the implementation of rm, for example, on GitHub mirror or here.

how can i get the max memory usage of a child process after its execution accurately?

I have written a program which is used to monitoring child processes' resources. I used wait4 function's fourth argument to get child processes' CPU usage, which works fine. But i could use that to get memory usage, it looks different from the output of "ps". I also tried parsing /proc/pid/status, but sometimes it's not accurate, for some child process is too quick to parse. can anybody give me some advice or solution? Thanks a lot.
Once the process terminates, even though the process entry still exists in the kernel, all of the resources for the process are released by the kernel. So, I would not expect to be able to read the memory size of the process from /proc.
In addition, there's no "maximum memory used" statistic for the process.
The only ways I can think to determine the maximum amount of memory for a process are the following:
Periodically sample the process state while it's executing and grab the current memory usage,
Use strace to capture all of the system calls made by the process and process this to determine just how much memory the process used, or
Use a shared library to intercept the memory-allocation system calls as they are made by the process, capture the details, and find a way to report
I would probably go with (1) unless very high accuracy is absolutely needed.
There may be profiling or statistics tools to help in this task, but I'm not aware of any.
Using Strace
Here's a program that illustrates the use of strace for this purpose:
allocit.c
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int cur;
cur = 0;
while ( cur < 1000 )
{
malloc(1024);
cur++;
}
return 0;
}
Running this with strace (strace ./allocit) gets output like this:
execve("./allocit", ["./allocit"], [/* 49 vars */]) = 0
brk(0) = 0x1b991000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ae49dccd000
uname({sys="Linux", node="fearless.office.tmcs", ...}) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/home/jdoe/lib/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/jdoe/lib/tls/x86_64", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/home/jdoe/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/jdoe/lib/tls", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/home/jdoe/lib/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/jdoe/lib/x86_64", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/home/jdoe/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/jdoe/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/software/ticketmaster/lib/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/software/ticketmaster/lib/tls/x86_64", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/software/ticketmaster/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/software/ticketmaster/lib/tls", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/software/ticketmaster/lib/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/software/ticketmaster/lib/x86_64", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/software/ticketmaster/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/software/ticketmaster/lib", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/usr/lib/oracle/11.2/client64/lib/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/oracle/11.2/client64/lib/tls/x86_64", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/usr/lib/oracle/11.2/client64/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/oracle/11.2/client64/lib/tls", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/usr/lib/oracle/11.2/client64/lib/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/oracle/11.2/client64/lib/x86_64", 0x7fff896b2900) = -1 ENOENT (No such file or directory)
open("/usr/lib/oracle/11.2/client64/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/oracle/11.2/client64/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=123338, ...}) = 0
mmap(NULL, 123338, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ae49dcce000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\332!\2359\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1717800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ae49dced000
mmap(0x399d200000, 3498328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x399d200000
mprotect(0x399d34e000, 2093056, PROT_NONE) = 0
mmap(0x399d54d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14d000) = 0x399d54d000
mmap(0x399d552000, 16728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x399d552000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ae49dcee000
arch_prctl(ARCH_SET_FS, 0x2ae49dcee210) = 0
mprotect(0x399d54d000, 16384, PROT_READ) = 0
mprotect(0x399d01b000, 4096, PROT_READ) = 0
munmap(0x2ae49dcce000, 123338) = 0
brk(0) = 0x1b991000
brk(0x1b9b2000) = 0x1b9b2000
brk(0x1b9d3000) = 0x1b9d3000
brk(0x1b9f4000) = 0x1b9f4000
brk(0x1ba15000) = 0x1ba15000
brk(0x1ba36000) = 0x1ba36000
brk(0x1ba57000) = 0x1ba57000
brk(0x1ba78000) = 0x1ba78000
brk(0x1ba99000) = 0x1ba99000
exit_group(0) = ?
Note all of the brk() calls used to expand the heap.

Resources