It is really nice to see something you did in a project influence in future features and developments. I always feel happy and proud when I notice such scenarios happening, and this time was no different. Gary Benson, a colleague at Red Hat who works in the GDB team as well, has implemented a way of improving the interface between the linker and the debugger, and one of the things he used to achieve this is the GDB <-> SystemTap integration that I implemented with Tom Tromey 2 years ago. Neat!

The problem

You can read a detailed description of the problem in the message Gary sent to the gdb-patches mailing list, but to summarize: GDB needs to interface with the linker in order to identify which shared libraries were loaded during the inferior's (i.e., program being debugged) life.

Nowadays, what GDB does is to put a breakpoint in _dl_debug_state, which is an empty function called by the linker every time a shared library is loaded (the linker calls it twice, once before modifying the list of loaded shlibs, and once after). But GDB has no way to know what has changed in the list of loaded shlibs, and therefore it needs to load the entire list every time something happens. You can imagine how bad this is for performance...

The solution

What Gary did was to put SDT probes strategically on the linker, so that GDB could make use of them when examining for changes in the list of loaded shlibs. It improves performance a lot, because now GDB doesn't need to stop twice every time a shlib is loaded (it just needs to do that when stop-on-solib-events is set); it just needs to stop at the right probe, which will inform the address of the link-map entry of the first newly added library. It means GDB also won't need to walk through the list of shlibs and identify what has changed: you get that for free by examining the probe's argument.

Gary also mentions a discrepancy that happened on Solaris libc, which has also been solved by his patch.

And now, the most impressing thing: the numbers! Take a look at this table, which displays the huge improvement in the performance when using lots of shlibs (the time is in seconds):

Number of shlibs 128 256 512 1024 2048 4096
Old interface > 0 > 1 > 4 > 12 > 47 > 185
New interface > 0 > 0 > 2 > 4 > 10 > 36

Impressive, isn't it?

Conclusion

This is one the things I like most in Free Software projects: the possibility of extending and improving things by using what others did before. When I hacked GDB to implement the integration between itself and SystemTap, I had absolutely no idea that this could be used for improving the interface between the linker and the debugger (though I am almost sure that Tom was already thinking ahead!). And I can say it is a pleasure and I feel proud when I see such things happening. It just makes me feel more and more certain that Free Software is the way to go :-).


So long, Ambassadors...


Tags:

No, I am not leaving the Fedora Project, I am just leaving (or taking a break, depending on how you look) its Ambassadors program. I am still the co-maintainer of the GDB package, and will contribute to the development of the distribution since it is also my job. However, after a few months trying to become more involved with the Fedora community (specifically with the Brazilian/LATAM community), I became so disappointed that the only logical action for me now is to step back.

My brief history

I joined the Ambassadors program on October, 2012. After having used the system heavily for almost 3 years, I decided that it was about time to pay something back to the community too. Since I live in Brazil, I joined the the brazilian team of Ambassadors (which meant that I was also part of the Latin America team). Thanks to my friend Leonardo Vaz (from Red Hat), I talked to Daniel Bruno who then became responsible for "mentoring" me.

The brazilian community was (and still is) very inactive (compared to others, and to itself a few years ago), but I was very excited and decided to try to revive it. And the first task that I assigned myself was to regain control of the brazilian and LATAM domains.

The domains

