<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/blog/templates/default/atom.css" type="text/css" ?>

<feed version="0.3" 
   xmlns="http://purl.org/atom/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    
    <link href="http://sebastian.marsching.com/blog/rss.php?version=atom0.3" rel="service.feed" title="Open-Source, Physik &amp; Politik" type="application/x.atom+xml" />
    <link href="http://sebastian.marsching.com/blog/"                        rel="alternate"    title="Open-Source, Physik &amp; Politik" type="text/html" />
    <link href="http://sebastian.marsching.com/blog/rss.php?version=2.0"     rel="alternate"    title="Open-Source, Physik &amp; Politik" type="application/rss+xml" />
    <title mode="escaped" type="text/html">Open-Source, Physik &amp; Politik</title>
    <tagline mode="escaped" type="text/html">Weblog von Sebastian Marsching</tagline>
    <id>http://sebastian.marsching.com/blog/</id>
    <modified>2011-08-31T21:18:00Z</modified>
    <generator url="http://www.s9y.org/" version="1.5.5">Serendipity 1.5.5 - http://www.s9y.org/</generator>
    <dc:language>de</dc:language>
    <info mode="xml" type="text/html">
        <div xmlns="http://www.w3.org/1999/xhtml">You are viewing an ATOM formatted XML site feed. Usually this file is inteded to be viewed in an aggregator or syndication software. If you want to know more about ATOM, please visist <a href="http://atomenabled.org/">Atomenabled.org</a></div>
    </info>

    <entry>
        <link href="http://sebastian.marsching.com/blog/archives/114-Neues-Spielzeug-II.html" rel="alternate" title="Neues Spielzeug II" type="text/html" />
        <author>
            <name>Sebastian Marsching</name>
                    </author>
    
        <issued>2011-08-25T21:47:00Z</issued>
        <created>2011-08-25T21:47:00Z</created>
        <modified>2011-08-31T21:18:00Z</modified>
        <wfw:comment>http://sebastian.marsching.com/blog/wfwcomment.php?cid=114</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sebastian.marsching.com/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=114</wfw:commentRss>
    
        <id>http://sebastian.marsching.com/blog/archives/114-guid.html</id>
        <title mode="escaped" type="text/html">Neues Spielzeug II</title>
        <content type="application/xhtml+xml" xml:base="http://sebastian.marsching.com/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><a href="http://sebastian.marsching.com/blog/uploads/2011-08-26_Mehr_Pakete.jpg" class="serendipity_image_link"><!-- s9ymdb:19 --><img width="73" height="110" alt="Mehr Pakete" src="http://sebastian.marsching.com/blog/uploads/2011-08-26_Mehr_Pakete.serendipityThumb.jpg" class="serendipity_image_left" /></a>Im Laufe der letzten zwei Wochen sind diverse weitere Pakete eingetroffen. Heute ist das letzte Paket gekommen (diese Artikel zu besorgen hat sich als schwieriger als erwartet erwiesen).</p>
<p>Damit haben wir jetzt alle benötigte Hardware und warten nur noch auf einen Dienstleister. Wenn alles glatt läuft, ist es am 31. August soweit, und dann wird auch verraten, was sich in den Kartons befunden hat und wofür wir die ganzen Sachen brauchen.</p>
<p>Als kleine Anregung zum Grübeln gibt es hier noch eine Information zum Foto von vor zwei Wochen: Diese Kartons habe ich alle in der Stephanienstraße in Karlsruhe abgeholt. <img src="http://sebastian.marsching.com/blog/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /></p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://sebastian.marsching.com/blog/archives/115-Neues-Spielzeug-III.html" rel="alternate" title="Neues Spielzeug III" type="text/html" />
        <author>
            <name>Sebastian Marsching</name>
                    </author>
    
        <issued>2011-08-31T19:49:10Z</issued>
        <created>2011-08-31T19:49:10Z</created>
        <modified>2011-08-31T19:49:10Z</modified>
        <wfw:comment>http://sebastian.marsching.com/blog/wfwcomment.php?cid=115</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sebastian.marsching.com/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=115</wfw:commentRss>
    
        <id>http://sebastian.marsching.com/blog/archives/115-guid.html</id>
        <title mode="escaped" type="text/html">Neues Spielzeug III</title>
        <content type="application/xhtml+xml" xml:base="http://sebastian.marsching.com/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><a class="serendipity_image_link" href="http://sebastian.marsching.com/blog/uploads/2011-08-31_Telefone.jpg"><!-- s9ymdb:20 --><img height="73" width="110" class="serendipity_image_left" src="http://sebastian.marsching.com/blog/uploads/2011-08-31_Telefone.serendipityThumb.jpg" alt="Inhalt der Kartons: Telefone" /></a>Heute ist planmäßig unsere neue Telefonanlage in Betrieb gegangen. Damit ist auch das Geheimnis gelüftet, was sich in den <a title="http://sebastian.marsching.com/blog/archives/113-Neues-Spielzeug-I.html" href="http://sebastian.marsching.com/blog/archives/113-Neues-Spielzeug-I.html">Kartons</a> befand.<br /></p> 
