Thunderbird Uses OpenGL – Who Knew?

I have a laptop and a desktop system (as well as a bunch of other crap, but let’s ignore that for a moment). Both laptop and desktop are running openSUSE Tumbleweed. I’m usually in front of my desktop, with dual screens, a nice keyboard and trackball, and the laptop is sitting with the lid closed tucked away under the desk. Importantly, the laptop is where my mail client lives. When I’m at my desk, I ssh from desktop to laptop with X forwarding turned on, then fire up Thunderbird, and it appears on my desktop screen. When I go travelling, I take the laptop with me, and I’ve still got my same email client, same settings, same local folders. Easy. Those of you considering heckling me for not using $any_other_mail_client and/or $any_other_environment, please save it for later.

Yesterday I had an odd problem. A new desktop system arrived, so I installed Tumbleweed, eventually ssh’d to my Laptop, started Thunderbird, and…

# thunderbird

…nothing happened. There’s usually a little bit of junk on the console at that point, and the Thunderbird window should have appeared on my desktop screen. But it didn’t. strace showed it stuck in a loop, waiting for something:

wait4(22167, 0x7ffdfc669be4, 0, NULL)   = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TKILL, si_pid=22164, si_uid=1000} ---
rt_sigreturn({mask=[]})                 = -1 EINTR (Interrupted system call)
wait4(22167, 0x7ffdfc669be4, 0, NULL)   = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TKILL, si_pid=22164, si_uid=1000} ---
rt_sigreturn({mask=[]})                 = -1 EINTR (Interrupted system call)
wait4(22167, 0x7ffdfc669be4, 0, NULL)   = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TKILL, si_pid=22164, si_uid=1000} ---
rt_sigreturn({mask=[]})                 = -1 EINTR (Interrupted system call)

After an assortment of random dead ends (ancient and useless bug reports about Thunderbird and Firefox failing to run over remote X sessions), I figured I may as well attach a debugger to see if I could get any more information:

# gdb -p 22167
GNU gdb (GDB; openSUSE Tumbleweed) 7.11
[...]
Attaching to process 22167
Reading symbols from /usr/lib64/thunderbird/thunderbird-bin...
[...]
0x00007f2e95331a1d in poll () from /lib64/libc.so.6
(gdb) break
Breakpoint 1 at 0x7f2e95331a1d
(gdb) bt
#0 0x00007f2e95331a1d in poll () from /lib64/libc.so.6
#1 0x00007f2e8730b410 in ?? () from /usr/lib64/libxcb.so.1
#2 0x00007f2e8730cecf in ?? () from /usr/lib64/libxcb.so.1
#3 0x00007f2e8730cfe2 in xcb_wait_for_reply () from /usr/lib64/libxcb.so.1
#4 0x00007f2e86ecc845 in ?? () from /usr/lib64/libGL.so.1
#5 0x00007f2e86ec74b8 in ?? () from /usr/lib64/libGL.so.1
#6 0x00007f2e86e9a2a9 in ?? () from /usr/lib64/libGL.so.1
#7 0x00007f2e86e9654b in ?? () from /usr/lib64/libGL.so.1
#8 0x00007f2e86e966b3 in glXChooseVisual () from /usr/lib64/libGL.so.1
#9 0x00007f2e90fa0d6f in glxtest () at /usr/src/debug/thunderbird/mozilla/toolkit/xre/glxtest.cpp:230
#10 0x00007f2e90fa1003 in fire_glxtest_process () at /usr/src/debug/thunderbird/mozilla/toolkit/xre/glxtest.cpp:333
#11 0x00007f2e90f9b4cd in XREMain::XRE_mainInit (this=this@entry=0x7ffdfc66c448, aExitFlag=aExitFlag@entry=0x7ffdfc66c3ef) at /usr/src/debug/thunderbird/mozilla/toolkit/xre/nsAppRunner.cpp:3134
#12 0x00007f2e90f9ee27 in XREMain::XRE_main (this=this@entry=0x7ffdfc66c448, argc=argc@entry=1, argv=argv@entry=0x7ffdfc66d958, aAppData=aAppData@entry=0x7ffdfc66c648)
at /usr/src/debug/thunderbird/mozilla/toolkit/xre/nsAppRunner.cpp:4362
#13 0x00007f2e90f9f0f2 in XRE_main (argc=1, argv=0x7ffdfc66d958, aAppData=0x7ffdfc66c648, aFlags=) at /usr/src/debug/thunderbird/mozilla/toolkit/xre/nsAppRunner.cpp:4484
#14 0x00000000004054c8 in do_main (argc=argc@entry=1, argv=argv@entry=0x7ffdfc66d958, xreDirectory=0x7f2e9504a9c0) at /usr/src/debug/thunderbird/mail/app/nsMailApp.cpp:195
#15 0x0000000000404c4a in main (argc=1, argv=0x7ffdfc66d958) at /usr/src/debug/thunderbird/mail/app/nsMailApp.cpp:332
(gdb) continue
[Inferior 1 (process 22167) exited with code 01]

