Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

openSUSE factory :: dumpe2fs

# dumpe2fs 
dumpe2fs 1.42.12 (29-Aug-2014)
Segmentation fault

# echo $?
139

# dumpe2fs -h
dumpe2fs 1.42.12 (29-Aug-2014)
Segmentation fault

> rpm -qf `which dumpe2fs`
e2fsprogs-1.42.12-1.2.x86_64

> cat /etc/SuSE-release 
openSUSE 20140909 (x86_64)
VERSION = 20140909
CODENAME = Harlequin
# /etc/SuSE-release is deprecated and will be removed in the future,
use /etc/os-release instead

# ltrace dumpe2fs
__libc_start_main([ "dumpe2fs" ] 
setlocale(LC_MESSAGES, "")                        = "en_US.UTF-8"
setlocale(LC_CTYPE,"")                            = "en_US.UTF-8"
bindtextdomain("e2fsprogs", "/usr/share/locale")  = "/usr/share/locale"
textdomain("e2fsprogs")                           = "e2fsprogs"
set_com_err_gettext(0x401a00, 1, 1, 0x73676f72707366)                              = 0
add_error_table(0x605260, 1, 1, 0x73676f72707366)                                  = 0
__fprintf_chk(0x7f4fcb90f060, 1, 0x403b42, 0x403b3adumpe2fs 1.42.12 (29-Aug-2014)) = 31
getopt(1, 0x7fff9f754798, "bfhixVo:")                                              = -1
ext2fs_open(0, 0x29000, 0, 0 < no return ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

# strace dumpe2fs
execve("/sbin/dumpe2fs", ["dumpe2fs"], [/* 94 vars */]) = 0
brk(0)                                  = 0x15c1000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc391daf000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=153158, ...}) = 0
mmap(NULL, 153158, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc391d89000
close(3)                                = 0
open("/lib64/libext2fs.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3>\1 \360"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=285064, ...}) = 0
mmap(NULL, 2380840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc39194a000
mprotect(0x7fc39198d000, 2097152, PROT_NONE) = 0
mmap(0x7fc391b8d000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x43000) = 0x7fc391b8d000
close(3)                                = 0
open("/lib64/libcom_err.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3>\1 \27"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14712, ...}) = 0
mmap(NULL, 2109960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc391746000
mprotect(0x7fc391749000, 2093056, PROT_NONE) = 0
mmap(0x7fc391948000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x2000) = 0x7fc391948000
close(3)                                = 0
open("/lib64/libe2p.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3>\1`\""..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=32528, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc391d88000
mmap(NULL, 2128304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc39153e000
mprotect(0x7fc391545000, 2093056, PROT_NONE) = 0
mmap(0x7fc391744000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x6000) = 0x7fc391744000
close(3)                                = 0
open("/usr/lib64/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3>\1\340\26"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=19048, ...}) = 0
mmap(NULL, 2113928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc391339000
mprotect(0x7fc39133c000, 2097152, PROT_NONE) = 0
mmap(0x7fc39153c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x3000) = 0x7fc39153c000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3>\1\20\34\2"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1978611, ...}) = 0
mmap(NULL, 3832352, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc390f91000
mprotect(0x7fc39112f000, 2097152, PROT_NONE) = 0
mmap(0x7fc39132f000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x19e000) = 0x7fc39132f000
mmap(0x7fc391335000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1,
0) = 0x7fc391335000
close(3)                                = 0
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3>\1\20o"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=137435, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc391d87000
mmap(NULL, 2213008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc390d74000
mprotect(0x7fc390d8c000, 2093056, PROT_NONE) = 0
mmap(0x7fc390f8b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x17000) = 0x7fc390f8b000
mmap(0x7fc390f8d000, 13456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1,
0) = 0x7fc390f8d000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc391d86000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc391d84000
arch_prctl(ARCH_SET_FS, 0x7fc391d84780) = 0
mprotect(0x7fc39132f000, 16384, PROT_READ) = 0
mprotect(0x7fc390f8b000, 4096, PROT_READ) = 0
mprotect(0x7fc39153c000, 4096, PROT_READ) = 0
mprotect(0x7fc391744000, 4096, PROT_READ) = 0
mprotect(0x7fc391948000, 4096, PROT_READ) = 0
mprotect(0x7fc391b8d000, 4096, PROT_READ) = 0
mprotect(0x604000, 4096, PROT_READ)     = 0
mprotect(0x7fc391db0000, 4096, PROT_READ) = 0
munmap(0x7fc391d89000, 153158)          = 0
set_tid_address(0x7fc391d84a50)         = 4002
set_robust_list(0x7fc391d84a60, 24)     = 0
rt_sigaction(SIGRTMIN, {0x7fc390d7a9f0, [], SA_RESTORER|SA_SIGINFO, 0x7fc390d83890},
NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7fc390d7aa80, [], SA_RESTORER|SA_RESTART|SA_SIGINFO,
0x7fc390d83890}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(0)                                  = 0x15c1000
brk(0x15e2000)                          = 0x15e2000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2434, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc391dae000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2434
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7fc391dae000, 4096)            = 0
open("/usr/lib/locale/en_US.UTF-8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(3)                                = 0
open("/usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=57, ...}) = 0
mmap(NULL, 57, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc391dae000
close(3)                                = 0
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26244, ...}) = 0
mmap(NULL, 26244, PROT_READ, MAP_SHARED, 3, 0) = 0x7fc391da7000
close(3)                                = 0
futex(0x7fc3913348f8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=256420, ...}) = 0
mmap(NULL, 256420, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc391d45000
close(3)                                = 0
write(2, "dumpe2fs 1.42.12 (29-Aug-2014)\n", 31dumpe2fs 1.42.12 (29-Aug-2014)
) = 31
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} ---
+++ killed by SIGSEGV +++
Segmentation fault

a silhouette of a person's head and shoulders, used as a default avatar

openSUSE 11.4 has reached end of Evergreen support

I have posted the following to the openSUSE lists a few moments ago:

as you probably know our initial commitment to support 11.4 within
Evergreen was until July 2014.
http://en.opensuse.org/openSUSE:Evergreen

While I was hoping that we can keep 11.4 alive for some time longer this
is currently not possible from what I would call the "core team" which
is Stefan and myself. We are too busy nowadays to be able to scan and
patch every issue we get aware of.

Thanks to you all who contributed to the success of Evergreen/11.4!

The important message is:

   openSUSE 11.4 Evergreen is not actively maintained anymore!

So if you can, we recommend to switch to openSUSE 13.1 as soon as
possible which is still planned to be an Evergreen release.


Some more details below:
The repository already got and will most likely get more updates from
package maintainers who care about 11.4 and/or their packages though.
You noticed that with recent releases of patches for the bash and NSS
issues already, BUT this is _no_ guarantee that every security issue
will be fixed.
We will accept contributions from anyone though and I will try to take
care about "my" packages.

Some numbers from 11.4 Evergreen (as far as I was able to get them easily):

Evergreen lifetime: 21 months
11.4 overall lifetime (incl. Evergreen): 41 months / 3 years 5 months

Evergreen lifetime numbers (w/o official maintenance period):
Released update source packages: 804
Unique touched source packages:  177
rough number of patches (based on incident counter): 320

Let me also quote Marcus' numbers from official maintenance lifetime:

Total updates: 723
	Security:    416
	Recommended: 306
	Optional:      1

a silhouette of a person's head and shoulders, used as a default avatar

Be careful with Intel turbo boost! It can screw your benchmarking! And run slower when dealing with parallel programs!

I wrote several months ago a little application called machPQ.py (I’ll open the code soon…) which calculates the active, reactive and also the apparent power in machine terminal’s over the time domain, for electromagnetic transients analysis. The files that this program have to crunch often have 1.E6 lines or more.



MANAUARA_PQFig. 1: All this work to generate this kind of images.


Due to those large files this application was taking long time to finish it’s calculations 1h-3h, hence I started to transcript it into a parallel paradigm using python as well.

The problem begins when I tried to benchmark the parallel version and compare with the single threaded one. The single threaded in some runs was being faster than the parallel version! That was driving me crazy! I don’t know why, but something told me that I should take a look at the processor state (my laptop is a Dell XPS 15 L502x with i7 processor).

And damn! I was right! With the turbo boost enabled [3] the computer running multiple threads got hotter faster and then slowed the clock speed, therefore being slower than the single thread version, or just slightly faster (depending on how hot the day was).

So, to disable the turbo boost, I used, from [1]:

# echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo

And then the magic happened! In this way, with the parallel version fighting in fair conditions with single thread version the expected results came up.

I’ll not do a long discussion over the data, but just to summarize:

  • When the code was running with turbo boost enable, the time needed to complete the simulation using the parallel version was only by 4.13 % smaller than the single threaded version (Simulation 1);
  • Now, with turbo boost disable, the non parallel version took 42.02 % more time time than the parallel version – Oh, yeah! – (Simulation 3);
  • Running the code into n-crap-vidia, with optimus [2], again, we got a nice speed up of 48.34 % (comparing the bigger time to the smaller) (Simulation 4);
  • The parallel code running directly into cpu (Simulation 3) took 2.61 % more time than into n-crap-vidia (Simulation 4). However, this mismatch is so small and I just performed a single simulation that it is not possible to verify any trend here;
  • The single thread version running with turbo boost enabled (Simulation 1) was 24.21 % faster than the single threaded version when turbo boost was disabled (Simulation 3);
  • The parallel version with turbo boost disabled (Simulation 3) was 8.77 % faster than the parallel version with turbo boost enabled (Simulation 1);

From the above analysis we can conclude:

  • This variable clock speed is a pain in the ass when doing benchmarks!!! Even disabling the turbo boost, the clock can also be reduced if the temperature is high;
  • As the major programs are still single threaded leaving the turbo boost enabled is a good idea;
  • For very demanding multiple process or multiple threaded programs, it’s a good idea disabling the turbo boost;
  • Using the GPU through bumblebee seems interesting and deserves further tests.

All the data used to analyze the performance and speed up due to the code parallelism are shown clicking here ->

Simulation 1: With turbo boost enabled

single_threadFig. 2: Simulation 1 – Single thread version.


multi_threadFig. 3: Simulation 1: Parallel threads version.


leonardo@AL:~/projects/machPQ$ time python machPQ_s_plot.py teste.adf 1.E-6 63. ; time python machPQ_teste_parallel.py teste.adf 1.E-6 63.
Abrindo arquivo de dados…
…OK!
Iniciando processamento…
…OK!
Gravando resultados em disco…
…OK!

Tempo de processamento: 186.784282

real 3m7.005s
user 3m7.135s
sys 0m0.079s
Abrindo arquivo de dados…
…OK!
Iniciando processamento…
…OK!
Gravando resultados em disco…
…OK!

Tempo de processamento: 179.066593

real 2m59.248s
user 5m14.349s
sys 1m11.704s


Simulation 2: With turbo boost enabled and running into n-crap-vidia

leonardo@AL:~/projects/machPQ$ time optirun python machPQ_s_plot.py teste.adf 1.E-6 63. ; time optirun python machPQ_teste_parallel.py teste.adf 1.E-6 63.
Abrindo arquivo de dados…
…OK!
Iniciando processamento…
…OK!
Gravando resultados em disco…
…OK!

Tempo de processamento: 203.956192

real 3m52.100s
user 3m24.476s
sys 0m0.228s
Abrindo arquivo de dados…
…OK!
Iniciando processamento…
…OK!
Gravando resultados em disco…
…OK!

Tempo de processamento: 183.662801

real 3m20.575s
user 5m29.300s
sys 0m58.710s


Simulation 3: With turbo boost disabled

single_thread_noturboFig. 4: Simulation 3 – Single thread version.


multi_thread_noturboFig. 5: Simulation 3 – Parallel threads version.


leonardo@AL:~/projects/machPQ$ time python machPQ_s_plot.py teste.adf 1.E-6 63. ; time python machPQ_teste_parallel.py teste.adf 1.E-6 63.Abrindo arquivo de dados…
…OK!
Iniciando processamento…
…OK!
Gravando resultados em disco…
…OK!

Tempo de processamento: 232.012078

real 3m52.313s
user 3m52.349s
sys 0m0.107s
Abrindo arquivo de dados…
…OK!
Iniciando processamento…
…OK!
Gravando resultados em disco…
…OK!

Tempo de processamento: 163.367201

real 2m43.608s
user 4m36.375s
sys 1m22.991s


Simulation 4: With turbo boost disabled and running into n-crap-vidia

leonardo@AL:~/projects/machPQ$ time optirun python machPQ_s_plot.py teste.adf 1.E-6 63. ; time optirun python machPQ_teste_parallel.py teste.adf 1.E-6 63.
Abrindo arquivo de dados…
…OK!
Iniciando processamento…
…OK!
Gravando resultados em disco…
…OK!

Tempo de processamento: 236.172199

real 3m59.293s
user 3m56.594s
sys 0m0.125s
Abrindo arquivo de dados…
…OK!
Iniciando processamento…
…OK!
Gravando resultados em disco…
…OK!

Tempo de processamento: 159.207409

real 2m41.755s
user 4m35.806s
sys 1m18.623s


References:

[1] – http://luisjdominguezp.tumblr.com/post/19610447111/disabling-turbo-boost-in-linux
[2] – http://bumblebee-project.org/
[3] – http://en.wikipedia.org/wiki/Intel_Turbo_Boost

Acknowledgements

English revised by my love @anielampm =) Thank you!!

a silhouette of a person's head and shoulders, used as a default avatar

Yast Code Review Guide

Yast team has finally published their official Code Review Guide.

All contributors and Yast team members are asked to use the very same simple rules for all code changes related to Yast, including Installer or just simply all code handled by thee Yast team, including, e.g., Linuxrc.

Please, see the guide here. We are looking forward your suggestions for improvements.
a silhouette of a person's head and shoulders, used as a default avatar

Building Yocto/Poky on openSUSE Factory

Since a few weeks, openSUSE Factory no longer is labeled as "openSUSE Project 13.2", but as:
seife@susi:~> lsb_release -ir
Distributor ID: openSUSE project
Release: 20140918
When trying to build the current Yocto poky release, you get the following Warning:
WARNING: Host distribution "openSUSE-project-20140918" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Now I know these warnings and have ignored those before. The list of tested distributions is hard coded in the build system configuration and in general it would be a bad idea to add not yet released versions (as 13.2) or rolling releases. And since the Factory release number changes every few days, it is clearly impossible to keep this up to date: once you have tested everything, the version has increased already. But apart from this, purely cosmetic warning, there is a really annoying consequence of the version change: the configuration cache of bitbake (the build tool used by Yocto poky/OpenEmbedded) is rebuilt on every change of the host distribution release. Updating the cache takes about 2 minutes on my machine, so doing a simple configuration check on your already built Yocto distribution once a week can get quite annoying. I looked for a solution and went for the "quick hack" route:
  • bitbake parses "lsb_release -ir"
  • I  replace "lsb_release" with a script that emits filtered output and is before the original lsb_release in $PATH
This is what I have put into ~/bin/lsb_release (the variable check is a bit of paranoia to let this only have an effect in a bitbake environment):

#!/bin/bash
if [ -z "$BB_ENV_EXTRAWHITE" -o "x$1" != "x-ir" ]; then
        exec lsb-release $@
fi
printf "Distributor ID:\topenSUSE project\nRelease:\t2014\n"

Then "chmod 755 ~/bin/lsb_release" and now the warning is
WARNING: Host distribution "openSUSE-project-2014" has not been validated...
And more important: it stays the same after updating Factory to the next release. Mission accomplished.

UPDATE: Koen Kooi noted that "Yocto" is only the umbrella project and what I'm fixing here is actually the "poky" build system that's part of the project, so I edited this post for clarity. Thanks for the hint!

a silhouette of a person's head and shoulders, used as a default avatar

Fix openSUSE's grub2 for Virtualization and Servers

After installing current openSUSE Factory in a VM, I found that the old GRUB option was removed from YaST2. I knew this from the mailing list, but now I actually realized that this happened. I still prefer GRUB over GRUB2, because for me it is easier to manage. But being lazy, I just went with the default.
Everything went well, until I added a customized kernel (I had installed the VM to do some kernel experiments after all). The boot menu suddenly was not very useful anymore. After selecting "advanced options", I got the following:
Well, which one of the four is now my hand-built, brand new kernel?
There is no such thing as in old GRUB where "Esc" got you out of gfxboot mode and into text mode. The command keys, like "e" for editing the current selection and "c" for a GRUB2 shell (something even more hellish than the old GRUB shell apparently) work, but you really need to know this, as there is no indication of that.

So I wanted to get rid of the gfxboot stuff. I don't need fancy, I need it usable.
Booted the VM, logged in. "zypper rm grub2-branding-openSUSE" followed by "grub2-mkconfig > /boot/grub2/grub.cfg". Much better:
But still it is in graphics mode, which I do not care about now, but once I have to deploy this stuff on something like an HP server where you can get a text console via SSH, but only if it is in plain VGA mode, I will not be amused. So boot that VM again, and look further. Finally, the solution is in /etc/default/grub: "GRUB_TERMINAL=console". The comment above says just uncommenting the original "gfxterm" setting would be enough, but it is not. After recreating the config file and rebooting, it looks quite useful:
And it is not even missing information, compared to the gfxterm version... no idea why this stuff is default.

Now that "Distribution" string in there looks completetly redundant, so getting rid of that will help, too.
Again, it is in /etc/default/grub, variable GRUB_DISTRIBUTOR. I see that in the grub2 rpm package, there is only "openSUSE" instead of  "openSUSE Factory Distribution", so it might be put into the config by the installer or something. I'll change it to just "Factory" (to distinguish between other openSUSE installations). After grub2-mkconfig, it looks almost good:
Now the important information (Kernel version) is completely visible. Much better than the original "bling bling" screen, which had no useful information at all...
Just fixing the Factory string would probably have helped also, but it still would fail the server test, so plain console will stay my favorite for now.


a silhouette of a person's head and shoulders, used as a default avatar

Making of GNOME 3.14

The release of GNOME 3.14 is slowly approaching, so I stole some time from actual design work and created this little promo to show what goes into a release that probably isn't immediately obvious (and a large portion of it doesn't even make it in).

GNOME 3.14, behind the scenes Watch on YouTube

I'd like to thank all the usual suspects that make the wheels spinning, Matthias, Benjamin and Allan in particular. The crown goes to Lapo Calamandrei though, because the amount of work he's done on Adwaita this cycle will really benefit us in the next couple of releases. Thanks everyone, 3.14 will be a great release! (I keep saying that every release, but you simply feel it when you're forced to log in to your "old" GNOME session rather than jhbuild.)

a silhouette of a person's head and shoulders, used as a default avatar

Multiple Linux Consoles in z/VM

The standard method to access z/VM is using a 3215 terminal with a terminal emulator. With linux, the x3270 package provides a free emulator for these terminals.

One of the features of z/VM is, that you can define several consoles for a guest. This is very helpful if there are problems with a guest that affect the network connectivity. With z/VM you can even define multiple consoles that allow direct logon to the running guest.

By default, only one terminal is defined for z/VM guests. To define three additional 3270 consoles on a guest at the addresses 0020-0022, use the following commands:

cp define graf 20
cp define graf 21
cp define graf 22

These consoles can also be created online from linux, provided that you got sufficient privileges on the guest. To issue cp commands from linux, use the command vmcp instead of cp.

With SLES 12, several additional steps are needed to activate these consoles.

First, the devices must be made available to the system. This a twofold process:

  1. Remove the devices from the cio ignore list with the command
  2. cio_ignore -r 0.0.0020-0.0.0022
  3. Add the devices to /boot/zipl/active_devices.txt to make this change persistent.
    # cat /boot/zipl/active_devices.txt
    ...
    0.0.0020-0.0.0022

The system automatically detects those devices. The corresponding serial devices are found below /dev/3270/tty[123]. Next, tell systemd to run a getty on these devices:

systemctl enable serial-getty@3270-tty1.service
systemctl enable serial-getty@3270-tty2.service
systemctl enable serial-getty@3270-tty3.service
systemctl start serial-getty@3270-tty1.service
systemctl start serial-getty@3270-tty2.service
systemctl start serial-getty@3270-tty3.service

To use the new consoles on a machine called LINUX065, direct the 3270 terminal emulator at z/VM. Instead of logging on as regular user, move the cursor to the COMMAND line and enter the following command:

dial linux065

To redisplay the logon prompt, you might want to press enter once.

When trying to logon to this console as root, you will find that it won’t let you. The reason for this is, that root logon is only allowed on previously defined consoles. The configuration file for this is /etc/securetty. Add the following lines to the end of this file:

3270/tty1
3270/tty2
3270/tty3

After this, you can directly logon to the linux guest without the need for z/VM credentials.

If you want to avoid the need to redefine the consoles after a logoff of the guest, add the definition to PROFILE EXEC A of the guest.

 

the avatar of Sankar P

Kernel Development Beginner

Yesterday Vignesh asked me if I could give some guidance to a college junior of mine who wants to start with Kernel programming. Being a filesystem developer on Novell for a while now, I thought I could share some things that I have learned. I wrote a somewhat long reply which I am reproducing below (with minor edits for clarity) in the hope that it may be useful to someone.

Since it was originally intended to be a mail, it is a little more verbose than a blog post. My advice is based on the situation on my college when I studied a decade ago. Things would have probably changed and the recommendations may need tweaking based on the context.

---

The most important quality that you need to inculcate if you want to do any kernel space programming is "Patience" (or persistence if you will). Though it is a good quality for any large scale project, it is a fundamental requirement for kernel programming. It is very easy to see progress and make an impact on userspace projects, but even simple changes in the kernel core will take a lot of time to get accepted, and will often require multiple rewrites. But fear not, as there are plenty of people who have conquered this mountain and it is not something to be worried about.

The starting steps will be:

1) Try to understand how to use git. We were (are ?) not taught to use a version control system in our college and it is such a fundamental thing. So start using git for college assignments and get the hang of it.

2) Start writing a lot of C programs and get experienced with pointers, memory allocation, threading. You can start implementing things like Stack, Queue, Trees etc. (whatever you study in datastructures) in a simple, thread-safe way. Do not focus on how you can visualize these datastructures but how you can effectively implement their functionality and thread safety. Use pthreads for threading. Do not use any library (like Glib) for giving you convenient datastructures (like Strings). Implement each of the things on your own. (But when you are writing code for a product, use a standard library always instead of re-inventing the wheel)

Write these C programs on Linux and compile using gcc. In our college days we were using turboc on windows and I hope things have changed. Use a linux distro (fedora, debian, openSUSE, Gentoo etc.) exclusively; Do not use Windows (at least for a while) to make yourself aware of the sysadmin, shell-scripting parts of linux, which will come in handy.

3) Grab a (any) book on Operating Systems theory and read it. The dinosaur book by Silberschatz et. al. is a good start.

