Lazy man's guide to debugging in Gentoo
If you ever tried to either report a bug or solve it yourself, you have probably come across terms like "backtraces" and gdb (GNU Debugger). Here I will try to explain very shortly how to get meaningful backtraces on Gentoo and why you should do so.
What are backtraces and why should I use them?
In layman's terms, backtraces are like a flight recorder of the programme — it records the history of the programme's usage and when (and how) the programme crashed. This makes them a very useful source of information for debugging a programme — whether you do it yourself or just want to report a bug you noticed.
But in order to make them work you have to compile the programmes you want debugged with the debug symbols and then run the programme inside a debugger. Portage by default strips these symbols out of the programme, to make a smaller and thus faster binary.
How do I enable meaningful backtraces?
It is actually quite easy — just add two words to your /etc/make.conf and when the package recompiles next time you will have the needed debugging information for it.
The words in question are:
- add
-ggdbto theCFLAGSstring → e.g.CFLAGS="-march=native -O2 -pipe -ggdb"; and - add
splitdebugto theFEATURESstring → e.g.FEATURES="parallel-fetch splitdebug".
Note: The two examples above are just to illustrate how cca. the string will look like later on. Do not copy-paste the rest of them!
After that is done, it is a good idea to remerge glibc with emerge -1 glibc, to make Valgrind take the debugging information into consideration. Also note that you will have debugging symbols only for the packges you emerged after you made the above two changes. You can check which debugging symbols are already present if you browse through /usr/lib/debug/.
Does it affect the performance of my system?
As far as I understand, not if you use FEATURES="splitdebug". This is because with splitdebug the debugging information is still stripped from the binary and saved to an external file, so the GNU Debugger, Valgrind etc. can look them up there when needed. Because the binary is still stripped from them from what I gather, you should not feel any performace drop. (Otherwise then if you would use FEATURES="nostrip", which would keep the symbols in the binary, making the programme run slower.)
What does happen is that by using the -ggdb compile flag, it takes longer for the programme to compile and it takes more disk space (tampakrap reported about 11 GiB). But unless you are in a hurry or tight on disk space, I still think it is a worthwile endavour.
So there you are: In my opinion there is no big reason why you should not be a good sport and produce meaningful backtraces. You never know when they will be needed.
More info
This is just a lazy man's guide, so these are the utmost very basics to help make meaningful bug reports. If you want to know anything about it you are well advised to read at least:
- the official Gentoo documentation on How to get meaningful backtraces;
- Diego Ellio "Flameeyes" Pettenò's blog post on Debug code and debug information;
- KDE TechBase also has a nice tutorial on How to create useful crash reports
- Although tempting, do not confuse the above with
USE="debug", which enables debugging calls and tools of the programme itself. Unless you know what you are doing that is not what you want. And especially not when you are just trying to submit a useful bug report.
Update: added information about disk space and compile time
Cherokee Market ToS and PP
People who regularly read my blog will notice that I started removing accounts from pages and services of whose ToS and PP I do not agree with. So I decided to also read the ToS and PP of services before I create an account there. And obviously, if I do not agree with them, do not create an account there.
And if I am already reading it, I decided I may as well make the best for the community and publicly post my thoughts about them and notify the company or person who wrote them. I feel this is the only way to make a change.
So, as the first ToS and PP that I will analyse publicly, I chose those of Cherokee Market. Cherokee Market is the brand new market of the small, fast and user friendly web server Cherokee. The idea behind it is to make it dead easy to install and set up web applications (e.g. Drupal, Wordpress, Trac, Nagios) with only a few clicks directly from your web server's web interface.
Please do take notice that this is not intended as a complete review of the Cherokee Market's ToS and PP, but just my comments while I read it. You are still advised to read it yourself, as you should read any other legal contract you sign!
In short, I think Cherokee Market's ToS and PP are OK, but I would rather see some changes I commented on below, before I agree to it.
Sorry for downtime
Dear readers,
terribly sorry that my website was not available in the past few days.
From what I can guess the issue was that Cyberpipe, which kindly hosts my website, has been updating its web server and has had some issues.
Since I currently lack both time and money for a migration, I will continue to be hosted here, but I already have plans to host myself, which I hope will become reality still in 2011.
My current plan is to get a Plug Computer (e.g. FreedomBox, SheevaPlug, GuruPlug) and put on it:
- Cherokee as my web server
- Drupal 7 to run my website and blog (will have to migrate from Drupal 6 as well)
- Seeks and YaCy for web search, preferably combined!
- some distributed social network node (e.g. GNU Social, Diaspora, )
- ownCloud for file and photo album sharing, music hosting, encrypted P2P backups etc. etc. etc.
- PageKite in case I need it for tunneling
- …and probably as much stuff as the box can handle ;)
Thank you for reporting the website went down and thank you for understanding. I cannot promise that the uptime will be better when I am on my own, but at least I will be the one to blame ;)
hook out → studying while drinking a nice cuppa English breakfast tea spiced with some cardamom husks
Even less is even more in modern X
Oh How I Migrated from HAL to udev, Survived Again and Found Another Neat Trick
More then two years ago I wrote a post on how to migrate to X with HAL, evdev and RandR and get rid of unneeded settings. Today I will share with you how to migrate X from HAL to udev and get rid of unneeded XML clutter.
In case you use Gentoo and have recently updated X and found out your graphical envorinment is suddenly not working (as it should), that is because now in Gentoo — I suppose other distributions have or will follow soon — x11-base/xorg-server-1.9 and with it the rest of X11R7.6 is in the stable tree for most architectures. Since the previous stable (in Gentoo) version X11R7.5 included x11-base/xorg-server-1.7 this is a big leap. HAL was dropped in favour of pure udev, and XCB has been made a requirement (the latter does not influence your settings).
This migration took me quite a few hours to get right, so I decided to summarise it below.
Double post
I just noticed that my previous story — the one about issues in the post-Cablegate era — has been published twice.
I'm terriby sorry for the inconveniance and have no idea how that happened. Since both instances have already been linked to, I'll keep both alive.
hook out → going to brew some tea and study
Issues and challenges for the post-Cablegate world
Already the birds are chirping (they're not tweeting anymore) about WikiLeaks and its Cablegate affair, how it came to be, how it got blocked, how it got filtered, DDoS'ed, removed from Amazon's cloud service, PayPal, MasterCard, Visa, how its founder became wanted by the Interpol and arrested for sex crimes, how a 16-year old boy was arrested for DDoS'ing etc. etc., so I won't bother you with this. Also I am not really interested much in what the cables say and whether they should have leaked or not.
No, this post is about what I think we have to watch out after Cablegate.
In all honesty, I think that traditional media and the general public will get bored with WikiLeaks and forget about it in about a months' time. That is unless WikiLeaks has some pretty well-planned and well-timed tricks up his sleeve (which still may be the case).
But only then things will start to become interesting! And not so much in diplomacy — sure, diplomacy will again become more secure, pick its words wiser and in general be more discreet again, but that is nothing new. I think the consequences will be a lot severer and with a wider impact …and it could be even more dangerous, that it will (try to) be done silently. Not just for the openness' sake, but because what is at stake.
So, the cat is out of the bag. While everyone is running after it (whether they claim to see a kitty or a tiger), let us stop, sit down and watch what the bag and the people chasing the cat are doing …
Issues and challenges for the post-Cablegate world
Already the birds are chirping (they're not tweeting anymore) about WikiLeaks and its Cablegate affair, how it came to be, how it got blocked, how it got filtered, DDoS'ed, removed from Amazon's cloud service, PayPal, MasterCard, Visa, how its founder became wanted by the Interpol and arrested for sex crimes, how a 16-year old boy was arrested for DDoS'ing etc. etc., so I won't bother you with this. Also I am not really interested much in what the cables say and whether they should have leaked or not.
No, this post is about what I think we have to watch out after Cablegate.
In all honesty, I think that traditional media and the general public will get bored with WikiLeaks and forget about it in about a months' time. That is unless WikiLeaks has some pretty well-planned and well-timed tricks up his sleeve (which still may be the case).
But only then things will start to become interesting! And not so much in diplomacy — sure, diplomacy will again become more secure, pick its words wiser and in general be more discreet again, but that is nothing new. I think the consequences will be a lot severer and with a wider impact …and it could be even more dangerous, that it will (try to) be done silently. Not just for the openness' sake, but because what is at stake.
So, the cat is out of the bag. While everyone is running after it (whether they claim to see a kitty or a tiger), let us stop, sit down and watch what the bag and the people chasing the cat are doing …
And back to Deco
Switched back to Deco theme.
If I don't find a theme that suits me and I find the time I might hack my own theme for the next version of my website.
Major changes of my ~/.plan ← important!
Introduction
This is not easy for me, so I'll just go ahead and say it.
For the same reason I cannot guarantee how long, short; coherent or not it will be. So please bear with me.
The thing is I'm a geek.
I've been using, reading, learning and studying about free software, free culture, open standards, privacy, net neutrality and other geeky stuff for ages! In fact, to such length and breadth that lately it grew over my head and started getting counter-productive. I'm talking being on at least a dozen or two mailing lists (even after unsubscribing from dozen or two last year!), following 40+ news feeds, a few podcasts, StatusNet/identi.ca and other sources.
The thing is I'm also a law student, soon aged 27, with 14 exams and a diploma/master's thesis planned for the next two years.
The thing is I also have a life; a family, a girlfriend, a dog; and would like to enjoy sailing, go dancing, get a job …you get the idea.
And as absurd as this may sound, I have to start doing less in order to get more done.
Reading and following
In order to achieve that, I'll have to limit myself to following less themes and select only a few which therefore I'll follow more in depth.
It was very hard for me to chose, since I care for many themes almost equaly as much — from diverse FOSS projects, free software in general, open standards, net neutrality and privacy all over to free culture!
So my consideration was such: I am not much of a coder, so right now burrowing even deeper into coding is not a good idea. But with a decade or so experience of trying to be one and following all these topics, I hope I am at least a good lawyer with decent insight in coding. Therefore, I won't follow so much the technical bits anymore and concentrate a bit more on legal stuff.
This still leaves a great deal of legal themes though, so I had to limit myself there as well. Again, I pondered for a while and decided that for now I will try to brush up on my license skills and be active on net neutrality and privacy.
For all other fields I followed so far, (at least for now) I'll have to depend on others.
If it's of use to anyone I'm attaching the list of the feeds I've been following so far.
Advocation, Fellowship FSFE etc.
The same as above applies here as well. I reasoned that I'll be able to help the most with Gentoo, FSFE, its FTF and ELN, Fellowship and so on with licensing and net neutrality (especially ACTA, since that's my diploma/masters' thesis). Especially in our Fellowship group, in order for our group to flourish, I'll have to concentrate on those topics and on coordinating itself.
This means in order to make our Fellowship group even better, members who care deeply about certain themes, will have to be more active and take over those themes in the group. This by far doesn't mean I'm withdrawing myself from the Fellowship and FSFE — quite the contrary! My plan is to burden myself less with too many topics, so I can better concentrate on a few, better direct the group and as soon as possible start a Slovenian FSFE team. I hope my fellow Fellows understand what I mean and will take the initiative.
I'm a suit.
Yes, I'm a suit. Recently on a mailing list someone pretty much called me as such in a slightly sneering way and that triggered the thought. I'm a geeky lawyer, steadily sailing towards my 30's. If I start waving transparents, singing protest songs and throwing eggs, it'd just look silly. I'm better at words and legal texts then coding. So, I think the best thing I can do is help with legal and abstract matters.
So, yes, I'm a suit. I'm a suit so you don't have to be. I'm a suit so those who are dream in source code can safely code and so that the younger generation has something to fight about and is able to…
Coding
For my whole adolescent life, I've been helping with small things with all sorts of projects — be it just reporting bugs, occasionally translating something, giving ideas, finding solutions or meeting up different projects in order for better cooperation. This is also something I will sadly have to stop doing for the most part.
But being a hacker by heart, of course this means, I won't be able to sustain myself from scratching an occasional itch, hacking it up, publishing or reporting it ;)
Website
If anyone has been following me online for the past decade, I've been posting news, tips and curiosities from the FOSS world for quite some time — ranging from my (in theory) weekly news about FOSS and Linux games on Cyberpipe's old website to my humble homepage, which in current form has been in existance since 2005 (and as a static page since 2003).
I've already hinted before I plan some major visual and organisational changes of my webpage. Maybe now is the time to explain a bit what I had in mind and put to rest any misconceptions of my untimely web demise.
Layout-wise, so far I've come up with the idea to slice the front page into three sections (possibly columns):
| articles | blog entries | microblog posts |
| longer, thorough and least often updated | short or long, relatively quickly written and more often posted | very short and very often updated |
Of course there would be subpages for each section to make it more managable and RSS and/or Atom feeds.
Content-wise I will probably write more law-related articles, yet still blog and microblog about both law and small cool geeky tips I find.
Most importantly though, less time wasted reading means more time for thinking and writing — so I hope to actually write more in the future. Also, since microblogging will be present on the website as well, it should get the best of both worlds.
(Maybe Acquia Slate is not the best theme either …I'll have to find a new one someday soon :P)
Finishing thoughts
I've planning on doing that for days, writing this post for two days now and it's been a painful ordeal.
It feels almost a bit like abandoning someone you care for greatly, because you know it's for their own good. So I sincerely hope you understand my plight and more importantly my aims on doing this.
Thank you for taking the time to fight through these lines. I hope it wasn't as hard to read them as it was to write them down.
hook out → in hope I will soon have time to actually enjoy drinking tea again…
Back to Acquia Slate
Since summer is over (where I live) the website uses Acquia Slate theme again.
With Drupal 7.0 slowly coming to fruit, HTML5 being already out, plug computers being increasingly powerful and me being more and more busy, I am making plans on a new website already.







