Earlier quoted context omitted.
Haha sorry. It's a Solaris version of DWARF or pdb style metadata for their kernel. https://docs.oracle.com/cd/E19253-01/816-5041/syntax-20/inde... For that to be useful, you'd need the addresses in question, which is why it'd be an ASLR bypass. The kernel needs to give higher level information by default so it can sanitize the output. And the debugging symbols exist on Linux anyway, they're just DWARF (which ironica…
CTF is just a specially compressed format and specification of embedding the source code into the binary; it's a complement to DWARF format, not the format itself. The documentation you cite even says it's similar, meaning that it's not DWARF.
Using /proc to get a process' current stack trace
61–69 of 69 posts
Re: Using /proc to get a process' current stack trace
#62If you are running java instead of a c program the proc stacktrace shows you just the virtual machine state. You can still get a stacktrace of your java threads[1]. How about other languages? Python, ruby? [1] https://stackoverflow.com/questions/4876274/kill-3-to-get-ja...
No, this is a _kernel_ backtrace: what is happening in kernelspace on behalf of your process. If the work is being done in userspace (that is, in state R; the thread isn't in a syscall or page fault handler), you'll see essentially nothing here. I just tried it on a userspace busylooper and got this:
[] exit_to_usermode_loop+0x57/0xb0
[] prepare_exit_to_usermode+0x20/0x30
[] 0xfffffffffffffff
Java, Python, C++ nothings all look pretty similar.If you want a userspace stack trace, you need a different tool. If you're using an interpreted (or perhaps JITted) language, yes, you probably want something language-specific.
Also note the current stack trace is a per-thread concept, not a per-process one. If you're looking at a multithreaded program, you want to target the thread(s) of interest with "/proc//task//stack".
Re: Using /proc to get a process' current stack trace
#63Earlier quoted context omitted.
It's not a Solaris specific feature; FreeBSD has it as well: https://www.freebsd.org/cgi/man.cgi?query=ctf&apropos=0&sekt... Linux is the one lagging behind, as usual. How is embedding source code an "ASLR bypass"?
OK, it's a dtrace thing that got ported to FreeBSD with dtrace. That still doesn't make it "Unix" any more than Linux's proc access. Embddeding debugging information in a way that allows to you to use it (ie. in a way that you'd care about the format as an end user) implies giving you kernel addresses, which implies an ASLR bypass. If it's an implementation detail, then DWARF works great.
Re: Using /proc to get a process' current stack trace
#64Re: Using /proc to get a process' current stack trace
#65Earlier quoted context omitted.
OK, it's a dtrace thing that got ported to FreeBSD with dtrace. That still doesn't make it "Unix" any more than Linux's proc access. Embddeding debugging information in a way that allows to you to use it (ie. in a way that you'd care about the format as an end user) implies giving you kernel addresses, which implies an ASLR bypass. If it's an implementation detail, then DWARF works great.
And if "FreeBSD has it too" is our standard for portable UNIX features, then /proc counts thanks to linprocfs.
Re: Using /proc to get a process' current stack trace
#66Earlier quoted context omitted.
It's not a Solaris specific feature; FreeBSD has it as well: https://www.freebsd.org/cgi/man.cgi?query=ctf&apropos=0&sekt... Linux is the one lagging behind, as usual. How is embedding source code an "ASLR bypass"?
OK, it's a dtrace thing that got ported to FreeBSD with dtrace. That still doesn't make it "Unix" any more than Linux's proc access. Embddeding debugging information in a way that allows to you to use it (ie. in a way that you'd care about the format as an end user) implies giving you kernel addresses, which implies an ASLR bypass. If it's an implementation detail, then DWARF works great.
Re: Using /proc to get a process' current stack trace
#67Instead of teaching people how to do this portably across all UNIX-like systems, by sending SIGABRT to the process, the article is steeping them in GNU/Linux only way of doing things. This feels exactly like the '90's of the past century, where a lot of people with computer-related careers had no idea that there were other operating systems and other ways of doing things (better): an intel-based PC tin bucket with Wi…
SIGABRT in most places is not going to both get the stack trace and keep the process running. In fact, I would argue that if you are running something that continues working after it receives a signal telling it to /abort/, it's a bug. What do the word abort mean to you? As for SmartOS, as someone who ran it at home and in production for years: Keep flying that flag, I guess. I liked it. But I also realized that Joye…
Linux has no containers, cgroups aren't anything conceptually close to zones. There are 56 different solutions to virtualization on Linux, all competing, mainly because everyone there is still flapping on deployment and lifecycle management. We'll just have to disagree and vehemently at that.
As for Joyent having no resources: you debug it and fix it yourself. That's precisely how Linux got to be the hegemony that it is today. Oh, how quickly we forget, how short our memory is...
Re: Using /proc to get a process' current stack trace
#68Re: Using /proc to get a process' current stack trace
#69Nicely formatted site. Anyone know if/what static site generator/theme is being used? Couldn't find anything on the footer, site tags, or his GitHub that would reveal that...