4) Without hesitation buy, Robert Love's Linux Kernel Programming book. It is one of the best beginner material and start reading it parallel to the OS book. This is easier to read than the previous one and more practical. But the previous one adds more value and is more theoretical. Handle (3) and (4) in parallel without blocking on any of the other activities.

5) After you are done with (1) and (2), and feel sufficiently confident with C and pointers, grab the  linux kernel sources from http://git.kernel.org/ and try to build the sources yourself. http://kernelnewbies.org/KernelBuild should help. Learn how to install and boot with the kernel that you have built.

6.1) Subscribe to Kernel Newbies mailing list http://kernelnewbies.org/MailingList and read every mail, *even* if you do not understand most of it.

6.2) Watch: https://www.youtube.com/watch?v=LLBrBBImJt4

6.3) Subscribe to http://lwn.net RSS feeds.

After this, you should be able to fix and send any trivial, documentation, staging fixes. Once you have done this and get the hang of the process, you will know how to send patches for any parts of the kernel.

By this time, you would have found your areas of interest in kernel (filesystems, memory management, io scheduler, CPU scheduling etc.). You will then have to dig deeper in those particular areas, by:
a) subscribing to the individual mailing lists (such as fs-devel, etc.)
b) reading about the bug reports for the individual component
c) finding the literature that is relevant for your subsystem (The linux memory management book Mel Gorman, etc).