<p>Wir haben uns für eine Telefonanlage von <a title="http://www.starface.de/" href="http://sebastian.marsching.com/blog/exit.php?url_id=425&amp;entry_id=115"  onmouseover="window.status='http://www.starface.de/';return true;" onmouseout="window.status='';return true;">STARFACE</a> entschieden. Überzeugt hat mich an dieser Anlage, die ich auf der CeBIT letztes Jahr zum ersten mal gesehen hatte, dass die Anbindung der Telefone vollständig über IP erfolgen kann, Telefone unterschiedlicher Hersteller unterstützt werden (wir benutzen Tischtelefone von <a title="http://www.snom.de/" href="http://sebastian.marsching.com/blog/exit.php?url_id=426&amp;entry_id=115"  onmouseover="window.status='http://www.snom.de/';return true;" onmouseout="window.status='';return true;">snom</a>) und man die Anlage mit eigenen Modulen erweitern kann.</p> 
<p>Nachdem ich die eigentliche Anlage und die Telefone schon vor rund drei Wochen direkt bei STARFACE in Karlsruhe abgeholt hatte, musste noch etwas Netzwerk-Hardware und anderes Zubehör organisiert werden. Die Kontakte die ich mit verschiedenen STARFACE-Mitarbeitern hatte, waren alle sehr nett, so dass ich diese Firma uneingeschränkt weiterempfehlen kann.</p> 
<p>Als überraschend schwierig hat es sich erwiesen passende Netzwerk-Switches zu bekommen. Eigentlich hätten diese schon vor rund zwei Wochen kommen sollen, aber da unser Lieferant, <a title="http://www.office-partner.de/" href="http://sebastian.marsching.com/blog/exit.php?url_id=427&amp;entry_id=115"  onmouseover="window.status='http://www.office-partner.de/';return true;" onmouseout="window.status='';return true;">Office-Partner</a>, selbst Probleme mit seinem Vorlieferanten hatte, verzögerte sich die Lieferung immer weiter. Glücklicherweise konnte Office-Partner die Switches dann doch noch von einem anderen Vorlieferanten kurzfristig beziehen, so dass wir letzte Woche dann <a title="http://sebastian.marsching.com/blog/archives/114-Neues-Spielzeug-II.html" href="http://sebastian.marsching.com/blog/archives/114-Neues-Spielzeug-II.html">alle benötigte Hardware</a> hatten. An dieser Stelle auch ein herzliches Dankeschön an Herrn Wittneven von Office-Partner für seinen Einsatz.<br /></p> 
<p> <a class="serendipity_image_link" href="http://sebastian.marsching.com/blog/uploads/2011-08-31_Telefonanlage.jpg"><!-- s9ymdb:21 --><img height="73" width="110" class="serendipity_image_right" src="http://sebastian.marsching.com/blog/uploads/2011-08-31_Telefonanlage.serendipityThumb.jpg" alt="STARFACE Telefonanlage" /></a>Für den neuen Telefon-/DSL-Anschluss hatten wir uns für <a title="http://www.vodafone.de/" href="http://sebastian.marsching.com/blog/exit.php?url_id=430&amp;entry_id=115"  onmouseover="window.status='http://www.vodafone.de/';return true;" onmouseout="window.status='';return true;">Vodafone</a> entschieden. 
Ausschlaggebend war nicht nur der im Vergleich zur <a title="http://www.telekom.de/" href="http://sebastian.marsching.com/blog/exit.php?url_id=431&amp;entry_id=115"  onmouseover="window.status='http://www.telekom.de/';return true;" onmouseout="window.status='';return true;">Telekom</a> deutlich 
niedrigere Preis bei den Geschäftskunden-Angeboten, sondern auch die Tatsache, dass uns Vodafone DSL-6000 
anbieten konnte, während bei der Telekom nur DSL-3000 möglich war.</p> 
<p>Heute morgen war dann schließlich der Telekom-Techniker da um die Leitung zu schalten. Über den Service der Telekom wird ja gerne gelästert, insbesondere wenn es um die Schaltung von Leitungen für Mitbewerber geht. In unserem Fall war der Telekom-Techniker aber nicht nur sehr pünktlich sondern auch ausgesprochen freundlich und kompetent.</p> 
<p>Da die neue Telefonanlage über einen ISDN-Anlagenanschluss verfügt, habe wir jetzt endlich auch die Möglichkeit flexibel Durchwahlen für verschiedene Zwecke festzulegen. Das ist schon sehr bequem im Vergleich zum ISDN-Mehrgeräteanschluss, den wir vorher hatten. Leider haben sich dadurch unsere Telefonnummern geändert, aber mittelfristig wird sich der Aufwand in der Umstellungsphase sicherlich auszahlen.</p> 
<p>Besonders gut gefällt mir die Möglichkeit der STARFACE-Telefonanlage eigene Module in einer speziellen Skriptsprache zu schreiben. Als jemand, der auch gerne mal selbst etwas bastelt, habe ich damit die Möglichkeit nahezu beliebige Funktionen in der Anlage selbst zu implementieren. Bei anderen Anlagen müssten wir hingegen teure Zusatzmodule vom Hersteller kaufen, insofern für die benötigte Funktion überhaupt Module verfügbar wären. Ein erstes Modul habe ich bereits entworfen, dazu werden ich aber noch in einigen Tagen etwas schreiben.</p> 
<p>Zusammenfassend kann ich sagen, dass ich mit der jetzt gefundenen Lösung sehr zufrieden bin, und glaube, dass sich die vielen Stunden, die ich in Auswahl, Organisation und Einrichtung investiert habe, gelohnt haben.<br /></p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://sebastian.marsching.com/blog/archives/113-Neues-Spielzeug-I.html" rel="alternate" title="Neues Spielzeug I" type="text/html" />
        <author>
            <name>Sebastian Marsching</name>
                    </author>
    
        <issued>2011-08-12T21:09:00Z</issued>
        <created>2011-08-12T21:09:00Z</created>
        <modified>2011-08-12T21:09:00Z</modified>
        <wfw:comment>http://sebastian.marsching.com/blog/wfwcomment.php?cid=113</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sebastian.marsching.com/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=113</wfw:commentRss>
    
        <id>http://sebastian.marsching.com/blog/archives/113-guid.html</id>
        <title mode="escaped" type="text/html">Neues Spielzeug I</title>
        <content type="application/xhtml+xml" xml:base="http://sebastian.marsching.com/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><a class="serendipity_image_link" href="http://sebastian.marsching.com/blog/uploads/2011-08-11_Pakete.jpg" onclick="F1 = window.open('/blog/uploads/2011-08-11_Pakete.jpg','Zoom','height=690,width=465,top=262.5,left=735,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes'); return false;"><!-- s9ymdb:18 --><img width="73" height="110" class="serendipity_image_left" src="http://sebastian.marsching.com/blog/uploads/2011-08-11_Pakete.serendipityThumb.jpg" alt="Kartons" /></a>Gestern habe ich in Karlsruhe mehrere Kartons abgeholt. Was sich daran befindet, wird allerdings erst in einigen Wochen verraten. <img src="http://sebastian.marsching.com/blog/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /></p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://sebastian.marsching.com/blog/archives/112-KVM-and-Graceful-Shutdown-on-Ubuntu.html" rel="alternate" title="KVM and Graceful Shutdown on Ubuntu" type="text/html" />
        <author>
            <name>Sebastian Marsching</name>
                    </author>
    
        <issued>2011-06-11T15:44:38Z</issued>
        <created>2011-06-11T15:44:38Z</created>
        <modified>2011-06-11T16:28:49Z</modified>
        <wfw:comment>http://sebastian.marsching.com/blog/wfwcomment.php?cid=112</wfw:comment>
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://sebastian.marsching.com/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=112</wfw:commentRss>
    
        <id>http://sebastian.marsching.com/blog/archives/112-guid.html</id>
        <title mode="escaped" type="text/html">KVM and Graceful Shutdown on Ubuntu</title>
        <content type="application/xhtml+xml" xml:base="http://sebastian.marsching.com/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>For quite some time, I have been trying to figure out, how to gracefully shutdown the <a href="http://sebastian.marsching.com/blog/exit.php?url_id=415&amp;entry_id=112"  onmouseover="window.status='http://www.linux-kvm.org/';return true;" onmouseout="window.status='';return true;" title="http://www.linux-kvm.org/">KVM-based</a> virtual machines running on a <a href="http://sebastian.marsching.com/blog/exit.php?url_id=416&amp;entry_id=112"  onmouseover="window.status='http://www.ubuntu.com/';return true;" onmouseout="window.status='';return true;" title="http://www.ubuntu.com/">Ubuntu </a>10.04 LTS (Lucid Lynx) host system. This problem consists of two parts: First you have to make the virtual machines support the shutdown event from libvirt and second you have to call the shutdown action for each virtual machine on system shutdown.</p> 