Alejandro Perez, a very nice guy from Panamá responsible for LATAM's money, asked me to talk to Rodrigo Padula, an inactive Fedora Ambassador from Brazil, about the domains. Padula was a very active member of the brazilian community since 2006 if I'm not mistaken, but due to reasons beyond my knowledge is inactive in the Fedora community for quite some time now (he's still very active in the Mozilla community, however). And he owns both domains.

Alejandro was worried because the LATAM domain had suffered some sort of outage during some days, which is obviously bad for the project. He was also concerned (and I totally agreed with him on this) because those domains shouldn't be owned by a person (rather, it should be registered on behalf of the Fedora Project or, ultimately, Red Hat), specially if this person is now inactive.

To make a long story short, I spent more than 1 month doing the indirection and talking to both guys about this issue. Padula initially said he could transfer the domains without problem, but then changed his mind and said he wouldn't do it. On the other side, Alejandro was getting upset because Padula did not want to make the transfer, and the LATAM community was pressuring him. In the end, I totally gave up, and the LATAM guys registered yet another domain, but right now are still using the old domain. Yes, a mess.

Working with LATAM

Anyway, after this episode, and after witnessing how active the LATAM community was in contrast with the brazilian community, I decided to work directly with them. I wanted to do something, and I was eager to start working as a real ambassador, spreading the word about Fedora everywhere. And my friends from Panamá, Argentina, México, Venezuela, etc., seemed the right people to work with.

So I started attending the weekly meetings on #fedora-latam, at Freenode, every Wednesday night. It is a well-organized meeting (run by Alejandro), whose main goal is to vote tickets from LATAM ambassadors (including brazilians). Tickets are basically requests made through a Trac instance, and are used to ask for swags, media, sponsorship for travels, etc. The Fedora Project has a budget, and the LATAM region gets a fraction of this budget for annual expenses, so our job as ambassadors was to vote those tickets and decide whether they deserve to be approved or not, according to some rules inside the project.

Keep in mind: we are dealing with money here. It's not yours nor mine, but it's still money that should be used to promote a project that embraces open source initiatives (unfortunately, I cannot say Fedora is Free Software, but that is a topic for another post).

So, after some weeks working with the LATAM guys, I became the default owner of Trac tickets from brazilian ambassadors. And a few more weeks down the road Alejandro asked me to produce media (Fedora DVDs) and be resposible for distributing them in Brazil. I spent a lot of time ordering the medias (I had to travel to São Paulo in order to make sure everything was OK), and every time an ambassador requests Fedora DVDs I go through a series of steps (link in pt_br) to guarantee that she gets her media and I get my reimbursement.

I also like to give talks and presentations about the project, and so I've attended some events (or organized them) just to be able to do that. I have posted some reports about them in this blog, you can find them in the archives (if you can read in pt_BR).

So, enough of self-promotion: why I am leaving the ambassador's program after all?

Disappointment

A few things started to happen:

  • During the weekly LATAM meetings, it bothered me to see that the tickets were being approved without any kind of serious discussion. Everyone (including myself!) was just giving "+1" to everything!
  • FISL, the biggest open source (no, it is not about Free Software!!) event in LATAM, is going to happen on July. Suddenly, new brazilian ambassadors were popping out of nowhere, and inactive ambassadors were pretending to do something.
  • As a consequence, we received 9 sponsorship requests in our Trac. Some from active people, some not.

Something that I should have noticed before became crystal clear to me: some people are there just to take advantages for their own. They are not interested in the project, in the philosophy (yes, you can laugh at my face now...), in the promotion of the ideals, etc. They just want free lunch. And they get it...

During the last meeting I attended, two weeks ago, we were going to vote the FISL tickets. A few days before the meeting, I sent the following message to the LATAM Ambassadors list:

Hi there,

This message is just to let you know that we will be discussing several FISL tickets in our next meeting, May 8th. You can take a look at the meeting agenda by going to:

https://fedorahosted.org/fedora-latam/report/9

I would like to ask everyone to read the requests and make your decision based on merits, please. In my opinion, only active ambassadors should receive the honor of being sponsored by Fedora to go to FISL14. Let's not spend money unnecessarily, so try to avoid the "+1" wave when voting for the tickets.

Thanks a lot,

--Sergio.

As I said, some tickets were filed by inactive ambassadors, and I wanted us to at least discuss the matter with him/her, showing that we were not happy with his/her conduct. It is one thing when you have personal problems and have to step away from the project for a while; it is another different thing when you disappear without saying a word and then comes back to request sponsorship for travel.

We began the meeting by discussing tickets filed by active members, and approving them without thinking much about it. However, eventually we got to the problematic ones. There is this specific guy, whose name I will not mention here, who was very absent since I started in the project, and I felt the need to point that out. I told him I hadn't seen him in quite a while, and explained that there were many ambassadors doing things for Fedora. He's a long term contributor to the project, as he himself told me in a not-so-friendly tone during the meeting. But that was not the subject of the discussion, and while he kept saying how hard he worked for the project in the last 5 years, or how much he's done for this or that, I remained silent and began to think: what the hell am I doing? Why am I wasting my time in a Wednesday night to convince a group that someone maybe doesn't deserve the credit he's asking for? Well, the only reasonable answer was: because I feel it is the right thing to do. But nobody said a word during this discussion, and I started to feel something else. I felt that people were not interested in evaluating how much this guy (or anybody else, for that matter) really did for the project! And the feeling was corroborated when someone else said: "Hey, let's just approve the ticket now, we can continue the discussion later". WHAT????. Let me see if I get it: we are here to discuss, reach a consensus, and vote. You want to approve, maybe discuss, fuck the consensus. Well...

I left before the end of the meeting, but I still managed to see this behaviour explained by some people: there was enough money to approve all tickets, so the meeting was just a formality needed to explain the expenses later. I was at least fully convinced that I did not belong there.

Not my place

If you are part of a team and you disagree with its members, I believe you have two choices most of the time: you can either (a) discuss with them, try to understand their reasons for being different, try to explain yours, see what you can do to overcome this, or (b) leave it. Sometimes I choose one, sometimes another. This is the time for (b). I don't want to spend more time and energy into something that doesn't work the way I think it should. I don't feel motivated to fight against the tide, because I am not so strong and the tide keeps getting bigger and bigger. And I also don't want to stop people from doing what they think is right, honestly. In the end of the day, I still want to believe that everyone has a conscience and knows what's correct...

But I am not going to cross my arms and sit. Some friends and I decided to create our own group, called LibrePlanet São Paulo (link in pt_br), and focus on the real important thing: Free Software. I really hope we can make a difference with our local community, and we have started with the right foot already: we organized the Document Freedom Day in our city this year!

As for Fedora, as I said, I still intend to continue contributing to it. I'm still subscribed to the fedora-devel mailing list, and I still follow the project's decisions, partly because it is part of my job, partly because I strongly believe you have to give back what you take for free -- as in freedom -- from the community. I also have some DVDs and I intend to distribute them. But my time as a Fedora Ambassador is coming to an end. It was a good experience, I met good people, had a great time doing talks and presentations, and most of all, did what I felt right at the right time.

So, as Douglas Adams said, "...thanks for all the fish!".


Hi, there! This is the report of the Document Freedom Day event that took place in Campinas, São Paulo state, Brazil. I will talk a little bit about how we (keep reading to know who "we" are!) organized it, and the conclusions that can be drawn to help for the next edition.

Organization

The DFD (or Document Freedom Day) 2013 in Campinas was organized by the LibrePlanet São Paulo (link in pt_BR) group. If you follow this blog, and if you speak portuguese, then you have probably read the announcement of the group that I made last year. If you haven't: LibrePlanet São Paulo is part of the LibrePlanet project (sponsored by the Free Software Foundation), and "... is a global network of free software activists and teams working together to help further the ideals of software freedom by advocating and contributing to free software.".

The DFD 2013 was an important event to us because it was the first serious event that we organized as a group. Despite some mistakes and errors, I believe we did fine and were able to learn some great lessons for the next events that we plan to do. By the way, if you want to see the official page which we used to promote the event (and organize it too), take a look here. The page is in pt_br.

Basically, we should have: (a) focused more on defining the venue as soon as possible, because that would have made it possible to (b) start sending announcements about the event earlier. We also should have contacted the Document Freedom organization and asked swags and banners earlier, because when we did it was too late for the shipment to arrive in time. And last but not least, we should really have taken pictures!! Unfortunately, I have absolutely no pictures to post here, so you will have to believe just in the words I write...

But well, nothing is perfect, and hey, the event happened!. So let's talk it :-).

The Event

DFD 2013 occurred on Wednesday, March 27th. After some discussion, we decided to schedule the event from 13h (1 p.m.) to 17h (5 p.m.), with 4 presentations of 50 minutes each, approximately. The venue chosen was CCUEC, the Center of Computing at the University of Campinas, UNICAMP. This center has some great people working on it who are involved with Free Software since the beginning of the movement, particularly Rubens Queiroz de Almeida, a very nice guy (very famous in the Brazilian Free Software scene) who helped us a lot with the organization of this event.

We understand that doing the event on a Wednesday afternoon was something that made it very hard for most people to attend, and that is probably the main reason for the low attendance: only 8 people in the audience. I have to say I was a little frustrated in the beginning, but hey, what really matters is that we spread the word about Free Software to 8 brave souls there, who will hopefully spread the word again to more people, and so on :-). So, it was time for the show to begin!

