Skip to content

Instantly share code, notes, and snippets.

@CodeAsm
Created December 21, 2024 16:14
Show Gist options
  • Save CodeAsm/c805da621e28b8ffd61f00f198bf86a4 to your computer and use it in GitHub Desktop.
Save CodeAsm/c805da621e28b8ffd61f00f198bf86a4 to your computer and use it in GitHub Desktop.
ectool strace log
execve("src/ectool", ["src/ectool", "battery"], 0x7ffc98acd678 /* 75 vars */) = 0
brk(NULL) = 0x629287156000
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=306907, ...}) = 0
mmap(NULL, 306907, PROT_READ, MAP_PRIVATE, 3, 0) = 0x781c6fe0e000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libusb-1.0.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\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=120808, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x781c6fe0c000
mmap(NULL, 119208, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x781c6fdee000
mmap(0x781c6fdf3000, 61440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x781c6fdf3000
mmap(0x781c6fe02000, 32768, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x781c6fe02000
mmap(0x781c6fe0a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c000) = 0x781c6fe0a000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libftdi1.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\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=63432, ...}) = 0
mmap(NULL, 65552, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x781c6fddd000
mmap(0x781c6fde0000, 36864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x781c6fde0000
mmap(0x781c6fde9000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0x781c6fde9000
mmap(0x781c6fdec000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x781c6fdec000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/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\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=22040176, ...}) = 0
mmap(NULL, 2641984, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x781c6fa00000
mmap(0x781c6fa97000, 1363968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x97000) = 0x781c6fa97000
mmap(0x781c6fbe4000, 589824, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e4000) = 0x781c6fbe4000
mmap(0x781c6fc74000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x274000) = 0x781c6fc74000
mmap(0x781c6fc82000, 12352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x781c6fc82000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/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\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=973144, ...}) = 0
mmap(NULL, 975176, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x781c6fcee000
mmap(0x781c6fcfc000, 536576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x781c6fcfc000
mmap(0x781c6fd7f000, 376832, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x91000) = 0x781c6fd7f000
mmap(0x781c6fddb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xec000) = 0x781c6fddb000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/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\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=915712, ...}) = 0
mmap(NULL, 184808, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x781c6fcc0000
mmap(0x781c6fcc4000, 147456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x781c6fcc4000
mmap(0x781c6fce8000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28000) = 0x781c6fce8000
mmap(0x781c6fcec000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2b000) = 0x781c6fcec000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/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\340_\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
fstat(3, {st_mode=S_IFREG|0755, st_size=2014520, ...}) = 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, 2034616, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x781c6f80f000
mmap(0x781c6f833000, 1511424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x781c6f833000
mmap(0x781c6f9a4000, 319488, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x195000) = 0x781c6f9a4000
mmap(0x781c6f9f2000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e3000) = 0x781c6f9f2000
mmap(0x781c6f9f8000, 31672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x781c6f9f8000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libudev.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\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=285104, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x781c6fcbe000
mmap(NULL, 289128, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x781c6f7c8000
mmap(0x781c6f7cd000, 163840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x781c6f7cd000
mmap(0x781c6f7f5000, 81920, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2d000) = 0x781c6f7f5000
mmap(0x781c6f809000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x40000) = 0x781c6f809000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libcap.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 |\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=43064, ...}) = 0
mmap(NULL, 45128, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x781c6fcb2000
mmap(0x781c6fcb5000, 20480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x781c6fcb5000
mmap(0x781c6fcba000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x781c6fcba000
mmap(0x781c6fcbc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x781c6fcbc000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x781c6fcb0000
arch_prctl(ARCH_SET_FS, 0x781c6fcb1500) = 0
set_tid_address(0x781c6fcb17d0) = 57945
set_robust_list(0x781c6fcb17e0, 24) = 0
rseq(0x781c6fcb1e20, 0x20, 0, 0x53053053) = 0
mprotect(0x781c6f9f2000, 16384, PROT_READ) = 0
mprotect(0x781c6fcbc000, 4096, PROT_READ) = 0
mprotect(0x781c6fcec000, 4096, PROT_READ) = 0
mprotect(0x781c6f809000, 20480, PROT_READ) = 0
mprotect(0x781c6fddb000, 4096, PROT_READ) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x781c6fcae000
mprotect(0x781c6fc74000, 53248, PROT_READ) = 0
mprotect(0x781c6fe0a000, 4096, PROT_READ) = 0
mprotect(0x781c6fdec000, 4096, PROT_READ) = 0
mprotect(0x6292771e5000, 8192, PROT_READ) = 0
mprotect(0x781c6fe93000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x781c6fe0e000, 306907) = 0
prctl(PR_CAPBSET_READ, CAP_MAC_OVERRIDE) = 1
prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, CAP_CHECKPOINT_RESTORE) = 1
prctl(PR_CAPBSET_READ, 0x2c /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, 0x2a /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, 0x29 /* CAP_??? */) = -1 EINVAL (Invalid argument)
futex(0x781c6fc826bc, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x21\xf6\x52\xb6\xc1\x01\xc9\x25", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x629287156000
brk(0x629287177000) = 0x629287177000
openat(AT_FDCWD, "/dev/cros_ec", O_RDWR) = 3
read(3, "1.0.0\nhx30_v0.0.1-4ea1c89\n\nread-"..., 79) = 37
ioctl(3, _IOC(_IOC_READ|_IOC_WRITE, 0x3a, 0, 0x28), 0x7ffe3ee3ade0) = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(3, CROS_EC_DEV_IOCRDMEM, 0x7ffe3ee3ad00) = 2
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}) = 0
write(1, "init dev (nil) 0x6292771d01eb 0x"..., 60) = 60
uname({sysname="Linux", nodename="framework", ...}) = 0
ioctl(3, CROS_EC_DEV_IOCXCMD, 0x6292871688d0) = 12
ioctl(3, CROS_EC_DEV_IOCXCMD, 0x629287168900) = 0
write(2, "EC result 3 (INVALID_PARAM)\n", 28) = 28
ioctl(3, CROS_EC_DEV_IOCXCMD, 0x629287168900) = 4
write(1, "cmd 0x600=0x1\n", 14) = 14
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV (core dumped) +++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment