home.social

#strace — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #strace, aggregated by home.social.

fetched live
  1. Отладка bash-скриптов: инструменты, о которых мало кто

    В предыдущей статье я рассказал, как писал скрипт мониторинга системы с нуля от идеи до рабочего инструмента с меню, цветным выводом и уведомлениями в Telegram. Там же выяснилось, что большинство проблем при написании bash-скриптов возникает не из-за сложной логики, а из-за незаметных ошибок: забытых токенов-заглушек, тихих падений через pipe, команд которые молча возвращают не то. Именно тогда я понял, что echo для отладкиэто каменный век. Скрипт мониторинга написан и работает. Теперь поговорим о том, что делать, когда он перестаёт работать или ведёт себя странно. Я собрал инструменты и приёмы, которые реально меняют то, как работать с bash. Не абстрактный список из документации, а вещи которые я использую сам и которые несколько раз спасали в ситуации «скрипт упал на проде, надо найти за пять минут». Для тех, кто спешит: быстрая шпаргалка

    habr.com/ru/articles/1044660/

    #bash #linux #отладка #shellcheck #bashdb #strace #set_x #devops #bash_scripting #отладка_скриптов

  2. Как программа попадает в память: от execve до main

    Вы когда-нибудь задумывались, что происходит после того, как вы нажимаете Enter в терминале Linux? Вводите ./myprogram и... Что именно происходит дальше? Как ядро находит файл? Как загружает его в память? Кто вызывает main ? И как на всё это посмотреть вживую? Разберемся на примере пустой программы empty_sleep . Она ничего не делает, просто запускается и завершается через 30 секунд. В ней нет лишнего кода и мы сможем сосредоточиться только на процессе загрузки. Всё, что мы увидим, относится к большинству динамически скомпилированных программ в Linux. В этой статье покажу как с помощью strace в реальном времени проследить путь программы от execve до _start и main .

    habr.com/ru/articles/1036444/

    #Linux #strace #ELF #загрузка_программ #системные_вызовы #execve #mmap #анализ_файлов #компоновщик

  3. Ah, nothing quite like reading a thrilling #novella about TCP socket woes where #ECONNRESET is the main character and "reproducer" makes a cameo appearance! 📚✨ Spoiler alert: Our daring hero bravely navigates the murky waters of #tcpdump, #strace, and... zzz. Wake me when they reboot the server! 🤦‍♂️💤
    movq.de/blog/postings/2026-05- #TCPsocket #ServerReboot #HackerNews #ngated

  4. Ah, nothing quite like reading a thrilling #novella about TCP socket woes where #ECONNRESET is the main character and "reproducer" makes a cameo appearance! 📚✨ Spoiler alert: Our daring hero bravely navigates the murky waters of #tcpdump, #strace, and... zzz. Wake me when they reboot the server! 🤦‍♂️💤
    movq.de/blog/postings/2026-05- #TCPsocket #ServerReboot #HackerNews #ngated

  5. strace: отладка Linux-приложений через системные вызовы

    Когда процесс зависает, молчит в логах и при этом продолжает жить своей странной жизнью, обычные инструменты наблюдения быстро упираются в потолок. В таких ситуациях strace полезен не как «ещё одна консольная утилита», а как прямой способ увидеть, чем процесс занят на уровне системных вызовов: что он открывает, чего ждёт, куда пишет и на чём реально тормозит. В статье — коротко и по делу о том, как читать этот поток событий и применять strace в типовых продовых расследованиях, где дебаггер, исходники и лишние эксперименты недоступны.

    habr.com/ru/companies/otus/art

    #linux #системное_администрирование #itинфраструктура #системные_вызовы #трассировка #strace

  6. `lnav` is a fab tool for analysing logs. Today I used it for debugging a verbose `strace -f` log file to analyse what the problem was w/smth and it was cool

    Tip: hit `<tab>` to edit, enable, and disable existing text filters added w/e.g. `:filter-in` and `:filter-out`.

    #lnav #Linux #Logs #strace #debugging #ArchLinux #Tools #DebuggingTools #Sysadmin #CommandLine

  7. @xhr DANKE! Der Hint mit #strace hat mir weitergeholfen!

    Ich hatte eine Datei __db.sasl_passwd.db vom Okt 31 welche bei #postmap anscheinend aufgerufen wird. Diese war aber leer, ein verschieben in eine .old hat instant eine neue angelegt, diesmal aber mit Inhalt. Nach einem Neustart existiert diese als sasl_passwd.db und in meine Inbox trudeln gerade die Mails von #Yunohost ein.

  8. @xhr DANKE! Der Hint mit #strace hat mir weitergeholfen!

    Ich hatte eine Datei __db.sasl_passwd.db vom Okt 31 welche bei #postmap anscheinend aufgerufen wird. Diese war aber leer, ein verschieben in eine .old hat instant eine neue angelegt, diesmal aber mit Inhalt. Nach einem Neustart existiert diese als sasl_passwd.db und in meine Inbox trudeln gerade die Mails von #Yunohost ein.

  9. New scenario released! 🚀

    Having the config file for a program is not enough. You also need to put it in the right place so that the program can find it. But it's not that easy when you don't know where the program is looking for its config file!

    Check it out and level up your troubleshooting skills: learnbyfixing.com/scenarios/13/

    Happy fixing!

    #LearnByFixing #Linux #DevOps #SRE #Sysadmin #syscalls #strace

  10. The October issue has been released! This month, we show you how to configure and manage kernel auditing to help protect you from an attack. This month's DVD includes 23.2 Full and @ubuntu Mate 25.04
    linux-magazine.com/Issues/2025

  11. The October issue has been released! This month, we show you how to configure and manage kernel auditing to help protect you from an attack. This month's DVD includes #antiXLinux 23.2 Full and @ubuntu Mate 25.04
    linux-magazine.com/Issues/2025
    #Linux #OpenSource #auditing #kernel #security #SparkyLinux #strace #Falco #Nix #Meshtastic #Android #Python #PipeWire #Commodore #Koel

  12. If you run a #Linux program in #strace, usually the start of the log shows it trying to load a ton of shared libraries, and for each one, trying the same file name in all your LD_LIBRARY_PATH directories until it finds it. So you mostly see file-open operations _failing_, with ENOENT.

    To a novice strace reader, it looks as if something has already gone horribly wrong! But it hasn't – this is all normal, and as expected. Each of those ENOENT is technically "an error", but not a _bad_ error, because ld.so just moves on to the next in its big list of things to try, and one works in the end.

    Errors happen _all the time_ in the guts of a computer system, and most of them are not even interesting – just business as usual. The event an end user thinks of as "an error" is the case where the program _doesn't_ have a fallback plan. Those are often outnumbered by the cases where it does!

  13. If you run a #Linux program in #strace, usually the start of the log shows it trying to load a ton of shared libraries, and for each one, trying the same file name in all your LD_LIBRARY_PATH directories until it finds it. So you mostly see file-open operations _failing_, with ENOENT.

    To a novice strace reader, it looks as if something has already gone horribly wrong! But it hasn't – this is all normal, and as expected. Each of those ENOENT is technically "an error", but not a _bad_ error, because ld.so just moves on to the next in its big list of things to try, and one works in the end.

    Errors happen _all the time_ in the guts of a computer system, and most of them are not even interesting – just business as usual. The event an end user thinks of as "an error" is the case where the program _doesn't_ have a fallback plan. Those are often outnumbered by the cases where it does!

  14. TIL that a trivial Python3 OpenCV program (open an image, attempt to display it in a window) on a Raspberry Pi tries to open over 2800 shared libraries

    (EDIT: more like nearly 1400, 'cos strace opens the symbolic link and the library ... but still)

    #python #OpenCV #strace #RaspberryPi #NotLookingForAdvice

  15. TIL that a trivial Python3 OpenCV program (open an image, attempt to display it in a window) on a Raspberry Pi tries to open over 2800 shared libraries

    (EDIT: more like nearly 1400, 'cos strace opens the symbolic link and the library ... but still)

    #python #OpenCV #strace #RaspberryPi #NotLookingForAdvice

  16. Process injection shenanigans are dear to my heart - it's one of the first things I ever learned in security.

    Inspired by an Akamai blog last month, this blog digs into techniques to tinker with other processes on Linux, and show you how to write a little debugger in C!

    labs.greynoise.io/grimoire/202

    #linux #reversing #strace #ptrace #gdb

  17. Process injection shenanigans are dear to my heart - it's one of the first things I ever learned in security.

    Inspired by an Akamai blog last month, this blog digs into techniques to tinker with other processes on Linux, and show you how to write a little debugger in C!

    labs.greynoise.io/grimoire/202

    #linux #reversing #strace #ptrace #gdb

  18. Stratoshark: Computer debugging tool: like wireshark, but for system calls instead of network packets
    stratoshark.org/
    #via:hackernews #wireshark #debugging #syscall #strace #devops #linux #+

  19. [Перевод] Внутрипроцессная трассировка системных вызовов с использованием цепочного загрузчика

    В этой статье мы разберём небольшой инструмент для трассировки системных вызовов. В отличие от strace и аналогов, здесь трассировка будет происходить внутри процесса , без применения ptrace() или эквивалентных вещей. Должен добавить, что это всего лишь демонстрационный пример, поэтому на практике он и близко не сравнится с strace . В частности, он пока не может точно выводить в консоль аргументы для большинства системных вызовов. Именно на примере системных вызовов удобно продемонстрировать цепочную загрузку, и на то есть три причины...

    habr.com/ru/companies/timeweb/

    #timeweb_статьи_перевод #процессор #трассировка #вызов #strace #linux #система #библиотеки_c++ #x86 #vdso

  20. yup, CAP_NET_RAW must be the forbidden fruit on #GitHub runners...

    Or this weird... piece of binary is trying to do something even more evil. Should I run #strace on GitHub action?

    *sigh*

  21. yup, CAP_NET_RAW must be the forbidden fruit on #GitHub runners...

    Or this weird... piece of binary is trying to do something even more evil. Should I run #strace on GitHub action?

    *sigh*

  22. Having a shit of the day, while some Python wrapper on some terrible SDK for some hell-a-expensive device does not error-out while only on #strace -e trace=file >_<

  23. #macOS developers: if you are running an x86_64 container through #Docker and #Rosetta, does #strace work?

  24. From the Linux Update newsletter: @hgesser shows you how to monitor and isolate unknown applications to safeguard your system with the strace analysis tool and the Firejail sandbox linux-magazine.com/Issues/2024
    #Linux #applications #strace #Firejail #applications #OpenSource

  25. Brought to you by #strace-ing sssd to the connect(), getrandom(), and few read()/write() calls before switching to #GnuTLS localization files to get the “error message”, where it became obvious no actual certificates were being checked locally… Then checking #sssd's source code, diving into the #openldap rabbit hole and its dedicated config file, ending with:

    # TLS certificates (needed for GnuTLS)
    TLS_CACERT /etc/ssl/certs/ca-certificates.crt

  26. Updated the article: Monitor file access by Linux processes

    Linux is powerful with the help of small utilities like lsof and strace. They help with monitoring disk and file activity, of new and running processes. #linux #lsof #ltrace #strace #syscall

    Link: linux-audit.com/monitor-file-a

    Feedback and boosts welcome 🤟

  27. Now installing #strace to troubleshoot a #Rust cross-compilation issue: ow, my hubris!

  28. I will admit, I reach for #strace quickly, like I reach for #procmon on Windows. Same root cause (other than me being impatient).

  29. If I have to use #strace to debug your software in the first place, you needed more logging and tracing (and it needed to be discoverable).

    #Debugging #SoftwareComplexity

  30. Today's minor bug is a minor cosmetic `strace` bug: github.com/strace/strace/pull/

    There `strace` mixes order of parameters to `calloc(nmemb, size);` and does `calloc(size, nmemb);` instead.

    All due to "new" `-Werror=calloc-transposed-args` `gcc` warning: gcc.gnu.org/git/?p=gcc.git;a=c

    #strace #bug

  31. Actually made an entire SDF type face, incl. declarative shape syntax to define characters (there're only lines & circular arcs)...

    #GenerativeArt #SDF #SphereTracing #Agents #Boids #Particles #STRACE

    5/x