Our schedule was (presentation titles translated):

  1. "What is Free Software?", by me
  2. "Free Documents or the End of the World", by Rubens Queiroz de Almeida
  3. "HTML5: all the faces of the new standard", by Ricardo Panaggio
  4. "EPUB3: The book in the XXI century", by Raniere Silva

So my presentation was scheduled to be the first one, and I really liked it (surprise!). It was virtually the first time I gave a "philosophical" talk, and a very important one: a general presentation about Free Software, its history, the present, and a little bit of the future. In my opinion, what I liked about my talk is that I focused less on the "freedom" part, and more on the "respect" part of the philosophy. This is something I did because I wanted to use a different argument that was on my head for a long time: that the main thing behing the Free Software is the respect towards others, and only with that one can achieve freedom.

I watched Rubens too, who gave an excelent presentation about why we need free documents and standards. Rubens is very talkative and warm, which makes the audience feel relaxed. People liked his presentation a lot, from what I noticed.

Unfortunately, Ricardo Panaggio had a problem with his computer before his presentation, so we decided to switch: Raniere Silva would take his place as the third presenter, while Ricardo tried to fix the problem. I helped him with his problems, and because of this I was unable to watch Raniere's talk. In the end, we could not solve Ricardo's problem and he decided to give his presentation without any slides. In my opinion, he managed to catch everyone's attention (also because HTML5 is such a hot topic today), so I guess the missing slides were not so important after all!

At 17h o'clock, we declared DFD 2013 finished. I still had time to distribute some Free Software stickers (from FSF), and talk a little with two or three people there, who were satisfied with the presentations! It made my day, of course :-). And just because of that I now feel motivated to organized another DFD next year!

Acknowledgements

I would like to thank Rubens Queiroz for helping with the promotion, the location, and the presentation during the event. DFD 2013 would have been impossible without his help. Thanks, Rubens!

The LibrePlanet São Paulo team, specially Ricardo Panaggio, were also deeply involved with me in the organization. And I hope we manage to make a bigger event next year!

Finally, I would like to thank everyone who attended the event, even for watch only one talk. Your presence there was really, really important to all of us. See you all next year!


E... Aqui estamos (estou?) com mais um relato sobre duas atividades envolvendo o Projeto Fedora! Ele contempla, respectivamente, os Install Fests ocorridos na UNESP de Rio Claro/SP e na UNICAMP. Foram atividades que envolveram diversas pessoas, tiveram vitórias e derrotas, alegrias e tristezas, mas acima de tudo um sentimento de impotência (principalmente no Install Fest ocorrido na UNICAMP) em relação às novas "tecnologias" de boot, principalemente ao Secure Boot.

Install Fest: missão UNESP de Rio Claro/SP

Este foi o Install Fest mais tranquilo. Ele começou a ser organizado logo depois da minha participação na Semana da Computação da UNESP de Rio Claro, e a intenção inicial era realizá-lo no dia da matrícula dos alunos ingressantes na Universidade. No final das contas, decidimos postergar a data, e isso foi uma boa escolha.

O Install Fest aconteceu no dia 06 de março de 2013, em um auditório da Biblioteca do campus, e começou com uma palestra minha sobre o Projeto Fedora. Foi basicamente a mesma palestra que eu havia apresentado na Semana da Computação, mas de uma maneira mais sucinta porque tínhamos pouco tempo. Creio que a palestra foi bem recebida, porque o público demonstrou interesse em contribuir com o Projeto Fedora depois que eu expliquei os meios para isso :-). Além disso, apesar do número pequeno de pessoas (aproximadamente 12 participantes), todos estavam bastante interessados no conteúdo, o que é uma motivação extra!

Bem, após a palestra era hora de começar a instalar os sistemas. Levei vários DVDs do Fedora, em basicamente 2 versões: LiveDVDs, que permitem o boot e a utilização de um sistema Fedora sem a necessidade de instalar nada na máquina, e InstallDVDs, que não oferecem a opção de "experimentar" o sistema, mas já possuem todos os pacotes necessários para fazer uma instalação completa. Expliquei a todos os presentes algumas regras básicas de todo Install Fest: é preciso reparticionar o disco rígido caso se queira manter o Microsoft (R) Windows (R), quem organiza o Install Fest não pode assumir responsabilidade por nenhuma falha na instalação (apesar de elas serem raras), e também não pode assumir responsabilidade caso o usuário torne-se viciado no GNU/Linux :-). Dito isso, começamos a colocar as mãos na GNU/massa.

