Loud ramblings of a Software Artisan

Friday 11 October 2019

Getting a stack trace out of a Flatpak

So, the flatpak application you use just crashed

How do you report it? If you file a bug just saying it crashed, the developers will probably ask for some stack trace. On Fedora 30, for example, abrt (the crash reporting system) doesn't provide any useful information. Let's see if we can extract that information.

We are gonna have to use the terminal to use some command line tools. Flatpak has a tool flatpak-coredumpctl to use the core dump in the flatpak sandbox. The core dump is an image of the program memory when it crashed that will contain a lot about the crash. But by default the tool will not be able to provide much useful info. There is some initial setup need to be able to have a better output.

First you must make sure that you have the right Debug package for the right version of the Flatpak runtime. Well, actually, for the corresponding SDK.

To check the runtime and version:

$ flatpak info org.gnome.MyApp

Check the line that starts with Sdk:

Sdk: org.gnome.Sdk/x86_64/3.34

What is after Sdk: could be a different value, and that's what is important here. This is what we are looking for

You can use the command flatpak install --user org.gnome.Sdk.Debug (in our example, just put the one found above) to install it. WARNING: it's likely big. For example the debug package for Gnome 3.34 is 3.4GB here. I recommend installing it for the user as unless you have a lot of space on your system filesystem (if separate) it will fail.

Then you need to install the debug info for the app. It is the app ID suffixed with .Debug. In that case org.gnome.MyApp.Debug.

Both will provide the debug info that is necessary to see where in the code things crashed.

$ flatpak-coredumpctl org.gnome.MyApp

This is gdb being launched inside the flatpak. It will take a while to process, and use quite a good chunk of memory. What follows is mostly for people that are not familiar with `gdb` ; if you are, just go ahead, you know what to do.

When it is ready, something like this will be printed in the terminal:

Program terminated with signal SIGSEGV, Segmentation fault.

And then at the end, the prompt: (gdb)

You can type where and press "Enter". This is the stack trace: lines starting with #NNN where NNN is an increasing number. You can copy that output to provide it to the developers in the bug report.

Then you can type quit followed by "Enter" when you are done.

Hope that's useful to you.

Monday 10 November 2008

Smith's Law

Smith's Law says this:

Murphy was optimistic

You bet! This morning, my "micro" server light was solid blue, server whose disk I had just replaced ; the console (still connected) was not responding. Reboot hard, freeze after 5 minutes (with a weird click when it happen). Disassemble, clean up the fans, check, as I suspected overheating, let cool down. Retry. Blast! Still the same, but with an even shorter uptime. I still hope it is not the hard drive that is DOA.

The problem is now, what to run the server on. I have a spare PIII that works well, but I want the hard drive as is. Problem it is a 2.5" IDE, I need the adapter. Problem, I need a car. The closest electronic store is La Source by Circuit City née Radio Shack[1], but they haven't had anything I need or want to buy in forever. Ah yes, because my car has been towed at the shop and I don't have a loaner yet, I can't get the needed adapter.

Update later, I can get a car, the dealership still has to work on mine, send the courtesy shuttle over, drive me there and provide me with a car. In the end I have the adapter, the "new server" is now more silent. It was not without pain. Old BIOS that can't boot on just any drive, grub that fail on said machine (know issue, I still know LILO, so no biggie), and udev mysteries that I solved by forcing to regenerate the "binding" to eth0 by MAC address.

Notes

[1] Hint: they just filed for bankruptcy in both the US and Canada

Thursday 4 September 2008

EEE, etc.

Dear lazyweb,

I have this EEE PC 2GB, and I'd like to install something I can be productive with, not the clunky s*** that come with it[1].

So far I tried the following:

  • Mandriva Flash: would be good, but the Live flash from GUADEC does not install on the 2GB model as it needs more space. *sigh* FAIL
  • openSUSE 11.0: installed from the DVD after reducing the packages and end up with a non-functionnal system: YaST does not start, no wifi[2], no Ethernet, etc. Gotta have to debug it and fix it. FAIL
  • EEE-Ubuntu Ubuntu-EEE: I don't like their statement bashing open solutions. Sorry guys I use Linux for the freedom. Anyway it seems to not like to be installed on 2GB either. FAIL
  • EEEdora: the long list of hacks did deter me.
  • Debian: they upstream broke the kernel. Not a good sign idea.

So what else?

I'm not installing on an external SD card as I want to keep that for useful removable storage

Thanks.

