Live data from Hacker News

Using /proc to get a process' current stack trace

ops.tips

21–30 of 69 posts

Re: Using /proc to get a process' current stack trace

#21
post #7
post #2

Instead 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…

Yes, it feels strange to hear millennials talk about UNIX, when they are actually talking about GNU/Linux, and many things don't apply to e.g. OS X, Aix or many other variants.

...the article doesn't say unix at all with the exception of when the go code at the end is in fd_unix.go in it's source trace.

Re: Using /proc to get a process' current stack trace

#22
post #11

If 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...

This is about the kernel's stack trace during a system call, not the user space stack trace.

Yes, and if you want to know the user space stack, you may be able to attach gdb to the process: https://stackoverflow.com/questions/2308653/can-i-use-gdb-to...

Re: Using /proc to get a process' current stack trace

#23
post #2

Instead 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…

Even if that were the case, a free software hegemony is surely better than a proprietary Microsoft hegemony.

Re: Using /proc to get a process' current stack trace

#24
post #5

Earlier quoted context omitted.

What is the non alternative O/S that has complete hardware support? fwiw openbsd / freebsd have been painless to install on every machine I have tried in the last 5 years.

How's the support for bluetooth on openbsd these days?

Also, how many of the aforementioned bsds use drivers that were ported from the Linux kernel tree?

Re: Using /proc to get a process' current stack trace

#25
post #2

Instead 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…

> Instead of teaching people how to do this portably across all UNIX-like systems, by sending SIGABRT to the process

Sending SIGABRT doesn't do what the article is talking about, on any UNIX. Perhaps you would learn something from listening to the kids these days, like the distinction between a kernel stack and a userspace stack.

Re: Using /proc to get a process' current stack trace

#26
post #7

Earlier quoted context omitted.

Yes, it feels strange to hear millennials talk about UNIX, when they are actually talking about GNU/Linux, and many things don't apply to e.g. OS X, Aix or many other variants.

...the article doesn't say unix at all with the exception of when the go code at the end is in fd_unix.go in it's source trace.

I was supporting the parent post about doing stuff in Linux only way, instead of UNIX in general.

Re: Using /proc to get a process' current stack trace

#27
post #2

Instead 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…

Umm, what is the alternative O/S that has complete hardware support?

Any illumos-based operating system: SmartOS, OmniOS, Tribblix, or any BSD-based one: OpenBSD, NetBSD, FreeBSD.

Re: Using /proc to get a process' current stack trace

#28
post #6
post #2

Instead 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…

This mainly about grabbing the kernel stack trace. There's not a portable way to do that. Also, doesn't SIGABRT generally kill off the process?

A kernel should always be compiled with symbols / source code inside of it -- that the Linux kernel doesn't have full support for CTF says more about it than it does about CTF.

Yes, a SIGABRT will get you a core file and will kill a process, but if your process is hanging in an endless loop (like the author's was), one already has far bigger problems, and keeping such a process running will not amount to much.

Re: Using /proc to get a process' current stack trace

#29
post #2

Instead 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…

Even if that were the case, a free software hegemony is surely better than a proprietary Microsoft hegemony.

Write for yourself -- I've no problem paying Apple Computer for a solution which I plop down on a table, turn on, and start using immediately after that without having to fiddle with it.

Re: Using /proc to get a process' current stack trace

#30
post #25
post #2

Instead 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…

> Instead of teaching people how to do this portably across all UNIX-like systems, by sending SIGABRT to the process Sending SIGABRT doesn't do what the article is talking about, on any UNIX. Perhaps you would learn something from listening to the kids these days, like the distinction between a kernel stack and a userspace stack.

My illumos based kernel begs to differ.

And I'll listen to the kids when they actually start understanding what they are doing and why they are doing it, that is, when they learn how to use a computer.

Post reply on HN