DragonFlyBSD bugtracker: Issueshttps://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082016-02-21T05:13:54ZDragonFlyBSD bugtracker
Redmine DragonFlyBSD - Bug #2891 (New): Kernel panic in IEEE802.11 related codehttps://bugs.dragonflybsd.org/issues/28912016-02-21T05:13:54Zshamaz
<p>Hello I am using DragonflyBSD 4.2 (but kernel panics on DragonFlyBSD 4.4 in<br />the same situation too) with Atheros (if_ath) Wi-Fi adapter.</p>
I have kernel panic after the following commands are executed:
<ol>
<li>ifconfig wlan0 create wlandev ath0 wlanmode ahdemo</li>
<li>ifconfig wlan0 up</li>
<li>ifconfig wlan0 list scan</li>
<li>ifconfig wlan0 ssid a channel 4</li>
</ol>
<p>There is no panic if commands are reordered:</p>
<ol>
<li>ifconfig wlan0 create wlandev ath0 wlanmode ahdemo</li>
<li>ifconfig wlan0 ssid a channel 1</li>
<li>ifconfig wlan0 up</li>
</ol>
<p>Last kernel messages are:</p>
<p>wlan0: ieee80211_init<br />wlan0: start running, 1 vaps running<br />wlan0: ieee80211_new_state_locked: SCAN <del>> SCAN (nrunning 0 nscanning 0)<br />wlan0: ieee80211_new_state_locked: SCAN -> SCAN (nrunning 0 nscanning 0)<br />wlan0: macaddr bssid chan rssi rate flag wep essid<br /> - ec:22:80:cc:a1:ac ec:22:80:cc:a1:ac 11 37 54M ess! wep! "nbn71" <br /> - 10:fe:ed:5e:63:59 10:fe:ed:5e:63:59 11 31 54M ess! wep!<br />"TP-LINK_2.4GHz_5E6359" <br /> - 20:4e:7f:74:fa:06 20:4e:7f:74:fa:06 1 31 54M ess! wep!<br />"Kristina" <br /> - ee:43:f6:ce:ab:f8 ee:43:f6:ce:ab:f8 1 17 54M ess! wep!<br />"Keenetic-1161" <br /> - 00:22:b0:90:7b:0d 00:22:b0:90:7b:0d 2 3! 54M ess! wep! "dysha" <br /> - ec:22:80:cd:2f:4e ec:22:80:cd:2f:4e 2 3! 6M! ess! wep! "nbn89" <br /> - 00:24:01:f6:b5:7c 00:24:01:f6:b5:7c 3 6! 54M ess! wep! "home" <br /> - 90:f6:52:52:50:4a 90:f6:52:52:50:4a 5 16 54M ess! wep! "ANN" <br /> ^ 04:8d:38:bc:b8:6b 04:8d:38:bc:b8:6b 6 26 54M ess! wep! "netis<br />2.4G" <br /> - d8:fe:e3:f9:3b:95 d8:fe:e3:f9:3b:95 9 30 54M ess! wep! "kadet" <br /> - 54:04:a6:bb:ee:0c 54:04:a6:bb:ee:0c 12 12 11M ess! wep!<br />"Glorfindeil" <br /> - 60:e3:27:d2:8a:88 60:e3:27:d2:8a:88 7 10 54M ess! wep!<br />"BOBAHbICH" <br /> ^ 2c:ab:25:ff:46:86 2c:ab:25:ff:46:86 3 1! 54M ess! wep!<br />"SmileNet153203102013" <br /> - e0:cb:4e:ee:29:e4 e0:cb:4e:ee:29:e4 12 6! 11M ess! wep!<br />"ASUS9571" <br />wlan0: ieee80211_create_ibss: creating IBSS on channel 1<br />wlan0: ieee80211_alloc_node 0xffffffe073280000<cc:af:78:58:73:a2> in<br />station table<br />I am in node_set_chan! Setting ni</del>>ni_chan to 0xffffffe04e1cd6a4<br />wlan0: ieee80211_new_state_locked: SCAN -> RUN (nrunning 0 nscanning 0)<br />wlan0: scan_task: done, [ticks 64005, dwell min 100 scanend 2147545069]<br />wlan0: notify scan done<br />wlan0: ieee80211_newstate_cb: SCAN -> INIT arg -1<br />wlan0: adhoc_newstate: SCAN -> INIT (-1)<br />wlan0: node_reclaim: remove 0xffffffe073280000<cc:af:78:58:73:a2> from<br />station table, refcnt 2<br />wlan0: ieee80211_alloc_node 0xffffffe0730d2000<cc:af:78:58:73:a2> in<br />station table<br />wlan0: ieee80211_newstate_cb: INIT -> RUN arg -1<br />wlan0: adhoc_newstate: INIT -> RUN (-1)<br />wlan0: adhoc_newstate: unexpected state transition INIT -> RUN</p>
<p>Fatal trap 12: page fault while in kernel mode<br />cpuid = 3; lapic->id = 03000000<br />fault virtual address = 0xffff<br />fault code = supervisor read data, page not present<br />instruction pointer = 0x8:0xffffffff806ea42c<br />stack pointer = 0x10:0xffffffe04e6ab868<br />frame pointer = 0x10:0xffffffe04e6ab8c0<br />code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 0, def32 0, gran 1<br />processor eflags = interrupt enabled, resume, IOPL = 0<br />current process = Idle<br />current thread = pri 12<br />kernel: type 12 trap, code=0</p>
<p>This is a cut from kgdb session:</p>
<p>(kgdb) bt<br />#0 _get_mycpu () at ./machine/thread.h:69<br /><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> md_dumpsys (di=di@entry=0xffffffff8151f760 <dumper>) at<br />/usr/src/sys/platform/pc64/x86_64/dump_machdep.c:265<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: K&R -> ANSI cleanup status (Closed)" href="https://bugs.dragonflybsd.org/issues/2">#2</a> 0xffffffff805f0627 in dumpsys () at<br />/usr/src/sys/kern/kern_shutdown.c:915<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: freebsds pipe-reverse test fails on dfly (Closed)" href="https://bugs.dragonflybsd.org/issues/3">#3</a> 0xffffffff802c0152 in db_fncall (dummy1=<optimized out>,<br />dummy2=<optimized out>, dummy3=<optimized out>,<br /> dummy4=<optimized out>) at /usr/src/sys/ddb/db_command.c:539<br /><a class="issue tracker-1 status-5 priority-5 priority-high3 closed" title="Bug: Rework of nrelease (Closed)" href="https://bugs.dragonflybsd.org/issues/4">#4</a> 0xffffffff802c059b in db_command (aux_cmd_tablep_end=<optimized out>,<br />aux_cmd_tablep=<optimized out>,<br /> cmd_table=<optimized out>, last_cmdp=0xffffffff80f71450<br /><db_last_command>) at /usr/src/sys/ddb/db_command.c:401<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: sys/dev cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/5">#5</a> db_command_loop () at /usr/src/sys/ddb/db_command.c:467<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: sys/emulation cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/6">#6</a> 0xffffffff802c3179 in db_trap (type=type@entry=12, code=code@entry=0)<br />at /usr/src/sys/ddb/db_trap.c:71<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: /sys/boot cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/7">#7</a> 0xffffffff809e0625 in kdb_trap (type=type@entry=12, code=code@entry=0,<br />regs=regs@entry=0xffffffe04e6ab798)<br /> at /usr/src/sys/platform/pc64/x86_64/db_interface.c:175<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: make upgrade broken (Closed)" href="https://bugs.dragonflybsd.org/issues/8">#8</a> 0xffffffff809e623a in trap_fatal (frame=frame@entry=0xffffffe04e6ab798,<br />eva=<optimized out>)<br /> at /usr/src/sys/platform/pc64/x86_64/trap.c:1035<br /><a class="issue tracker-1 status-5 priority-5 priority-high3 closed" title="Bug: panic with HEAD (Closed)" href="https://bugs.dragonflybsd.org/issues/9">#9</a> 0xffffffff809e6462 in trap_pfault (frame=frame@entry=0xffffffe04e6ab798,<br />usermode=usermode@entry=0)<br /> at /usr/src/sys/platform/pc64/x86_64/trap.c:940<br /><a class="issue tracker-1 status-5 priority-5 priority-high3 closed" title="Bug: make buildworld broken (Closed)" href="https://bugs.dragonflybsd.org/issues/10">#10</a> 0xffffffff809e6c8f in trap (frame=0xffffffe04e6ab798) at<br />/usr/src/sys/platform/pc64/x86_64/trap.c:618<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: libstand cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/11">#11</a> 0xffffffff809d017f in calltrap () at<br />/usr/src/sys/platform/pc64/x86_64/exception.S:188<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: /sys/net cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/12">#12</a> 0xffffffff806ea42c in ieee80211_getcapinfo<br />(vap=vap@entry=0xffffffe03dc66d00,<br />chan=0xffff)<br /> at /usr/src/sys/netproto/802_11/wlan/ieee80211_output.c:2231<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Buildworld error/panic (Closed)" href="https://bugs.dragonflybsd.org/issues/13">#13</a> 0xffffffff806ea4db in ieee80211_beacon_construct<br />(m=m@entry=0xffffffe07319b200,<br />frm=0xffffffe0731be162 "",<br /> bo=bo@entry=0xffffffe03dc676e8, ni=ni@entry=0xffffffe0730d2000)<br /> at /usr/src/sys/netproto/802_11/wlan/ieee80211_output.c:2966<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: zombie processes waiting for a lock, smth to worry about? (Closed)" href="https://bugs.dragonflybsd.org/issues/14">#14</a> 0xffffffff806ebad1 in ieee80211_beacon_alloc<br />(ni=ni@entry=0xffffffe0730d2000,<br />bo=bo@entry=0xffffffe03dc676e8)<br /> at /usr/src/sys/netproto/802_11/wlan/ieee80211_output.c:3167<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: savecore -z patch (Closed)" href="https://bugs.dragonflybsd.org/issues/15">#15</a> 0xffffffff803d6e01 in ath_beacon_alloc (sc=sc@entry=0xffffffe04de21a00,<br />ni=ni@entry=0xffffffe0730d2000)<br /> at /usr/src/sys/dev/netif/ath/ath/if_ath_beacon.c:200<br /><a class="issue tracker-1 status-5 priority-5 priority-high3 closed" title="Bug: install: net/bridge/*.h: No such file or directory (Closed)" href="https://bugs.dragonflybsd.org/issues/16">#16</a> 0xffffffff803cefa3 in ath_newstate (vap=0xffffffe03dc66d00,<br />nstate=<optimized out>, arg=<optimized out>)<br /> at /usr/src/sys/dev/netif/ath/ath/if_ath.c:6126<br /><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> 0xffffffff806ed8a0 in ieee80211_newstate_cb (xvap=0xffffffe03dc66d00,<br />npending=<optimized out>)<br /> at /usr/src/sys/netproto/802_11/wlan/ieee80211_proto.c:1770<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: extern uint64_t tsc_frequency missing (Closed)" href="https://bugs.dragonflybsd.org/issues/18">#18</a> 0xffffffff80629f05 in taskqueue_run (queue=queue@entry=0xffffffe0064efd80,<br />lock_held=lock_held@entry=1)<br /> at /usr/src/sys/kern/subr_taskqueue.c:331<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: usched questions and a patch (Closed)" href="https://bugs.dragonflybsd.org/issues/19">#19</a> 0xffffffff8062a023 in taskqueue_thread_loop (arg=<optimized out>) at<br />/usr/src/sys/kern/subr_taskqueue.c:489<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: No detection of 8169S Gb interface (Closed)" href="https://bugs.dragonflybsd.org/issues/20">#20</a> 0xffffffff80602d42 in lwkt_deschedule_self (td=<optimized out>) at<br />/usr/src/sys/kern/lwkt_thread.c:321<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: /etc/network.subr list_net_interfaces() fix (Closed)" href="https://bugs.dragonflybsd.org/issues/21">#21</a> 0x0000000000000000 in ?? ()<br />(kgdb) frame 13<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Buildworld error/panic (Closed)" href="https://bugs.dragonflybsd.org/issues/13">#13</a> 0xffffffff806ea4db in ieee80211_beacon_construct<br />(m=m@entry=0xffffffe07319b200,<br />frm=0xffffffe0731be162 "",<br /> bo=bo@entry=0xffffffe03dc676e8, ni=ni@entry=0xffffffe0730d2000)<br /> at /usr/src/sys/netproto/802_11/wlan/ieee80211_output.c:2966<br />2966 capinfo = ieee80211_getcapinfo(vap, ni->ni_chan);<br />(kgdb) p ni->ni_chan<br />$1 = (struct ieee80211_channel *) 0xffff<br />(kgdb) p vap->iv_des_chan<br />$2 = (struct ieee80211_channel *) 0xffffffe04e1cd6a4<br />(kgdb) p *(vap->iv_des_chan)<br />$3 = {ic_flags = 66688, ic_freq = 2412, ic_ieee = 1 '\001', ic_maxregpower
= 20 '\024', ic_maxpower = 63 '?',<br /> ic_minpower = 0 '\000', ic_state = 0 '\000', ic_extieee = 0 '\000',<br />ic_maxantgain = 0 '\000', ic_pad = 0 '\000',<br /> ic_devdata = 0}<br />(kgdb) p vap->iv_bss->ni_chan<br />$4 = (struct ieee80211_channel *) 0xffff<br />(kgdb) p vap->iv_ic->ic_curchan<br />$5 = (struct ieee80211_channel *) 0xffffffe04e1cd6a4<br />(kgdb) p vap->iv_ic->ic_bsschan<br />$6 = (struct ieee80211_channel *) 0xffffffe04e1cd6a4<br />(kgdb) quit</p>
<p>As you see IEEE80211_CHAN_ANYC (0xffff) constant is being dereferenced.<br />I've added "I am in node_set_chan!" on entry to ieee80211_node_set_chan()<br />to be sure that ni->ni_chan has a real pointer to channel structure rather<br />than 0xffff. But later that node is freed and a new node is allocated with<br />ni_chan == IEEE80211_CHAN_ANYC (see last kernel messages).</p>
<p>Also there are strange state changes:</p>
<p>1) SCAN -> RUN followed by SCAN -> INIT. So where is RUN?<br />2) INIT -> RUN, which is "unexpected".</p>
<p>Please confirm this on master and/or with other drivers. Any ideas what's<br />going on?</p>
<p>Vasily</p> DragonFlyBSD - Bug #2863 (New): HAMMER synch tid is zerohttps://bugs.dragonflybsd.org/issues/28632015-12-09T19:49:43Zshamaz
<p>Hello. This appears on DragonFlyBSD 4.2 (and maybe newer) if you try the<br />following with HAMMER filesystem:</p>
1) Create a new vnode device.
<ol>
<li>dd if=/dev/zero of=test.img bs=1m count=15000</li>
<li>vnconfig -c vn test.img</li>
<li>disklabel64 -w -r vn4s0 auto</li>
<li>disklabel64 -e vn4s0<br />Add a line like "a: * 0 HAMMER"</li>
</ol>
<p>2) Create a HAMMER filesystem:<br />newfs_hammer -f -L TEST /dev/vn4s0a</p>
<p>3) Mount it:<br />mount /dev/vn4s0a /mnt</p>
<p>4) Try to sync it:<br />hammer synctid /mnt</p>
<p>You will see zero sync tid (0x0000000000000000). If you try to set some<br />debug-related sysctls, it will get you no info at all when syncing. Also<br />hammer pfs-status /mnt will show that sync-end-tid does not increment in<br />time as it should. I am not sure if it happens with any non-root hammer FS,<br />or just with those based on vn pseudo disks.</p> DragonFlyBSD - Submit #2854 (Closed): Support for place independent executableshttps://bugs.dragonflybsd.org/issues/28542015-11-25T19:03:07Zshamaz
<p>Hello. If you launch a PIE, the loader will map it in memory to a fixed<br />position (ET_DYN_LOAD_ADDR). This patch changes this behaviour and makes<br />the loader respect vm.randomize_map sysctl.</p> DragonFlyBSD - Submit #2849 (Closed): Allow bpf to work with wireless interfaces.https://bugs.dragonflybsd.org/issues/28492015-10-30T03:59:44Zshamaz
<p>This patch to bpf_movein makes it check if data link layer type is<br />DLT_IEEE802_11 or DLT_IEEE802_11_RADIO, allowing bpf to work with wireless<br />connections.</p> DragonFlyBSD - Bug #2820 (New): TP-Link USB Wi-Fi adapter cannot be reattached to the systemhttps://bugs.dragonflybsd.org/issues/28202015-05-23T04:45:03Zshamaz
<p>Hello. I have TL-WN821N USB Wi-Fi adapter (urtwn driver) and DragonFlyBSD<br />built from DragonFly_RELEASE_4_0 branch.</p>
<p>If I attach my adapter and then invoke the following:</p>
<p>$ ifconfig wlan0 create wlandev urtwn0<br />$ ifconfig wlan0 up</p>
<p>and then physically detach the adapter, I will not be able to reattach it<br />again (no kernel messages are printed, no urtwn0 interface is created)<br />until reboot. Reboot time is also increases drastically.</p>
<p>If I invoke</p>
<p>$ ifconfig wlan0 destroy</p>
<p>before detaching the device, all works just fine.</p>
<p>Quite frequent condition is that I get a message "urtwn0: device timeout" <br />when wi-fi adapter is working, urtwn0 interface is then destroyed and the<br />adapter cannot be reattached.</p>
<p>I would like to know if the first symptom can be reproduced with other USB<br />wireless adapters.</p>
<pre><code>Vasily Postnicov.</code></pre> DragonFlyBSD - Bug #2814 (Closed): No CPU P-state support for AMD FX-4170https://bugs.dragonflybsd.org/issues/28142015-05-17T18:34:17Zshamaz
<p>Hello. This is related to master. I have AMD FX-4170 CPU with 6 P-states.<br />For some reason, DragonFlyBSD can work with maximum of 5 for some CPUs.</p>
<p>See<br /><a class="external" href="http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/sys/platform/pc64/acpica/acpi_pstate_machdep.c">http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/sys/platform/pc64/acpica/acpi_pstate_machdep.c</a></p>
<p>I get a message "cpu3: only P0-P4 is allowed" and there are no frequency<br />related sysctls in hw.acpi.cpu</p>
<p>I suggest an attached patch, which works for me. Further testing requested.</p>
<p>wbr, Vasily.</p> DragonFlyBSD - Bug #2768 (Closed): Slave HAMMER PFSes cannot be exported via NFShttps://bugs.dragonflybsd.org/issues/27682015-01-14T18:52:27Zshamaz
<p>The situation I already described in user mailing list: suppose you have<br />slave HAMMER PFS mounted at /nbackup and want to export it, so you add to<br />/etc/exports a line like this:</p>
<p>/nbackup -ro -network 192.168.10/24</p>
<p>When you restart mountd daemon you will get these errors in<br />/var/log/messages:</p>
<p>Jan 14 18:37:24 ressurected mountd<sup><a href="#fn2279">2279</a></sup>: can't export /nbackup<br />Jan 14 18:37:24 ressurected mountd<sup><a href="#fn2279">2279</a></sup>: bad exports list line /nbackup<br />-ro -network 192.168.10/24</p>
<p>Once PFS is upgraded to master, it can be exported fine.</p> DragonFlyBSD - Submit #2726 (Closed): Allow reading with small uio->uio_resid or uio->uio_offset ...https://bugs.dragonflybsd.org/issues/27262014-10-06T18:23:18Zshamaz
<p>Currently map file in procfs cannot be read with programs like cat<br />sometimes. It happens if the buffer to be read into cannot hold the entire<br />content of map file. Call to read returns EFBIG on this occasion, which is<br />somewhat confusing.</p>
<p>A test:</p>
<p><a class="external" href="http://pastebin.com/SrZY3Sr4">http://pastebin.com/SrZY3Sr4</a></p>
<p>It will print -1 on error or 0 on success.</p>
<p>Patch attached. It also contains some changes from FreeBSD</p> DragonFlyBSD - Submit #2682 (Closed): Fix for uaudio driver, so it can be used on DragonFlyhttps://bugs.dragonflybsd.org/issues/26822014-06-08T18:19:21Zshamaz
<p>Hello. A new uaudio driver for usb4bsd (sys/bus/u4b/audio) needs some care<br />and love. Currently it can only probe audio devices, that is all. So I<br />propose a patch which makes this driver useful.</p>
<p>What works: playback with different audio formats and sample rates (8/16<br />bit pcm, 44.1kHz, 8kHz and so on). Up to 2 channels (what most people need<br />;). Module loading/unloading.<br />What does not: multichannel environments, mixer master output level ("vol")<br />affects only left channel, I really do not know why.<br />What was not tested: recording</p>
<p>Is it good enough to be committed?</p>
<pre><code>With best regards, Vasily.</code></pre> DragonFlyBSD - Bug #2664 (Closed): Re: Another NULL pointer dereference in networking codehttps://bugs.dragonflybsd.org/issues/26642014-04-15T16:12:16Zshamaz
<p>Another link (just in case):</p>
<p><a class="external" href="https://drive.google.com/uc?id=0B1NArWn4pLpxLVRCZmlld0VURGM&export=download">https://drive.google.com/uc?id=0B1NArWn4pLpxLVRCZmlld0VURGM&export=download</a></p> DragonFlyBSD - Bug #2663 (Closed): Strange behaviour when loading a library twice.https://bugs.dragonflybsd.org/issues/26632014-04-15T16:07:13Zshamaz
<p>Hello. This is an output of uname:</p>
<p>$ uname -a<br />DragonFly cyberspace.cyberspace 3.6-RELEASE DragonFly<br />v3.6.2.2.g063e0-RELEASE <a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: /sys/boot cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/7">#7</a>: Sun Apr 13 09:50:36 MSK 2014<br /><a class="email" href="mailto:vasily@cyberspace.cyberspace">vasily@cyberspace.cyberspace</a>:/usr/obj/usr/src/sys/MYKERNEL<br />x86_64</p>
<p>Trying to port common lisp IOLib library on DragonFly, I have encountered a<br />strange behaviour (of RTLD as I think). Assume you have a library which<br />mmap's a fixed (with flag MAP_TRYFIXED) region of memory in its<br />constructor. When your program opens it with dlopen, then closes it with<br />dlcose and again opens with dlopen, the second call to mmap from the<br />constructor will fail. Is it OK?</p>
<p>I attach a testing program (test.c). Try to compile it and run with<br />libthread_xu.so:</p>
<p>$ cc -o test test.c<br />$ ./test /usr/lib/thread/libthread_xu.so.</p>
<p>You will get the following output:</p>
<p>testing /usr/lib/thread/libthread_xu.so<br />Fatal error 'Cannot allocate red zone for initial thread' at line 275 in<br />file /usr/src/lib/libthread_xu/thread/thr_in<br />it.c (errno =<br />12)</p>
<p>Abort (core dumped)</p>
<p>You can try any other library which is linked against -lpthread or you can<br />try my own library testlib.c<br />Compile it as follows:</p>
<p>$ cc -shared -fPIC -o testlib.so testlib.c</p>
<p>And run the test:</p>
<p>$ ./test ./testlib.so</p>
<p>You will get:</p>
<p>testing ./libtest.so<br />0<br />mmap OK<br />0<br />Failed to allocate some space with initialized == 0</p>
<p>In FreeBSD, for example, mmap succeeds two times.</p> DragonFlyBSD - Bug #2662 (Closed): Another NULL pointer dereference in networking codehttps://bugs.dragonflybsd.org/issues/26622014-04-12T04:06:41Zshamaz
<p>Hi!<br />I'am using the same configuration as described here:<br /><a class="external" href="https://bugs.dragonflybsd.org/issues/2660">https://bugs.dragonflybsd.org/issues/2660</a></p>
<p>After playing with my virtual machine for a while I caught a new kernel<br />panic caused by dereferencing a NULL pointer to network interface. As the<br />backtrace tells, it appears in in_broadcast():</p>
<p>(kgdb) bt<br />#0 _get_mycpu () at ./machine/thread.h:69<br /><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> md_dumpsys (di=di@entry=0xffffffff80f38f60 <dumper>) at<br />/usr/src/sys/platform/pc64/x86_64/dump_machdep.c:265<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: K&R -> ANSI cleanup status (Closed)" href="https://bugs.dragonflybsd.org/issues/2">#2</a> 0xffffffff80561832 in dumpsys () at<br />/usr/src/sys/kern/kern_shutdown.c:912<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: freebsds pipe-reverse test fails on dfly (Closed)" href="https://bugs.dragonflybsd.org/issues/3">#3</a> 0xffffffff802b21ac in db_fncall (dummy1=<optimized out>,<br />dummy2=<optimized out>, dummy3=<optimized out>, dummy4=<optimized out>)<br /> at /usr/src/sys/ddb/db_command.c:539<br /><a class="issue tracker-1 status-5 priority-5 priority-high3 closed" title="Bug: Rework of nrelease (Closed)" href="https://bugs.dragonflybsd.org/issues/4">#4</a> 0xffffffff802b25e3 in db_command (aux_cmd_tablep_end=<optimized out>,<br />aux_cmd_tablep=<optimized out>, cmd_table=<optimized out>,<br /> last_cmdp=0xffffffff80db5430 <db_last_command>) at<br />/usr/src/sys/ddb/db_command.c:401<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: sys/dev cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/5">#5</a> db_command_loop () at /usr/src/sys/ddb/db_command.c:467<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: sys/emulation cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/6">#6</a> 0xffffffff802b51b9 in db_trap (type=type@entry=12, code=code@entry=0)<br />at /usr/src/sys/ddb/db_trap.c:71<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: /sys/boot cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/7">#7</a> 0xffffffff809345ef in kdb_trap (type=type@entry=12, code=code@entry=0,<br />regs=regs@entry=0xffffffe05de9b7f8)<br /> at /usr/src/sys/platform/pc64/x86_64/db_interface.c:174<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: make upgrade broken (Closed)" href="https://bugs.dragonflybsd.org/issues/8">#8</a> 0xffffffff80939890 in trap_fatal (frame=frame@entry=0xffffffe05de9b7f8,<br />eva=<optimized out>) at /usr/src/sys/platform/pc64/x86_64/trap.c:1029<br /><a class="issue tracker-1 status-5 priority-5 priority-high3 closed" title="Bug: panic with HEAD (Closed)" href="https://bugs.dragonflybsd.org/issues/9">#9</a> 0xffffffff80939ac9 in trap_pfault (frame=frame@entry=0xffffffe05de9b7f8,<br />usermode=usermode@entry=0) at /usr/src/sys/platform/pc64/x86_64/trap.c:934<br /><a class="issue tracker-1 status-5 priority-5 priority-high3 closed" title="Bug: make buildworld broken (Closed)" href="https://bugs.dragonflybsd.org/issues/10">#10</a> 0xffffffff8093a015 in trap (frame=0xffffffe05de9b7f8) at<br />/usr/src/sys/platform/pc64/x86_64/trap.c:610<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: libstand cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/11">#11</a> 0xffffffff809242af in calltrap () at<br />/usr/src/sys/platform/pc64/x86_64/exception.S:188<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: /sys/net cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/12">#12</a> 0xffffffff8065da52 in in_broadcast (in=..., ifp=0x0) at<br />/usr/src/sys/netinet/in.c:1303<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Buildworld error/panic (Closed)" href="https://bugs.dragonflybsd.org/issues/13">#13</a> 0xffffffff8067aaa6 in tcp_input (mp=<optimized out>, offp=<optimized<br />out>, proto=<optimized out>) at /usr/src/sys/netinet/tcp_input.c:1147<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: zombie processes waiting for a lock, smth to worry about? (Closed)" href="https://bugs.dragonflybsd.org/issues/14">#14</a> 0xffffffff80671ce6 in transport_processing_oncpu (m=0x0, hlen=20,<br />ip=0xffffffe0f47c59c0) at /usr/src/sys/netinet/ip_input.c:390<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: savecore -z patch (Closed)" href="https://bugs.dragonflybsd.org/issues/15">#15</a> 0xffffffff80671d1b in transport_processing_handler (msg=<optimized<br />out>) at /usr/src/sys/netinet/ip_input.c:404<br /><a class="issue tracker-1 status-5 priority-5 priority-high3 closed" title="Bug: install: net/bridge/*.h: No such file or directory (Closed)" href="https://bugs.dragonflybsd.org/issues/16">#16</a> 0xffffffff8061be6a in netmsg_service_loop (arg=<optimized out>) at<br />/usr/src/sys/net/netisr.c:319<br /><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> 0xffffffff80571c57 in lwkt_deschedule_self (td=<optimized out>) at<br />/usr/src/sys/kern/lwkt_thread.c:327<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: extern uint64_t tsc_frequency missing (Closed)" href="https://bugs.dragonflybsd.org/issues/18">#18</a> 0x0000000000000000 in ?? ()<br />(kgdb) frame 12<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: /sys/net cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/12">#12</a> 0xffffffff8065da52 in in_broadcast (in=..., ifp=0x0) at<br />/usr/src/sys/netinet/in.c:1303<br />warning: Source file is more recent than executable.<br />1303 if ((ifp->if_flags & IFF_BROADCAST) == 0)<br />(kgdb) quit</p>
<p>I don't know exactly how to reproduce the bug but it appears very often<br />(approx. every 10 minutes) with described configuration when machines A and<br />C access ftp server on machine B.<br />I attach a patch that checks if ipf is not NULL, which finally fixes the<br />problem.</p>
<p>I also checked sys/netinet/tcp_input.c for passing m->m_pkthdr.rcvif. Both<br />in_pcblookup_pkthash and in_pcblookup_hash seem to handle this argument<br />correctly.</p>
<p>Crash dump:<br /><a class="external" href="https://docs.google.com/uc?export=download&id=0B1NArWn4pLpxLVRCZmlld0VURGM">https://docs.google.com/uc?export=download&id=0B1NArWn4pLpxLVRCZmlld0VURGM</a></p> DragonFlyBSD - Bug #2660 (Closed): Use of IPDIVERT causes kernel crasheshttps://bugs.dragonflybsd.org/issues/26602014-04-08T18:41:44Zshamaz
<p>Hello. I was trying to set up NAT on DragonFly machine and got a crash. I<br />have a following configuration:</p>
<p>1) Machine A with DragonFlyBSD 3.4<br />2) Machine B (the one which crashes) with DragonFlyBSD<br />3.6.1.24.gd9a9-RELEASE x86_64 (from git branch DragonFly_RELEASE_3_6)<br />3) Machine C is a vkernel machine hosted by B</p>
<p>Machine B kernel was compiled with following lines in config:</p>
<p>IPFIREWALL<br />IPFIREWALL_VERBOSE<br />IPFIREWALL_VERBOSE_LIMIT=100<br />IPFIREWALL_DEFAULT_TO_ACCEPT<br />IPDIVERT</p>
<p>Machine B has 2 network interfaces: nfe0 (with connection to A) and tap0<br />(with connection to C) configured as follows:</p>
<p>$ ifconfig nfe0 192.168.10.1 netmask 255.255.255.0 up (A has an address<br />192.168.10.2 assigned to re0 which is the interface on the other side)<br />$ ifconfig tap0 192.168.20.1 netmask 255.255.255.0 up (C has an address<br />192.168.20.2 assigned to vke0)</p>
<p>So I do as follows:</p>
<p>On machine A:<br />$ route add default 192.168.10.1</p>
<p>On machine B:<br />$ sysctl net.inet.ip.forwarding=1<br />$ ipfw -f flush (accept all because of line in config)<br />$ natd -interface tap0<br />$ ipfw add 100 divert natd ip from any to any in via tap0<br />$ ipfw add 110 divert natd ip from any to any out via tap0</p>
<p>Again, on machine A:<br />$ ping 192.168.20.2</p>
<p>Machine B crashes. 100% repeatable</p>
<p>Here is a part of the backtrace:</p>
<p><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: libstand cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/11">#11</a> 0xffffffff8092429f in calltrap ()<br /> at /usr/src/sys/platform/pc64/x86_64/exception.S:188<br /><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: /sys/net cleanup (Closed)" href="https://bugs.dragonflybsd.org/issues/12">#12</a> 0xffffffff80673d22 in ip_input (m=m@entry=0xffffffe0f49ce800)<br /> at /usr/src/sys/netinet/ip_input.c:684<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Buildworld error/panic (Closed)" href="https://bugs.dragonflybsd.org/issues/13">#13</a> 0xffffffff8066813a in div_output (control=<optimized out>,<br /> sin=0xffffffe0f605a130, m=0xffffffe0f49ce800, so=0xffffffe0bf0ff7c0)<br /> at /usr/src/sys/netinet/ip_divert.c:373<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: zombie processes waiting for a lock, smth to worry about? (Closed)" href="https://bugs.dragonflybsd.org/issues/14">#14</a> div_send (msg=0xffffffe0f54896a0) at<br />/usr/src/sys/netinet/ip_divert.c:514<br /><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: savecore -z patch (Closed)" href="https://bugs.dragonflybsd.org/issues/15">#15</a> 0xffffffff8061be6a in netmsg_service_loop (arg=<optimized out>)<br /> at /usr/src/sys/net/netisr.c:319<br /><a class="issue tracker-1 status-5 priority-5 priority-high3 closed" title="Bug: install: net/bridge/*.h: No such file or directory (Closed)" href="https://bugs.dragonflybsd.org/issues/16">#16</a> 0xffffffff80571c57 in lwkt_deschedule_self (td=<optimized out>)<br /> at /usr/src/sys/kern/lwkt_thread.c:327</p>
<p>Crash dump (129 Mb) is here:<br /><a class="external" href="https://drive.google.com/uc?id=0B1NArWn4pLpxazAxYjJOQVRMeGM&export=download">https://drive.google.com/uc?id=0B1NArWn4pLpxazAxYjJOQVRMeGM&export=download</a></p>
<pre><code>Vasily</code></pre> DragonFlyBSD - Bug #2613 (Closed): Distcc from DPorts is somewhat brokenhttps://bugs.dragonflybsd.org/issues/26132013-12-14T15:15:36Zshamaz
<p>Hi there! I use distcc to parallel dports building to 2 DragonFly BSD<br />machines. The bad thing is that dports version of distcc itself is broken.</p>
<p>To solve this problem one must add old pkgsrc distcc patches to dports and<br />rebuild distcc again.</p>
<p>I am not sure if all patches are really needed, but this one (which<br />implements sendfile) is crucial:</p>
<p><a class="external" href="http://gitweb.dragonflybsd.org/pkgsrcv2.git/blob/refs/heads/pkgsrc-2013Q1:/devel/distcc/patches/patch-ab">http://gitweb.dragonflybsd.org/pkgsrcv2.git/blob/refs/heads/pkgsrc-2013Q1:/devel/distcc/patches/patch-ab</a></p>
<p>So I cp'd it to /usr/dports/devel/distcc/files/patch-src-sendfile.c and<br />distcc works now fine.</p>
<p>Can someone do the same in dports git repo?</p> DragonFlyBSD - Bug #2596 (Closed): Audio output does not switch to headphones on Acer Aspire One ...https://bugs.dragonflybsd.org/issues/25962013-10-20T06:39:59Zshamaz
<p>Hello.</p>
<p>When I attach headphones to my netbook Acer Aspire One Happy 2, built-in<br />speaker keeps playing along with headphones (and that's not supposed to<br />be). This is true for system built both from master and from<br />DragonFly_RELEASE_3_4. Soundcard driver is snd_hda. Attached patch fixes<br />the problem.</p>
<p>So, can someone accept this patch (and push it into git repo or something<br />like that)? Or maybe it's better to update the whole driver from FreeBSD?<br />Current version seems to be 6 years old.</p>
<pre><code>Vasily</code></pre>