4 ms·
Man this brings back so many memories :-) Definitely a fun read. Debugging crashes has, in the last decade or so, become something a bit like a "lost art". Noo
by fch42 2y ago
Man this brings back so many memories :-)
Definitely a fun read. Debugging crashes has, in the last decade or so, become something a bit like a "lost art". Noone looks at coredumps in the cloud ...
I don't want to outdo you on Solaris debugging (plenty of old-time Solaris folks at Oxide who are totally capable to show how to get things like open files and their contents from a coredump, or how to configure the system to include those should it not be there ... etc ... etc ... Solaris has the best coredumps for all that's worth ...).
A note on the fix side of things though, while adding pthread_get_attr_np() for stack location/size gives Solaris the Linux interface, it already has its own for those - pthread_attr_getstack{size,addt}(), see https://docs.oracle.com/cd/E19455-01/806-5257/6je9h032l/index.html https://docs.oracle.com/cd/E19455-01/806-5257/6je9h032l/inde... - I happen to remember this because I used this decades ago somewhere in the Solaris name lookup code to choose at runtime between using alloca() and malloc() ... don't ask. Those were different times.
- seanhunter 2y ago> Solaris has the best coredumps for all that's worth I remember debugging a gnarly c++ crash in some vendor code we had extended on solaris circa 1998 and I ended up with a coredump[1] which, when I loaded it into the sun workshop debugger, caused the debugger to dump core. That's one of those moments you go and get a coffee while figuring out what to do next. [1] From a runaway recursive process
- tomsmeding 2y agoThat just means you get to debug a core dump debugger core dump!
- sunshowers 2y agoTrue, if you look at my libc PR I added getstackaddr as well: https://github.com/rust-lang/libc/pull/3788 https://github.com/rust-lang/libc/pull/3788 But stacker already has an implementation that uses the np method, and it was easier to co-opt that.