OK, so it’s libGL that’s waiting for something. Why is my mail client trying to do stuff with OpenGL?

Hang on! When I told gdb to continue, suddenly Thunderbird appeared, running properly, on my desktop display. WTF?

As far as I can tell, the problem is that my new desktop system has an NVIDIA GPU (nouveau drivers, BTW), and my laptop and previous desktop system both have Intel GPUs. Something about ssh’ing from the desktop with the NVIDIA GPU to the laptop with the Intel GPU, causes Thunderbird (and, indeed, any GL app — I also tried glxinfo and glxgears) to just wedge up completely. Whereas if I do the reverse (ssh from Intel GPU laptop to NVIDIA GPU desktop) and run GL apps, it works fine.

After some more Googling, I discovered I can make Thunderbird work properly over remote X like this:

# LIBGL_ALWAYS_INDIRECT=1 thunderbird

That will apparently cause glXCreateContext to return BadValue, which is enough to kick Thunderbird along. LIBGL_ALWAYS_SOFTWARE=1 works equally well to enable Thunderbird to function, while presumably still allowing it to use OpenGL if it really needs to for something (proof: LIBGL_ALWAYS_INDIRECT=1 glxgears fails, LIBGL_ALWAY_SOFTWARE=1 glxgears gives me spinning gears).

I checked Firefox too, and it of course has the same remote X problem, and the same solution.

It’s OK to be Wrong in Public

I’ve spent a reasonably long time with computers. I’ve been doing something with either software or hardware (mostly software) for pretty close to three quarters of my current lifespan. I started when I was about 10, but (perhaps unsurprisingly) nobody was paying me for my work yet then. Flash forwards a few decades, and I have a gig I rather enjoy with SUSE, working on storage stuff.

OK, “yay Tim”. Enough of the backstory, what’s the point?

The point (if I can ball up my years of experience, and the experience of the world at large), is that, in aggregate, we write better software if we do it in the open. There’s a whole Free Software vs. Open Source thing, and the nuances of that discussion are interesting and definitely important, but to my mind this is all rather less interesting than the mechanics of how F/OSS projects actually work in practice. In particular, given that projects are essentially communities, and communities are made up of individuals, how does an individual join an existing project, and become accepted and confident in that space?

Continue reading

The Politics of Resentment

I’ve been reading The Archdruid Report regularly for a long time now, because unlike me, John Michael Greer posts every week and always writes something interesting. Given that we’ve got a federal election coming up in Australia and that I’ve mentioned one of JMG’s notions on the current state of politics to several people over the last few months, I though I’d provide a TL;DR here:

If you want, you can split people in the US into four classes, based on how they get most of their income:

  1. The investment class (income derived from returns on investment)
  2. The salary class (who receive a monthly salary)
  3. The wage class (who receive an hourly wage)
  4. The welfare class (who receive welfare payments)

