Archive for October, 2004

2004-10-23 21:44

Saturday, October 23rd, 2004

A murderous day :)

It began with an early wakeup (not without any commotions), and coming back to the real world. I had almost gotten a grip on myself, when Yovko called that he’s waiting in front of the block – I dressed with a record speed, we loaded the equipment, picked Rosi from Pliska, and arrived at the Inter Expo Center. There we placed all the machines, arranged the cabling and the internet connectivity (more about it later), and a lot of stuff like tables, camera, a laptop for the presentations, etc.

We opened with Yovko, who presented the OpenFest crew, and the people applauded us (I should see if we recorded it), then he spoke a bit, and then left the first lecturer – dr. Stoycho Katzarov (a member of the Parliament)…
(I won’t be speaking a lot about the lectures, there are video recordings, and because I had a lecture and tasks, I wasn’t able to listen to them too much… It always happens, when I’m in the organizing and participating in an event, I can’t act like a visitor, I can’t stay at one place).

The event was nice, although a bit tense at times, especially around the connectivity with Internet – it turned out that we’ve requested 512kbps instead of 2mbps, and the transmission was drowning a bit (it practically was pushing ~1.5mbps, with some drops). Of course, it took up to the third lecture to diagnose the problem, and we had some talks with the local admin (and with Lirex, to be sure that there isn’t any problem), then he contacted Orbitel, and we were able to get about 1.1 mbps, which somewhat did the job, and I lowered the bitrate of the streams. For tomorrow they promised to make something more, if there is a possibility, I hope there won’t be any more interruptions of the streaming… Because of the reconfigurations I interrupted the feed a few times, and one the cable from the came has pulled out, so we’ve lost a part of a lecture (I’m not sure which one, I still haven’t looked at the recordings).

The live feed was popular – at the peak moments there were about 48 connected people, you can see the traffic graphs at http://marla.ludost.net/stats/q?video (we pushed 12 mbps :) ). I still haven’t made analysis of the log of the ffserver, I’ll do it when I have time. The recordings themselves are at zadnik.org (I was archiving them there, not to load marla with them), and I’ll download and review them, when I have the time, there’s a lot to edit, before having the final variant.

My lecture went well, I didn’t interrupt my speaking too much, and the people found it interesting – I’m just sorry that I skipped the demo what happens when a server crashes (and I’ve found a way to do it over ssh, with dd if=/dev/zero of=/dev/kmem bs=4096 seek=1000000). There were a lot of questions asked, and after the end a few people wanted to talk about the subject.

After some more lectures we finished, gathered the equipment (there was a serious dispute where to put it, and in the end we put it the hall, locked and turned on the alarm. Then bu groups we crawled to “Krivoto” on “Dondukov” (Chorbadzhiyski didn’t come, he’s on a diet- there’s something wrong with him), where there were a lot of free tables, because it was early (arount 17-18), made a serious line of tables, and slowly all gathered. We drank, we spoke, spoke, spoke, ate, and I with the last of my strength went home …

Now I’m really tired, and I’ll be going to bed. I trued to hit a bit the punching bag, but mu hands start to hurt on the third punch.

And not to forget to thank Yovko, for most of the organization, to Rosi, that she was able to appear, even though she was sick, to Zhoro Chorbadzhiyski, that he was a great clock and marauderator, to Elena for her work with the camera and the filming, and to all known and unknown people, that helped to go through today. Let’s see what will happen tomorrow…

2004-10-23 21:10

Saturday, October 23rd, 2004

Скапващ ден :)

Започна се със ранно ставане (не без сътресения) и освестяване. Почти бях се осъзнал, когато Йовко звънна, и каза че е отпред – облякох се със рекордна скрост, смъкнахме техниката, и след като взехме Роси от Плиска, се появихме в Интер Експо Центъра. Там последва скоростно подреждане на техниката, уреждане на окабеляването и internet свързаността (за нея – после), както и уреждане на всякакви неща като маси, камерата, лаптопа за показване на презентации и т.н.

Открихме с Йовко, който представи екипа на OpenFest, и хората ни се порадваха малко на сцената (трябва да видя дали сме го записали), след което поговори малко, и остави първия лектор да говори – д-р Стойчо Кацаров (депутат)…
(няма да говоря много за самите лекции, има видео записи, а и понеже и аз имах лекция и задачи, нямах сили да им обърна внимание… Винаги става така, ако се занимавам с организацията или участвам в нещо, не мога да се държа изобщо като посетител, не ме свърта на едно място).

