Re: Question about core dumps and swap space.
Hi On Mon, Oct 19, 2015 at 10:11 PM, Nick Hollandwrote: > [...] > and thus, I'll suggest you just don't worry about it. IF you manage to > find a way to panic your machine, drop the memory wy down to 2G or > so, reproduce it and worry about a 2G core dump. Nick, In this case boot.conf: machine memory=2G would be enough? or should one get other ram sticks...? Thanks > And -- even if you do have a system panic, very often developers can > make sense out of what went wrong from the output of the debugger's > trace and ps commands, rather than having to dig through an entire core > dump. This is always what they ask for FIRST. > > Nick.
Re: Question about core dumps and swap space.
Thanks for your answer and, the detailed explanations. > The core dumps in question here are for when the OS panics. Core dumps > can be used by developers to look at what went wrong, but in order to do > so, you may need everything that was in RAM at the time of the panic. That answered my question fully, thanks. > So...the kernel can dump to swap (whatever was in swap wasn't in RAM, > thus wasn't part of what caused the panic). On next boot, savecore will > find the dump in swap, and save it to /var. > > So that means swap has to be at least the size of RAM and you have to > have AT LEAST that much space FREE on your /var partition. Your 256G > SSD just got ~70G smaller. Ouch. Yes, that I understood. > ... or ... > > you can look at the big picture and realize... > 1) you probably aren't a developer. > 2) you probably haven't seen a core dump. Yep, true. > 3) you probably wouldn't know what to do with the core dump. Me not (who knows what comes in the future) but, a developer. > 4) if you got a core dump and wanted to send it to a developer, a 32G > core dump would probably create a lot of problems for everyone. Yes, from the view of a user (I have no problems to admit, that I don't know things), I don't expected, that a core dump really could have 32 GB of size. As you say before - Ouch. > 5) that's a freaking big chunk of your SSD devoted to stuff you are > unlikely to ever do anything with! Yep, I will delete swap and use it for other things. > and thus, I'll suggest you just don't worry about it. IF you manage to > find a way to panic your machine, drop the memory wy down to 2G or > so, reproduce it and worry about a 2G core dump. Not possible, there are 4 x 8 GB in it. Where we are again at the size problem from before. > And -- even if you do have a system panic, very often developers can > make sense out of what went wrong from the output of the debugger's > trace and ps commands, rather than having to dig through an entire core > dump. This is always what they ask for FIRST. Ok, I use OpenBSD only for some weeks / months more or less often. I got back my ThinkPad from repair and took now more time to read things and play around ... it is like a puzzle where you come across this kind of questions.
Re: Question about core dumps and swap space.
Thanks for your answer. > 2015/10/20 6:29 "Christoph R. Murauer": >> >> Hello ! >> >> I readed the FAQ 4.8 about partioning my drive but have a little problem >> of understanding. >> >> The machine has 32 GB physical RAM, > > Wow. Way cool. Yep. > >> the disc is a 256 GB SSD > > That's not shabby, either. It was there, I prefer a good old HD. >> (yes, I know, >> I should not use swap on a SSD) > > Have you been reading this thread? > > http://marc.info/?t=144492611700013=1=2 Yes, I readed it in parts but, thanks for the link. >> and, I installed the latest snapshot from >> yesterday. So far so good. >> >> Disklabel likes to create in auto layout b: swap with 23,2 GB and e: >> /var >> with 30,2 GB. >> >> If I follow the FAQ, then core dumps should not work. > > 2G RAM, 4G swap on my netbook running openbsd. > > I have lots of core dumps sitting around. I have not seen any the size > of physical memory. Nothing close. Even firefox doesn't leave that > much of a dump when it bombs. > > Hmm. Xombrero, from when I was playing with that, left a coredump of > 512M. Firefox left one at 197M. Time to rm those. Yes, Xombrero is nice, I hate Firefox (maybe it is because my first browser was Mosaic / Netscape). >> I could resize swap >> and /var to have the same (or bigger size) as the physical RAM which is >> also no problem. My question - or better the things I don't understand >> (I >> found no informations and also had no panic message till now) are, which >> size had a core dump and, will core dumps work, if swap (on /var is >> enough >> place to copy the core dump file from swap to /var/crash after a reboot) >> is smaller then the physical RAM ? My question is meaned, that swap is >> only used for core dumps - nothing more. > > So, you don't plan on using swap for deep sleep or powered-down system > suspend? Nope, because suspend works but resume not. I will send a dmesg later, maybe someone is interested. A user at bsdforen.de told me, that is because of the optimus (you can't switch off the discrete GPU in the BIOS) in the machine (I don't know whether this is true or not). But it is not important because even I had in the past another operating system, I used it not really. > Why do you have 32G of RAM? What kind of working sets do you expect > the applications you'll be running to have? I bought the machine (a ThinkPad W541 with optical drive) as offered (the only ThinkPad with optical drive at this time) at the European u:book project, where you can buy hardware (twice a year) with round 20 % discount. At the time I bought it, I hadn't decided whether I stay (I came from Mac OS X) with Linux (because of the hardware support) or FreeBSD. After playing around, I remembered, that I saw round 1997 (or maybe it was a littlebit later - can't remember) the OpenBSD website (cool time with ISDN) and I gave it a try. What should I say, it simple worked out of the box and, does what I want / need (thanks to all developers). So, the machine is already there - now it will be used with OpenBSD. > Do you expect chain-reaction core dumps, where one application hits an > uncaught exception and dumps core and then its parent or some other > application that is communicating with it bombs and dumps core, too? ;-) > In other words, do you expect to ever have all 32G filled with stuff > that all at once dies and dumps core? Nope, but as I wrote, it is already there.
Re: Question about core dumps and swap space.
Thanks for your answer. > On Mon, October 19, 2015 8:01 pm, Joel Rees wrote: >> >> I have lots of core dumps sitting around. I have not seen any the size >> of physical memory. Nothing close. Even firefox doesn't leave that >> much of a dump when it bombs. >> >> Hmm. Xombrero, from when I was playing with that, left a coredump of >> 512M. Firefox left one at 197M. Time to rm those. >> >> Why do you have 32G of RAM? What kind of working sets do you expect >> the applications you'll be running to have? >> > > He's referring to savecore(8) dumps when the kernel crashes, not > application crashes. > > Tim. Yes, thats true. But no problem to answer that.
Re: Question about core dumps and swap space.
Hello ! Thanks for your answer. > Nick, In this case boot.conf: > > machine memory=2G > > would be enough? or should one get other ram sticks...? > > Thanks I keep it as option. For now and till I experienced no panic, I will use the SSD without swap. If I replace the SSD with a normal (big size) HD, I will not care of 32 + something GB for swap.
Re: Question about core dumps and swap space.
On 10/20/15 07:09, Abel Abraham Camarillo Ojeda wrote: > Hi > > On Mon, Oct 19, 2015 at 10:11 PM, Nick Holland >wrote: >> [...] >> and thus, I'll suggest you just don't worry about it. IF you manage to >> find a way to panic your machine, drop the memory wy down to 2G or >> so, reproduce it and worry about a 2G core dump. > > Nick, In this case boot.conf: > > machine memory=2G > > would be enough? or should one get other ram sticks...? Forgot about that...but yes, I suspect that would work nicely. But still -- remember what developers ask for most often: a good problem report: panic message, trace and ps output, a dmesg and info about how to repeat the problem. If people would reliably provide that, they'd make developers very very happy. Not being a coder, I hesitate to say this, but I don't recall anyone being asked for a system core dump by a developer. (my statement is accurate: I don't recall. The conclusions you draw may or may not be :) Nick.
Re: Question about core dumps and swap space.
On 2015-10-20 07:55, Nick Holland wrote: But still -- remember what developers ask for most often: a good problem report: panic message, trace and ps output, a dmesg and info about how to repeat the problem. If people would reliably provide that, they'd make developers very very happy. Not being a coder, I hesitate to say this, but I don't recall anyone being asked for a system core dump by a developer. (my statement is accurate: I don't recall. The conclusions you draw may or may not be :) One of the nice things about having a successful savecore(8) is that the captured dump can provide all the critical bits. So dumps are very useful to have. Tools like ps(1) and dmesg(8) have -N and -M options for post-mortem analysis. The crash(8) man page has been extremely helpful to me over the years. And, there's also very helpful guidance in FAQ 2.4. I've never sent anyone a crash dump, but I've certainly pulled info from them to make a dish of copypasta.
Re: Question about core dumps and swap space.
Thanks for your answers. The best would be, to use the man pages if needed. For now, my main question is answered - all other things will come from alone. >> And -- even if you do have a system panic, very often developers can >> make sense out of what went wrong from the output of the debugger's >> trace and ps commands, rather than having to dig through an entire core >> dump. This is always what they ask for FIRST. > > Exactly. > So how do you extract this information from a modern laptop without > serial? Your question is true. But let's stop this on this point because it will end in argue or a flame. I forgot in the OP to tell, that the ThinkPad has no serial port.
Re: Question about core dumps and swap space.
On 19/10/15 23:18 Christoph R. Murauer wrote: > Hello ! > > I readed the FAQ 4.8 about partioning my drive but have a little problem > of understanding. > > The machine has 32 GB physical RAM, the disc is a 256 GB SSD (yes, I know, > I should not use swap on a SSD) and, I installed the latest snapshot from > yesterday. So far so good. > > Disklabel likes to create in auto layout b: swap with 23,2 GB and e: /var > with 30,2 GB. > > If I follow the FAQ, then core dumps should not work. I could resize swap > and /var to have the same (or bigger size) as the physical RAM which is > also no problem. My question - or better the things I don't understand (I > found no informations and also had no panic message till now) are, which > size had a core dump and, will core dumps work, if swap (on /var is enough > place to copy the core dump file from swap to /var/crash after a reboot) > is smaller then the physical RAM ? My question is meaned, that swap is > only used for core dumps - nothing more. The dumps have the size of the physical memory, perhaps a wee bit smaller. The save dir does not need to be on /var, you can replace /var/crash with a symlink that points to, say, a dir in /home or on some other partition. In theory savecore can compress the dump, I've never tried it, and I don't know how much it buys. Rtfm savecore(8). If you want to test it, don't need to wait for a panic. Rtfm ddb(4) how to trigger the kernel debugger, once there just type boot crash. And wait, with that machine it will take a while, I guess. oh, and: http://marc.info/?l=openbsd-misc=135672896123632=2 Never worked for me though, it didn't recover the dumps. One day I'll figure out why. tilo
Re: Question about core dumps and swap space.
On 19/10/15 23:11 Nick Holland wrote: > ... or ... > > you can look at the big picture and realize... > 1) you probably aren't a developer. > 2) you probably haven't seen a core dump. That's all very nice, but sometimes you don't get to pick your battles, they come and pick you. > and thus, I'll suggest you just don't worry about it. IF you manage to > find a way to panic your machine, drop the memory wy down to 2G or > so, reproduce it and worry about a 2G core dump. Yes, if the bugger is easy to reprduce thats fine. Some are. Some are not. > And -- even if you do have a system panic, very often developers can > make sense out of what went wrong from the output of the debugger's > trace and ps commands, rather than having to dig through an entire core > dump. This is always what they ask for FIRST. Exactly. So how do you extract this information from a modern laptop without serial? tilo
Re: Question about core dumps and swap space.
Thanks for your answer. > One of the nice things about having a successful savecore(8) is that > the captured dump can provide all the critical bits. So dumps are very > useful to have. Tools like ps(1) and dmesg(8) have -N and -M options > for > post-mortem analysis. > > The crash(8) man page has been extremely helpful to me over the years. > And, there's > also very helpful guidance in FAQ 2.4. > > I've never sent anyone a crash dump, but I've certainly pulled info > from them to make a dish of copypasta. At the first crash, I will come back to that.
Re: Question about core dumps and swap space.
> Forgot about that... [ ... ] Yep, I will do that and, keep that > But still -- remember what developers ask for most often: a good problem > report: panic message, trace and ps output, a dmesg and info about how > to repeat the problem. If people would reliably provide that, they'd > make developers very very happy. in mind. Thanks.
Question about core dumps and swap space.
Hello ! I readed the FAQ 4.8 about partioning my drive but have a little problem of understanding. The machine has 32 GB physical RAM, the disc is a 256 GB SSD (yes, I know, I should not use swap on a SSD) and, I installed the latest snapshot from yesterday. So far so good. Disklabel likes to create in auto layout b: swap with 23,2 GB and e: /var with 30,2 GB. If I follow the FAQ, then core dumps should not work. I could resize swap and /var to have the same (or bigger size) as the physical RAM which is also no problem. My question - or better the things I don't understand (I found no informations and also had no panic message till now) are, which size had a core dump and, will core dumps work, if swap (on /var is enough place to copy the core dump file from swap to /var/crash after a reboot) is smaller then the physical RAM ? My question is meaned, that swap is only used for core dumps - nothing more. Thanks for your answers. Regards, Christoph
Re: Question about core dumps and swap space.
On Mon, October 19, 2015 8:01 pm, Joel Rees wrote: > > I have lots of core dumps sitting around. I have not seen any the size > of physical memory. Nothing close. Even firefox doesn't leave that > much of a dump when it bombs. > > Hmm. Xombrero, from when I was playing with that, left a coredump of > 512M. Firefox left one at 197M. Time to rm those. > > Why do you have 32G of RAM? What kind of working sets do you expect > the applications you'll be running to have? > He's referring to savecore(8) dumps when the kernel crashes, not application crashes. Tim.
Re: Question about core dumps and swap space.
2015/10/20 6:29 "Christoph R. Murauer": > > Hello ! > > I readed the FAQ 4.8 about partioning my drive but have a little problem > of understanding. > > The machine has 32 GB physical RAM, Wow. Way cool. > the disc is a 256 GB SSD That's not shabby, either. > (yes, I know, > I should not use swap on a SSD) Have you been reading this thread? http://marc.info/?t=144492611700013=1=2 > and, I installed the latest snapshot from > yesterday. So far so good. > > Disklabel likes to create in auto layout b: swap with 23,2 GB and e: /var > with 30,2 GB. > > If I follow the FAQ, then core dumps should not work. 2G RAM, 4G swap on my netbook running openbsd. I have lots of core dumps sitting around. I have not seen any the size of physical memory. Nothing close. Even firefox doesn't leave that much of a dump when it bombs. Hmm. Xombrero, from when I was playing with that, left a coredump of 512M. Firefox left one at 197M. Time to rm those. > I could resize swap > and /var to have the same (or bigger size) as the physical RAM which is > also no problem. My question - or better the things I don't understand (I > found no informations and also had no panic message till now) are, which > size had a core dump and, will core dumps work, if swap (on /var is enough > place to copy the core dump file from swap to /var/crash after a reboot) > is smaller then the physical RAM ? My question is meaned, that swap is > only used for core dumps - nothing more. So, you don't plan on using swap for deep sleep or powered-down system suspend? Why do you have 32G of RAM? What kind of working sets do you expect the applications you'll be running to have? Do you expect chain-reaction core dumps, where one application hits an uncaught exception and dumps core and then its parent or some other application that is communicating with it bombs and dumps core, too? In other words, do you expect to ever have all 32G filled with stuff that all at once dies and dumps core? > Thanks for your answers. > > Regards, > > > Christoph
Re: Question about core dumps and swap space.
On 10/19/15 17:18, Christoph R. Murauer wrote: > Hello ! ... > If I follow the FAQ, then core dumps should not work. I could resize swap > and /var to have the same (or bigger size) as the physical RAM which is > also no problem. My question - or better the things I don't understand (I > found no informations and also had no panic message till now) are, which > size had a core dump and, will core dumps work, if swap (on /var is enough > place to copy the core dump file from swap to /var/crash after a reboot) > is smaller then the physical RAM ? My question is meaned, that swap is > only used for core dumps - nothing more. The core dumps in question here are for when the OS panics. Core dumps can be used by developers to look at what went wrong, but in order to do so, you may need everything that was in RAM at the time of the panic. So...the kernel can dump to swap (whatever was in swap wasn't in RAM, thus wasn't part of what caused the panic). On next boot, savecore will find the dump in swap, and save it to /var. So that means swap has to be at least the size of RAM and you have to have AT LEAST that much space FREE on your /var partition. Your 256G SSD just got ~70G smaller. Ouch. ... or ... you can look at the big picture and realize... 1) you probably aren't a developer. 2) you probably haven't seen a core dump. 3) you probably wouldn't know what to do with the core dump. 4) if you got a core dump and wanted to send it to a developer, a 32G core dump would probably create a lot of problems for everyone. 5) that's a freaking big chunk of your SSD devoted to stuff you are unlikely to ever do anything with! and thus, I'll suggest you just don't worry about it. IF you manage to find a way to panic your machine, drop the memory wy down to 2G or so, reproduce it and worry about a 2G core dump. And -- even if you do have a system panic, very often developers can make sense out of what went wrong from the output of the debugger's trace and ps commands, rather than having to dig through an entire core dump. This is always what they ask for FIRST. Nick.