Miriam Ruiz
random thoughts on technology and life

{January 24, 2007}   Enjaulando al apache

PHP es un lenguaje interesante, que permite un desarrollo bastante rápido con poco esfuerzo. Sin embargo, en mi opinión, tiene algunos problemas que hacen que haya que andar con cuidado con él. En primer lugar, pone poco énfasis en la seguridad. Esto no quiere decir que no se puedan hacer cosas seguras en PHP, sino que todo el trabajo ha de realizarlo el programador, el lenguaje no le va a ayudar mucho en esta tarea. De igual forma, PHP tampoco ayuda a separar la visualización del motor en los desarrollos, y para proyectos moderadamente grandes, es un engorro.

De todas formas, puesto que hay tanto software hecho en PHP, el hosting es tan accesible (bastante más que el Ruby o que Java, por poner ejemplos), y es tan sencillo realizar modificaciones y personalizaciones en los programas ya existentes, puede merecer la pena usarlo.

El problema es que conozco tanta gente que les han entrado en el ordenador explotando fallos en PHP, que no me atrevo a instalarlo tal cual, prefiero enjaularlo en un chroot. Sería bastante más seguro usar una máquina virtual para ello, por ejemplo XEN, tan de moda actualmente, o User Mode Linux, pero no quiero cargar tanto mi portátil para poder trabajar un poquito con PHP.

La forma más cómoda de instalar Apache en un chroot desde Debian es.. hacérselo una misma. Para ello, mediante debootstrap o cdebootstrap se puede crear la infraestructura base del entorno chroot en el que dejaremos instalado nuestro servidor de contenidos web, y configurarlo a nuestro gusto a partir de ahí. Esto hace que especialmente el mantenimiento del sistema se simplifique bastante.

Read the rest of this entry »

{January 24, 2007}   Burnout

According to Wikipedia: “Burnout is a psychological term for the experience of long-term exhaustion and diminished interest (depersonalisation or cynicism), usually in the work context. Burnout is often construed as the result of a period of expending too much effort at work while having too little recovery, but it is sometimes argued that workers with particular personality traits (especially neuroticism) are more prone to experiencing burnout.”

In this web page there’s a global overview of burnout that might be useful: Burnout is a chronic condition that happens when your body or mind can no longer cope with overwhelmingly high demands. You are trapped in a state of emotional exhaustion, and it is hard to get out of that state. You stop caring about what you do, even though you may feel guilty about that fact. Even if you still continue working, it seems to be hard to make progress. You hardly accomplish anything significant, just go through the motions.

Certain categories of people and professions are particularly susceptible to job burnout. Most often these are people who are highly committed and motivated, who have high standards and idealistic dedication to their jobs.

Common burnout causes include:

For all of those burnout causes what is important is not as much the external factors that fall on you, but how you interpret them, what you say to yourself, and what actions you take in response. Finally, it is important to understand the risks of burnout in your personal or job situations. Once you are its victim, it may not be easy to get things back on track. That condition does not go away in a day. You may not be able to recover by yourself, and you may need to have drastic changes in your attitudes and life style. You are much better off preventing it now than putting your life back together later.

Some links:

{January 24, 2007}   DudesConf

El objetivo de esta reunión es similar al del evento internacional (la DebConf): reunir a los desarrolladores y desarrolladoras del projecto Debian GNU/Linux, y por qué no, de sus distribuciones derivadas para colaborar juntos en el desarrollo de la distribución, así como tener la oportunidad cara a cara de intercambiar opiniones y charlar sobre el desarrollo del proyecto. Se puede obtener más información sobre el evento en la página web de DudesConf.

La DudesConf se celebrará en la facultad de Informática de la Universidad de La Coruña. Campus de Elviña desde el viernes 13 al domingo 15 de Abril de 2007.

{January 19, 2007}   Backtrace

I found a really nice way to trace back the execution stack inside a program, without the need of a debugger like gdb. I’ve made some test code in C that seems to work all right in my system. I doubt if it will just work in i386 systems, but it’ll do perfect for the debugging of the code I’m currently doing. It’s great.

{January 19, 2007}   More about my analysis of usplash

After my post from yesterday, I’ve been able to find out what my problem with usplash is about, although I’m stiill working in a proper solution to it.

It seems that when the root filesystem is changed, programs must react accordingly. The proposed sequence for the usage of pivot_root is something like the following:

To be able to analyze the exact starting sequence of the system stored in the initrd.img, we must expand its contents to a directory using cpio. Some time ago, initrd.img used to be a filesystem that used cramfs, minix or ext2 filesystems, but not anymore for the newer Debian systems.

The script that is responsible for setting up the system at start is called init and is currently a shell program. Having a look at it, I found out that a temporarily environment variable is set, designing the place in which the real root filesystem will be temporarily mounted before switching it to the root filesystem: rootmnt=/root

At some point later, /sys and /proc filesystems, that were mounted in their respective directories at the beginning, are moved to ${rootmnt}/sys and ${rootmnt}/proc to be set in their final destination directories: mount -n -o move /sys ${rootmnt}/sys, and later mount -n -o move /proc ${rootmnt}/proc

At the end of the script, the system switches to the real root filesystem: exec run-init ${rootmnt} ${init} “$@” <${rootmnt}/dev/console >${rootmnt}/dev/console