В общи линии събитието протече добре, макар и малко напрегнато, особено около момента със свързаността с internet – оказа се, че сме заявили 512 kbps вместо 2mbps, и съответно предаването леко се давеше (фактически буташе около 1.5 mbps, обаче с прекъсвания). Разбира се, трябваше да стигнем до 3тата лекция, за да бъда сигурен в проблема, и се проведоха няколко разговора с локалния админ (и с Лирекс, да не би там да има проблем), той си говори с Орбител, и в крайна сметка измъкнахме около 1.1 mbps, което горе-долу свърши работа, а аз намалих bitrate на потоците. За утре обещаха да направят нещо повече, ако е възможно, надявам се да няма такива прекъсвания в предаването… Поради пренастройки няколко пъти прекъсвах feed-а, а един път и кабела от камерата се беше измъкнал, та сме загубили част от някоя лекция (още не е ясно коя, не съм изгледал записите).

Самото предаване беше доста гледано – в пиковите моменти имаше около 48 човека закачени, може да се види и графиката на трафика на http://marla.ludost.net/stats/q?video (направихме 12 mbps :) ). Още не съм правил анализ на log-а на ffserver, това ще го направя като ми остане време. По кратки наблюдения сме засилили около 2.5-3GB до marla. Самите записи са на zadnik.org (свалях ги там, за да не товаря marla и с това), и смятам да ги преточа и прегледам, има бая да се редактира, за да се получи финалния вариант.

Моята лекция протече добре, не се запъвах, и на хората им се видя интересна – за мое съжаление пропуснах демонстрацията какво става, като crash-не сървър (а бях намерил начин да го направя през ssh, чрез dd if=/dev/zero of=/dev/kmem bs=4096 seek=1000000). Зададоха се доста въпроси, и след края няколко човека ме заговориха на темата.

След още няколко лекции свършихме, прибрахме техниката (имаше сериозен спор къде и как, в крайна сметка я замъкнахме в залата, и пуснаха алармата). Ние на групички се замъкнахме в “Кривото” на “Дондуков” (Чорбаджийски не дойде, понеже е на диета – нещо се е побъркал), където имаше бая свободни маси, понеже беше рано (около 17-18), подредихме една сериозна редица, и бавно-бавно се насъбрахме. Пихме, говорихме, говорихме, говорихме, хапнахме, и аз с последни сили се прибрах…

Сега съм адски уморен, и мисля да си лягам. Пробвах да поблъскам по крушата, ама ме заболяват ръцете на третия удар.

И да не пропусна да благодаря на Йовко, за основното организиране, на Роси, че успя да дойде, въпреки че е болна, на Жоро Чорбаджийски, че бая добре игра ролята на часовник и мародератор, на Елена за работата и с камерата и снимането, и изобщо на всички знайни и незнайни хора, с чиято помощ се справихме с днешния ден. Да видим какво следва утре…

Friday, October 22nd, 2004

Madness…

At the OpenFest there will be a sparc, with a 17″ monitor, with Debian on it. I’ve even cleaned it up, because it’s age was measurable by the layers of dust on it :)

For a part of the day I was a companion of Yovko, to finish some tasks, one of which was the payment and the taking of the flayers, and because FSA hadn’t made the transfer, we had to buffer payment… It’s really good that I have backup in the debit card. And I really don’t envy him, he did 130 kilometers today…

MY T-shirt for OpenFest with the ‘Security’ labels is 2 sizes bigger than those that I wear (and I wear mostly baggy clothes). I intend to censor all the pictures that show me with it.

With Zhoro we touched up the presentations to look ok on the notebook – and did some work on mine, I again had used too many words and has written too much, it was really obvious at what hour I had made it…

Tomorrow in the early morning (8:80) Yovko will pick me up. Because of that, up until now I was hitting the punching bag to get tired, had a shower, and after I blog, I’m going to bed.

! Not to forget tomorrow to keep contact with Lirex through the day, to be aware of any crashes around marla, because a while ago there was some problem with their router…

(I want to apologize for the dismemberness of my thoughts in this posting, it’s just that my head is on fire, and I can’t see too well through the smoke.)

2004-10-22 21:54

Friday, October 22nd, 2004

Лудница….

