small pixel drawing of a pufferfish j3s.sh

add firefox coredump post
Jes Olson j3s@c3f.net
Fri, 20 Oct 2023 20:41:33 -0500
commit

2c432e63bc6a3f5c9c20a1bc50760f1c4ab2f811

parent

eb5c257ed66fb6b5119339b6b6487547b66f2f01

2 files changed, 79 insertions(+), 0 deletions(-)

jump to
M templates/thoughts.htmltemplates/thoughts.html

@@ -4,6 +4,7 @@ {{ template "nav" . }}

<div id="main"> <h3>thoughts</h3> <h4>2023</h4> +<li><a href="/thought/recover-lost-text-by-coredumping-firefox.html">recover lost text by coredumping firefox</a></li> <li><a href="/thought/shell-tip-print-json-with-printf.html">shell tip: print json with printf</a></li> <li><a href="/thought/i-will-never-participate-in-weird-internet-caste-systems.html">i will never participate in weird internet caste systems</a></li> <li><a href="/thought/vore-a-new-rss-feed-reader.html">vore: a new rss feed reader</a></li>
A thought/recover-lost-text-by-coredumping-firefox.html

@@ -0,0 +1,78 @@

+recover lost text by coredumping firefox + 2023-10-20 + +sometimes websites fuck up and erase your text. + +websites either glitch, crash, freeze, or are just designed +extremely poorly, and your 5+ minutes of writing effort +have disappeared into the æthernet. the usual ctrl+z doesn't +work - either does the back button. your text is gone. + +it often feels like you might never be capable +of recapturing that writing, even if you try +to re-think and re-write it. + +a tangible loss - some magic that's gone forever. + +or sometimes it's just a really fucking annoying survey +question that you answered, but you didn't even really want +to do the survey, but you had already started so you're not +backing out now, and also you just HAD to know which hogwarts +familiar you were, even though everyone knows you're going to be +the fucking frog that ron owns, but now the fucking browser fucked +up, or maybe it was the website, i don't know, but my text is +god damned gone forever, and i hate this earth, and now i shall +throw my keyboard out the nearest window. + +this type of data loss happens to me far too often, and +when it does, my internal reality turns into a hellscape. + +this also happens to yngmar[0], and he reacts appropriately: + +- Yell "Fuck you and your piece of shit website". +- Close tab +- Do some woodworking, sew clothes, plant trees, + grow crops, help refugees, etc. + + +i recently discovered this little trick to +rescue any text that was recently typed into +firefox. + +coredumping might seem unreliable, but it has +never failed me before. + +1. find the firefox pid + + pgrep -l firefox + +2. attach gdb to firefox and dump its core + + sudo gdb -p <pid> + +3. find your lost text in the coredump + + strings firefox.dump | grep 'phrase-from-your-text' + +4. disconnect gbd + + detach # this detach prevents firefox from dying + # when you type "exit" + exit + +5. remove coredump + + rm firefox.dump + +and that's it! you recovered your text. + +shoutout to klardotsh[1] for inspiring me to post this. + +love, + + +j3s + + +[0]: https://social.tchncs.de/@yngmar/111269159153831442 +[1]: https://merveilles.town/@klardotsh