O primeiro desafio (e, até então, único!) dos Install Fests recentes é imposto pelos próprios fabricantes de notebooks. Um disco rígido que ainda utilize MBR (a maioria) suporta apenas 4 partições primárias. Antigamente, os fabricantes criavam apenas uma partição para o Microsoft (R) Windows (R), e às vezes chegavam a criar outra partição de "recuperação", mas paravam por aí. Atualmente, não é raro encontrar computadores com 4 partições primárias já criadas. Eu inclusive já cheguei a ver notebooks com discos de 1 TB com uma partição primária de pouco mais de 1 MB! É uma prática totalmente absurda, e a meu ver é feita com má-fé, visando dificultar a instalação de outros sistemas operacionais. Além disso, pra piorar ainda mais, alguns fabricantes (HP me vem à cabeça, mas existem outros) dão um jeito de invalidar a garantia caso o esquema de particionamento seja alterado!!!

Felizmente, vários computadores no Install Fest possuíam apenas 3 partições (ou até menos!), e aqueles que possuíam 4 partições ou usavam um outro boot sector (chamado GPT), ou já estavam fora da garantia do fabricante e podiam ter seus esquemas de particionamento alterados. O próprio Microsoft (R) Windows (R), a partir da versão 7 (se não me engano), oferece uma ferramenta específica para redimensionar e reparticionar o disco, portanto essa primeira etapa foi concluída com sucesso em todas as máquinas (por favor, se você participou do Install Fest e se lembra de alguma máquina na qual não foi possível efetuar o reparticionamento, por favor contate-me <about> para que eu corrija o post!).

Depois de reparticionar, era hora de começar a instalação. Quase todos preferiram utilizar o InstallDVD, porque a instalação pela internet iria demorar muito. Após o boot, deparamo-nos com a interface do instalador do Fedora 18. Depois de ter lido diversas críticas sobre ele, pude finalmente confirmar que, infelizmente, quase todas condizem. Confesso que fiquei confuso no início, principalmente na tela de particionamento e seleção de disco, que não é nem um pouco intuitiva. Sei que o instalador foi reescrito, e que ele foi um dos principais motivos do atraso no lançamento do Fedora 18, então espero muito que as melhorias para o Fedora 19 contemplem, principalmente, essa parte de interface com o usuário. Após apanhar um pouco, acabei me acostumando com ele e as outras instalações foram mais tranquilas.

Conforme as instalações foram acabando, os sistemas começaram a ser configurados. Se minha memória não falha, todos optaram por instalar o GNOME 3, que é o desktop padrão do Fedora 18. Eu particularmente não gosto dele, e também tive algumas dificuldades (principalmente ao tentar encontrar modos de alterar opções mais avançadas), mas algumas pessoas gostaram do visual.

No final, esqueci de contar quantas máquinas foram instaladas, mas creio que chegamos perto de 11. Todas as instalações foram bem sucedidas, até onde minha memória alcança :-). E novamente eu fiquei bastante satisfeito com minha ida à UNESP de Rio Claro!

Entretanto, nuvens negras estavam se aproximando, e minha alegria duraria pouco...

Install Fest: missão UNICAMP

Há alguns anos começaram a surgir notícias sobre um novo sistema que substituiria a BIOS, permitindo muito mais flexibilidade durante o boot e inclusive adicionando camadas de segurança que protegeriam o usuário de vírus e outras ameaças. Esse sistema chama-se UEFI (e uma das tais "camadas de segurança" chama-se Secure Boot), e no ano passado ele ganhou muita notoriedade porque a Microsoft (R) anunciou que seu então novo sistema, o Windows (R) 8, só poderia ser utilizado em máquinas com UEFI. Isso causou uma corrida dos fabricantes de computador para adaptar-se a esse novo modelo (e ganhar o famigerado selo de compatibilidade da Microsoft (R)), e gerou incoformismo em boa parte das comunidades envolvidas com Software Livre e/ou Open Source.

Resumindo, o grande problema desse novo esquema é a necessidade de uma chave criptográfica assinada por uma autoridade certificadora para que o sistema operacional seja iniciado. Essa é a segurança que o Secure Boot provê, e o único jeito de obter uma chave assinada é... (tambores)... pagando à Microsoft (R)!

Até onde eu sei, o Microsoft (R) Windows (R) 8 não funciona caso o Secure Boot esteja desabilitado (um meio perfeitamente válido de instalar uma distribuição GNU/Linux que não possui a tal chave criptográfica), então a distribuição é obrigada a compactuar com esse esquema caso queira oferecer a opção de dual-boot ao usuário. E atualmente, as duas únicas distribuições que oferecem isso são o Fedora e o Ubuntu.

Bem, depois dessa sucinta explicação, começa aqui meu relato sobre o que aconteceu no Install Fest. No dia 13 de março de 2013, quarta-feira, nos reunimos no Instituto de Computação da UNICAMP para realizarmos a instalação de distribuições GNU/Linux. Novamente, eu levei vários DVDs do Fedora para serem utilizados pelos alunos ingressantes nos cursos de Ciência e Engenharia de Computação. Dessa vez não houve palestra introdutória sobre o Projeto Fedora, mas eu resolvi pegar 10 minutos e explicar as "regras" de um Install Fest. Também comentei sobre a má prática que algumas fabricantes de notebooks têm quando decidem entregar um disco rígido todo particionado e sem a possibilidade de adição de novas partições primárias. Dito isso, começamos a instalar.

Infelizmente, devido a diversos fatores como inexperiência, tempo curto para organização do evento, e erro na estimativa de quantas pessoas iriam ao evento, acabamos ficando com muita gente pra instalar e pouca gente pra ajudar. Não chegamos a fazer uma contagem oficial, mas eu suponho que pelo menos 20 pessoas estavam na sala querendo instalar o Fedora. E a grande maioria delas estava com notebooks novos, com Microsoft (R) Windows (R) 8, i.e., com UEFI e Secure Boot habilitados.