На OpenFest ще има sparc, с един 17″ монитор, с Debian на него. Даже го поизчистих, че възрастта му можеше да се измерва по пластовете мръсотия :)

През част от деня бях спътник на Йовко, докато свършим разни неща, едно от които беше плащането и вземането на флаерите, и понеже ССС така и не беше направило превода, двамата буферирахме плащането… Добре, че си имам backup в дебитната карта. А на него не му завиждам, сигурно е обиколил София поне 5 пъти…

Тениската ми за OpenFest с надпис Security е около 2 размера над тези, които нося (а аз нося основно размъкнати дрехи). Смятам да цензурирам всички снимки, на които ме има с нея.

С Жоро си оправихме презентациите и ги напаснахме да се виждат добре на notebook-а – основно пипахме по моята, пак се бях поолял с дългите думи и разпъванията, личеше си в колко часа я бях писал.

Утре в ранната сутрин (8:30) Йовко ще мине да ме вземе. По този случай досега блъсках по боксовата круша да се уморя, изкъпах се, остава да блогна, и ще си легна.

! Да не забравя да поддържам утре контакт с Лирекс през деня, да не се срине нещо около marla случайно, че преди малко имаше някакъв проблем с router-а им…

(Извинявам се за разпокъсаността на мислите в тоя постинг, просто главата ми леко пуши, и през димната завеса не се вижда добре.)

2004-10-22 02:44

Friday, October 22nd, 2004

Today it was a really amusing day…

In the morning I finished up my presentation, with some help from Mom and Zhoro, and even chervarium didn’t have any major remarks… All that’s left is to make a general rehearsal tomorrow, and to survive until saturday :)

Then I did some magic, to make the streaming server to send constantly one image, and in the end I crafted an avi file, that just displays the picture at a low frame rate, and started sending it to the server. Because of this Zhoro’s machine is probably working at 100% CPU, because I use it to send the stream… In the moment there’s even a graph at marla’s stats, to see how much traffic does it generate.

Then Rumen brought in the sparc for installation (an old Ultrasparc I, 167 mhz, with 128 mb RAM), and it started to get interesting :) At first it didn’t work with the small monitor (a measly 15″ CRT), so I had to connect my 17″ LCD, which worked (looks like it supports the required sync-on-green). Then began the installation, which was one of the most painless and easy ones that I’ve made. All I had to do was to start rarpd and tftpd on the alpha, to get a netboot image from the nearest mirror (with the new installer), and to tell the sparc Stop-a and ‘boot net’. It ran the kernel, loaded the installer, and not-long-after-that I had a base system installed (the link wasn’t really fast). Then I told it to do apt-get install some-really-important-packages, it downloaded about 200mb packages, installed them (for about 1-2 hours), and now the machine has a working Debian with Gnome, which is even localized :)

The machine is pretty good, and for a workstation it’s better that the alpha, no matter that the display support only 256 colors, and is a bit slow. It even has a full power off when you halt it – something, that took the PC engineers a lot of time to get right with the damn APM BIOS-es. And it’s really nicer to work than the Itanic, on which I did some work through the day…

At the same time I was finishing the configuration on Rumen’s laptop, to have a good enough environment for work (and I’m thinking about getting another external mouse, his sucks), I found and somewhat fixed a problem with the transformer’s cable, with duct tape (but he’ll have to take it somewhere for repairs, I hope the patch holds until the end of Openfest). I had the strange idea to try KDE, while doing the configurations…

There was a period in the beginning of the sparc installation, that I found myself sitting between it and the alpha, working on both – one of them is 9 years old, the other one ~14, they aren’t mainstream, and in fact they work great…

I’ve put pictures from all this here (in the beginning the idea was to show Velin what’s at home, for him to be prepared). One can see the serious attempts to cover everything with used tissues, I really hate the beginning of the winter…

The night finished with Velin at “Divaka”, because we both haven’t eaten. He has to start writing a blog, IMO…

2004-10-22 02:26

Friday, October 22nd, 2004

Днес беше адски забавен ден…

Сутринта си оправих презентацията, с помощта на Мом и на Жоро, оказа се, че и chervarium няма забележки… Остава утре да направя една генерална репетиция, и да оцелея до събота, за да говоря пред хората:)