According to JMG, over the last fifty years or so, three of these classes of people have remained roughly where they are; the investment class still receives returns on investment (modulo a recession or two), the salary class still draws a reasonable salary, and life still sucks for people on welfare. But the wage class, to be blunt, has been systematically fucked over this time period. There’s a lot of people there, and it’s this disenfranchised group who sees someone outside the political establishment status quo (Trump) as someone they can get behind. Whether or not Trump is elected in the US, there’s still going to be a whole lot of people out there pissed off with the current state of things, and it’s going to be really interesting to see how this plays out.

You should probably go read the full post, because I doubt I’ve done it justice here, but I don’t think it’s unreasonable to imagine the same (or a similar) thesis might be valid for Australia, so my question is: what, if anything, does this mean for our 2016 federal election?

Oops, That Didn’t Work

As an experiment, we’ve written a play. It might be viable to perform in an actual theatre, provided there’s a large screen with a projector that a few between-scene montage things can be played on. Failing that, we’ll just have to run with a short film version.

OOPS, THAT DIDN’T WORK
(a Tragedy in Three Acts, based on a true story)

by Tim Serong and Morgan Leigh

 

Cast of Characters

TIM, cranky software developer
MORGAN, lover of robots and tech promised by golden age science fiction
SUPPORT, various LIFX support people, QA people and possibly Android developers*

* (These are several different people in real life, but it should be easier to perform as one character)
Continue reading

Some Photos from Nuremberg