I’ve changed my code so that /proc/… files I used are open from the very beginning, and kept open until the end of the execution of usplash, and it seems to work. I’ve also been able to write a debug log for it, storing it in /dev/.initramfs/, which is a directory that is kept in that place all the time, so that whatever is stored there is available after the soot switch. That is the directory that usplash uses to store its FIFO nodes: usplash_fifo and usplash_outfifo. Maybe I can find a way to store core files there after a SEGFAULT error, setting the proper parameters with ulimit and /proc/sys/kernel/core_pattern.

All I need to find out now is how to be able to reach the contents of /etc/… after the final rootsystem is mounted. I’ll tell you when I’ve solved that.

{January 18, 2007}   Experiments with usplash themes

I’ve been doing some usplash-related stuff these days, but I’ve come across some problems. First of all, I want to be able to track some hardware information from within the experimental theme I’m working on, and that means reading some stuff from /proc and /etc (and maybe from /sys in the future, I don’t know yet) if it is available. It seems to work OK if I open the file handler from the beginning and keep it open, rewinding to the start of the file when I need to read its contents but never closing it until the end of execution. If I instead open the file, read from it and close it again, it seems to work properly for the beginning, but after a while it stops retrieving data. I guess that when the real root is mounted i lose the capacity to interact with the filesystem from my code, like opening new files.

The second problem is somehow related. I want to be able to save a log file of the execution of the program, but I don’t seem to be able to open a file for writing, at any moment in the execution of the program. I guess it’s the same problem, accessing the filesystem from a program that is started from initrd.img instead of from the real disk.

¿Is there any way to connect the program with gdb during real execution? I seem to be getting SEGFAULT errors with some things I try, but it’s hard to debug without any data (not even logs, as I cannot open a file for writing at any moment). Maybe being able to dump a core when a SIGSEGV signal is received would do.

More on this, in future posts.

{January 16, 2007}   I might not be able to go to DebConf7

I sent an email to my boss a couple of weeks ago, asking for some days in June to be able to go to DebConf7. I wanted to buy the plane tickets as soon as I could, to be able to get a lower price. Last year they weren’t very happy about us having our holidays whenever we wanted, so this year they’ll probably decide that we must take them in August, whether we want or not. They’re having a meeting one of these days, if they find some time to do it, to discuss about that stuff, so I might find out soon whether I’ll be able to go or not. Or maybe I won’t be able to know until some days before, who knows.

I was very happy about going to EDI this year, so if I cannot go, and if the perspective is that I’ll never be able to go to a DebConf again, unless they’re in August, I might need to start thinking about finding a solution, even when it might be quite drastic. I’ll keep you informed.

{January 15, 2007}   Playing with usplash

I’ve been experimenting with usplash for some weeks, and it seems quite powerful. I decided to try with the latest version of the program (0.4), from Ubuntu’s repositories, which doesn’t seem to be backwards-compatible with the one that is currently in Debian (that is, 0.3e). The main idea of a theme in usplash seems to be embedding all the needed information into a shared object, including the images and the fonts, and coding the themes in plain C. This, which might seem terribly scary for non-coders, gives a lot of freedom for creating new effects in a certain theme, which is something I want to experiment.

The low-level graphical fuctions use bogl (Ben’s Own Graphics Library) and svgalib for showing, and the rest of the code is built above them. Even though I like the overall design of the project, it doesn’t really suits my needs for what I want to try. I need to implement more low-level functions for certain effects, and I’m also considering doing some changes to optimize memory used. Right now I’m doing the graphical effects in a pixmap and, right at the end, dumping that pixmap onto the real screen, which makes me adapt what I want to the canonical code of usplash, but I guess at some point I might need to make deeper changes in the code, and I might need to change the insides of usplash.
I don’t know if something useful can come out of this, or if the results will be only aesthetic, but I’ll put my code available somewhere as soon as it is ready for inspection, so I can get some comments on it. As always, ideas are welcome.

{January 12, 2007}   European W3C Symposium on eGovernment

The European W3C Symposium on eGovernment aims to understand specific government and citizens’ needs related to eGovernment services, identify aspects that put Web interoperability at risk and find how governments can deliver better and more efficient services through computer technologies.

It will take place in Gijón (Asturias, Spain) during the 1st and 2nd of February 2007.

{January 12, 2007}   CISL/FSWC 2007

Conferencia Internacional de Software Libre 3.0 (Free Software World Conference 3.0): will be held in the Manuel Rojas Congress Centre in Badajoz from february, 7th to 9th, 2007 under the motto “A Challenge for Imagination”. Its organization is shared between the Regional Government of Extremadura and Andalucía and is based on the collaborative agreement for the development and the promotion of Free Software.

This Conference, in its third edition, has become the most important forum for presentation and for the debate of ideas, projects and experiences in Spain and one of the most important events all over the world. In it’s previous editions, held in Málaga and Mérida, more than 10,000 participants have been registered and more than 400 outstanding speakers have participated: politicians, people from telecommunications, businesses, Administration and Universities.


This is a personal webpage that belongs to Miriam Ruiz.
If you want to contact her, you can do at:

January 2007
    Feb »

La Lista de Sinde