https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082016-09-21T13:39:57ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #2952: vkernel crashes during boothttps://bugs.dragonflybsd.org/issues/2952?journal_id=129802016-09-21T13:39:57Ztuxillo
<ul><li><strong>Category</strong> changed from <i>Kernel</i> to <i>vkernel</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>Assignee</strong> set to <i>tuxillo</i></li></ul><p>Hi,</p>
<p>Can you boot it with -v to see if we get a better idea where it might be crashing?<br />Also, can you 'addr2line -f -e /var/vkernel/4.6/boot/kernel/kernel 0x6ef9b9 ' ?</p>
<p>As a final test, would you be able to cherry-pick this commits and build the vkernel to see if it works?</p>
<p>4dd1b99459f58c096edd1945eb144cf12006d85a<br />57cbfb93d182ba7966c918d24df413bf77f7e459</p>
<p>Best regards,<br />Antonio Huete</p> DragonFlyBSD - Bug #2952: vkernel crashes during boothttps://bugs.dragonflybsd.org/issues/2952?journal_id=129812016-09-21T13:45:48Zzhtwroot@zta.lk
<ul></ul><p>Only now I noticed that I compiled it with CONFIGARGS=-p option.<br />After I removed the option, 4.4 vkernel started to work. 4.6 however now hangs:<br />a@kl:~$ sudo /var/vkernel/4.6/boot/kernel/kernel -m 2g -r /vhost/dev/root.img -I auto:bridge0 -d -p /var/run/vkernel.<br />vhost-dev.pid<br />Wachtwoord:<br />Using memory file: /var/vkernel/memimg.000003<br />KVM mapped at 0x8000000000-0x10000000000<br />TAP UNIT 7<br />Copyright (c) 2003-2016 The DragonFly Project.<br />Copyright (c) 1992-2003 The FreeBSD Project.<br />Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994<br /> The Regents of the University of California. All rights reserved.<br />DragonFly v4.6.0.20.ged336-RELEASE <a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: Minor typos (Closed)" href="https://bugs.dragonflybsd.org/issues/17">#17</a>: Wed Sep 21 15:29:59 CEST 2016<br /> <a class="email" href="mailto:root@kl.zta.lk">root@kl.zta.lk</a>:/usr/obj/usr/src/sys/VKERNEL64<br />real memory = 2147483648 (2097152K bytes)<br />avail memory = 2027917312 (1980388K bytes)<br />DragonFly/MP: Multiprocessor<br /> cpu0 (BSP)<br /> cpu1 (AP)<br />Initialize MI interrupts<br />initclocks<br />SMP: AP CPU <a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: lib/libcr/sys/ cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/1">#1</a> Launched!</p>
<p>I will recompile it with -p again and do what you just asked.</p>
<p>(Thanks for such a quick response.)</p> DragonFlyBSD - Bug #2952: vkernel crashes during boothttps://bugs.dragonflybsd.org/issues/2952?journal_id=129822016-09-21T13:54:10Ztuxillo
<ul></ul><p>Hi,</p>
<p>If vkernel 4.6 hangs there you have to cherry-pick the commits I mentioned.</p>
<p>Let me know how it works for you.</p>
<p>Cheers,<br />Antonio Huete</p> DragonFlyBSD - Bug #2952: vkernel crashes during boothttps://bugs.dragonflybsd.org/issues/2952?journal_id=129842016-09-21T14:37:33Zzhtwroot@zta.lk
<ul></ul><p>Booting with -v gives exactly the same output.<br />addr2line doesn't seem to recognize the line:</p>
<p>a@kl:/usr/src$ sudo addr2line -f -e /var/vkernel/4.6-p/boot/kernel/kernel 0x6ef9b9<br />.mcount<br />??:?</p>
<p>After cherry-picking the two commits it still doesn't work, but addr2line shows something different:<br />a@kl:/usr/src$ sudo addr2line -f -e /var/vkernel/4.6-p-cherry/boot/kernel/kernel 0x6ef9b9<br />time<br />??:?</p>
<p>But could you check if I did everything right (I don't have much experience in all this):</p>
a@kl:/usr/src$ git branch<br /> DragonFly_RELEASE_3_8<br /> DragonFly_RELEASE_4_0<br /> DragonFly_RELEASE_4_2<br /> DragonFly_RELEASE_4_4
<ul>
<li>DragonFly_RELEASE_4_6<br /> master<br />a@kl:/usr/src$ git status | head -n 2<br />On branch DragonFly_RELEASE_4_6<br />Your branch is ahead of 'origin/DragonFly_RELEASE_4_6' by 2 commits.<br />a@kl:/usr/src$ git log -n 2<br />commit 49c5ab8692483d2ec472789f02823714859a81ba<br />Author: Antonio Huete Jimenez <<a class="email" href="mailto:tuxillo@quantumachine.net">tuxillo@quantumachine.net</a>><br />Date: Wed Sep 21 01:31:58 2016 +0200</li>
</ul>
<pre><code>vkernel - Invalidate pte before setting attributes to the vm_page</code></pre>
<pre><code>- Fixes a problem at mountroot time where it doesn't find any disk<br /> even though the disk is detected earlier.</code></pre>
<p>commit 2ea5d46f3046bdaa05c13c93f357b16170c14461<br />Author: Antonio Huete Jimenez <<a class="email" href="mailto:tuxillo@quantumachine.net">tuxillo@quantumachine.net</a>><br />Date: Wed Sep 21 00:03:05 2016 +0200</p>
<pre><code>vkernel - Fix a vkernel lockup on startup</code></pre>
<pre><code>- During ap_init() any pending IPIs is processed manually so<br /> clear gd_npoll as the real kernel does.<br /> - Do not disable interrupts for vkernels during lwkt_send_ipiq3()<br /> because they don't seem to be re-enabled afterwards as they should.<br /> I'm not entirely sure this is the right fix, more investigation<br /> is required.</code></pre>
<p>Build command was: make -DNO_MODULES CONFIGARGS=-p buildkernel KERNCONF=VKERNEL64 -j 4</p>
<p>Install command: make -DNO_MODULES installkernel CONFIGARGS=-p KERNCONF=VKERNEL64 DESTDIR=/var/vkernel/4.6-p-cherry</p>
<p>So this all was with CONFIGARGS=-p.</p>
<p>But when compiled without it, it started to work. Thanks!</p> DragonFlyBSD - Bug #2952: vkernel crashes during boothttps://bugs.dragonflybsd.org/issues/2952?journal_id=129852016-09-21T14:41:57Zzhtwroot@zta.lk
<ul></ul><p>Just to be clear, the summary:<br />When compiled with CONFIGARGS=-p, neither 4.4 nor 4.6 work -- both crash.<br />When compiled without this option, 4.4 works, but 4.6 hangs.</p>
<p>After cherry-picking:<br />Without CONFIGARGS=-p 4.6 works.<br />With it it still crashes.</p>
<p>Anyway, my problem is solved. Thank you so much!</p> DragonFlyBSD - Bug #2952: vkernel crashes during boothttps://bugs.dragonflybsd.org/issues/2952?journal_id=129972016-10-03T08:58:10Zzhtwroot@zta.lk
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><p>I'm closing this ticket because the problem was solved for me. But I wander if it makes sense to back-port (basically cherrypick and submit as there are no conflicts) the two commits that solved the problem from master to DragonFly_RELEASE_4_6?</p>