Conforme íamos reparticionando os discos e bootando os DVDs do Fedora, começamos a perceber que havia algo errado. Depois de terminar a instalação em algumas máquinas, notávamos que o sistema não iniciava. O que tínhamos que fazer, em alguns casos, era desabilitar o Secure Boot (mesmo assim, sem sucesso em alguns casos). E depois disso, o Fedora finalmente era iniciado, mas o Microsoft (R) Windows (R) 8 não aparecia na lista de sistemas operacionais do GRUB! Ou seja, era impossível fazer com que os dois sistemas convivessem na mesma máquina.

Tivemos alguns casos um pouco mais graves, mas que no fim foram resolvidos. E antes que você me pergunte qual foi a solução, eu respondo: reabilitamos o Secure Boot, e praticamente desfizemos a instalação do Fedora. Ou seja, a esmagadora maioria dos alunos presentes no Install Fest voltou pra casa com uma máquina sem Fedora ou qualquer outra distro GNU/Linux. Eu pessoalmente vi apenas 2 instalações bem sucedidas, apesar de que depois do Install Fest fiquei sabendo de mais.

Saí do evento bastante chateado, achando que a culpa havia sido nossa, e que os alunos nunca mais iriam querer instalar GNU/Linux nas suas máquinas. Mas depois de um tempo, coloquei as idéias em ordem e resolvi escrever este post. Não estou eximindo ninguém da culpa, creio que devíamos ter planejado o Install Fest um pouco melhor, e com certeza aprendemos com os erros que cometemos. Mas acho muito importante apontar alguns dedos e dizer o que realmente aconteceu.

Conclusões

A conclusão principal não poderia ser outra. É preciso tomar muito cuidado com essas novas tecnologias de boot. Quando for comprar uma máquina nova, é preciso prestar muita atenção a isso, pois essas novas tecnologias nada mais são do que armadilhas para tirar a sua liberdade de escolher o que quer executar na sua máquina. É preciso lutar contra essas imposições que as empresas fazem (não seja inocente pensando que é só a Microsoft (R) que está por trás disso...), e é preciso tomar conta da sua liberdade. Se quiser demonstrar ainda mais seu apoio contra essas imposições (e entender mais do porquê delas existirem), clique aqui e leia a página da Free Software Foundation sobre o assunto (e assine a petição também!).

Conclusões secundárias: um Install Fest (ou qualquer evento, na verdade) precisa ser organizado com antecedência, e precisa ter bastante gente disposta a ajudar nas instalações. Só assim as coisas fluem.

Agradecimentos

Não posso deixar de agradecer o Ricardo Panaggio por me ajudar indo até a UNESP de Rio Claro comigo! Ele também ajudou bastante no Install Fest da UNICAMP.

Também gostaria de agradecer ao Marcel Godoy e ao Centro Acadêmico da Computação da UNESP de Rio Claro pela organização e divulgação do Install Fest lá. Muito obrigado!

O Install Fest da UNICAMP só foi possível com a ajuda do Grupo Pró-Software Livre da UNICAMP, em especial ao Gabriel Krisman. O Ivan S. Freitas e o Raniere Gaia Silva também ajudaram no apoio logístico do Install Fest.

Por fim, gostaria de agradecer à comunidade Fedora pelo apoio com os DVDs. Obrigado a todos!


Bye bye, Juvia!


Tags:

Once upon a time, there was a guy who cared about what other people could say about what he was writing on his blog. Well, like all fairy tales, this one also has a happy ending!

In case you didn't make the connection, the "guy" is me :-). And also in case you didn't notice: my blog does not have a comment system anymore. My reasoning for that is simple, and I can make a small list with the major points that made me take this decision:

  1. Juvia (the comment system I was using) is written in Ruby, which in itself is enough to drop it entirely (I really don't understand how it is modeled, and I spent quite some time trying to figure out how to hack it);
  2. I had to run Passenger on my Apache, which was eating lots of RAM (I only have 2GB of RAM in my personal home server, which is where I was running Juvia);
  3. I had to run MySQL in order to store the comments (the other option was PostgreSQL), which was also eating lots of RAM;
  4. I want to use my personal home server for other things :-).

I probably could list a few more reasons, but I think you get the picture. Before dropping the comment system, I spent some days thinking about whether the blog readers would like the decision or not, but after all this time I came up with this: if you, dear reader, want to send me your opinion about what I write here, you can easily send me an e-mail (see the "About" page for my address), and I will happily reply to whatever you have to say. And if I notice that the blog is losing by not having interesting discussions, I can easily bring the comment system back online (though I'd like to find another solution that consumes less memory).

Anyway, that's it. I'll make another post about something interesting soon, I promise. Stay tunned!


This will probably be one of those controversial posts, but I really cannot just be silent about a behaviour that I am constantly seeing around me.

Since my childhood, I am fascinated by the power of the words. I always liked reading a lot, and despite not knowing the grammar rules (either in pt_BR or en_US, the former being my native language, the latter being the only idiom I can consider myself fluent in), I am deeply interested in what words (and their infinite meanings) can do to us. (If you can read in portuguese, and if you also like to study or admire in this subject, I strongly recommend a romance by José Saramago called "O Homem Duplicado"). So now, what I am seeing everywhere is that people are being as careless as ever with words, their meanings, and specially their implications.

The problem I am seeing, and it is a serious problem in my opinion, is the constant use of the term "free software" when "open source" should be used. This is obviously not a recent problem, and I really cannot recall when was the first time I noticed this happening. But maybe because I am much more involved with (real) free software movements now, I have the strong impression that this "confusion" is starting to grow out of control. So here I am, trying to convince some people to be a little more coherent.

When you create a group to talk about free software, or when you join a group whose goal is to promote free software ideas, you should really do that. First of all, you should understand what free software is about. It is not about open source, for starters. It is also a political movement, not only a technical one.

I was part of a group in my former university which had "Free Software" in its name. For a long time, I believed the group really was about free software, even after receiving e-mails with heavy negative critics about my opinions when I defended something related to the free software ideology (e.g., when I suggested that we should not have a Facebook page, which had been created for the group by one of its members). Well, when I really could not hide the truth from myself anymore, I packed my things and left the group (this was actually the start of a new free software group that I founded with other friends in Brazil).

I also like a lot to go to events. And not only because of the presentations, but mostly because I really like to talk to people. Brazilians are fortunately very warm and talkative, so events here are really a fertile soil for my social skills :-). However, even when the event has "free software" in its name and description, it is very hard to find someone who really understands the philosophy behind the term. And I'm not just talking about the attendees: the event staff is also usually ignorant (and prefer to remain like this)! I feel really depressed when I start to defend the (real) free software, and people start looking at me and saying "You're radical.". It's like going in a "Debugger Conference" and feel ridicularized when you start talking about GDB! I cannot understand this...