После измислях магия как точно да накарам streaming сървъра да излъчва постоянно една картинка, и накрая скалъпих едно avi, което просто показва картинката на нисък framerate, и го засилих към сървъра. По случая машината на Жоро вероятно работи на 100% CPU, понеже оттам го засилвам… В момента и на графиките на marla може да се види колко трафик се прави.

После Румен ми донесе sparc-а за инсталация (стар UltraSparc I, на 167 mhz, с 128 mb памет), и стана интересно :) Първо не захапа с по-малкия ми монитор (едно мижаво 15″ CRT), и се наложи да му закача 17″ LCD-то. На него, слава богу, припали (изглежда поддържа изискваното sync-on-green), и се започна инсталацията, която се оказа една от най-лесните, които бях правил. Всичко се сведе до това да подкарам rarpd и tftpd на alpha-та, да сваля един netboot image от най-близкия mirror (с новия инсталатор), и да кажа на Sparc-а Stop-a и ‘boot net’. Той си запали ядрото, зареди инсталатора, и за не-особено-много време успях да кача базовата система (поради скоростта на връзката). После му казах apt-get install няколко-бая-основни-пакета , то преточи около 200 mb пакети, инсталира ги (за час-два), и в крайна сметка на машината има работещ Debian с Gnome, който даже е българизиран :)

Машината е бая добра, като за работна станция е по-добра от alpha-та – нищо, че дисплея поддържа само 256 цвята, и е леко бавна на моменти. Освен всичко си има и пълно гасене при halt – нещо, което отне на PC инженерите бая време да докарат правилно със смотаните APM BIOS-и. Освен всичко, е много по-приятна от Itanic-а, с който също се занимавах малко през деня …

През същото време донастройвах laptop-а на Румен, за да е с удобна среда за работа (и мисля да му взема друга мишка, неговата не се трае), намерих и донякъде оправих един проблем с кабела на захранването му, с малко изолирбанд (но ще му се наложи да го занесе на ремонт някъде, дано patch-а да издържи до края на openfest). Дойде ми и кощунствената идея да мина на KDE от тези настройки…

Имаше един период в началото на занимаването със sparc-а, в който открих как съм седнал м/у него и alpha-та, и работя и на двете машини – от които едната е на 9 години, а другата вероятно на ~14, нямат нищо общо с mainstream архитектурите, и всъщност работят много добре…

Снимки от цялото това нещо съм качил тук (в началото идеята беше да покажа на Велин какво е вкъщи, за да не се уплаши). Може да се видят и сериозните ми опити да покрия всичко с използвани носни кърпички, мразя началото на зимата…

Вечерта завършихме с Велин в “Дивака”, понеже и двамата не бяхме яли. Той трябва да почне да пише блог, поне според мен…

2004-10-21 03:06

Thursday, October 21st, 2004

I’m not really certain how will I manage to go saturday morning to the Openfest, if I keep working up to 3-4.
(and I really don’t know how long will Velin tolerate me making noises every night :) )

(relatively) In the morning I went to the project, and rehearsed the first variant of my lecture, to see what I have to say. It was nice, tomorrow I’ll do it again, after I fix my presentation.

After that I went to finish yesterday’s installation. It turned out, that I’ve downloaded the ISO image for x86_64, not for ia64 (I felt really stupid), and did nothing with the Itanium… In the end I left Nikola Antonov to install some kind of mandrake on it. Poor machine…

Then quickly I got to Zhoro’s office (who was dying of hunger, and had to leave asap, leaving under Anton’s supervision), and with some pains, reconfigurations, fixing Rumen’s laptop and some magic with firewire (many thanks to Anton, he saved us at least few hours of fighting with dvgrab and friends :) ) we were able to run the video broadcast. It works great, but there are some minor problems, like when encoding three video streams (about 3.2 mbps) the machine can’t keep with it. For the moment I’ve set up two audio/video streams and one audio only, to be listen-able everywhere (but it’s at 64kbps, I wonder if I’ll need a lower bitrate one).

After all of this we gathered all the equipment (Rumen had left early), and I went home with two laptops on my back, where up until now I was making my presentation… It looks ok, but there are some problems in it, and I’ve sent it to the expert in this – Zhoro, to see it and say what does he think (and to fix it :) ).

Second week in a row I’m missing IBB, it’s not nice (Ylith even was whining).

2004-10-21 02:56

Thursday, October 21st, 2004

Не ми е ясно като си лягам по това време и ставам по обяд как по дяволите ще ида в събота сутринта на Openfest.
(не е ясно и Велин колко още ще ме трае всяка нощ да му тракам на главата :) )