<p>The first part is very easy for Linux VMs and also not too hard for Windows VMs. I described the necessary steps in my <a title="http://sebastian.marsching.com/wiki/Linux/KVM#Graceful_Shutdown" href="/wiki/Linux/KVM#Graceful_Shutdown">wiki</a></p> 
<p>The seconds part is harder to accomplish: On Ubuntu 8.04 LTS (Hardy Heron) I just modified the <span class="code">/etc/init.d/libvirt-bin</span> script to call a Python script in the stop action. This solution was not perfect, as it meant that the virtual machines were also shutdown, when <span class="code">libvirtd</span> was just restarted, however it was a quick and easy solution.</p> 
<p>For Ubuntu 10.04, the init script has been converted to an <a title="http://upstart.ubuntu.com/" href="http://sebastian.marsching.com/blog/exit.php?url_id=418&amp;entry_id=112"  onmouseover="window.status='http://upstart.ubuntu.com/';return true;" onmouseout="window.status='';return true;">Upstart</a> job. So the easiest way was to create a upstart job that is starting on the <span class="code">stopping libvirt-bin</span> event. However, this did not solve the problem, because the system powered off or rebooted before the shutdown of the virtual machines was finished. As it turns out, Ubuntu 10.04 uses an odd combination of Upstart jobs and traditional init scripts. This leads to a situation, where <span class="code">/etc/init.d/halt</span> or <span class="code">/etc/init.d/reboot</span> are called, before all upstart jobs have stopped, when one of the upstart jobs needs a significant amount of time to stop. This can be solved by adding an init script, than runs before the <span class="code">halt</span> or <span class="code">reboot</span> scripts and waits for the respective Upstart job to finish. In fact, it is best to run this script before the <span class="code">sendsigs</span> script to avoid processes started by one of the upstart jobs to receive a <span class="code">SIGKILL</span>.</p> 
<p>I added the complete scripts and configuration files needed for this feature to my <a title="http://sebastian.marsching.com/wiki/Linux/KVM#Shutdown_virtual_machines_on_host_system_shutdown" href="/wiki/Linux/KVM#Shutdown_virtual_machines_on_host_system_shutdown">wiki</a>. In fact, this solution also ensures, that the virtual machines are only shutdown if <a href="http://sebastian.marsching.com/blog/exit.php?url_id=420&amp;entry_id=112"  onmouseover="window.status='http://www.libvirt.org/';return true;" onmouseout="window.status='';return true;" title="http://www.libvirt.org/">libvirt</a> is stopped because of a runlevel change. Thus, the <span class="code">libvirt-bin</span> package can now be upgraded without resulting in a restart of the VMs.</p> 
<p>For me, automatically shutting down the virtual machines is very important.  The KVM hosts I manage are connected to an uninterruptible power supply with limited battery time. Although in the past years I remember only a single time, the host systems were shutdown because the battery was nearly empty (most power interrupts are very short), I want to make sure that all virtual machines are in a safe, consistent state, when the power finally goes off. So I hope that the scripts in the wiki are also helpful to other people, having the same problem.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://sebastian.marsching.com/blog/archives/111-Problems-when-Upgrading-to-GRUB-2.html" rel="alternate" title="Problems when Upgrading to GRUB 2" type="text/html" />
        <author>
            <name>Sebastian Marsching</name>
                    </author>
    
        <issued>2011-06-11T14:52:11Z</issued>
        <created>2011-06-11T14:52:11Z</created>
        <modified>2011-06-11T15:42:24Z</modified>
        <wfw:comment>http://sebastian.marsching.com/blog/wfwcomment.php?cid=111</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sebastian.marsching.com/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=111</wfw:commentRss>
    
        <id>http://sebastian.marsching.com/blog/archives/111-guid.html</id>
        <title mode="escaped" type="text/html">Problems when Upgrading to GRUB 2</title>
        <content type="application/xhtml+xml" xml:base="http://sebastian.marsching.com/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Yesterday, I upgraded the last systems, which where still running on <a href="http://sebastian.marsching.com/blog/exit.php?url_id=412&amp;entry_id=111"  onmouseover="window.status='http://www.gnu.org/software/grub/grub-legacy.en.html';return true;" onmouseout="window.status='';return true;" title="http://www.gnu.org/software/grub/grub-legacy.en.html">GRUB Legacy</a> (GRUB 1) to <a href="http://sebastian.marsching.com/blog/exit.php?url_id=413&amp;entry_id=111"  onmouseover="window.status='http://www.gnu.org/software/grub/';return true;" onmouseout="window.status='';return true;" title="http://www.gnu.org/software/grub/">GRUB 2</a> (the grub-pc package on <a title="http://www.ubuntu.com/" href="http://sebastian.marsching.com/blog/exit.php?url_id=414&amp;entry_id=111"  onmouseover="window.status='http://www.ubuntu.com/';return true;" onmouseout="window.status='';return true;">Ubuntu</a>).</p> 