But the worst part of all this is that newcomers are learning that "free software" is "Linux", or something which is not free software. This is definitely not a good thing, because people should be aware that the world is not just about software development: there are serious issues, including privacy and freedom menaces by Facebook/Google/Apple/etc, which we should fight against. Free software is about that as well. Awareness should be raised, actions should be taken, and people should refuse those impositions.

So, to finish what I want to say, if you do not consider yourself a free software activist, please consider becoming one. And if, after giving it a thought, you decided that you really do not want to be a free software activist, then do not use the name "free software" in your event/group/whatever, unless you really intend to talk about it and not open source.. In other words, if you don't want to help, please don't spread confusion.


Olá a todos!

Finalmente consegui um pouco de tempo na minha agenda, e resolvi escrever no blog para anunciar a criação do grupo LibrePlanet São Paulo!

O que é o LibrePlanet

O projeto LibrePlanet teve início em 2006, durante a reunião de membros da FSF (a Free Software Foundation). Ele foi criado para ajudar a organizar maneiras de levar o movimento de Software Livre ao conhecimento da população em geral.

Os grupos são organizados geograficamente, e cada um é responsável por definir metas e estratégias visando fomentar o Software Livre na região. É importante deixar claro: o objetivo é trabalhar em prol do Software Livre, e não do open source. Para saber mais a respeito da definição de Software Livre, recomendo que leia este artigo.

O surgimento do LibrePlanet São Paulo

Essa história é um pouco longa, mas vou tentar resumir :-).

Tudo começou quando eu, Ricardo Panaggio, Ivan S. Freitas e Raniere Gaia Silva começamos a trocar alguns e-mails sobre assuntos como privacidade, software livre, soluções e serviços livres, etc. Eu e o Panaggio já estávamos nos sentindo muito insatisfeitos com os rumos que um grupo local, teoricamente "pró software livre", estava tomando (como quase tudo hoje em dia, o nome "software livre" está lá simplesmente porque ninguém se tocou de que devia ser "open source" ainda...). E essa insatisfação já vinha nos fazendo querer criar um novo grupo, fiel à ideologia do Software Livre, no qual pudéssemos dar nossas opiniões sem medo de sermos esmagados por uma maioria que não se importa com "essas coisas".

Bem, começamos a conversar, e logo o Ivan e o Raniere deram sinais de que eles topariam participar do grupo, sem problemas. Portanto, o solo já estava fértil para novas idéias :-).

Um dia, eu acordei e vi na minha INBOX uma mensagem do Raniere dizendo que havia encontrado algo sobre um projeto interessante, o LibrePlanet, na Internet. Foi a faísca que faltava pra começar a movimentação! Recordei-me de que eu já havia conversado com o Matt Lee, também da FSF, sobre o LibrePlanet, e depois de uma rápida busca na wiki do projeto, vi que ainda não havia nenhum grupo brasileiro. Então, depois de alguma conversa interna, decidimos criar um grupo para o Estado de São Paulo.

Hoje, pouco mais de 2 semanas depois da criação, contamos com 10 membros cadastrados na Wiki, e aproximadamente 7 membros ativos no nosso canal de IRC. Também temos uma lista de discussão, e já estamos começando a conversar sobre possíveis projetos para 2013.

Como você pode fazer parte do grupo?

É simples! Siga os seguintes passos:

  1. Entre na nossa Wiki, e leia todas as informações presentes lá antes de qualquer coisa!
  2. Depois disso, efetue a criação de seu usuário na FSF, indo até este link de cadastro e preenchendo as informações. Repare que você não precisa tornar-se membro da FSF (os membros são pessoas que contribuem financeiramente com a Fundação), mas se você puder, iria ser bem legal :-).
  3. Ok, agora que você já possui um usuário, efetue o login na Wiki do LibrePlanet, e crie sua página pessoal lá. Para isso, vá até este link, clique no link Edit, e insira algumas informações sobre lá. Se quiser, utilize minha página pessoal como exemplo. É importante que você insira, no final de todo o conteúdo, a seguinte linha: {% raw %}{{user SP}}{% endraw %}. Ele faz com que você passe a pertencer ao grupo LibrePlanet de São Paulo.
  4. Agora, é importante que você também efetue sua inscrição na nossa lista de discussão. Vá até esta página de inscrição e preencha as informações necessárias! Também recomendamos fortemente que você envie uma mensagem de apresentação para a lista. Nada formal, só para termos uma idéia do tamanho do grupo!
  5. Ufa, último passo! Se você utiliza IRC e frequenta a rede Freenode, entre no nosso canal: #lp-br-sp! É lá que a maior parte das discussões acontece, então seria muito legal se você também pudesse participar delas!

Acho que é isso :-). Se você ainda tiver alguma dúvida sobre qualquer assunto tratado neste post (objetivos do grupo, inscrição, etc), ou se quiser fazer algum comentário, sinta-se à vontade!

Saudações livres!