The Basslink cable was cut this morning in order to repair it. Concerns that this could cause Tasmanian internet speeds to go to shit appear to have been well founded (see #basslink on Twitter). In my case, my NBN wireless has gone from 21Mbps/5Mbps to 1Mbps/4Mbps, i.e. my download speed is a twentieth of what it was before, but my upload is about the same. So I may as well post some photos, right?

Continue reading

A Gentle Introduction to Ceph

A Gentle Introduction to CephI told a little story about Ceph today in the sysadmin miniconf at linux.conf.au 2016. Simon and Ewen have already put a copy of my slides up on the miniconf web site, but for bonus posterity you can get them from here also. For some more detail, check out Lars’ SUSE Enterprise Storage – Design and Performance for Ceph slides from SUSECon 2015 and Software-defined Storage: Sizing and Performance.

Update (2016-02-07): The video of the talk can be found here.

Pets vs. Cattle

I was at SUSECon 2015 in Amsterdam a few weeks ago, which, aside from being a great conference, was an opportunity to actually interact with my colleagues in person for a change. So I finally got to meet Adam Spiers after working-ish with-ish him for at least three-ish years (strictly speaking we’re on different-ish teams), and one of the first things he asked was for my take on the Pets vs. Cattle cloud computing metaphor, because in addition to knowing my way around high availability, distributed storage and cloud foo, my wife and I actually do farming which means I might be qualified to have an opinion on the matter.

Continue reading

Wait, What?

Something odd just happened, so I thought I’d better screencap it for posterity.

I’ve had a Twitter account since some time in 2011. It looks a bit like this:

twitter-tserongBy blind accident, I happened to notice something resembling a clone, named @tszrong, which looks like this:

twitter-tszrongMaybe it was petty of me, but I thought it appropriate to report this account for impersonation. This resulted in the following email from Twitter Support (I’ve omitted the part at the bottom with the actual links and whatnot, but you get the idea):

twitter-support-impersonationIncredibly, the name on my goverment-issued photo ID does actually match the name on my Twitter account, but I will not be uploading a copy of this for Twitter to verify. Partly this is because I don’t want digital copies of my government-issued photo ID unnecessarily floating around the aether, and partly it’s because… SRSLY? Just look at the profile pages. Please.

Snow in the Forest

“How’d you solve the icing problem?”
“Icing problem?”
“Might want to look into it.”
Iron Man (2008)

On a particularly cold Saturday morning a couple of years ago, my mobile phone couldn’t get any signal for a few hours. But I didn’t really care, because I had breakfast to eat, animals to feed, and nobody I urgently needed to talk to at the time. Also it came good again shortly after midday.

The following week the same thing happened, but for rather longer, i.e. well into the evening. This was enough to prompt me to use my landline to call Optus (our mobile phone provider) and report a fault. The usual dance ensued:

“Have you tried turning it off and on again?”
“Yes.”
“Have you tried a different handset?”
“Yes.”
“A different SIM?”
“Yes.”
“Holding the phone in your other hand?”
“Yes.”
“Sacrificing a lamb to the god Mercury?”
“Yes.”

I might be misremembering the details of the conversation, but you get the idea. Long story short, I got a fault lodged.

Later I received a call – on my mobile – asking if my mobile was working again. “Indeed it is, and you wouldn’t have been able to make this call if it wasn’t”, I replied. Then I asked what the problem had been. “Let me check”, said the support person. “Uhm… It says here there was… 100mm of ice on the local tower.”

Flash forwards to a couple of days ago, when snow fell down to sea level for the first time since 2005, and my mobile phone was dead again. I can only assume they haven’t solved the icing problem, and that maybe the local NBN fixed wireless tower suffers from the same affliction, as that was dead too for something like 24 hours.

It was very pretty though.

Snow in the Forest

Get off my Lawn

When I was about the right age to first think that taking compromising photos of myself might be good for a lark, technology was a little different. Mobile phones that weren’t actually bricks anymore could show maybe two lines of pixelated text on an unpleasantly glowing background, terrible quality digital cameras were barely affordable, and connecting to the internet actually had a sound – kind of like KSShhh-aaa-KWEO-pung-pung-drhdrhdrhd-KHH, but it went for longer than that. Or maybe it was: mobile phones only existed in gangster movies where they were installed as part of a car, digital cameras didn’t exist, and I only had access to a few local BBSes. I forget the specifics, but that’s not the point – the point is that when I was in my teens, technology was shit, and nobody had any of it. Now, technology is excellent, everybody has all of it, it’s really easy to use, and the ways in which we interact with our technology shape the ways we expect our technology to work.

If I write an email to someone, I’m thinking “I will type my message in this box here, hit SEND, and then they will receive the message and read it”. I am not thinking “I will type my message in here, hit SEND, then it will be transmitted in plain text across a vast network of computer systems, through a number of mail servers, possibly be recorded by several government agencies in case I’m a terrorist, be stored for a little while in a mail spool and possibly backed up by some ISP, before eventually being downloaded and read by the intended recipient”.

Same with photos: “I will take a picture and share it with my wife” is a distinctly personal experience (regardless of what it’s a photo of), and that’s what I’m thinking at the time. I am not thinking “I will take a picture with my phone which will then be uploaded across that same vast network to a cloud system somewhere and stored for Eris-only-knows how long in some other jurisdiction which can probably be hacked by script kiddies”.

Technology now is all about communicating with people, and about sharing our experiences, and that we can do this without having any idea what’s actually going on is fantastic. The price though is that with each service we use, we give up a certain amount of privacy, and what privacy we give up is not necessarily obvious.

To go back to the compromising photo example: When all I had was a little film camera, nobody I knew ever took photos they wouldn’t be happy for random strangers to see, because we all knew that we had to take the film to get processed – the mechanics of how the technology worked were at least somewhat obvious to the people using the technology. As far as I am aware, there are no nude photos in existence of my teenage self and partners, because we didn’t want those perverts in the photo shop to see them.

I want a world where user experience accurately reflects potential privacy – not “sharing to circles”, or allegedly private “private messages”, but where any share that could conceivably result in non-private communication is preceded by a dialog that states “I hope you know that this will go down on your permanent record”. Because privacy is important – as Bruce Schneier said: “Privacy is not about something to hide. Privacy is about human dignity. Privacy is about individuality. Privacy is about being able to decide when and how we show ourselves to other people.”