<p>On one of the systems, I experienced the problem, that <span class="code">upgrade-from-grub-legacy</span> could not install GRUB. When I tried to install GRUB manully using <span class="code">grub-install</span>, I got a strange error message:</p> 
<pre>/usr/sbin/grub-setup: warn: Your embedding area is unusually small.  core.img won't fit in it..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and its use is discouraged..
/usr/sbin/grub-setup: error: if you really want blocklists, use --force.</pre> 
<p>It took me some time to figure out, that this system had an unusual disk geometry, resulting in not enough space being available before the start of the first partition. The output of <span class="code">fdisk -lu /dev/sda</span> looked like this:</p> 
<pre>Disk /dev/sda: 320.1 GB, 320071884800 bytes
64 heads, 32 sectors/track, 305244 cylinders, total 625140400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009153c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              32      585727      292848   83  Linux
/dev/sda2          585728   625139711   312276992    5  Extended
/dev/sda5          585760   215429119   107421680   8e  Linux LVM
/dev/sda6       215429152   430272511   107421680   8e  Linux LVM
/dev/sda7       430272544   625139711    97433584   8e  Linux LVM</pre> 
<p>Usually, the first partition starts at sector 63 (for systems installed more recently, 2048 is also common), but for this system it started at sector 32. I guess that this was cause by the strange geometry, which did not specify the usual 255 heads and 63 sectors/track. I am not sure, whether the disks (two Western Digital 320 GB drives) really have this strange geometry, or the RAID-Controller, a 3ware Escalade 8006-2LP, reports a different geometry. However, for sure the first partition being to close to the start of the disk was the cause of the problem with GRUB.</p> 
<p>Unfortunately, I could not move the partition using <span class="code">parted</span> and <span class="code">gparted</span> does not allow to specify the start and end of a partition in sectors, but only in MiB (and only supports aligning to MiB or cylinders, which did not help considering the odd geometry). Therefore I decided to delete the partition (after all it was only the boot partition and its content could easily be stored on the root partition) and create a new partition using <span class="code">fdisk</span>.</p> 
<p>In fact, when (re-)creating the partition, fdisk suggested to start the partition at sector 2048, which I accepted. No surprise, after that change GRUB could be installed to the MBR without any problems.</p> 
<p>The good thing about this problem was, that the time I invested to get a high-availability setup running for most important services, finally paid of. I for sure would have been less relaxed, while figuring out and fixing the GRUB problem, when the services usually running on this machine would have been offline.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://sebastian.marsching.com/blog/archives/110-Speicherprobleme-loesen-mit-Valgrind.html" rel="alternate" title="Speicherprobleme lösen mit Valgrind" type="text/html" />
        <author>
            <name>Sebastian Marsching</name>
                    </author>
    
        <issued>2010-12-19T19:04:55Z</issued>
        <created>2010-12-19T19:04:55Z</created>
        <modified>2010-12-19T19:40:20Z</modified>
        <wfw:comment>http://sebastian.marsching.com/blog/wfwcomment.php?cid=110</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sebastian.marsching.com/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=110</wfw:commentRss>
    
        <id>http://sebastian.marsching.com/blog/archives/110-guid.html</id>
        <title mode="escaped" type="text/html">Speicherprobleme lösen mit Valgrind</title>
        <content type="application/xhtml+xml" xml:base="http://sebastian.marsching.com/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Beim Versuch <a href="http://sebastian.marsching.com/blog/exit.php?url_id=407&amp;entry_id=110" title="http://ics-web.sns.ornl.gov/edm/"  onmouseover="window.status='http://ics-web.sns.ornl.gov/edm/';return true;" onmouseout="window.status='';return true;">EDM</a> auf einem <a href="http://sebastian.marsching.com/blog/exit.php?url_id=408&amp;entry_id=110" title="http://www.opensuse.org/de/"  onmouseover="window.status='http://www.opensuse.org/de/';return true;" onmouseout="window.status='';return true;">openSUSE</a>-11.2-System (x86_64) zum Laufen zu bekommen, traten in bestimmten Fällen immer wieder Speicherzugriffsfehler auf. Nun ist es so, dass ich wirklich kein Freund von RPM-basierten Distributionen im allgemeinen und SUSE im speziellen bin. Aber es wäre zu einfach gewesen dieses Problem auf die Distribution zu schieben. Eine Suche im <a href="http://sebastian.marsching.com/blog/exit.php?url_id=409&amp;entry_id=110" title="http://www.aps.anl.gov/epics/tech-talk/index.php"  onmouseover="window.status='http://www.aps.anl.gov/epics/tech-talk/index.php';return true;" onmouseout="window.status='';return true;">EPICS-Mailinglisten-Archiv</a> ergab dann auch relativ schnell, dass dieses Problem auch schon auf anderen 64-Bit-Systemen aufgetreten war.</p><p>Zunächst untersuchte ich das Problem also mit dem <a href="http://sebastian.marsching.com/blog/exit.php?url_id=410&amp;entry_id=110" title="http://www.gnu.org/software/gdb/"  onmouseover="window.status='http://www.gnu.org/software/gdb/';return true;" onmouseout="window.status='';return true;">GDB</a>. Damit konnte ich aber lediglich herausfinden, dass der Fehler beim &quot;delete[]&quot; eines Arrays auftrat. Mit etwas Debug-Code konnte ich schnell feststellen, dass es (trotz entsprechender Meldungen der glibc) kein Double-Free-Problem war, kam aber ansonsten nicht wirklich weiter.</p><p>Dann entdeckte ich das Werkzeug <a href="http://sebastian.marsching.com/blog/exit.php?url_id=411&amp;entry_id=110" title="http://www.valgrind.org/"  onmouseover="window.status='http://www.valgrind.org/';return true;" onmouseout="window.status='';return true;">Valgrind</a>. Valgrind wurde speziell entwickelt um Speicher-Probleme, wie Buffer-Overflows und Memory-Leaks, in C/C++-Programmen zu finden. Tatsächlich konnte ich damit sehr schnell herausfinden, dass ein Array über die Grenzen hinweg beschrieben wurde.</p><p>Die Ursache war dann auch schnell gefunden. Der Code, der den Speicher für den Array reserviert, hatte die Größe verschiedener Datentypen fest kodiert. Die Annahme, dass ein &quot;long&quot;-Wert 4 Bytes hat, ist allerdings nur auf 32-Bit-Systemen richtig. Auf 64-Bit-Systemen kann ein &quot;long&quot; 8 Bytes lang sein.Nachdem die festen Größen durch den &quot;sizeof&quot;-Operator ersetzt wurden, verschwand dann auch der Speicherzugriffsfehler.</p><p>Valgrind kann also ein wertvolles Werkzeug bei der Lösung von Speicherproblem in C- oder C++-Code sein, deren Ursache andernfalls nur schwer zu finden wäre.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://sebastian.marsching.com/blog/archives/109-Spass-mit-selbstgebasteltem-Roentgengeraet.html" rel="alternate" title="Spaß mit selbstgebasteltem Röntgengerät" type="text/html" />
        <author>
            <name>Sebastian Marsching</name>
                    </author>
    
        <issued>2010-12-19T18:59:26Z</issued>
        <created>2010-12-19T18:59:26Z</created>
        <modified>2010-12-19T18:59:26Z</modified>
        <wfw:comment>http://sebastian.marsching.com/blog/wfwcomment.php?cid=109</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sebastian.marsching.com/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=109</wfw:commentRss>
    
        <id>http://sebastian.marsching.com/blog/archives/109-guid.html</id>
        <title mode="escaped" type="text/html">Spaß mit selbstgebasteltem Röntgengerät</title>
        <content type="application/xhtml+xml" xml:base="http://sebastian.marsching.com/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Ein <a href="http://sebastian.marsching.com/blog/exit.php?url_id=405&amp;entry_id=109" title="http://www.youtube.com/watch?v=W9cUVCY3mSo"  onmouseover="window.status='http://www.youtube.com/watch?v=W9cUVCY3mSo';return true;" onmouseout="window.status='';return true;">Video</a> bei Youtube zeigt, wie man mit einem selbstgebasteltem Röntgengerät in Überraschungseier hinein schauen kann.</p><!-- xhtml clean youtube --><object type="application/x-shockwave-flash" width="640" height="385" data="http://www.youtube.com/v/W9cUVCY3mSo?fs=1&amp;hl=de_DE"><param name="movie" value="http://www.youtube.com/v/W9cUVCY3mSo?fs=1&amp;hl=de_DE" /><param name="movie" value="http://www.youtube.com/v/W9cUVCY3mSo?fs=1&amp;hl=de_DE"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param></object><!-- /xhtml clean youtube -->