(относително) Сутринта се примъкнах до проекта, и разиграх първия си вариант на лекцията, за да видя какво точно имам да говоря. Получи се добре, утре пак, като си доправя презентацията.

След това отидох да довършвам вчерашната инсталация. Оказа се, че за съм свалил ISO image за x86_64, а не за ia64 (много тъп се почувствах) и не можах нищо да направя днес с Itanium-а… В крайна сметка оставих Никола Антонов да инсталира някакъв mandrake на него. Не и било писано на тая машина…

На бърз ход се добрах до офиса на Жоро (който умираше от глад, и се изнесе набързо, като ни остави под надзора на Антон), и с малко родилни мъки, пренастройки, оправяне на laptop-а на Румен, и малко магии по firewire (много благодаря, Антоне, спести ни поне няколко часа мъчене с dvgrab и приятели :) ) подкарахме видео broadcast-а. Работи много добре, само дето при три потока (сумарно около 3.2 mbps) и машината кляка. За момента са предвидени два аудио/видео потока и един само аудио, да може да се слуша навсякъде (само дето audio потока е 64kbps… чудя се дали да пускам на по-ниска скорост).

Накрая прибрахме камери, машини и т.н. (и Румен си беше заминал), и аз с два лаптопа на гръб се добрах до вкъщи, където досега си правих презентацията … Горе-долу се справих, само дето някои моменти ми куцат, и я препратих на Жоро да я види и като един експерт да си каже мнението (и да я пооправи, моля … :) ).

Втора поредна седмица пропускам ИББ, неприятна работа (даже Ylith ми измрънка).

2004-10-20 11:50

Wednesday, October 20th, 2004

One of the many reasons to read linux-kernel – a posting by Alexander Viro:

Oh, and don’t bother contacting me regarding any code I’d worked on – the answer hadn’t changed. If English translation had been unclear, maybe the original will help: poshel ty na huj so swoimi predlozheniyami.

(english translation: Go [sit] on a dick with your offers)

2004-10-20 11:49

Wednesday, October 20th, 2004

Една причина да се чете linux-kernel – постинг на Alexander Viro:

Oh, and don’t bother contacting me regarding any code I’d worked on – the answer hadn’t changed. If English translation had been unclear, maybe the original will help: poshel ty na huj so swoimi predlozheniyami.

2004-10-20 01:46

Wednesday, October 20th, 2004

The most important thing for today – I found the problem with ffserver. In fact, it turned out to be a problem with ffmpeg, but took a lot of time to be found, and after that I discovered that it got fixed in the latest versions (and have broken a lot of other stuff :) ).

The problem is in libavformat/tcp.c, it’s as follows (I’ve removed some ifdefs for clarity):

        ret = write(s->fd, buf, size);
        if (ret < 0 && errno != EINTR && errno != EAGAIN)
            return -errno;
        size -= ret;
        buf += ret;

Which at EAGAIN or EINTR in fact moves the buffer backwards, because ret=-1. This way the stream sent by ffmpeg get screwed, and ffserver goes mad.

I went to take a look at the cvs, and found out that the problem is fixed here, right after the 0.4.8 release. If I had looked at the way ffmpeg worked, I would've caught it with the first strace, here's the output:

write(4, "fm\0\0\0\3\346\323\337\326< |\10\r\35?\225j\234G\260\263"..., 32768) = 3432
write(4, "\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\3238/\310"..., 29336) = -1 EAGAIN (Resource temporarily unavailable)
write(4, "\v\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\3238"..., 29337) = -1 EAGAIN (Resource temporarily unavailable)
write(4, "M\v\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\323"..., 29338) = -1 EAGAIN (Resource temporarily unavailable)
write(4, "\vM\v\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\323"..., 29339) = -1 EAGAIN (Resource temporarily unavailable)
write(4, "%\vM\v\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\323"..., 29340) = -1 EAGAIN (Resource temporarily unavailable)

And for the search engines to be able to catch it in a better way, a short description of the problem: ffserver dies with segmentation fault (e.g. SIGSEGV) when network problems occur on the link between ffmpeg and ffserver.