Nesta última sexta-feira, dia 30/11/2012, estive presente na sétima edição do SoLiSC 2012, em Florianópolis, para apresentar uma palestra introdutória sobre o GDB. Este é um relato sobre minha particição no evento :-).

Impressões sobre o evento

Foi a primeira vez que fui ao SoLiSC. Já tive vontade de ir em anos anteriores, mas infelizmente sempre havia algo para atrapalhar. No entanto, nesse ano felizmente tudo correu bem, e inclusive tive uma palestra aceita! Ou seja, um ótimo motivo para visitar Floripa e rever o mar :-D.

Peguei um vôo saindo às 6h de Campinas, e cheguei lá às 7h10min. Estava bastante cansado, pois não havia dormido de quinta pra sexta, só que a ansiedade estava conseguindo me deixar ligado :-).

O evento aconteceu Universidade Estácio de Sá, que fica em São José. Cheguei por lá às 8h, e fui bem recebido pelo pessoal do evento. Já tentei me enturmar, e conheci algumas pessoas que também iam palestrar no evento. Como minha palestra estava marcada para começar às 14h, resolvi ficar batendo papo e de olho na grade de palestras.

Por coincidência (ou não!), acabei ficando na sala onde aconteceria o primeiro LibreOffice Hack Day no Brasil. Acabei ficando na sala o dia todo, ajudando o pessoal a resolver alguns problemas chatos com o firewall da Universidade, e depois com git. Foi uma experiência muito legal, nunca tinha participado de um Hack Day antes, e foi uma honra poder presenciar e ajudar no primeiro evento do tipo que o pessoal do LibreOffice fez no Brasil :-). Aliás, foi muito interessante conhecer um pouco mais sobre um projeto tão grande e complexo quanto o LibreOffice, e inclusive fiz um "jabá" sobre o GDB para eles :-).

No final, também conheci algumas pessoas muito interessadas em contribuir com projetos de software livre, o que é sempre bom! Isso me ajuda a ter mais motivação para continuar a fazer esse trabalho de divulgação. Você pode ler uma descrição mais detalhada sobre o LibreOffice Hack Day (inclusive com fotos) aqui.

Apresentação "GDB Crash Course"

Eu já estava esperando pouca gente na palestra, até porque falar sobre o GDB está ficando cada vez mais complicado... As pessoas em geral não sabem (e nem se interessam) pelo software, então é normal ficar meio "de escanteio" nesses eventos :-). Quem sabe um dia eu não escreva um post sobre isso?

Bem, mas mesmo com pouco público, creio que palestra correu bem. Dessa vez, meu amigo Edjunior não foi, então levei a palestra sozinho :-). Existem vantagens e desvantagens nisso, mas de modo geral acho que a palestra ficou um pouco mais rápida.

Adicionei alguns slides extras para falar sobre a Red Hat, e sobre o que estamos fazendo pelas comunidades de software livre por aí -- não só na do GDB, mas também em muitas outras. Essa parte da apresentação realmente foi bacana, porque o orgulho de se trabalhar nessa empresa é grande!

Depois que terminei minha palestra e voltei à sala do LibreOffice Hack Day, alguns desenvolvedores que estavam por lá me perguntaram como foi, e disseram que tinham se arrependido de não ter ido... Sabe como é, preferiram ficar fazendo patches, então eu entendo :-P. Bem, pra não deixar ninguém insatisfeito, acabei fazendo uma segunda rodada da palestra dentro do Hack Day, e também foi muito bacana :-).

Várias pessoas me pediram os slides, então aqui estão eles:

Conclusão

Gostaria de agradecer especialmente à Eliane Domingos, ao David Jourdain e ao Olivier Hallot, todos membros da TDF e contribuidores do LibreOffice, pelos momentos prazerosos e pelas conversas divertidas que tivemos durante todo o evento!

Também gostaria de agradecer à organização do SoLiSC pela oportunidade de participar de um evento tão bacana! O Klaibson Ribeiro foi a pessoa com quem troquei alguns e-mails antes do evento, então um "muito obrigado" a ele também :-).

Nos vemos no próximo SoLiSC!


Hi there. This little post is just a heads about an issue that I am facing with the comment system that I run. Unfortunately, you will not be able to post comments on the blog until, at least, next Wednesday (November 21).

For those of you wondering which comment system I use, it is called Juvia. Due to privacy concerns, I chose not to use anything like Disqus because it tracks you and your comments (read their privacy policy if you want more details). On the other hand, Juvia runs on my private personal server, and does not collect any kind of personal information when you make a comment. The cons of this approach is that when my personal server is down (like now), the blog doesn't have comments. But that's a minor price to pay for the respect of privacy, I think.

Anyway, I hope to have the comments back online next week. Until there, I plan to continue making posts here, so save your comments for some time!

Thanks!


Hi everybody :-).

I finally got some time to finish this series of posts, and I hope you like the overall result. For those of you who are reading this blog for the first time, you can access the first post here, and the second here.

My goal with this third post is to talk a little bit about how you can use the SDT probes with tracepoints inside GDB. Maybe this particular feature will not be so helpful to you, but I recommend reading the post either way. I will also give a brief explanation about how the SDT probes are laid out inside the binary. So, let's start!

Complementary information

In my last post, I forgot to mention that the SDT probe support present on older versions of Fedora GDB is not exactly as the way I described here. This is because Fedora GDB adopted this feature much earlier than upstream GDB itself, so while this has a great positive aspect in terms of how the distro's philosophy works (i.e., Fedora contains leading-edge features, so if you want to know how to FLOSS community will be in a few months, use it!), it also has the downside of delivering older/different versions of features in older Fedoras. But of course, this SDT feature will be fully available on Fedora 18, to be announced soon.