Update: I got ahold of an iso for EEEdora from this howto. It did install almost without glitch (I actually had to make a symlink for the live CD to find the DVD drive, go figure). Did install but I get a functional but akward system without login and without a proper user (it can't even sudo), where either logout or reboot do an actual shutdown.

Update 2: it is Ubuntu-EEE I tried not EEE-Ubuntu. How confusing!

Update 3: kernel is broken in upstream no Debian.

Notes

[1] I'll keep that rant for later

[2] almost expected

Tuesday 16 October 2007

Spam Filtering

Thomas, for my spam filtering I use Bogofilter in combination with maildrop on my server. I followed this recipe that I improved with my own setup and since I mostly forgot I was receiving spam.

The only caveat is training the filter for false negative, what I just to is move them to a "Spambox" folder and run bogofilter -s -B * in there. And for those who wonder, I didn't feel the CPU usage on my P2 @266MHz. Beside patching courier IMAP to have hooks for the Junk/NonJunk flag and have Evolution actually set them (Thunderbird does it) I don't see another easy solution.

Saturday 15 September 2007

Free Software lock out

Apple has never been Free Software friendly with their iPod. The whole business is based on the vendor and application lock-in of iTunes.

But this time it is apparently worse. Apparently Apple has decided that the database file for the song has to be validated with some cryptographic hash, or it appears to be. If the hash is not valid, the iPod refuse to playback any music (source). Read also BoingBoing's Cory Doctorow rant. This make gtkpod, Rhythmbox, Amarok and all these fabulous tools no longer working with the new devices.

How long before it get cracked? No idea. But one thing is sure. If you use Linux, don't buy an iPod. If you use OpenSolaris, don't buy an iPod. If you use BSD, don't buy an iPod. If you don't like this way of doing things, don't buy an iPod. I'm actually surprised that this didn't happen sooner, or maybe I'm like seeing too much evil or a giant conspiracy in what is an implementation detail...

Update: Lennart remind us some facts. I guess I might not be that wrong.

Thursday 19 July 2007

Mandriva Flash

In the bag of swag (actually it was out of the bag, but that's just splitting hair), there was a 2GB USB flash. Beside holding the whole conference material, it also has a Mandriva live system. Unlike other LiveCD this is actually a persistent one as the flash drive is used to store the user's data.

I hadn't tried Mandriva for over half a decade and I must admit that Mandriva has done an awesome job. This time I'm impressed. It is simple to install and it works, almost. The only problem came out of the 915resolution hack to have the LCD panel in something else than 800x600. Not that I had to tweak, but I had to configure manual in the clicky-UI and reboot.

Monday 25 June 2007

OLS 2007

OLS 2007 is being held in town starting this Wednesday. I won't attend the conference, but I was wondering if I should join one of the out-of-conference beer BOFs. If you are in town and owe me a beer, leave a message here :-) (not obligated if I owe you one).

Wednesday 14 February 2007

Thin clients

Another Linux thin client. This time it is the Canadian company Koolu (just ignore the proprietary Flash like I did). The interesting thing is that they run Ubuntu and OLPC (choice) on it, booting via PXE. OLPC is potentially the biggest deployment of AbiWord. The machine is still able to run big software like OpenOffice, and even has an optional hard drive.

Another interesting thing is that they have John "maddog" Hall as a CTO.

Update (02/15/07): the demo video is available in Ogg

See also: Linutop. BTW, about Linutop, if you are interested in it and are around Montreal, there will be a presentation of Linutop at the monthly meeting of FACIL. Info in French

Saturday 18 November 2006

Sony and Linux

Sometime the world is full of contradiction. On one side you have Sony that fight on the ground of DRM and put spyware on their music discs, and the other hand you can run Linux on their devices. I think it is more related to the organization of the company and how they are business driven. In that case Linux is business driven.

  • Running Linux on Playstation 3. The Playstation was rumored to include lot of anti-freedom features, include one that would mark the game media to not play it in another machine after the first time (to avoid the used game market). I don't know what happened to it, but apparently it is gone. But you can run Linux on the Playstation 3 and it is supported by Sony. Note that Playstation 2 had a similar option as well. But the Playstation 3 might be able to provide a decent hardware platform for distributed computing with its cell-processor.
  • Mylo to ship, and it runs Linux and Qtopia. Not cheap either: USD$350.

Monday 23 October 2006

Laptop software suspend and Linux

There seems to be a bit of misinformation spreading about Linux and software suspend not working reliably on Linux. Let me quote:

After running Linux on a variety of different systems, I have to say, it's utterly amazingly refreshing to use something whose software was designed specifically for its hardware. I close it and it goes to sleep. I open it and it wakes up. In almost four years with my previous laptop, I never got power management working well enough that I would trust it.

and

He's "amazingly refreshed" at finally having working power management, after suffering through years and years of crap. I remember the first little while with my Powerbook, where I'd pray a bit every time I'd close the lid, only to eventually be enlightened: it won't crash on me a few times a day! The uptime on my Powerbook is basically "how long since the last kernel upgrade", like it bloody should be.

Guys! Which dimension have you been living in? Or are you suffering from a reality distorsion field. Software suspend has been working for a long time reliably on Linux, on reliable hardware. Let me summarize:

  • 1999: Pentium 166 based Toshiba Satellite. apm -s works fine with Debian/Linux for i386
  • 1999: PowerBook 3400 with hand installed Debian/Linux for PowerPC (no installer by the time I installed it). Worked fine by closing the lid (or something like that). Much more stable than the MacOS 8.x that came with it.
  • 1999: Compaq Armada 1700: apm -s works fine with Debian/Linux for i386
  • 2000: IBM ThinkPad 600E: closing the lid suspends to RAM. With Debian/Linux for i386
  • 2001: Toshiba Tecra: apm -s works fine. RedHat Linux 6.0
  • 2004: PowerBook G3/400 finally moved to Debian/Linux for PowerPC, then later in late 2004 to Ubuntu. Closing the lid suspends to RAM. Much like it was doing on MacOS X.
  • Dec. 2005: IBM ThinkPad Z60t: suspend works great out of the box with Ubuntu Dapper Flight 2 (2nd pre-release of 06.06 LTS). This machine end up beating the uptime of my server at home because of its universal UPS. Well it was until I upgraded to Edgy... and it is back on a new cycle.

I must admit that sometime things are not completely white. For example Dapper final release kernel, break the resume horribly on my laptop, since 2.6.15-21. Kernel 2.6.15-25 still has the problem, I don't know for -27. -19 works fine, I'm sticking to it. Malone #49078. Edgy kernels are broken a bit worse with 2.6.17: Malone #63967, this is not with other boot-related breakage like the console messup (update: that last one have had a huge improvement) or grub not working properly.

But these are not worse than suspend not working on PC laptop with the Operating System you are forced to purchase that is supposed to be supported by the manufacturer... (and sometime it works way better in Linux) given that most of the time you are never getting this fixed... unlike for Linux. And for MacOS X, it better be working given the very narrow hardware range it supports.

Thanks pcolijn for contributing into rectifying the truth. The dark side is always more attractive and easier, but in the long run will NOT win.

Update: I forgot about that Toshiba Tecra I had from work in 2001.

Monday 16 October 2006

And you want to run binary X drivers?

Are you sure want to run a binary X driver as root[1]? Think twice

Notes

[1] X runs as root

Saturday 12 August 2006

... or Closed Source AMDATI

ATI people retract the open sourcing rumors by AMD. Will that turn into a "division war"? Looks much like the Java open sourcing saga...

I let you make your opinion.

Update: and Aaron has some thought

Wednesday 9 August 2006

Open Source ATIMD ?

AMD is considering open sourcing former-ATI graphics drivers, at least a large part. Taken from kernelslacker.

If that is true, I can only congratulate AMD to make the right choice, or at least a good step forward in the right direction. Given AMD's help for open source support of their 64-bits platform, it sounds logical.

Saturday 5 August 2006

ThinkPad with preloaded Linux, but non-Free drivers?

miguel: doesn't that ThinkPad T60p require the proprietary ATI driver for the FireGL V5200? Doesn't that proprietary X driver require proprietary kernel modules that are in disagreement with the kernel license according to some key Linux contributors? Does this go together with the decision of Novell to no longer ship the proprietary kernel modules with their distributions[1]?

Notes

[1] decision I clearly respect

Tuesday 25 July 2006

OLS 2006, last report

My last report of OLS:

  • Greg's keynote told us that binary kernel modules in the kernel are illegal.
  • Dave Airlie's presentation about driver has an epilogue, or when ATI cannot review 600 lines of code in 4 month. It is just a repeat of the talk, but in writing. Let's hope AMD-ATI merger will change things in the right direction.
  • Samsung experiment putting Linux on a Digital Still Camera, and they consider that it fits the bill. If only we got better Linux support from them. They are the second company to publish something like that after Ricoh in OLS a few years back. Still no real product though.