Another thing for today was my work on a Itanium2, that we'll be showing at openfest - I'll be downloading some other distro, at the moment it has a SLES8 on it, which is really outdated. The machine also roars like two 32b servers, and my head hurts... I don't like its speed, either - looks like for something to work ok on it, it has to be compiled with ICC, and that's pretty hard task for linux, not only because not everything compiled with icc works (for example - the kernel, with removed GNUisms).

2004-10-20 01:38

Wednesday, October 20th, 2004

Най-важното за днес – намерих проблема с ffserver. Всъщност, се оказа проблем с ffmpeg, но отне бая време да го изровя, и след това да открия, че това са го оправили в новите версии (и са строшили куп други неща :) ).

Проблемът беше в libavformat/tcp.c, правеше се следното(премахнал съм малко ifdef-ове):

        ret = write(s->fd, buf, size);
        if (ret < 0 && errno != EINTR && errno != EAGAIN)
            return -errno;
        size -= ret;
        buf += ret;

Което при EAGAIN или EINTR всъщност мърда буфера в обратната посока, понеже ret=-1. Така потока, пращан от ffmpeg, се намазва, и ffserver-а полудява.

Отидох да погледна в cvs-а, и какво открих - проблема е оправен ето тук, точно след release на 0.4.8. Да бях се усетил да разгледам самия ffmpeg как се държи, още с първия strace го хванах, че мести буфера назад, ето и изхода:

write(4, "fm\0\0\0\3\346\323\337\326< |\10\r\35?\225j\234G\260\263"..., 32768) = 3432
write(4, "\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\3238/\310"..., 29336) = -1 EAGAIN (Resource temporarily unavailable)
write(4, "\v\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\3238"..., 29337) = -1 EAGAIN (Resource temporarily unavailable)
write(4, "M\v\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\323"..., 29338) = -1 EAGAIN (Resource temporarily unavailable)
write(4, "\vM\v\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\323"..., 29339) = -1 EAGAIN (Resource temporarily unavailable)
write(4, "%\vM\v\23\21\330\214V1WD\6\347;\305\213\24A\265C\323g\323"..., 29340) = -1 EAGAIN (Resource temporarily unavailable)

И за да може да хване google търсенията по-добре, кратко описание на проблема: ffserver дава segmentation fault (т.е. SIGSEGV) при мрежови проблеми при връзката м/у ffmpeg и ffserver.

Другото днес беше занимаването ми с един Itanium2, който ще показваме на openfest - в крайна сметка ще сваля някаква друга дистрибуция, за момента има един SLES8, който обаче е адски outdated. Освен това машината бучи като за два 32битови сървъра, и ме боли главата... Не ми харесва и как се движи - изглежда, за да работи нещо добре на нея, трябва да се компилира с ICC, а това е леко сложна задача за linux, най-малкото защото не всичко, компилирано с тоя компилатор работи (пример - linux kernel, с изчистени GNU-изми).

2004-10-19 04:40

Tuesday, October 19th, 2004

ffserver, et tu mama tambien!

The day wasn’a anything special, my glasses are undergoing repairs, I went through the project to check on some things, after which we had a meeting for OpenFest, and to test the camera. It turned out that we don’t have the required cable, today I’ll be looking at the stores.

After that I went home, with some lasagna, ate, and started looking for a problem in ffserver, it was segfaulting at times.

I tried gdb, valgrind and strace on in, read the sources of 0.4.8, 0.4.7, the cvs snapshot from their page and the latest one… I got to the following conclusion – it does screw the .ffm file SOMEWHERE, in which he keeps the current stream, because of network problems, and when the clients reach that, it dies with SIGSEGV. My night passed in looking at things like this:

193.110.159.41 - - [Tue Oct 19 01:10:15 2004] "GET /test2.avi HTTP/1.0" 200 5309590
193.110.159.41 - - [Tue Oct 19 01:12:06 2004] "GET /test1.avi HTTP/1.0" 200 10399138
Segmentation fault (core dumped)
marla:/home/vasil$ gdb --core=core ffmpeg-0.4.8/ffserver
....
#0  0x400c31b7 in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0x400c31b7 in memcpy () from /lib/libc.so.6
#1  0x08062db1 in ffm_read_data (s=0x8288260, buf=0x82cbcc3 "....", size=6421, 
    first=0) at ffm.c:354