My suggestion is that if you use a not-so-recent Fedora (like Fedora 16, 15, etc), please upgrade it to the last version, or compile your own version of GDB yourself (it's not that hard, I will make a post about it in the next days/weeks!).

With that said, let's move on to our main topic here.

SDT Probes and Tracepoint

Before anything else, let me explain what a tracepoint is. Think of it as a breakpoint which doesn't stop the program's execution when it hits. In fact, it's a bit more than that: you can define actions associated with a tracepoint, and those actions will be performed when the tracepoint is hit. Neat, huh? :-)

There is a nice description of what a tracepoint in the GDB documentation, I recommend you give it a reading to understand the concept.

Ok, so now we have to learn how to put tracepoints in our code, and how to define actions for them. But before that, let's remember our example program:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#include <sys/sdt.h>

int
main (int argc, char *argv[])
{
    int a = 10;

    STAP_PROBE1 (test_program, my_probe, a);

    return 0;
}

Very simple, isn't it? Ok, to the tracepoints now, my friends.

Using tracepoints inside GDB

In order to properly use tracepoints inside GDB, you will need to use gdbserver, a tiny version of GDB suitable for debugging programs remotely, over the net or serial line. In short, this is because GDB cannot put tracepoints on a program running directly under it, so we have to run it inside gdbserver and then connect GDB to it.

Running our program inside gdbserver

In our case, we will just start gdbserver in our machine, order it to listen to some high port, and connect to it through localhost, so there will be no need to have access to another computer or device.

First of all, make sure you have gdbserver installed. If you use Fedora, the package name you will have to install is gdb-gdbserver. If you have it installed, you can do:

1
2
3
$ gdbserver :3001 ./test_program
Process ./test_program created; pid = 17793
Listening on port 3001

The second argument passed to gdbserver instructs it to listen on the port 3001 of your loopback interface, a.k.a. localhost.

You will notice that gdbserver will stay there indefinitely, waiting for new connections to arrive. Don't worry, we will connect to it soon!

Connecting an instance of GDB to gdbserver

Now, go to another terminal and start GDB with our program:

1
2
3
4
5
6
7
$ gdb ./test_program
...
(gdb) target remote :3001
Remote debugging using :3001
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x0000003d60401530 in _start () from /lib64/ld-linux-x86-64.so.2

The command you have to use inside GDB is target remote. It takes as an argument the host and the port to which you want to connect. In our case, we just want it to connect to localhost, port 3001. If you saw an output like the above, great, things are working for you (don't pay attention to the messages about glibc debug information). If you didn't see it, please check to see if you're connecting to the right port, and if no other service is using it.

Ok, so now it is time to start our trace experiment!

Creating the tracepoints

Every command should be issued on GDB, not on gdbserver!

In your GDB prompt, put a tracepoint in the probe named my_probe:

1
2
(gdb) trace -probe-stap my_probe
Tracepoint 1 at 0x4005a9

As you can see, the trace command takes exactly the same arguments as the break command. Thus, you need to use the -probe-stap modified in order to instruct GDB to put the tracepoint in the probe.

And now, let's define the actions associated with this tracepoint. To do that, we use the actions command, which is an interactive command inside GDB. It takes some specific keywords, and if you want to learn more about it, please take a look at this link. For this example, we will use only the collect keyword, which tells GDB to... hm... collect something :-). In our case, it will collect the probe's first argument, or $_probe_arg0, as you may remember.

1
2
3
4
5
6
(gdb) actions 
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
>collect $_probe_arg0
>end
(gdb)

Simple as that. Finally, we have to define a breakpoint in the last instruction of our program, because it is necessary to keep it running on gdbserver in order to examine the tracepoints later. If we didn't put this breakpoint, our program would finish and gdbserver would not be able to provide information about what happened with our tracepoints. In our case, we will simply put a breakpoint on line 10, i.e., on the return 0;:

Running the trace experiment

Ok, time to run our trace experiment. First, we must issue a tstart to tell GDB to start monitoring the tracepoints. And then, we can continue our program normally.

1
2
3
4
5
6
7
8
(gdb) tstart 
(gdb) continue
Continuing.

Breakpoint 1, main (argc=1, argv=0x7fffffffde88) at /tmp/test_program.c:10
10        return 0;
(gdb) tstop
(gdb)

Remember, GDB is not going to stop your program, because tracepoints are designed to not interfere with the execution of it. Also notice that we have also stopped the trace experiment after the breakpoint hit, by using the tstop command.

Now, we will be able to examine what the tracepoint has collected. First, we will the tfind command to make sure the tracepoint has hit, and then we can inspect what we ordered it to collect:

1
2
3
4
5
(gdb) tfind start
Found trace frame 0, tracepoint 1
8         STAP_PROBE1 (test_program, my_probe, a);
(gdb) p $_probe_arg0
$1 = 10

And it works! Notice that we are printing the probe argument using the same notation as with breakpoints, even though we are not exactly executing the STAP_PROBE1 instruction. What does it mean? Well, with the tfind start command we tell GDB to actually use the trace frame collected during the program's execution, which, in this case, is the probe argument. If you know GDB, think of it as if we were using the frame command to jump back to a specific frame, where we would have access to its state.

This is a very simple example of how to use the SDT probe support in GDB with tracepoints. There is much more you can do, but I hope I could explain the basics so that you can start playing with this feature.

How the SDT probe is laid out in the binary

You might be interested in learning how the probes are created inside the binary. Other than reading the source code of /usr/include/sys/sdt.h, which is the heart of the whole feature, I also recommend this page, which explains in detail what's going on under the hood. I also recommend that you study a little about how the ELF format works, specifically about notes in the ELF file.

Conclusion

After this series of blog posts, I expect that you will now be able to use the not-so-new feature of SDT probe support on GDB. Of course, if you find some bug while using this, please feel free to report it using our bugzilla. And if you have some question, use the comment system below and I will answer ASAP :-).

See ya, and thanks for reading!