Linux Developers Consider On-Screen QR Codes For Kernel Panics
An anonymous reader writes "Linux kernel developers are currently evaluating the possibility of using QR codes to display kernel oops/panic messages. Right now a lot of text is dumped to the screen when a kernel oops occurs, most of which isn't easily archivable by normal Linux end-users. With QR codes as Linux oops messages, a smart-phone could capture the display and either report the error string or redirect them to an error page on Kernel.org. The idea of using QR codes within the Linux kernel is still being discussed by upstream developers."
I'm not sure how hard it would be to pull this off in practice, but kudos to the team for improving (or at least thinking about) better usability from the kernel out.
And if no one with a phone is there?
I worry about the long-term applicability of QR codes. In 10 years, are they still going to be convenient to read, or is some guy going to have to dig out an old smartphone to read the error output from his decade old system?
QR codes are highly redundant and don't actually contain much data. There isn't enough space for a stack trace or anything like that. Probaby not even a register dump on those big modern CPUs.
http://michaelsmith.id.au
You gonna need a big bowl to catch all them corn flakes, mister.
Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
Inscrutable error messages seem to be par for the course when you're looking at kernel panics.
Ironically most older x86 motherboards (pre-1994) didn't have an onboard serial port either.
Or just display a short number code. Displaying a QR code won't solve anything, it will just obfuscate the error and leave the user without any easily memorable reference. This sounds more to me like "let's do it because it's modern and hip" rather than it being actually useful.
Anything's an improvement over:
"My computer froze."
"What happened?"
"It put some message on the screen."
"What did it say?"
"Something about an error."
"What error?"
"I dunno. It had some numbers and letters and stuff."
"Win treats sysadmins better than users. Mac treats users better than sysadmins. Linux treats everyone like sysadmins."
Nothing is stopping you from displaying a short summary of the error and a code number in addition to the QR code. Depending on how much information gets jammed into the QR code though, it can be a lot harder to dump that all to the screw and expect a person to remember (or even write it down correctly).
Or do both. Short number code, some diagnostic data on the screen, and a QR code linking to more info. The QR doesn't have to be much more than a couple square cm in a corner of the screen.
It is pitch black. You are likely to be eaten by a grue.
Really? You think your end user who hasn't got the brains to take a screenshot of human readable text and send it to you and who probably has never even heard of QR codes is going to have the presence of mind and technical knowledge and ability to take a picture of the code and send it to you?
That has to be one of the dumbest things I've heard on slashdot...and that's REALLY saying something.
It's even more worrying that the Linux Kernel devs are giving this idea the time of day.
How about a slight modification of a classic: Just change the background color of the display. Even 1 byte RGB gives you 256 messages. (I guess lighting would affect this.)
But back in the days ISA based parallel and serial cards were commonly used and low level enough (using the well known IRQ/ DMA/ memory addresses) to just work and stand in as system console. Today's PCI or USB serial adaptor cards are overpriced (rare) and just that, not the 'real thing' but higher level adaptors, leaving several of the old fashioned protocols unsupported and mostly not being able to be used as ttyS0 (or COM1) as it's neither supported by the low-level drivers nor takes I/O 0x3f8 and irq 4.
No! We cannot do both! It must be either one or the other!
Or enable SOL...
I am NOT buying a fucking cell phone to read a core dump.
Just fuck right off already. Not everyone wants a digital leash.
I do not fail; I succeed at finding out what does not work.
There is only so much information you can store in a couple square cm, if you want it to be able to be reliably retrieved by a camera, qr code or not. Your comment.
The point here is that in a kernel panic, there's no way to save a screen shot or copy-and-paste anything into a file - all you have is (probably) a full kernel dump and a message on the screen, which can be transcribed with errors, and Step 2 is rebooting.
This is why my alternate OS eschews absolute minimalism and includes mandatory "userspace" features in its design, so it can rely on them being present. I handle the whole (multi) boot process within the OS, so I can launch other OSs from within a running instance. Boot process integration was necessary for firmware segmented loading (optionally put part of the OS in firmware, see: Coreboot). Since the OS handles boot itself it can avoid immediately crapping all over memory at boot and instead upon soft-boot the early-environment kernel detects whether the OS is resident in memory, whether the kernel halted properly in a "panic" or froze due to other lockup/powerloss, whether an unrecoverable error occurred, what the error message(s) are, walk the memory manager and move pertinent information out of the way into previously unused memory pages, then load the 2nd stage kernel into RAM with the debug option enabled (unless --no-debug is passed by its bootstrap loader's manual override). Finally the OS continues its boot process and its built in debugger launches, so I can read any detailed prior error messages left, save/print them, and attempt to debug the last thing the kernel or any of its programs was doing, or mark the prior memory free and return to standard operations. While there is no guarantee the RAM is still valid I can even attempt to restore program states and resume operation after a "panic" (if the bug was something small fixable via correcting a few erroneous bytes of memory).
Unlike Linux, my kernel includes many dedicated features of a full operating system, such as text editor, assembler, disassembler, compiler, file-system, debugger etc. so it is larger than Linux kernel itself in footprint. I can optionally remove some of these essential features if needed for my embedded projects, but I never have since memory isn't that expensive -- Being able to debug via serial console a glitched robot after reset is a godsend. Less modularity comes with its downsides, but the pros of being able to deploy programs as cross platform byte-code and have the OS "compile on install" programs into its private internal file system, and cryptographically sign the cached binaries to optionally secure the entire boot process and all running processes, far outweighs the cons. Being able to debug itself is just a side effect of other design decisions.
My "Toy" OS design has many similarities with classic OSs of old (bytecode instead of BASIC baked in), and seeks to address problems I foresaw with lack of hardware enforced sandboxing API in modern OSs: My kernel can run a program or its modules as emulated bytecode if the code is untrusted, or is loaded as a plugin. I use more than just the two userspace / kernelspace execution privilege levels in order to hardware-enforce something like a submodule level SEGFAULT to grant applications more control over their plugins or runtime scripts (also compiled as bytecode by the OS via scripting API).
4 execution privilege rings are available on x86, as opposed to 2 on ARM and thus some security features are not hardware enforced on ARM -- this is an instance of modern monolithic OS design influencing hardware design (everyone's using only 2, so ARM has 2 rings), much as C'ish calling constructs influenced x86 chipset instructions (ENTER, LEAVE, etc.) which BTW lead to inherently insecure practices such as placing mutable parameters and code pointers on the same stack (stack smashing / overrun is prevented via separate call and data stacks, kind of like good ol' FORTH used -- I'm only able to do so because all executable code is required to pass through the OS compiler / sanity checker).
I'm now seeing many of these features appear piecemeal in higher level constructs: E.g. Google's NACL bytecode for Chrome "apps", or .NET bytecode being able to go native, or Android's JIT and its native code interface, etc. I think future OSs would benefit from adopting better software deployment systems by incorporating a compiler / debugg
I prefer all my BSOD, crashes and core dumps to use the Matrix dripping green characters and pixel crap method of reporting errors. It's easier to see the patterns. Guru meditation # 42
I think it's a great idea to make error reporting easier. I recently experienced an oops but didn't report it because there was no immediate way to do it. However relying on a framebuffer being present is a mistake, in my case it was on an embedded headless system, and framebuffers generally are available only on desktops which are far from being the majority of Linux usage.
Bah. Punch cards are so much better. You young, know nothing, whipper snappers with your newfangled hoosammawhatsits...
Excuse me, but please get off my Pennisetum Clandestinum, eh!
subset of linux users with access to only one device vs the subset of linux users who would troubleshoot a machine via cell phone.... ?
Or just display a short number code. Displaying a QR code won't solve anything, it will just obfuscate the error and leave the user without any easily memorable reference. This sounds more to me like "let's do it because it's modern and hip" rather than it being actually useful.
The QR code can not only indicate the exact location of the error, but can take you to a website on the phone, with a url long enough to log
many key points about the error.
Even if it logs very little, developers will get more input this way than they do now, because when your machine is crashed, you can't report anything and once it reboots, you have other priorities than digging in the last crash dump.
However, other than collecting statistics, it might not do any good. Even when you do submit a dump, you get the request to install debug symbol packages and trigger the crash again. Ah, no, that isn't going to happen. Or there will be necessary drivers installed that taint the kernel, and devs wont touch it until replace your video card, untaint your kernel, and trigger another dump.
Sig Battery depleted. Reverting to safe mode.
Do you even know what a kernel panic is, or what is likely to cause one?
Il n'y a pas de Planet B.
They won't disappear, it's going to be optional and will be seamlessly available next to the text crash.
Cheers Levente Kurusa
From our friends over at Merriam-Webster:
panic
noun
: a state or feeling of extreme fear that makes someone unable to act or think normally
: a situation that causes many people to become afraid and to rush to do something
You were saying...?
Il n'y a pas de Planet B.
The current model of kernel panics is broken.
Currently, we can diagnose a fault if: The user has access to the console (unlikely, machines are usually in data centres, though some of them manage to set up KVM properly) and can take a screen shot (more likely, nowadays, thanks to phone cameras) and the useful information (the backtrace) hasn't scrolled off.
This solution addresses the third part.It does nothing to address the first; and makes the second worse. (You really expect the QR code to be useful after it's been displayed on the crustiest monitor in a datacentre, captured at a weird angle on a phone and sent to us as a badly compressed jpeg?)
I understand the technical reasons why the crash cannot be written to disk - the kernel has crashed, disk drivers are in a bad state.
But can we please write to a reserved partition with a dedicated driver, or something? Or make netconsole a default?
Linux must be ubuntufied. We need to hide everything because it's way to complicated for the common user or his dog. We need more splash-screens to hide all the stuff that makes no sense anyway. Who want's to know if a module didn't get loaded? As a matter of fact, we should remove unnecessary logs (like message, dmesg, audit), because nobody gives a rats ass. Also: Why have a console? Or init-mode 3 ? People want the graphical stuff, let's get rid of all the ballast like command-line. Those few people still using ancient tools like 'make', 'vi' or (o my god) 'ifconfig' should go and find themselves something else to brag with. Linux MUST go mainstream.
Is the point to give the users something useful? I assumed it was to give the devs something to debug. Asking the user to transcribe a kernel stack trace is not likely to happen, but a QR code that encodes a bit of text saying 'please email to crash@linux.org' followed by the stack trace would mean that you'd actually get something vaguely useful in some cases, rather than the user just shrugging and power cycling the box.
I am TheRaven on Soylent News
There isn't, and that is quite common actually. However the QR code could encode more information and, with some nifty algorithms, can be automatically interpreted from a photograph to kernel crash information files.
That would be so tricky that it's probably not feasible for the attacker. Basically you would have to both have a vulnerability in the QR code processing code in the phone and, a compromised Linux kernel in your PC which injects malicious data into the dump.
But yes, you raise an interesting point.
Do you want to mail them physical screenshots? With a qr code, you can mail text.
There are a number of advantages of doing this, non-technical people are likely to be familiar with QR-codes, most people have access to digital cameras and resources to convert the QR code to a link and using this works as long as the screen can be written to. Storage system failure or network system failures wouldn't be a hinder to provide a thorough failure analysis.
The sole disadvantage IMHO is that one have to have a QR encoder resident and functional at the time of a panic. Not a big problem.
Now they want to bury the kernel error messages in a QR code? That REALLY takes the cake.
This is not burying or hiding. It's there in full view if you have a decoder, and even better, you can send it to a mailing list without having to transcribe the sodding thing by hand. Bonus: no transcription errors!
Seems like a win to me especially as no one is ever planning on making it mandatory. It's a fantastic option if you don't have a convenient way to log a serial console.
I'm massively not a fan of exsessive complexity, but this atually sounds like a neat idea.
SJW n. One who posts facts.
Linux was beaten as the first by a long shot. Haiku has had this for 1 3/4 years.
If you gave me a choice between a printer and a giraffe with explosive diarrhoea, i'll get my ladder and my raincoat
A lot of newer motherboards actually have hardware serial and parallel ports again. I've been looking at LGA 1150 motherboards, and I would estimate that at least half of them have those ports.
Eat the rich.
A problem has been detected and Slashdot has shut down to prevent damage to your brain
The problem seems to be caused by the following user: ANONYMOUS COWARD If this is the first time you have seen this Stop error screen, refresh your browser. If this screen appears again, follow these steps:
Check to see if any new topics or comments are properly displayed. If this a new comment, ask Slashdot to filter Anonymous Coward comments you don't need.
If problems continue, disable or remove any newly-posted Anonymous Coward comments. Disable short-term memory options such as recall and storage. If you need to use Moderator points to remove or disable comments, press the drop-down menu below the comment, and then select -1 Troll.
Technical information:
*** STOP: 0x0000050 (0x616E6f6E,0x796D6F75,0x7320636F,0x77617264) ***
*** ANONYMOUS COWARD - Address 63726170 base at 706F7374 datestamp 35343134/code
If you gave me a choice between a printer and a giraffe with explosive diarrhoea, i'll get my ladder and my raincoat
Can kernel panic info also be saved to a disk log instead of just showing it on the screen? It could also be logged to a USB drive or something connected to the network or in the extreme case, CMOS space in BIOS.
Whatever the method, the log information should be easily accessible on reboot without the use of cameras/cell phones etc.
It says, `` ... most of which isn't easily archivable by normal Linux end-users. Abnormal Linux end-users easily archive the text. If you have to use QR codes ... maybe you aren't the right kind of Linux end-user. Just saying.
"Consensus" in science is _always_ a political construct.
Who cares, motherboards still come with expansion slots? PCI 2-Serial/1-Parallel Port Host Controller Card $3.67 If you want a serial card, put one in.
Good idea, but I hope they keep all existing systems in place, and make it optional. Graphics drivers are massively complex, and are probably a significant source of oops. If displaying a QR code means that the kernel needs to interact more with the drivers, and (oh god i hope not) change the resolution to display a QR code, then I expect more fail. People can take photos of the crash messages in 80x25 character consoles anyway, so let's not destroy that.
Ok, then.
Then all we need is a printer to hook up to that serial port.
You could sound the message out in Frequency Shift Keying.
E.g.
http://en.wikipedia.org/wiki/K...
1200 baud is 120 characters per second. So you could dump an uncompressed 80x24 screen of text in 16 seconds. You'd just repeat the dump over and over again.
Software on a mobile phone would capture the FSK and submit it as a bug report.
Perhaps a less whimsical way to do it would be to write to a dump file and submit when the system reboots. E.g. the kernel could keep enough of the Bios alive so that it could switch back to real mode and use int 13h to write to reserved bit of the disk.
echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
How is using using QR codes any improvement over such dusty techniques as unique error numbers, like "ABEND 07235453" - other than it doesn't require any discipline in registering error numbers?
Wouldn't integrating the frame buffer into kernel oops messages be one (small) step into the MS/Windows disease of integrating user land GUI primitives in the kernel?
This seems to be a solution for desktop (or laptop) Linux only - so it shouldn't be the default.
Most of the time when I'm dealing with Linux, it's either as a tablet (android), a server (used to run 150 headless servers, now I run only about 30), or as an embedded device from the low-end (an internet camera or a WiFi router running DD-WRT) to high-end (research lab equipment supported by a vendor.) My work desktop (Ubuntu) already hides as many error messages as possible, and I don't expect any Linux desktops in an office/workplace setting to reveal such messages - whether they're text, QR code, or cryptic IBM-like ABEND number.
Yes, it'll help Linux geeks report kernel oops messages to the kernel developers better (provided they can capture the image). But for most uses of Linux, it's unnecessary complication.
Yes, I do. http://i.imgur.com/zMyvT.jpg
I think having the option to scan the QR code with a simple message to do so is one more way to get the info needed.
Aiming a smartphone at the screen is easier than framing a screen with your phone's camera and hoping for a solid shot without a flash before it does something even stranger.
They're used on beer ads, chain pizza ads, breakfast cereal and at Disney parks.
So yes, I think the average end user has a shot at this.
I'm thinking of Windows in particular, that usually ends up with anywhere from one to a dozen lines of codes to reference.
Linked to a database, it has all the info you need.
It's pretty reliable stuff: http://datagenetics.com/blog/n...
Which is likely why people would rather scan QR codes than take pictures of every magazine ad they see.
"Win treats sysadmins better than users. Mac treats users better than sysadmins. Linux treats everyone like sysadmins."
*cough* you can already do all this if you want.
(just include your magic in the kdump init script / initrd to do with the dump information as you will)
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...