#2  0x080632fe in ffm_read_packet (s=0x8288260, pkt=0xbfffbc88) at ffm.c:511
#3  0x0805da4c in av_read_packet (s=0x8288260, pkt=0xbfffbc88) at utils.c:424
#4  0x08054998 in http_prepare_data (c=0x8295270) at ffserver.c:2116
#5  0x0805501a in http_send_data (c=0x8295270) at ffserver.c:2384
#6  0x08051f60 in handle_connection (c=0x8295270) at ffserver.c:879
#7  0x0805191d in http_server () at ffserver.c:625
#8  0x0805b0f2 in main (argc=3, argv=0xbffffd94) at ffserver.c:4654
(gdb) frame 4
#4  0x08054998 in http_prepare_data (c=0x8295270) at ffserver.c:2116
2116        return av_read_packet(s, pkt);
(gdb) print c->state
$1 = HTTPSTATE_SEND_DATA
(gdb) print  c->stream->feed
$2 = (struct FFStream *) 0x827fed0
....
(gdb) print ffm->file_size  
$37 = 117878784
(gdb) print size
$38 = 6421
(gdb) print len 
$39 = -24191
(gdb) print fill_size
$40 = 28273
(gdb) print frame_offset
$41 = -24191
(gdb) q

It’s especially strange that the return value of a function that reads 2 bytes and makes a two-byte number from them, are something that is over 65536 0 and Valgrind didn’g catch any oveflows.

Because I got tired, I made some toast, had breakfast, and I’ll probably sleep until the afternoon.

2004-10-19 04:32

Tuesday, October 19th, 2004

ffserver, et tu mama tambien!

Деня не беше нещо особено, очилата са ми на ремонт, минах през проекта да проверя едно-две неща, след което имахме среща за openfest, и за тест на камерата. За последното се оказа, че нямаме кабел, днес ще търся по магазините.

След това се прибрах, с едно количество лазаня под мишница, хапнах, и седнах да ровя проблем във ffserver-а, даваше segmentation fault от време на време.

Какво ли не пробвах, gdb, valgring, strace, четох source на 0.4.8, 0.4.7, cvs snapshot-а от страницата им и последния cvs… Е стигнах до един извод – НЯКЪДЕ намазва .ffm файла, в който държи текущия поток, при разни мрежови проблеми, и като стигнат дотам клиентите, гърми със sigsegv. Нощта ми мина в гледане на неща от типа:

193.110.159.41 - - [Tue Oct 19 01:10:15 2004] "GET /test2.avi HTTP/1.0" 200 5309590
193.110.159.41 - - [Tue Oct 19 01:12:06 2004] "GET /test1.avi HTTP/1.0" 200 10399138
Segmentation fault (core dumped)
marla:/home/vasil$ gdb --core=core ffmpeg-0.4.8/ffserver
....
#0  0x400c31b7 in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0x400c31b7 in memcpy () from /lib/libc.so.6
#1  0x08062db1 in ffm_read_data (s=0x8288260, buf=0x82cbcc3 "....", size=6421, 
    first=0) at ffm.c:354
#2  0x080632fe in ffm_read_packet (s=0x8288260, pkt=0xbfffbc88) at ffm.c:511
#3  0x0805da4c in av_read_packet (s=0x8288260, pkt=0xbfffbc88) at utils.c:424
#4  0x08054998 in http_prepare_data (c=0x8295270) at ffserver.c:2116
#5  0x0805501a in http_send_data (c=0x8295270) at ffserver.c:2384
#6  0x08051f60 in handle_connection (c=0x8295270) at ffserver.c:879
#7  0x0805191d in http_server () at ffserver.c:625
#8  0x0805b0f2 in main (argc=3, argv=0xbffffd94) at ffserver.c:4654
(gdb) frame 4
#4  0x08054998 in http_prepare_data (c=0x8295270) at ffserver.c:2116
2116        return av_read_packet(s, pkt);
(gdb) print c->state
$1 = HTTPSTATE_SEND_DATA
(gdb) print  c->stream->feed
$2 = (struct FFStream *) 0x827fed0
....
(gdb) print ffm->file_size  
$37 = 117878784
(gdb) print size
$38 = 6421
(gdb) print len 
$39 = -24191
(gdb) print fill_size
$40 = 28273
(gdb) print frame_offset
$41 = -24191
(gdb) q

Особено странни са моментите как от функция, която в общи линии прави прочита 2 байта и прави от тях едно двубайтово число, мога да получа нещо, което е над 65536 – и Valgrind не хвана никакви overflows.