Three other non-technical things that I would recommend are:

1) Create a new email address and use that for all your open source activities. That way you do not miss any important updates from your friends.

2) Kernel programming will not give you big money in the short and medium term (at least in India). If your motivation is not excellence in engineering, but becoming popular or rich (it is not wrong btw) then you should focus on some other areas of programming (developing apps, websites, solving user problems, making meaning etc.).

It will often take months (or even years) before you make a significant contribution that is not merely a memory leak or bug fix. Be prepared for that. But since you have age, energy, time (once you get married and/or have kids you will understand) on your side, it is not that difficult.

Many people try kernel programming and then quit because they do not have the patience and perseverance. It may also happen that they have found a more interesting technology at its nascent stage (like Distributed Computing, Artificial Intelligence, Containers, NLP etc.) It is not wrong to quit midway :) Any little time spent on kernel programming will immensely benefit you as a programmer even when you are doing user space programming. This holds good for not just kernel programming but any large-code-base/system programming (like Compilers, glibc, webkit, chrome, firefox etc.)

3) Be more aware of the GSoC community in colleges around you.

All the best.

a silhouette of a person's head and shoulders, used as a default avatar

GSoC 2014 Experiences

Whew…Another Summer of Code done with. New experiences, Lessons learnt, a lot of code became mainstream. Overall, an excellent program. So, here are my experiences for this years program:

1.) We participated with ownCloud, Zorp and MATE desktop. I personally think participating with other organizations is a good think and fosters collaborations between the open source communities. It is something we expect to continue in future versions of the program.

2.) As opposed to previous years, all our students managed to complete the program successfully. Their work was praised by the community as a whole. A big Thank You to all the students for their awesome work, and specially to the mentors who keep the wheels rolling.

3.) Me and Manu tried to address the shortcomings of the previous year. We decided on two ‘rules’ for selecting students

– All students must be vouched by a professor (to try and solve the problem of disappearing students).
– All students must send weekly update mails to the opensuse-project mailing list.

The first proposal was met by stiff opposition by some mentors. We even discussed this on the gsoc-mentors mailing list. While well intentioned, I admit that we did not expect many things. We assumed it would be as easy to get a vouch from a professor in Europe and the US as it is to get in India We realised much later that professors don’t have the level of interaction with the students as they do here in India. We scrapped the rule. The original problem is still not solved, and though we have not been hit by it this year, we are open to suggestions on how we can address this problem.

About the weekly mails on the mailing list, I feel it was a good decision. While students may feel that it is excessive ‘red tape’ and totally unnecessary (blogs and project specific ML’s serve well enough), it does help us in the off chance that something goes wrong. We had some experiences in the last edition and felt that it was better to enforce it as a rule. Additionally, it gives community members to provide feedback and improves the visibility of the student’s work.

4.) A lot of work done for openSUSE. Projects such as TSP (Travel Support Program), OSEM (Open Source Event Manager) benefited a lot from the program.

5.) This year, Google is celebrating its 10th anniversary of the program, and having a reunion meet for the same next month. Dominik Bamberger and Artem Chernikov are going to represent openSUSE at the summit.

6.) Mentoring is a tough job and it takes a lot of the mentors time. Henne pointed out that the program is not so rewarding to a mentor, and that we could incentivize mentoring. A lot of ideas were bounced around and we hope to work on them as well.

Lastly, I will be speaking about the Google Summer of Code, and our own experiences at next month’s openSUSE Asia Summit (Yay!). So for this year, over and out 🙂