<!-- <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/W9cUVCY3mSo?fs=1&amp;hl=de_DE"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/W9cUVCY3mSo?fs=1&amp;hl=de_DE" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object> -->

<p>Recht unterhaltsam sind auch die Kommentare zum Video ("Kann man das Ü-Ei danach noch essen?"), die von einem ausgeprägten Nicht-Wissen über Physik zeugen.</p><p>[via <a href="http://sebastian.marsching.com/blog/exit.php?url_id=406&amp;entry_id=109" title="http://www.shopblogger.de/blog/"  onmouseover="window.status='http://www.shopblogger.de/blog/';return true;" onmouseout="window.status='';return true;">Shopblogger</a>]</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://sebastian.marsching.com/blog/archives/108-Merkwuerdige-Probleme-nach-Ubuntu-Update.html" rel="alternate" title="Merkwürdige Probleme nach Ubuntu-Update" type="text/html" />
        <author>
            <name>Sebastian Marsching</name>
                    </author>
    
        <issued>2010-11-13T18:09:12Z</issued>
        <created>2010-11-13T18:09:12Z</created>
        <modified>2010-11-13T18:09:12Z</modified>
        <wfw:comment>http://sebastian.marsching.com/blog/wfwcomment.php?cid=108</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sebastian.marsching.com/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=108</wfw:commentRss>
    
        <id>http://sebastian.marsching.com/blog/archives/108-guid.html</id>
        <title mode="escaped" type="text/html">Merkwürdige Probleme nach Ubuntu-Update</title>
        <content type="application/xhtml+xml" xml:base="http://sebastian.marsching.com/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Nachdem ich auf einem Ubuntu 10.04 LTS (Lucid Lynx) System ein reguläres System-Update durchgeführt hatte, welches auch ein Update von libvirt enthielt, konnte ich merkwürdigerweise eine bestimmte VM nicht mehr starten.</p><p>Die ausgegebene Meldung<pre>error: Failed to start domain mydomain
error: monitor socket did not show up.: Connection refused</pre>war leider auch nicht besonders aussagekräftig. In den Logfiles fanden sich auch keine weiteren Informationen und libvirtd mit der Option &quot;-v&quot; zu starten brachte mich auch nicht weiter.</p><p>Nach viel herumprobieren stellte sich letztendlich heraus, dass die folgenden Zeilen in der Domain-Konfiguration für das Problem verantwortlich waren:<pre>    &lt;disk type='block' device='cdrom'&gt;
      &lt;source dev='/dev/cdrom'/&gt;
      &lt;target dev='hdc' bus='ide'/&gt;
      &lt;readonly/&gt;
    &lt;/disk&gt;
</pre></p><p>Warum genau die gleiche Konfiguration vor dem Update noch funktioniert hat, kann ich auch nicht sagen. Da ich für die betroffene VM das CD-Laufwerk sowieso nicht benötige, habe ich die Zeilen einfach nur entfernt.</p> 
            </div>
        </content>

        
    </entry>
</feed>