Понеже ми писна, си направих няколко филийки, закусих, и мисля да спя до следобеда.

2004-10-17 23:36

Sunday, October 17th, 2004

Second day for putting banners. The whole day me, Bobson and schz were walking through Sofia and sticking (and were able to finish just before the end of the soccer match, to be able to avoid the fans’ mob).

Next to NDK there is a place where they sell pizza by the piece, and make a great lasagna … mmmm …

My glasses turned out to be at home, tomorrow I’ll be bringing them for repairs. Looks like the autopilot has helped me take them.

2004-10-17 23:31

Sunday, October 17th, 2004

Втори ден за лепене на афиши. Цял ден аз, Бобсън и schz се разхождахме из София и лепяхме (и успяхме да свършим съвсем малко преди края на мача, за да избегнем тълпата фенове).

До НДК има едно място, в което продават пица на парче, и правят една страхотна лазаня… ммм….

Очилата ми всъщност се оказаха вкъщи, утре ще ги нося на ремонт. Автопилота е помогнал да си ги взема, както изглежда.

2004-10-17 01:19

Sunday, October 17th, 2004

The paunch soup saved me, and after that me and Bobson went out to put banners about openfest, I’m tired as hell, and the weather wasn’t very suitable (I hate the cold and rainy weather, when I’m outside).

I’ll have to go to the place of the party tomorrow, because I forgot my glasses there, and looking without them isn’t nice, it’s like the world with lower resolution (and as far as I remember, one of the glasses is broken, so I’ll have to bring them for maintenance).

I installed evolution 2.0, for some parts it looks better, for some – worse. And I want to find some way to encrypt the outgoing mail for people whose keys I have by default.

2004-10-17 01:15

Sunday, October 17th, 2004

Шкембе чорбата ме спаси в общи линии, след което с Бобсън цял ден разлепяхме плакати за OpenFest, скапах се, а и времето не беше особено подходящо (мразя да е студено и дъждовно, и да съм навън).

Трябва да ида утре до мястото, дето празнувахме, че там са ми останали очилата, а гледането без тях не е особено приятно, все едно света е с намалена разделителна способност (доколкото си спомням, и едното им стъкло е счупено, ще трябва да ги нося на ремонт).

Инсталирах си evolution 2.0, изглежда в някои отношения по-добре, в други – по-зле. Освен това искам да намеря начин по подразбиране да криптира изходящата поща до хората, чиито ключове имам.

2004-10-16 14:15

Saturday, October 16th, 2004

My notes from last night:

drunk
tired
documentation the whole day
the meeting at Zhoro failed
party at Nakov
drinks with different colors
made a lot of heated brandy, people liked it
tired to death and drunk
came home at 4, and I want do die
I’m thinking about dying

For the last thing I agree totally, I feel really bad…

We were celebrating that Nakov got the “John Atanasov” award, with a lot of drinkig… I decided to try everything, and because that wasn’t enough, I made a considerable amount of heated brandy, that almost everybody liked. I got so drunk, that I don’t even want to comment it.

Good thing that I remember an interesting conversation with Shiyachki, about making a bootable image that can behave as netboot – e.g. instead of using bootprom, to use GRUB and something else… I remember explaining to someone how bad idea it’s to run a database on raid5, not on raid1…

I’m thinking about getting a bath, and going for paunch soup, before I die.

2004-10-16 14:04

Saturday, October 16th, 2004

Бележките ми от снощи:

пиян
уморен
документация цял ден
провали се срещата при Жоро
купон при Наков
пиене с различни цветове
праил бая греяна ракия, която се хареса
уморен до смърт и пиян
прибрах се в 4, и ми се мре
мисля да умра

За последното в момента съм напълно съгласен, адски ми е зле…

В общи линии празнувахме това, че Наков спечели наградата “Джон Атанасов”, с много пиене… Аз реших да пия от всичко, а след като и това не ми стигна, направих едно сериозно количество греяна ракия, която бая се хареса на хората. Толкова жестоко се напих, че направо нямам думи…

Поне си спомням един интересен разговор с Шиячки, на тема дали може да се направи bootable image, което да се държи като netboot – т.е. вместо да се ползва bootprom, да се ползва GRUB с още нещо… Помня и как обяснявах на някой колко лоша идея е база данни да се пуска в/у raid5, а не в/у raid1…

След малко ще се изкъпя, и ще ида за шкембе чорба, преди да съм умрял.