From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 25 15:05:12 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AF571065701 for ; Sun, 25 Mar 2012 15:05:12 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id C69C98FC2B for ; Sun, 25 Mar 2012 15:05:06 +0000 (UTC) Received: by wern13 with SMTP id n13so4887329wer.13 for ; Sun, 25 Mar 2012 08:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:x-mailer; bh=WFBGYA0YkbC6AvUCs/CUH8ttZiZXzBWDGP0fD3WgFmg=; b=gT5ZdDie9IpsVSJB1xylwL1OFT0r7KfZOTpnks7IYBlVb63FWnPrbcgSsHVBx1tvSF NpFBizdjdLlgRDXDBPIzMH97VZ3ss/GJfOQYx2s4adHGsfy/0JVkhWC3+2xe8yNHKXWW 5cSmD4QoiH6iZLahQrqNQQLuGe7aj46nOFQV/IASA1USplbaENJAsurp1WaEMcQtQG3p uCXZkZNivn+X3oDw+S+0x7e3sMNivneNarwEBHLnTMZYH7U2359YUpx9piZgpiLNAh4a OsSGdLHHyW6hVrYUH/iNRbt3825hoaiEfd9lQDuYQSHqfomSfCVrynz988Oc4snKF3t2 ZSoA== Received: by 10.216.131.30 with SMTP id l30mr10501086wei.111.1332687905548; Sun, 25 Mar 2012 08:05:05 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id gd4sm41040254wib.6.2012.03.25.08.04.44 (version=SSLv3 cipher=OTHER); Sun, 25 Mar 2012 08:05:03 -0700 (PDT) Message-ID: <20120325.150506.135.2@DOMY-PC> From: rank1seeker@gmail.com To: hackers@freebsd.org Date: Sun, 25 Mar 2012 17:05:06 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2012 15:05:12 -0000 I've created a vnode image (md0) with sectorsizes of 8192 and = 4096=0D=0A=0D=0AAfter installing MBR's bootcode '/boot/boot0', in = provider 'md0' I did:=0D=0A# boot0cfg -o noupdate -m 0xc = md0=0D=0Aboot0cfg: read /dev/md0: Invalid argument=0D=0A# boot0cfg -v = md0=0D=0Aboot0cfg: read /dev/md0: Invalid argument=0D=0A=0D=0AIf custom = sectorsize isn't specifed(512 bytes), then both above CMDs will = work.=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 25 16:18:25 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52535106564A for ; Sun, 25 Mar 2012 16:18:25 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 42C158FC14 for ; Sun, 25 Mar 2012 16:18:24 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id E04CB1A3C83; Sun, 25 Mar 2012 09:10:26 -0700 (PDT) Date: Sun, 25 Mar 2012 09:10:26 -0700 From: Alfred Perlstein To: hackers@freebsd.org Message-ID: <20120325161026.GA36229@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: capping memory usage of buildworld (c++) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2012 16:18:25 -0000 I have a few vms with "only" 768MB to 1GB of ram. The problem is that buildworld is slow unless I give make(1) a jobs arg of about 8. However now when it reaches the c++ part of the build, it starts to page like crazy: Mem: 495M Active, 47M Inact, 162M Wired, 20M Cache, 85M Buf, 1624K Free Swap: 2048M Total, 1527M Used, 521M Free, 74% Inuse, 4272K In, 280K Out PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 44453 root 1 21 0 225M 71704K swread 1 2:14 2.98% cc1plus 44444 root 1 21 0 225M 68056K swread 1 2:18 1.95% cc1plus 44451 root 1 21 0 225M 72564K swread 0 2:17 1.95% cc1plus 44459 root 1 21 0 221M 66824K swread 1 2:13 1.95% cc1plus 44442 root 1 21 0 225M 67908K swread 1 2:12 1.95% cc1plus 44577 alfred 1 26 0 16716K 1812K CPU1 1 0:00 1.95% top 44446 root 1 21 0 225M 75148K swread 1 2:14 0.98% cc1plus 44440 root 1 21 0 225M 65184K swread 1 2:13 0.98% cc1plus 44435 root 1 21 0 225M 65084K swread 1 2:10 0.98% cc1plus Is there any way to cap the jobs when forking off c++? Would people be opposed to a hack where optionally one could fence off the jobs for C++ programs during buildworld? meaning maybe set .NOTPARALLEL via some other option? It's kind of insane how much memory the compiler uses these days. Any other options? -- - Alfred Perlstein .- VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 .- FreeBSD committer From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 25 16:38:25 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5252106564A for ; Sun, 25 Mar 2012 16:38:25 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id A7CE28FC1F for ; Sun, 25 Mar 2012 16:38:25 +0000 (UTC) Received: by iahk25 with SMTP id k25so9223859iah.13 for ; Sun, 25 Mar 2012 09:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ZWql3kpQ/6LmuJwwTa5TFQ7p05TnWLE4Fo9kEaOctQs=; b=rJlIWR9sGMi4vkWzdLZkdJUuKiX+vPU79OYNiBg5pZWBea20jKkq7DsKJaPYXPhtR5 W2JlCpsxHL7wi0PcXq00+Q8x67Lz9EiaUWB/kYUiNYZhYmCxjsFzycwGCdbZYbua6L/W +9Y2LT/XR936uaZyAZK+y8wAnCK4w+XrlqI0KX05kHDSWieJQl9/8/Zp9R885hkUwFIu fkCDQZDETVQ6sIxyl1oF3QMVRdlkyM+UO6mMPn7tQrIa+vmidmobZySSA2Gi1HDGtaQs Vt3Hd/mbLZ1/yhRAVzUMInwAA1GmMi8/xBQzxXBrQoDM70ePltyU/A7OsLnPsPZc3Ma+ bufg== Received: by 10.50.154.170 with SMTP id vp10mr3640068igb.32.1332693499772; Sun, 25 Mar 2012 09:38:19 -0700 (PDT) Received: from [192.168.1.3] (c-98-212-197-29.hsd1.il.comcast.net. [98.212.197.29]) by mx.google.com with ESMTPS id zv10sm8227623igb.13.2012.03.25.09.38.17 (version=SSLv3 cipher=OTHER); Sun, 25 Mar 2012 09:38:18 -0700 (PDT) Message-ID: <4F6F49C5.9020701@gmail.com> Date: Sun, 25 Mar 2012 11:37:25 -0500 From: Joshua Isom User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20120325161026.GA36229@elvis.mu.org> In-Reply-To: <20120325161026.GA36229@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: capping memory usage of buildworld (c++) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2012 16:38:26 -0000 On 3/25/2012 11:10 AM, Alfred Perlstein wrote: > It's kind of insane how much memory the compiler uses these days. > > Any other options? Switch to clang which uses less memory, or use a smaller jobs number. Memory use is inevitable, but the benefit is more efficient binaries. From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 25 17:09:52 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE0C8106564A for ; Sun, 25 Mar 2012 17:09:52 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 86EA08FC12 for ; Sun, 25 Mar 2012 17:09:52 +0000 (UTC) Received: by vcmm1 with SMTP id m1so5482981vcm.13 for ; Sun, 25 Mar 2012 10:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+CMlIvHP/137AWHzsf+zKSMyQpaklvyvAUPVy4+T9qU=; b=QU9uCFbjnTd8IVjr+2mCbzRwcKY3T2Anqz3bIVfUSlbLvQLPBYBjGyJA7lEBVfumx8 5+PqjPGAXzTR+zP6W5eHNWkqJJ5nsUrsz8XvXu/bUVw0gKWNmU3pkLWb+BSUJ67tEqJF ug7PVLsStuB32nH/pPgP622iFybd2+Jvgit066oFZxYjUVXN95/IC69VtJVPn1D5KHHo o8ta16rqfnPiCk24Pcbz2begse3mC0E7GKS2tMwM9sdTukydBax6o1arkNGFtIOpFPUK uyNECAyNQPQiZFeg2mgOJXzhQx2CzjljnS1d+GtBUTb39GyniuRAb82sJ7VrPmapRYO8 7z+A== MIME-Version: 1.0 Received: by 10.52.26.103 with SMTP id k7mr7435100vdg.26.1332695391912; Sun, 25 Mar 2012 10:09:51 -0700 (PDT) Received: by 10.220.230.135 with HTTP; Sun, 25 Mar 2012 10:09:51 -0700 (PDT) In-Reply-To: <4F6F49C5.9020701@gmail.com> References: <20120325161026.GA36229@elvis.mu.org> <4F6F49C5.9020701@gmail.com> Date: Sun, 25 Mar 2012 10:09:51 -0700 Message-ID: From: Garrett Cooper To: Joshua Isom Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: capping memory usage of buildworld (c++) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2012 17:09:52 -0000 On Sun, Mar 25, 2012 at 9:37 AM, Joshua Isom wrote: > On 3/25/2012 11:10 AM, Alfred Perlstein wrote: >> >> It's kind of insane how much memory the compiler uses these days. >> >> Any other options? > > Switch to clang which uses less memory, or use a smaller jobs number. Memory > use is inevitable, but the benefit is more efficient binaries. You could also impose memory limits via login.conf with a special class and then switch over to that class before running a build. Cheers, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 25 18:49:20 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45470106566B for ; Sun, 25 Mar 2012 18:49:20 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id C6D258FC1C for ; Sun, 25 Mar 2012 18:49:19 +0000 (UTC) Received: by wibhj6 with SMTP id hj6so2941871wib.13 for ; Sun, 25 Mar 2012 11:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:x-mailer; bh=1/k4LLPJUD4eCaTGEIkDCGm6b80EYwNQpHi2xF68Wjw=; b=cwLHy6iXgCDRykqMywqtp4UFmcyxXXDVbiR6aY7wP2Jyd6tbYp6TBjocyJBtVtDx6f bv8bTHUggzY3topc+OZrLaxBbtL9i56x4Jmd31pW5hz5pQnY0syz+k/fJiGLWpeJZb9L sEIFiM6rGePkUaiKtMZPV3qztfUaGaLCw08plPT8SxLRecLQqyfUTEFv3uuDGG8yOgcO jDxkbI3iiHIfQGUOw2q+ph6C9r5wKKm+Zj0VLy2JV2BVDOWDyf0pQDFCZONfmRIRhoEL PFas8AsRKjmAu7nCJq4tX0RDke7lFHKSbGp/VVuQmmhgf5C5D+AFgFnyITiQGil4VYu4 UEMA== Received: by 10.216.135.103 with SMTP id t81mr11050868wei.113.1332701358832; Sun, 25 Mar 2012 11:49:18 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id fl2sm56097529wib.4.2012.03.25.11.49.00 (version=SSLv3 cipher=OTHER); Sun, 25 Mar 2012 11:49:17 -0700 (PDT) Message-ID: <20120325.184917.751.1@DOMY-PC> From: rank1seeker@gmail.com To: hackers@freebsd.org Date: Sun, 25 Mar 2012 20:49:17 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: Active slice, only for a next boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2012 18:49:20 -0000 After having a thought about this issue and also currently looking at a = BootEasy boot manager ...=0D=0A'boot0cfg' is almost perfect for this task = and should/could be "exploited".=0D=0A=0D=0AIt's '-o noupdate' already = does a major task, of keeping main slice active.=0D=0ANow all we need is = a flag, through which we specify slice to boot (replacing human presing = button).=0D=0AFrom that point on, existing code simply proceeds with = received value.=0D=0A=0D=0A'-o noupdate' ensures next boot will bring up = main/active slice.=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 02:38:23 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1F011065670 for ; Mon, 26 Mar 2012 02:38:23 +0000 (UTC) (envelope-from willingbug@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id AE0A48FC1C for ; Mon, 26 Mar 2012 02:38:23 +0000 (UTC) Received: by yhgm50 with SMTP id m50so4279370yhg.13 for ; Sun, 25 Mar 2012 19:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=eeJqphRNyN/EyXwxYvihb0R2aSn5JxQWoScSZw+S/w0=; b=HyuujlUUMWQILEPUxrVjghlYtUMO3jebTMWBha6OEGP9j3zYvkjxXDNksvjFIRMwYA NEwfi97vakL94kXPjJZ6mMBXxj4A7QLEjrjESt1V3Bl2I98in/shlJ9mH5MZFJuxZczr nHmhZrXxeBdXANQulC47XDnykEWysO2gvJ3gEyJMvmK7JDmsF9YYm6610rzW7q/V5wD4 nphKVggj2EaDNkNNdRzha7FWLJuqYgoc23Gghzb+345S1ogKYeUw5h1SH/ZDhiMjewHg r+hi1Wo74bkyGoE4tKJCO7YSM4IEiM/Je0Jdk4CyvESzUxwX3my2nuWCzqsBNK79OziI Nq3Q== MIME-Version: 1.0 Received: by 10.60.25.196 with SMTP id e4mr24627071oeg.53.1332729497267; Sun, 25 Mar 2012 19:38:17 -0700 (PDT) Received: by 10.182.160.99 with HTTP; Sun, 25 Mar 2012 19:38:17 -0700 (PDT) Date: Mon, 26 Mar 2012 10:38:17 +0800 Message-ID: From: cz li To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: I want to write a 64-bit version of the driver, the MAKEFILE on how to write? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 02:38:24 -0000 I want to write a 64-bit version of the driver, the MAKEFILE on how to write?I can compile 64-bit version of the driver in the 32 system? Thank you! From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 06:34:23 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3154F1065670 for ; Mon, 26 Mar 2012 06:34:23 +0000 (UTC) (envelope-from sushanth_rai@yahoo.com) Received: from nm19.bullet.mail.sp2.yahoo.com (nm19.bullet.mail.sp2.yahoo.com [98.139.91.89]) by mx1.freebsd.org (Postfix) with SMTP id E29CE8FC16 for ; Mon, 26 Mar 2012 06:34:22 +0000 (UTC) Received: from [98.139.91.68] by nm19.bullet.mail.sp2.yahoo.com with NNFMP; 26 Mar 2012 06:34:16 -0000 Received: from [98.139.44.78] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 26 Mar 2012 06:34:15 -0000 Received: from [127.0.0.1] by omp1015.access.mail.sp2.yahoo.com with NNFMP; 26 Mar 2012 06:34:15 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 982293.56693.bm@omp1015.access.mail.sp2.yahoo.com Received: (qmail 1223 invoked by uid 60001); 26 Mar 2012 06:34:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1332743655; bh=E+p7+sly2hdG/jpbuKCt9zISVh7P8ciS7+egvW9u3OM=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=yduukkPHWj2/XYG4WIDDMQ/wMbvS51zEsczHQWv4lm1RWS9U4OJ3ouGRwp8UtyQNrgzxVm5BCCiq45H1UezwACMO9NNDZ3YDUOfGTjfi1Mom7kiw7aPk7MkdXJLSBD55/DCV4dyiPGQTKtEir9mPfbonnRE/kMwwcNA6ygR3B98= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=Efwxx+bi9yRjJLFhwzCDAoNva2BzqC+WNsyb1z4mkrXlW8hrYt6jb40ny8VHADU/21ve6GJoPQSpw383SBNwEsiuS73H1RqvyHneZz1enAxfBcnghnuhuszPRZK7nBNeC7Bugg06QnO95EB/5axmV01ISSh+fUG5w2fsFlSJh1A=; X-YMail-OSG: 4Jepwj4VM1neVR_WSa5dfUcJkiaPkwWCVR8zFfdN.PHNn5p 6dHA.G.T7yMqnXccwEmDYAg07dt6as9JF8_.qpzHsqWRlKNuZIDZS85m.tJS kRJNiYoWg59wbMHmyb057uz.Q2UT_5LR1GY_Q3Wndb6JG_Oe_VbU050D14l9 82Rl_bS4vf3QxY4jFjWAetB_8a3rPg0H6fuDpXjU4IVPtDz.36nfdT7a2Quy j774yL_unv5FJj34M9Du0fTbhO3ouXJzcXNED6Nr_OiwlgTd5Y_iAtW9FzY5 _OgI7bOOqpamyopMPTlU3x9Xr.XiVo4fOPdn6K80hSwtlWdeQkwcAIvonCuv Yq8pR8EQK9vnGOhSHO2gUiYAyQN2LKwd_23XHlsinaJNMoS70doDyXLk0SVt I.JuN3uAP154IqQP3GVDobTlhYUOkPawxjB3Uhh_AdYcaJwPddelK1y8y6tD 8b3_RTvE- Received: from [75.62.236.160] by web180010.mail.gq1.yahoo.com via HTTP; Sun, 25 Mar 2012 23:34:15 PDT X-Mailer: YahooMailClassic/15.0.5 YahooMailWebService/0.8.117.340979 Message-ID: <1332743655.97165.YahooMailClassic@web180010.mail.gq1.yahoo.com> Date: Sun, 25 Mar 2012 23:34:15 -0700 (PDT) From: Sushanth Rai To: Konstantin Belousov In-Reply-To: <20120324080129.GT2358@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-hackers@freebsd.org Subject: Re: Improving gcore X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 06:34:23 -0000 --- On Sat, 3/24/12, Konstantin Belousov wrote: > No, I mentioned exactly this in paragraph you replied to. > To actually start executing from runq, thread needs to > transition > from kernel to userspace (in other words, thread appears on > runq > due to interrupt, thus entering kernel space). On the > kernel->user > transition, the thread will be suspended in AST handler. > > So, if pending AST catched usermode thread on runq, no > single usermode > instruction is executed by the thread before suspension. > Got it. Basically if the usermode thread's time slice is up, AST handler (triggered due timer interrupt) would switch-out the thread when it sees TDF_NEERESCHED flag. When thread starts running again, userret() called from AST handler would check for suspension. I guess it was much ado about nothing. At least I got understand the code little better. Much thanks for that. Sushanth From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 14:48:10 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3EA69106564A; Mon, 26 Mar 2012 14:48:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 128328FC1B; Mon, 26 Mar 2012 14:48:10 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id AB8D446B38; Mon, 26 Mar 2012 10:48:09 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 19D8DB95E; Mon, 26 Mar 2012 10:48:09 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 26 Mar 2012 10:17:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <20120325.150506.135.2@DOMY-PC> In-Reply-To: <20120325.150506.135.2@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201203261017.41420.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Mar 2012 10:48:09 -0400 (EDT) Cc: rank1seeker@gmail.com, hackers@freebsd.org Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 14:48:10 -0000 On Sunday, March 25, 2012 11:05:06 am rank1seeker@gmail.com wrote: > I've created a vnode image (md0) with sectorsizes of 8192 and 4096 > > After installing MBR's bootcode '/boot/boot0', in provider 'md0' I did: > # boot0cfg -o noupdate -m 0xc md0 > boot0cfg: read /dev/md0: Invalid argument > # boot0cfg -v md0 > boot0cfg: read /dev/md0: Invalid argument > > If custom sectorsize isn't specifed(512 bytes), then both above CMDs will work. MBR bootstraps (such as boot0) assume a 512 byte sector. They won't boot correctly on media with a different sector size. So even if you "fixed" boot0cfg, you wouldn't have a bootable system. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 14:48:10 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3EA69106564A; Mon, 26 Mar 2012 14:48:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 128328FC1B; Mon, 26 Mar 2012 14:48:10 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id AB8D446B38; Mon, 26 Mar 2012 10:48:09 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 19D8DB95E; Mon, 26 Mar 2012 10:48:09 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 26 Mar 2012 10:17:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <20120325.150506.135.2@DOMY-PC> In-Reply-To: <20120325.150506.135.2@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201203261017.41420.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Mar 2012 10:48:09 -0400 (EDT) Cc: rank1seeker@gmail.com, hackers@freebsd.org Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 14:48:10 -0000 On Sunday, March 25, 2012 11:05:06 am rank1seeker@gmail.com wrote: > I've created a vnode image (md0) with sectorsizes of 8192 and 4096 > > After installing MBR's bootcode '/boot/boot0', in provider 'md0' I did: > # boot0cfg -o noupdate -m 0xc md0 > boot0cfg: read /dev/md0: Invalid argument > # boot0cfg -v md0 > boot0cfg: read /dev/md0: Invalid argument > > If custom sectorsize isn't specifed(512 bytes), then both above CMDs will work. MBR bootstraps (such as boot0) assume a 512 byte sector. They won't boot correctly on media with a different sector size. So even if you "fixed" boot0cfg, you wouldn't have a bootable system. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 14:48:11 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F42B106566B; Mon, 26 Mar 2012 14:48:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 219118FC1C; Mon, 26 Mar 2012 14:48:11 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id C893A46B3B; Mon, 26 Mar 2012 10:48:10 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2838CB940; Mon, 26 Mar 2012 10:48:10 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 26 Mar 2012 10:18:53 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <20120325.184917.751.1@DOMY-PC> In-Reply-To: <20120325.184917.751.1@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201203261018.53717.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Mar 2012 10:48:10 -0400 (EDT) Cc: rank1seeker@gmail.com, hackers@freebsd.org Subject: Re: Active slice, only for a next boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 14:48:11 -0000 On Sunday, March 25, 2012 2:49:17 pm rank1seeker@gmail.com wrote: > After having a thought about this issue and also currently looking at a BootEasy boot manager ... > 'boot0cfg' is almost perfect for this task and should/could be "exploited". > > It's '-o noupdate' already does a major task, of keeping main slice active. > Now all we need is a flag, through which we specify slice to boot (replacing human presing button). > From that point on, existing code simply proceeds with received value. > > '-o noupdate' ensures next boot will bring up main/active slice. You mean like 'boot0cfg -s 4'? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 14:48:11 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F42B106566B; Mon, 26 Mar 2012 14:48:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 219118FC1C; Mon, 26 Mar 2012 14:48:11 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id C893A46B3B; Mon, 26 Mar 2012 10:48:10 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2838CB940; Mon, 26 Mar 2012 10:48:10 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 26 Mar 2012 10:18:53 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <20120325.184917.751.1@DOMY-PC> In-Reply-To: <20120325.184917.751.1@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201203261018.53717.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Mar 2012 10:48:10 -0400 (EDT) Cc: rank1seeker@gmail.com, hackers@freebsd.org Subject: Re: Active slice, only for a next boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 14:48:11 -0000 On Sunday, March 25, 2012 2:49:17 pm rank1seeker@gmail.com wrote: > After having a thought about this issue and also currently looking at a BootEasy boot manager ... > 'boot0cfg' is almost perfect for this task and should/could be "exploited". > > It's '-o noupdate' already does a major task, of keeping main slice active. > Now all we need is a flag, through which we specify slice to boot (replacing human presing button). > From that point on, existing code simply proceeds with received value. > > '-o noupdate' ensures next boot will bring up main/active slice. You mean like 'boot0cfg -s 4'? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 14:48:12 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F7BB1065672 for ; Mon, 26 Mar 2012 14:48:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 227768FC1D for ; Mon, 26 Mar 2012 14:48:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id C745246B35; Mon, 26 Mar 2012 10:48:11 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 02095B963; Mon, 26 Mar 2012 10:48:11 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 26 Mar 2012 10:21:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203261021.42524.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Mar 2012 10:48:11 -0400 (EDT) Cc: cz li Subject: Re: I want to write a 64-bit version of the driver, the MAKEFILE on how to write? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 14:48:12 -0000 On Sunday, March 25, 2012 10:38:17 pm cz li wrote: > I want to write a 64-bit version of the driver, the MAKEFILE on how to > write?I can compile 64-bit version of the driver in the 32 system? > Thank you! Drivers generally use the same makefiles (if you mean a module makefile) for both i386 and amd64. If you want to cross-build a driver you will need a cross toolchain (e.g. 'make toolchain TARGET=amd64'). You can then either cross-build a kernel whose config includes your module, or you can do this to cross-build just your module: % cd /path/to/world % make buildenv TARGET=amd64 % cd sys/modules/ % make -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 17:56:09 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F89D1065673 for ; Mon, 26 Mar 2012 17:56:09 +0000 (UTC) (envelope-from maninya@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4D5DC8FC0C for ; Mon, 26 Mar 2012 17:56:09 +0000 (UTC) Received: by yenl9 with SMTP id l9so4918689yen.13 for ; Mon, 26 Mar 2012 10:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=PkRgrZleL6OXqoDHlypGEnBEtSUTZ/yrjOdZsbLliVc=; b=qM+jxHgmMAp5Rp0LADzbrCt0nkuGt9gFzCAB/UiTWokHnCdJNf8a7+6FbCJjgTtJTW g8lJBHWrIe9Kp1jEpO7ezuDLupxmFlQlTe9o6SlsvICKt4Y5aL32HGfMOeeB3gKsb3nV 5676SvRhBmW8Tm9QUqUPEaXKSe87O6wbYyCF9wlRpxbTwplZRCWXaOYfCBgdUoJdXlad VSlkPZlDKvQvJ0pSXLpYj+rIpJI/zgKaT3WmFVye4FD5Yfv16dcQAjzztLTBeOvGBMKz j3+b0SVMQm/mrfU3BSnM2xzCt+5Din9H9hgP4ZKsu+j5exSSU0ucFFD8FPuxteYDJ+4R 9HMA== MIME-Version: 1.0 Received: by 10.101.176.8 with SMTP id d8mr7134155anp.56.1332784568687; Mon, 26 Mar 2012 10:56:08 -0700 (PDT) Received: by 10.146.238.13 with HTTP; Mon, 26 Mar 2012 10:56:08 -0700 (PDT) Date: Mon, 26 Mar 2012 23:26:08 +0530 Message-ID: From: Maninya M To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: __NR_mmap2 in FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 17:56:09 -0000 I am trying to convert a function written for Linux to FreeBSD. What is the equivalent of the __NR_mmap2 system call in FreeBSD? I keep getting the error because of this exception: warn("Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. This could be a problem.",addr,temp_regs.eax); I changed temp_regs.eax = __NR_mmap2; to temp_regs.eax = 192; but it didn't work. I suppose I couldn't understand this function. Please help. This is the function: void map_memory(unsigned long addr, unsigned long size, int flags) { int status; struct user_regs_struct regs,temp_regs; unsigned long int_instr = 0x000080cd; /* INT 0x80 */ if (ptrace(PTRACE_GETREGS,exec_pid,NULL,®s) < 0) die_perror("ptrace(PTRACE_GETREGS,%d,NULL,®s)",exec_pid); /* mmap2 system call seems to take arguments as follows: * eax = __NR_mmap2 * ebx = (unsigned long) page aligned address * ecx = (unsigned long) page aligned file size * edx = protection * esi = flags * Other arguments (fd and pgoff) are not required for anonymous mapping */ temp_regs = regs; temp_regs.eax = __NR_mmap2; temp_regs.ebx = addr; temp_regs.ecx = size; temp_regs.edx = flags; temp_regs.esi = MAP_PRIVATE | MAP_ANONYMOUS; temp_regs.eip = temp_regs.esp - 4; if (ptrace(PTRACE_POKETEXT,exec_pid,(void *)(temp_regs.eip),(void*)int_instr) < 0) die_perror("ptrace(PTRACE_POKETEXT,%d,0x%.8x,INT 0x80) failed while allocating memory",exec_pid,temp_regs.eip); if (ptrace(PTRACE_SETREGS,exec_pid,NULL,&temp_regs) < 0) { die_perror("ptrace(PTRACE_SETREGS,%d,...) failed while allocating memory",exec_pid); } if (ptrace(PTRACE_SINGLESTEP,exec_pid,NULL,NULL) < 0) die_perror("ptrace(PTRACE_SINGLESTEP,...) failed while executing mmap2"); wait(&status); if (WIFEXITED(status)) die("Restarted process abrubtly (exited with value %d). Aborting Restart.",WEXITSTATUS(status)); else if (WIFSIGNALED(status)) die("Restarted process abrubtly exited because of uncaught signal (%d). Aborting Restart.",WTERMSIG(status)); if (ptrace(PTRACE_GETREGS,exec_pid,NULL,&temp_regs) < 0) { die_perror("ptrace(PTRACE_GETREGS,...) failed after executing mmap2 system call"); } if (temp_regs.eax != addr) warn("Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. This could be a problem.",addr,temp_regs.eax); else if (cr_options.verbose) fprintf(stdout,"Successfully allocated [0x%.8lx - 0x%.8lx]\n",addr,addr+size); /* Restore original registers */ if (ptrace(PTRACE_SETREGS,exec_pid,NULL,®s) < 0) { die_perror("ptrace(PTRACE_SETREGS,...) when restoring registering after allocating memory (mmap2)"); } } -- Maninya From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 18:02:57 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1369F1065673; Mon, 26 Mar 2012 18:02:57 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 67ECB8FC08; Mon, 26 Mar 2012 18:02:56 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so5810830bkc.13 for ; Mon, 26 Mar 2012 11:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=HPZ1/IuEL9UTmkFfzezjCriCkQTYD7mW5ca082NfudA=; b=qd4uASM/Gr0uNnCTN5AavXIVOFH6yeZtJhxdJiWHf4+j0lR/NCishavjNT3LNIGCcq +V8ThKWi6XFmyBz94qgOOBjls/zAT8jNq9vgZP7uf0/m9/KTKmcSBcLyYN+zwuUTV5ps JX1hi2r5W1PO7+YXGLJA36EvOAHygntH0X9UCMla06r3MJ1yAExtm8MhPmRn1pMSzb+u ZFLhGYWF1lWIXNJu96nt8Fomqair+W/yktwVJrAQv9G0v6i8okphXWxngN4XdC8a61Gp X7OdYReK4Q/BwTQ2A0sRCs1dUYtJbGX04ST4rCyS+D+yJ1eO+IXd0senOauXkn9JuDwC IFww== Received: by 10.204.155.83 with SMTP id r19mr9000419bkw.123.1332784975432; Mon, 26 Mar 2012 11:02:55 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id p19sm21169623bka.1.2012.03.26.11.02.51 (version=SSLv3 cipher=OTHER); Mon, 26 Mar 2012 11:02:53 -0700 (PDT) Message-ID: <20120326.180253.607.2@DOMY-PC> From: rank1seeker@gmail.com To: "John Baldwin" , hackers@freebsd.org Date: Mon, 26 Mar 2012 20:02:53 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: <201203261017.41420.jhb@freebsd.org> References: <20120325.150506.135.2@DOMY-PC> <201203261017.41420.jhb@freebsd.org> X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 18:02:57 -0000 ----- Original Message -----=0D=0AFrom: John Baldwin = =0D=0ATo: freebsd-hackers@freebsd.org=0D=0ACc: = rank1seeker@gmail.com, hackers@freebsd.org=0D=0ADate: Mon, 26 Mar 2012 = 10:17:41 -0400=0D=0ASubject: Re: BUG: REL 9.0 - 'boot0cfg' fails with = providers of non 512 byte sectorsize=0D=0A=0D=0A> On Sunday, March 25, = 2012 11:05:06 am rank1seeker@gmail.com wrote:=0D=0A> > I've created a = vnode image (md0) with sectorsizes of 8192 and 4096=0D=0A> > =0D=0A> > = After installing MBR's bootcode '/boot/boot0', in provider 'md0' I = did:=0D=0A> > # boot0cfg -o noupdate -m 0xc md0=0D=0A> > boot0cfg: read = /dev/md0: Invalid argument=0D=0A> > # boot0cfg -v md0=0D=0A> > boot0cfg: = read /dev/md0: Invalid argument=0D=0A> > =0D=0A> > If custom sectorsize = isn't specifed(512 bytes), then both above CMDs will =0D=0A> work.=0D=0A> = =0D=0A> MBR bootstraps (such as boot0) assume a 512 byte sector. They = won't boot =0D=0A> correctly on media with a different sector size. So = even if you "fixed" =0D=0A> boot0cfg, you wouldn't have a bootable = system.=0D=0A> =0D=0A> -- =0D=0A> John Baldwin=0D=0A> = =0D=0A=0D=0A=0D=0AIs it so?=0D=0AThis is also true for '/boot/mbr' = file?=0D=0A=0D=0AWell, majority of PC's are still BIOS bassed so MBR = scheme is still around and there are also now HDD's with 4b sector sizes = and SSD's with 4b and 8k sector sizes.=0D=0A=0D=0ASo how does things work = in those cases, without GPT?=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6=0D=0A From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 18:11:01 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F6461065672; Mon, 26 Mar 2012 18:11:01 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 73EFC8FC14; Mon, 26 Mar 2012 18:10:54 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so5818788bkc.13 for ; Mon, 26 Mar 2012 11:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=p5J1Fi0iBAXH3X4WTNvpVlDsIAH14RD/7OaeCNh7aGA=; b=Qs0WlTMbmTWR3BwD+vnpIegxic5UpQGgiXzZ/T0uKMt3HFgpH2IVrdUBHRwa48+YBE NPEItVCn/JxExnrAqL/2OE6O7aXa+6I41Nd6YDfaPyAWpkjv0lp941Z3YwlMjnX/HMb9 S3Ucnd/hjcomyFiuPr0cfR7CeQzRqoXYc2ROWd0tREY770pnhyMfYjNMQE0IAWvwbDGd A7L+evf9SOjtLnxmrKI/2Tl73FiFae+OrYbzyC8MXhmaQ3f63alG0QKe4jq+tS6Wqa7s BPDIkPS7AUhmE9d8M+gei9aoaP0aYPRmPEkpCHDY5ZcovvFxL6uEHTTflDKeQb9LBEAo 4BWA== Received: by 10.205.139.77 with SMTP id iv13mr8123104bkc.91.1332785454100; Mon, 26 Mar 2012 11:10:54 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id s16sm34106847bkt.3.2012.03.26.11.10.46 (version=SSLv3 cipher=OTHER); Mon, 26 Mar 2012 11:10:52 -0700 (PDT) Message-ID: <20120326.181050.391.3@DOMY-PC> From: rank1seeker@gmail.com To: "John Baldwin" , hackers@freebsd.org Date: Mon, 26 Mar 2012 20:10:50 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: <201203261018.53717.jhb@freebsd.org> References: <20120325.184917.751.1@DOMY-PC> <201203261018.53717.jhb@freebsd.org> X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: Active slice, only for a next boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 18:11:01 -0000 ----- Original Message -----=0D=0AFrom: John Baldwin = =0D=0ATo: freebsd-hackers@freebsd.org=0D=0ACc: = rank1seeker@gmail.com, hackers@freebsd.org=0D=0ADate: Mon, 26 Mar 2012 = 10:18:53 -0400=0D=0ASubject: Re: Active slice, only for a next = boot=0D=0A=0D=0A> On Sunday, March 25, 2012 2:49:17 pm = rank1seeker@gmail.com wrote:=0D=0A> > After having a thought about this = issue and also currently looking at a =0D=0A> BootEasy boot manager = ...=0D=0A> > 'boot0cfg' is almost perfect for this task and should/could = be "exploited".=0D=0A> > =0D=0A> > It's '-o noupdate' already does a = major task, of keeping main slice active.=0D=0A> > Now all we need is a = flag, through which we specify slice to boot (replacing =0D=0A> human = presing button).=0D=0A> > From that point on, existing code simply = proceeds with received value.=0D=0A> > =0D=0A> > '-o noupdate' ensures = next boot will bring up main/active slice.=0D=0A> =0D=0A> You mean like = 'boot0cfg -s 4'?=0D=0A> =0D=0A> -- =0D=0A> John Baldwin=0D=0A> = =0D=0A=0D=0A=0D=0AYes, but new flag for that purpose ('-n' for example = =3D> nextboot).=0D=0A=0D=0AI.e; =0D=0A # 'boot0cfg -s 4 -o noupdate -n = 3'=0D=0A=0D=0AWould, set the default/main boot selection to slice 4 and = '-o noupdate' ensures it remains that way, while '-n 3' would auto = press/choose slice 3 in selection menu, as human would.=0D=0AWell in that = case, better to not show menu at all, thus only "blic" into slice = 3.=0D=0AAt next boot it is at slice 4 again.=0D=0A=0D=0A=0D=0ADomagoj = Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 18:13:09 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9101C106564A; Mon, 26 Mar 2012 18:13:09 +0000 (UTC) (envelope-from gpf.kira@gmail.com) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 24C4E8FC0C; Mon, 26 Mar 2012 18:13:08 +0000 (UTC) Received: by qatm19 with SMTP id m19so2555538qat.13 for ; Mon, 26 Mar 2012 11:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=GLzMNd7wRlASndsJJDl5LQCq4l3ZkzKEBWxGPfDpyL0=; b=LknPYA0ckUX9SAnZiIbOk0ln2L0ozxbyzU9NG3EqlYYSOvg+v8+Et06Vl0k51qhcLj mNpvgHqMlRoLiPWSwzIT132T2fDn9B5q4yqvbWQepTBZrNbe5rLhFX78yW4SvcS8KKg6 njednnJQEIjN3KJuyNOZxD9o9zAYB82j1mGxzlGqziUOaksPh5xBtEJmEEUZKHPdHmar kM0/AJDGbQm1NSm0WmT69QYsRY6dJMx97l6tMGYXjKQX1nhfEuyublU9M17OPZqI874z Ej5H7FAx5gsW1HDxFbEcvsRXHSEBL6woV/VEGLINy6TArLY3pYeomQLoGmIJ95qLuiEv BolA== MIME-Version: 1.0 Received: by 10.224.187.2 with SMTP id cu2mr28664266qab.88.1332785588329; Mon, 26 Mar 2012 11:13:08 -0700 (PDT) Received: by 10.229.239.18 with HTTP; Mon, 26 Mar 2012 11:13:08 -0700 (PDT) Date: Mon, 26 Mar 2012 21:13:08 +0300 Message-ID: From: Efstratios Karatzas To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: gleb@freebsd.org, kib@freebsd.org Subject: NTFS GSoC Project Idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 18:13:09 -0000 Greetings, I am a FreeBSD GSoC 2010 student, looking to participate in this years GSoC. The project that I wish to work on is the FreeBSD NTFS driver. I 've already discussed my project idea with Attilio@ who suggested that I forward my proposal to the hackers mailing list in order to get more feedback and see if there's anyone interested in mentoring a NTFS project. The current draft of the technical part of my proposal(pdf & plain text) can be found here: http://cgi.di.uoa.gr/~std06101/ntfs/ntfs_proposal.tar The project idea focuses on mp-safing the NTFS driver as well as adding extra write support. I've tried to merge the two conflicting NTFS project ideas in the ideas wiki page, into one. One of them suggesting that work should be done on the current driver (mp-safe it etc) and the other one suggesting that we port Apple's NTFS driver from scratch. The concept is that we keep most of our vnode/vfs code (i.e. ntfs_vfsops.c, ntfs_vnops.c) and rework existing infrastructure as needed as well as implement new features using Apple's driver as a guide. This way, we avoid the major changes in Apple's VFS (is there any documentation to be found?) and port code that won't break current functionality. I tried to keep this e-mail brief so If you wish to know more, please refer to the proposal. Thank you -- Efstratios "GPF" Karatzas From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 20:31:11 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53851106564A for ; Mon, 26 Mar 2012 20:31:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2A26B8FC1C for ; Mon, 26 Mar 2012 20:31:11 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 85A79B966; Mon, 26 Mar 2012 16:31:10 -0400 (EDT) From: John Baldwin To: rank1seeker@gmail.com Date: Mon, 26 Mar 2012 16:29:58 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <20120325.150506.135.2@DOMY-PC> <201203261017.41420.jhb@freebsd.org> <20120326.180253.607.2@DOMY-PC> In-Reply-To: <20120326.180253.607.2@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201203261629.58303.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Mar 2012 16:31:10 -0400 (EDT) Cc: hackers@freebsd.org Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 20:31:11 -0000 On Monday, March 26, 2012 2:02:53 pm rank1seeker@gmail.com wrote: > ----- Original Message ----- > From: John Baldwin > To: freebsd-hackers@freebsd.org > Cc: rank1seeker@gmail.com, hackers@freebsd.org > Date: Mon, 26 Mar 2012 10:17:41 -0400 > Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize > > > On Sunday, March 25, 2012 11:05:06 am rank1seeker@gmail.com wrote: > > > I've created a vnode image (md0) with sectorsizes of 8192 and 4096 > > > > > > After installing MBR's bootcode '/boot/boot0', in provider 'md0' I did: > > > # boot0cfg -o noupdate -m 0xc md0 > > > boot0cfg: read /dev/md0: Invalid argument > > > # boot0cfg -v md0 > > > boot0cfg: read /dev/md0: Invalid argument > > > > > > If custom sectorsize isn't specifed(512 bytes), then both above CMDs will > > work. > > > > MBR bootstraps (such as boot0) assume a 512 byte sector. They won't boot > > correctly on media with a different sector size. So even if you "fixed" > > boot0cfg, you wouldn't have a bootable system. > > > > -- > > John Baldwin > > > > > Is it so? > This is also true for '/boot/mbr' file? Yes. > Well, majority of PC's are still BIOS bassed so MBR scheme is still around and there are also now HDD's with 4b sector sizes and SSD's with 4b and 8k sector sizes. > > So how does things work in those cases, without GPT? The BIOS still emulates 512 byte sectors. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 21:28:39 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25DA4106564A; Mon, 26 Mar 2012 21:28:39 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7AD7A8FC20; Mon, 26 Mar 2012 21:28:38 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so5998508bkc.13 for ; Mon, 26 Mar 2012 14:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Aq01YYiFPnDUkopjuHmg/NKkIeUlqmYWrd9HkGOxCGw=; b=ADvmEE1VtFc9hqYn0G+CFbmtMU+Jmte/PPgRS3HyR4IQudNT/BsVpLqOXXdfQl9xPU DmCYjUrRt6cjZ1j+kB5YmycRvNVhHjcXCSQx5LMHqAttOeO5Dg8RV23OP5KqBzYuUr6c UtQM+AZPc9EdVEoXDGGWfKDZ9cESzkpPVzxP4tuL9QnfDISA4NhjpShA5jjj3cS6xh/X h2eT9p6p7JIqn6XvXoHp67YMIbBHm53qWRWiEJReKEENX6sWrE4osVsCHpCeXXLnyTln DQfrZMh8Zpu7a/VqetWmovv6l20ete+jXZM3MejlQVPr6bF3T+5SLXQKZ5DtThGs0+oq 73bg== Received: by 10.205.137.15 with SMTP id im15mr9116454bkc.54.1332797317363; Mon, 26 Mar 2012 14:28:37 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.202.142 with HTTP; Mon, 26 Mar 2012 14:28:07 -0700 (PDT) In-Reply-To: <20120326.181050.391.3@DOMY-PC> References: <20120325.184917.751.1@DOMY-PC> <201203261018.53717.jhb@freebsd.org> <20120326.181050.391.3@DOMY-PC> From: Chris Rees Date: Mon, 26 Mar 2012 21:28:07 +0000 X-Google-Sender-Auth: sP5uODGMdMIP4Edz6csF2G42VA4 Message-ID: To: rank1seeker@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: Active slice, only for a next boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 21:28:39 -0000 On 26 March 2012 18:10, wrote: > ----- Original Message ----- > From: John Baldwin > To: freebsd-hackers@freebsd.org > Cc: rank1seeker@gmail.com, hackers@freebsd.org > Date: Mon, 26 Mar 2012 10:18:53 -0400 > Subject: Re: Active slice, only for a next boot > >> On Sunday, March 25, 2012 2:49:17 pm rank1seeker@gmail.com wrote: >> > After having a thought about this issue and also currently looking at = a >> BootEasy boot manager ... >> > 'boot0cfg' is almost perfect for this task and should/could be "exploi= ted". >> > >> > It's '-o noupdate' already does a major task, of keeping main slice ac= tive. >> > Now all we need is a flag, through which we specify slice to boot (rep= lacing >> human presing button). >> > From that point on, existing code simply proceeds with received value. >> > >> > '-o noupdate' ensures next boot will bring up main/active slice. >> >> You mean like 'boot0cfg -s 4'? >> >> -- >> John Baldwin >> > > > Yes, but new flag for that purpose ('-n' for example =3D> nextboot). > > I.e; > =A0 =A0# 'boot0cfg -s 4 -o noupdate -n 3' > > Would, set the default/main boot selection to slice 4 and =A0'-o noupdate= ' =A0ensures it remains that way, while '-n 3' would auto press/choose slic= e 3 in selection menu, as human would. > Well in that case, better to not show menu at all, thus only "blic" into = slice 3. > At next boot it is at slice 4 again. I'm afraid this sounds like a great way to make a very confusing scenario, where you have to reboot twice to be sure of a consistent boot sector, unless I've misunderstood you. Chris From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 21:31:55 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B979C106564A; Mon, 26 Mar 2012 21:31:55 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id 40DA78FC14; Mon, 26 Mar 2012 21:31:54 +0000 (UTC) Received: from mart.js.berklix.net (pD9FBE17E.dip.t-dialin.net [217.251.225.126]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id q2QL6J3J070203; Mon, 26 Mar 2012 21:06:19 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id q2QL67SL005621; Mon, 26 Mar 2012 23:06:07 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.4/8.14.4) with ESMTP id q2QL5s4O006834; Mon, 26 Mar 2012 23:06:01 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201203262106.q2QL5s4O006834@fire.js.berklix.net> To: Efstratios Karatzas From: "Julian H. Stacey" Organization: http://berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Mon, 26 Mar 2012 21:13:08 +0300." Date: Mon, 26 Mar 2012 23:05:54 +0200 Sender: jhs@berklix.com Cc: freebsd-hackers@freebsd.org, kib@freebsd.org, gleb@freebsd.org Subject: Re: NTFS GSoC Project Idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 21:31:55 -0000 Efstratios Karatzas wrote: > Greetings, > > I am a FreeBSD GSoC 2010 student, looking to participate in this years > GSoC. The project that I wish to work on is the FreeBSD NTFS driver. > > I 've already discussed my project idea with Attilio@ who suggested that I > forward my proposal to the hackers mailing list in order to get more > feedback and see if there's anyone interested in mentoring a NTFS project. > > The current draft of the technical part of my proposal(pdf & plain text) > can be found here: > > http://cgi.di.uoa.gr/~std06101/ntfs/ntfs_proposal.tar Hi, I just downloaded, will read tomorrow. Skimming the beginning, I notice "3) bugbusting" There's a bug in ntfs-3g see my: http://berklix.com/~jhs/hardware/laptops/shrink/#bugs_ntfs3g "FreeBSD-8.2-RELEASE /usr/ports/sysutils/fusefs-ntfs" ... "Name of Files & directories starting with a '$' are not seen" Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Reply below not above, cumulative like a play script, & indent with "> ". Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable. Mail from @yahoo dumped @berklix. http://berklix.org/yahoo/ From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 00:15:33 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27E12106566B; Tue, 27 Mar 2012 00:15:33 +0000 (UTC) (envelope-from gpf.kira@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id C79598FC08; Tue, 27 Mar 2012 00:15:32 +0000 (UTC) Received: by iahk25 with SMTP id k25so11708352iah.13 for ; Mon, 26 Mar 2012 17:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Zr9S0ix55Po0URZGDGqPilXHbk1MSrWjWtrPY+BgX40=; b=Tb52/wOpneHQVUNQ31btAO8EB87CvxzLmMFrQwJf+fL9xozLDrLpdDspaJM8khMYtg cABnD2JQXtJ59/mrg9nIgP0EnUbkZ4/qGMb5Nzh9OxA2o0gd/fN06oIDRnVdSi+xvmai IF51HOajXV6sbb56B1h8w75vyMdpMriov/D0jE2fJmpuqG+vO/5JHHmOObYCsReAVpCr bibIxJ7UqvaUhRfzOj/C74BPhs8hJrzKfy29iuDln8zvi05jkwYlkGgLPIbq7O5Gg6hC vDJS58bmFavxB9Yx3vSbrW0jXX9mFNLRXJRSzQBB3yU3UK5zsP8PyOTyKjms0fuPzZNO O4zg== MIME-Version: 1.0 Received: by 10.68.193.138 with SMTP id ho10mr56972234pbc.80.1332807331556; Mon, 26 Mar 2012 17:15:31 -0700 (PDT) Received: by 10.143.68.20 with HTTP; Mon, 26 Mar 2012 17:15:31 -0700 (PDT) In-Reply-To: <201203262106.q2QL5s4O006834@fire.js.berklix.net> References: <201203262106.q2QL5s4O006834@fire.js.berklix.net> Date: Tue, 27 Mar 2012 03:15:31 +0300 Message-ID: From: Efstratios Karatzas To: "Julian H. Stacey" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, kib@freebsd.org, gleb@freebsd.org Subject: Re: NTFS GSoC Project Idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 00:15:33 -0000 On Tue, Mar 27, 2012 at 12:05 AM, Julian H. Stacey wrote: > Efstratios Karatzas wrote: > > Greetings, > > > > I am a FreeBSD GSoC 2010 student, looking to participate in this years > > GSoC. The project that I wish to work on is the FreeBSD NTFS driver. > > > > I 've already discussed my project idea with Attilio@ who suggested > that I > > forward my proposal to the hackers mailing list in order to get more > > feedback and see if there's anyone interested in mentoring a NTFS > project. > > > > The current draft of the technical part of my proposal(pdf & plain text) > > can be found here: > > > > http://cgi.di.uoa.gr/~std06101/ntfs/ntfs_proposal.tar > > Hi, I just downloaded, will read tomorrow. Skimming the beginning, I > notice > "3) bugbusting" > > There's a bug in ntfs-3g see my: > http://berklix.com/~jhs/hardware/laptops/shrink/#bugs_ntfs3g > "FreeBSD-8.2-RELEASE /usr/ports/sysutils/fusefs-ntfs" ... > "Name of Files & directories starting with a '$' are not seen" > > Cheers, > Julian > -- > Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich > http://berklix.com > Reply below not above, cumulative like a play script, & indent with "> ". > Format: Plain text. Not HTML, multipart/alternative, base64, > quoted-printable. > Mail from @yahoo dumped @berklix. http://berklix.org/yahoo/ > This project proposal is about the FreeBSD in-kernel NTFS driver, not the one that runs with fuse, sorry! -- Efstratios "GPF" Karatzas From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 10:55:55 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05A15106564A; Tue, 27 Mar 2012 10:55:55 +0000 (UTC) (envelope-from Kashyap.Desai@lsi.com) Received: from psmtp.com (na3sys009aog134.obsmtp.com [74.125.149.83]) by mx1.freebsd.org (Postfix) with ESMTP id 0F6988FC12; Tue, 27 Mar 2012 10:55:52 +0000 (UTC) Received: from paledge01.lsi.com ([192.19.193.42]) (using TLSv1) by na3sys009aob134.postini.com ([74.125.148.12]) with SMTP ID DSNKT3Gctw08KUyHMMcFy1HuBgZxhckoPz/j@postini.com; Tue, 27 Mar 2012 03:55:54 PDT Received: from PALHUB01.lsi.com (128.94.213.114) by PALEDGE01.lsi.com (192.19.193.42) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 27 Mar 2012 06:59:17 -0400 Received: from inbexch02.lsi.com (135.36.98.40) by PALHUB01.lsi.com (128.94.213.114) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 27 Mar 2012 06:54:42 -0400 Received: from inbmail01.lsi.com ([135.36.98.64]) by inbexch02.lsi.com ([135.36.98.40]) with mapi; Tue, 27 Mar 2012 16:24:37 +0530 From: "Desai, Kashyap" To: "Kenneth D. Merry" , Jake Smith Date: Tue, 27 Mar 2012 16:24:36 +0530 Thread-Topic: LSI mps(4) driver issues with PIKE 2008/IMR (LSI SAS2008) Thread-Index: Ac0Ieg8g06uUir12TdWRkFnsgS+cSQDjZQQQ Message-ID: References: <20120322221900.GA3458@nargothrond.kdm.org> In-Reply-To: <20120322221900.GA3458@nargothrond.kdm.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 27 Mar 2012 11:34:31 +0000 Cc: "freebsd-scsi@freebsd.org" , "freebsd-hardware@freebsd.org" , "Choy, Marian" , "freebsd-hackers@freebsd.org" Subject: RE: LSI mps(4) driver issues with PIKE 2008/IMR (LSI SAS2008) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 10:55:55 -0000 > -----Original Message----- > From: owner-freebsd-scsi@freebsd.org [mailto:owner-freebsd- > scsi@freebsd.org] On Behalf Of Kenneth D. Merry > Sent: Friday, March 23, 2012 3:49 AM > To: Jake Smith > Cc: freebsd-scsi@freebsd.org; freebsd-hackers@freebsd.org; freebsd- > hardware@freebsd.org > Subject: Re: LSI mps(4) driver issues with PIKE 2008/IMR (LSI SAS2008) >=20 > On Thu, Mar 22, 2012 at 16:24:16 +0100, Jake Smith wrote: > > Hello, > > > > I am trying to get the latest mps(4) driver in FreeBSD 9-STABLE > working > > with am LSI SAS2008 variant from ASUS, they call it PIKE 2008/IMR. > Link > > http://www.asus.com/Server_Workstation/Accessories/PIKE_2008IMR/ > > > > From what I can see this card should be compatible with the mps(4) > > driver MFC'd to 9-STABLE about 6 weeks ago. > > > > # uname -a > > FreeBSD xxx 9.0-STABLE FreeBSD 9.0-STABLE #3 r233304M: Thu Mar 22 > > 12:53:17 GMT 2012 root@xxx:/usr/obj/usr/src/sys/GENERIC amd64 > > > > Revision: 233304 > > > > Initially the card is not seen at all by the driver, however pciconf > > shows us why that is. > > > > mps0@pci0:2:0:0: class=3D0x010700 card=3D0x843b1043 chip=3D0x007= 31000 > > rev=3D0x03 hdr=3D0x00 > > vendor =3D 'LSI Logic / Symbios Logic' > > device =3D 'MegaRAID SAS 9240' > > class =3D mass storage > > subclass =3D SAS > > > > It seems on other models of LSI SAS2008 the chip device ID is 0x0072, > > however for some reason this card has 0x0073. So I patched the mps(4) > > driver and recompiled. > > > > diff -ruN mps.orig/mpi/mpi2_cnfg.h mps/mpi/mpi2_cnfg.h > > --- mps.orig/mpi/mpi2_cnfg.h 2012-03-22 14:50:53.000000000 +0000 > > +++ mps/mpi/mpi2_cnfg.h 2012-03-22 14:52:23.000000000 +0000 > > @@ -416,7 +416,8 @@ > > > > /* SAS */ > > #define MPI2_MFGPAGE_DEVID_SAS2004 (0x0070) > > -#define MPI2_MFGPAGE_DEVID_SAS2008 (0x0072) > > +#define MPI2_MFGPAGE_DEVID_SAS2008_1 (0x0072) > > +#define MPI2_MFGPAGE_DEVID_SAS2008_2 (0x0073) > > #define MPI2_MFGPAGE_DEVID_SAS2108_1 (0x0074) > > #define MPI2_MFGPAGE_DEVID_SAS2108_2 (0x0076) > > #define MPI2_MFGPAGE_DEVID_SAS2108_3 (0x0077) > > diff -ruN mps.orig/mps_pci.c mps/mps_pci.c > > --- mps.orig/mps_pci.c 2012-03-22 14:48:41.000000000 +0000 > > +++ mps/mps_pci.c 2012-03-22 14:51:59.000000000 +0000 > > @@ -99,7 +99,9 @@ > > } mps_identifiers[] =3D { > > { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2004, > > 0xffff, 0xffff, 0, "LSI SAS2004" }, > > - { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008, > > + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008_1, > > + 0xffff, 0xffff, 0, "LSI SAS2008" }, > > + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008_2, > > 0xffff, 0xffff, 0, "LSI SAS2008" }, > > { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2108_1, > > 0xffff, 0xffff, 0, "LSI SAS2108" }, > > > > After reboot it now loads the mps(4) module and attempts to init the > > card but fails. > > > > # dmesg | grep mps > > mps0: port 0xd800-0xd8ff mem > > 0xfbd7c000-0xfbd7ffff,0xfbdc0000-0xfbdfffff irq 16 at device 0.0 on > pci2 > > mps0: Doorbell failed to activate > > device_attach: mps0 attach returned 6 > > > > From this point I'm stuck on what to try next, google does not provide > > any answers for this situation. Does any one have any advice or ideas > as > > to why this is not working? > > I am able to provide ssh access to the server if any one wants to log > > on and have a look at it. >=20 > In looking at the specs, that card supports RAID-5 and RAID-50. That > means > it isn't a SAS card supported by mps(4), but rather a MegaRAID card. This is Megaraid card. And it should not be supported by mps. Again, Just a= dding "0x73" in your pci list in mfi driver will not solve your problem. Please Check with Megaraid FreeBSD drivers. ~ Kashyap >=20 > It should be supported by mfi(4). Try adding the PCI ID to that > driver and see if that works. Or you can grab the driver from the > head_mfi branch, it looks like it already supports that card. Here's > the > mfi_pci.c file, you can see the PCI ID in there: >=20 > http://svnweb.freebsd.org/base/projects/head_mfi/sys/dev/mfi/mfi_pci.c?r > evision=3D232888&view=3Dmarkup >=20 > Ken > -- > Kenneth Merry > ken@FreeBSD.ORG > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 13:40:11 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81476106566C for ; Tue, 27 Mar 2012 13:40:11 +0000 (UTC) (envelope-from ssanders@softhammer.net) Received: from oproxy8-pub.bluehost.com (oproxy8.bluehost.com [IPv6:2605:dc00:100:2::a8]) by mx1.freebsd.org (Postfix) with SMTP id 9D0FC8FC1A for ; Tue, 27 Mar 2012 13:40:04 +0000 (UTC) Received: (qmail 8101 invoked by uid 0); 27 Mar 2012 13:40:04 -0000 Received: from unknown (HELO host358.hostmonster.com) (66.147.240.158) by oproxy8.bluehost.com with SMTP; 27 Mar 2012 13:40:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=softhammer.net; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=OHOBkpmkJNXp/TdZlGA4KLMItf0Utzl9xxN2yrUnRS8=; b=TwqtAyWirnssa++kM+nrUvr7MgRTAi77QXb26uE1Nxo4wfGmewz1F+MKvIOyJSU3OACynrJXXNOui1tJE6aSkt6TILhtCSOfoiBqlCaZMgvl7JGCii8f1nCfwJWWY7Ra; Received: from pool-173-73-60-93.washdc.fios.verizon.net ([173.73.60.93] helo=[192.168.1.3]) by host358.hostmonster.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SCWd2-00070Y-4A for freebsd-hackers@freebsd.org; Tue, 27 Mar 2012 07:40:04 -0600 Message-ID: <4F71C333.9010506@softhammer.net> Date: Tue, 27 Mar 2012 09:40:03 -0400 From: Steve Sanders User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4F3922A8.2090808@softhammer.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Identified-User: {2492:host358.hostmonster.com:softhamm:softhammer.net} {sentby:smtp auth 173.73.60.93 authed with ssanders@softhammer.net} Subject: Re: Odd RAID Performance Issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 13:40:11 -0000 Thanks for all of the suggestions. We do tune the logging ufs partition to have 64K blocks. We found a solution that makes this problem go away. We've modified the cam such that if a controller has 2 or more disks attached, it divides the number of I/O slots on the card between the disks. So a twa card as 252 slots available and the cam splits this between the two 'disks' attached to the controller, each disk getting 126 slots. The queue depths reported from iostat get ridiculously long (~1000) but we do not end up using memory from the runningspace buffers. Since we don't go over the vfs.hirunningspace mark, the system does not pause. I'm now wondering what causes runningspace usage? Could someone point me to the code where we end up allocating blocks from high running space? An interesting side effect of this has been to make a mess of the iostat's reports. 'iostats -x 1' now shows the database disk as 150-200% used and very often shows service time as being 15 seconds. Given the fact that the data looks good and the system isn't pausing, a 15 second operation time seems unlikely. I believe this to be an effect of a large number of NCQ operations terminating in the 1 second elapsed time window. So the operation duration is adding up to be much larger than the 1 second elapsed time window. Not realistic but illustrative, imagine 5 1 second NCQ operations terminating in the 1 second window. The current code will calculate the duration as 5 seconds, dividing by 1 will yield 500%. Thanks On 02/13/2012 11:51 AM, Ivan Voras wrote: > On 13/02/2012 15:48, Stephen Sanders wrote: >> We've an application that logs data on one very large raid6 array >> and updates/accesses a database on another smaller raid5 array. > You would be better off with RAID10 for a database (or anything which > does random IO). > >> Both arrays are connected to the same PCIe 3ware RAID controller. The >> system has 2 six core 3Ghz processors and 24 GB of RAM. The system is >> running FreeBSD 8.1. > Did you do any additional OS tuning? Do you use UFS or ZFS? > >> The problem we're encountering is that the disk subsystem appears to >> 'pause' periodically. It looks as if this is a result of disk read/write >> operations from the database array taking a very long time to complete >> (up to 8 sec). > You should be able to monitor this with "iostat -x 1" (or whatever > number of seconds instead of "1") - the last three columns should tell > you if the device(s) are extraordinarily busy, and the r/s and w/s > columns should tell you what the real IOPS rate is. You should probably > post a sample output from this command when the problem appears. > > > From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 14:28:03 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37D621065670; Tue, 27 Mar 2012 14:28:03 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id D15088FC18; Tue, 27 Mar 2012 14:28:02 +0000 (UTC) Received: by yenl9 with SMTP id l9so5663703yen.13 for ; Tue, 27 Mar 2012 07:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=b6klrsllFaJKOAlM/RTlDetBj9xxUcjvbPNgghXb7x8=; b=ksIqZNCdgZXfuquYnLjCqzt803HHD89ueQCArcb9HJImfn4367TIs+q+6b3RS5t8Eo 9PrWS25lv7zmp5ZeHYApfppOUZHWvaCVy7XXqMt+n8q+MnbTytt/9WWJ3T1/J2WER6qo QTfAK/jlwJUJKWzjfrcJJ1yCdkunQWSgI4dj/CHkzC1wK1a43nSnl0Dpb7753+/dEwAP T83HqvW7ngfwlLkjYr+r9w1t/oCQp9Xk5Usa8JAnQVhmMYXvRxNQmwzru2n/TqH9+k1R Q/tKUnYHVgTl6VDg4aqhc8ZmHkyDzs2xkMXcnCHaM69IiiwjPiMmxS2eXBAUp3CBaK0e eUng== Received: by 10.236.193.41 with SMTP id j29mr2492343yhn.14.1332858482220; Tue, 27 Mar 2012 07:28:02 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.101.101.10 with HTTP; Tue, 27 Mar 2012 07:27:20 -0700 (PDT) In-Reply-To: References: <4F45AB76.5050201@FreeBSD.org> From: Ivan Voras Date: Tue, 27 Mar 2012 16:27:20 +0200 X-Google-Sender-Auth: uH1KVV6pI4wI6LYqSmlXhT-0uUQ Message-ID: To: "Samuel J. Greear" Content-Type: text/plain; charset=UTF-8 Cc: "hackers@freebsd.org" , Doug Barton Subject: Re: PostgreSQL benchmarks (now with Linux numbers) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 14:28:03 -0000 >> On 02/22/2012 01:42, Ivan Voras wrote: >> > The Dragonfly team has recently liberated their VM from the giant lock >> > and there are some interesting benchmarks comparing it to FreeBSD 9 and a >> > derivative of RedHat Enterprise Linux: > I just saw this, so I thought I would mention -- DragonFly was not doing a > great job allocating pv entries rapidly, which is needed during PostgreSQL > warm up -- This made shm_use_phys appear very effective. It only makes 1-2% > difference now on DragonFly, and only 1-2% difference on FreeBSD. Great! Do you have a link to the updated results? From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 14:30:15 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E6AB106566B for ; Tue, 27 Mar 2012 14:30:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 73E118FC0A for ; Tue, 27 Mar 2012 14:30:15 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CF3D2B970; Tue, 27 Mar 2012 10:30:14 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 27 Mar 2012 07:53:21 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203270753.21534.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 27 Mar 2012 10:30:14 -0400 (EDT) Cc: Maninya M Subject: Re: __NR_mmap2 in FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 14:30:15 -0000 On Monday, March 26, 2012 1:56:08 pm Maninya M wrote: > I am trying to convert a function written for Linux to FreeBSD. > What is the equivalent of the __NR_mmap2 system call in FreeBSD? > > I keep getting the error because of this exception: > warn("Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. > This could be a problem.",addr,temp_regs.eax); I think you could just use plain mmap() for this? However, it seems that this is injecting a call into an existing binary, not calling mmap() directly. A few things will need to change. First, FreeBSD system calls on i386 put their arguments on the stack, not in registers, so you will need to do a bit more work to push the arguments onto the stack rather than just setting registers. > I changed > temp_regs.eax = __NR_mmap2; > to > temp_regs.eax = 192; > > but it didn't work. I suppose I couldn't understand this function. Please > help. > > This is the function: > > void map_memory(unsigned long addr, unsigned long size, int flags) > { > int status; > struct user_regs_struct regs,temp_regs; > unsigned long int_instr = 0x000080cd; /* INT 0x80 */ > > if (ptrace(PTRACE_GETREGS,exec_pid,NULL,®s) < 0) > die_perror("ptrace(PTRACE_GETREGS,%d,NULL,®s)",exec_pid); > > /* mmap2 system call seems to take arguments as follows: > * eax = __NR_mmap2 > * ebx = (unsigned long) page aligned address > * ecx = (unsigned long) page aligned file size > * edx = protection > * esi = flags > * Other arguments (fd and pgoff) are not required for anonymous mapping > */ > temp_regs = regs; > temp_regs.eax = __NR_mmap2; > temp_regs.ebx = addr; > temp_regs.ecx = size; > temp_regs.edx = flags; > temp_regs.esi = MAP_PRIVATE | MAP_ANONYMOUS; > temp_regs.eip = temp_regs.esp - 4; > > if (ptrace(PTRACE_POKETEXT,exec_pid,(void > *)(temp_regs.eip),(void*)int_instr) < 0) > die_perror("ptrace(PTRACE_POKETEXT,%d,0x%.8x,INT 0x80) failed while > allocating memory",exec_pid,temp_regs.eip); > if (ptrace(PTRACE_SETREGS,exec_pid,NULL,&temp_regs) < 0) { > die_perror("ptrace(PTRACE_SETREGS,%d,...) failed while allocating > memory",exec_pid); > } > if (ptrace(PTRACE_SINGLESTEP,exec_pid,NULL,NULL) < 0) > die_perror("ptrace(PTRACE_SINGLESTEP,...) failed while executing > mmap2"); > > wait(&status); > if (WIFEXITED(status)) > die("Restarted process abrubtly (exited with value %d). Aborting > Restart.",WEXITSTATUS(status)); > else if (WIFSIGNALED(status)) > die("Restarted process abrubtly exited because of uncaught signal (%d). > Aborting Restart.",WTERMSIG(status)); > > if (ptrace(PTRACE_GETREGS,exec_pid,NULL,&temp_regs) < 0) { > die_perror("ptrace(PTRACE_GETREGS,...) failed after executing mmap2 > system call"); > } > > if (temp_regs.eax != addr) > warn("Wanted space at address 0x%.8x, mmap2 system call returned > 0x%.8x. This could be a problem.",addr,temp_regs.eax); > else if (cr_options.verbose) > fprintf(stdout,"Successfully allocated [0x%.8lx - > 0x%.8lx]\n",addr,addr+size); > > /* Restore original registers */ > if (ptrace(PTRACE_SETREGS,exec_pid,NULL,®s) < 0) { > die_perror("ptrace(PTRACE_SETREGS,...) when restoring registering after > allocating memory (mmap2)"); > } > } > > -- > Maninya > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 14:24:35 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DF361065675 for ; Tue, 27 Mar 2012 14:24:35 +0000 (UTC) (envelope-from sjg@evilcode.net) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id F08D68FC15 for ; Tue, 27 Mar 2012 14:24:34 +0000 (UTC) Received: by iahk25 with SMTP id k25so12962197iah.13 for ; Tue, 27 Mar 2012 07:24:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=1iI3xvLtftBhzjpP4HINzv38vJ7/aB+g4EAuv8xAe+k=; b=GwXep/HHL/xq6WByPg+tjsx+2fOXs/cX5zs0MSCPjbUMZNQQP6bezHpCS0zRMhGxwm 1KoEf17C1Rh3evAhUm1mXnLwDWlPB2VpG7c4T6YlBcZXLVQ2MEDoxzFnK7B7ZOYyUnYm mzlezapisUGfYpJqM48wJHIkmu8V8xgFvX5OFy692DQUHJpVrGHLduRxXmtv4Cd4dY8+ yKOPclrYbnQMShnX66yRurMpgRmPheGkKjxiV6BjGOG4TYveUJL+ORDG2JBS+Qualw38 iEiVTU9b9nmfJZWXEdhsQs4eFubCno0Qs5mtMMb9sYyAyNEVWU2p8A/KUYwnyDkU1KJy J4zw== MIME-Version: 1.0 Received: by 10.42.97.200 with SMTP id p8mr13010149icn.2.1332858272876; Tue, 27 Mar 2012 07:24:32 -0700 (PDT) Received: by 10.50.73.38 with HTTP; Tue, 27 Mar 2012 07:24:32 -0700 (PDT) In-Reply-To: <4F45AB76.5050201@FreeBSD.org> References: <4F45AB76.5050201@FreeBSD.org> Date: Tue, 27 Mar 2012 08:24:32 -0600 Message-ID: From: "Samuel J. Greear" To: Doug Barton X-Gm-Message-State: ALoCoQlSEb1iz7M9vNXgs3SfeBTiYGwEySOuNl9KRSQCZ/l/vEIGcRWSe0imxO5eZyqqmVxFIaWd X-Mailman-Approved-At: Tue, 27 Mar 2012 15:59:59 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "hackers@freebsd.org" , Ivan Voras Subject: Re: PostgreSQL benchmarks (now with Linux numbers) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 14:24:35 -0000 On Wed, Feb 22, 2012 at 7:59 PM, Doug Barton wrote: > On 02/22/2012 01:42, Ivan Voras wrote: > > The Dragonfly team has recently liberated their VM from the giant lock > and there are some interesting benchmarks comparing it to FreeBSD 9 and a > derivative of RedHat Enterprise Linux: > > > > http://leaf.dragonflybsd.org/mailarchive/kernel/2011-11/msg00008.html > > > > Other developments are described in their release notes: > http://www.dragonflybsd.org/release30/ > > The 4.5 times improvement by enabling kern.ipc.shm_use_phys is pretty > notable, what prevents us from enabling that by default? > > > Doug > > -- I just saw this, so I thought I would mention -- DragonFly was not doing a great job allocating pv entries rapidly, which is needed during PostgreSQL warm up -- This made shm_use_phys appear very effective. It only makes 1-2% difference now on DragonFly, and only 1-2% difference on FreeBSD. Sam From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 18:00:01 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 236CB1065670 for ; Tue, 27 Mar 2012 18:00:01 +0000 (UTC) (envelope-from sjg@evilcode.net) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id C25D68FC16 for ; Tue, 27 Mar 2012 18:00:00 +0000 (UTC) Received: by ggnk4 with SMTP id k4so220863ggn.13 for ; Tue, 27 Mar 2012 11:00:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:x-gm-message-state:content-type; bh=X1RcO2F6uMwd0q1ugWDCGUhgrzbbvdzw8Ux5iczi9/4=; b=MKuVAJLsms/pEmyyqBHuCCAHRJ1tt3UYz6Lb6dedoZX3eusxUWN1F+nUnDYKgYCZ22 lA3lHxtaH8Tj3U5oZE70GesrY5yaEQF11NWq4Pj1fj53jiPIcPKhNMzu/NLGfw+bvRcD mU8iWbt6zTRIG5mkqY05KsDSATIdERtQUg4KzMbLIVleQZ9S4PKngODivqTP/ygiT39b 3HRXZ50xvLjPEMtT2SiKwMenqihEvHobGoqNOSQ/2SEIL6oOOY4HmSfUXcJsJ1zS/uu5 ic/ZQ7Y4eu9ApQNh3lDMfj1Fe/CWOHb/+XfbfzWbO6XquDoRKvIdc96kWJFvNIZTPTWE gV7Q== MIME-Version: 1.0 Received: by 10.50.85.130 with SMTP id h2mr9451804igz.47.1332871199784; Tue, 27 Mar 2012 10:59:59 -0700 (PDT) Received: by 10.50.73.38 with HTTP; Tue, 27 Mar 2012 10:59:59 -0700 (PDT) In-Reply-To: References: <4F45AB76.5050201@FreeBSD.org> Date: Tue, 27 Mar 2012 11:59:59 -0600 Message-ID: From: "Samuel J. Greear" To: Ivan Voras X-Gm-Message-State: ALoCoQn15Dn8RrYrzKQmAGvCBMiJsrB7Swh3rX4dnxe+ttcL3w50QbrLrD+ztNwjdLsWHZefAhcO X-Mailman-Approved-At: Tue, 27 Mar 2012 18:08:40 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "hackers@freebsd.org" , Doug Barton Subject: Re: PostgreSQL benchmarks (now with Linux numbers) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 18:00:01 -0000 On Tue, Mar 27, 2012 at 8:27 AM, Ivan Voras wrote: > >> On 02/22/2012 01:42, Ivan Voras wrote: > >> > The Dragonfly team has recently liberated their VM from the giant lock > >> > and there are some interesting benchmarks comparing it to FreeBSD 9 > and a > >> > derivative of RedHat Enterprise Linux: > > > I just saw this, so I thought I would mention -- DragonFly was not doing > a > > great job allocating pv entries rapidly, which is needed during > PostgreSQL > > warm up -- This made shm_use_phys appear very effective. It only makes > 1-2% > > difference now on DragonFly, and only 1-2% difference on FreeBSD. > > Great! > > Do you have a link to the updated results? > I looked back at this and I guess I mis-spoke a little. This is the best I have, http://leaf.dragonflybsd.org/mailarchive/kernel/2011-11/pdf00000.pdf -- the second page is I think the same as what was posted here before, but the first page is intermediate results. You can see there that we had a significant fall-off without shm_use_phy's after a certain point (yellow line). What I mis-remembered was that FreeBSD had a fall-off after a certain point as well -- it just isn't nearly as bad as ours was. https://github.com/DragonFlyBSD/DragonFlyBSD/commit/5669360730c92e705c92afd02210e7859b0dc722 -- Here is the relevant commit that enabled bursting of pv_entry's to our per-cpu cache, iirc this commit alone made up all of that difference (between the yellow line and the light green line on the first page of the pdf). I think that probably we are a little generous with the bursting now and that real-world this won't have much of an impact, real-world FreeBSD is probably already fine in this regard, caching things like this mostly just makes stuff look good on benchmarks. Another thing of note, the performance of PostgreSQL benchmarks is heavily limited by the concurrent fault rate of the kernel. (again, this is iirc) Pg opens files that are tens to hundreds of megabytes and these get faulted in 4096 bytes at a time, during these benchmarks it will be doing this from potentially several dozen processes on the same file. If these faults can be taken concurrently performance improves rather dramatically. Again, this is probably one of those things that does not have a dramatic effect on most real-life workloads but makes things look really good in benchmarks. Sam From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 18:57:51 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B111E106564A; Tue, 27 Mar 2012 18:57:51 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9412F8FC15; Tue, 27 Mar 2012 18:57:50 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so291879bkc.13 for ; Tue, 27 Mar 2012 11:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=8WM8QQLAVIGcFWbRvAxe3B4pix5uA/jworn2rygQsSg=; b=Y8dqy4LyeSKNPuCfTUGRvfGoglG6hbpVlPis+y87Pq+uN5L4bLKismizSwcXjPZenz xuLtQY1P8oEP/UUFRfKIqvDwXKtoDef0Ws4jr3gAQz9LzZrC6+0hBllDtqGNPxKbW6ao 42rSqqCc4R4VxuX0QJ6qsAVtxnWO9SL+7C0f4fpIObCRZNby7WVr7P6+fg2nRRKNWUzD gtt4t96cTcRUQmuWk8VQNtOCZOL5ah3n+KISO5+CfkdjJyQceGdgJdTp3tcRLOe191cU Pr8M55lEJ6QsmRgdeKFQaqHxUKwGuBH+dbMNUjkLdpCkEI1h6Abl8k/VQKBLLmQr7EsV pLdQ== Received: by 10.205.81.3 with SMTP id zw3mr6794099bkb.30.1332874668461; Tue, 27 Mar 2012 11:57:48 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id o7sm1290419bkw.16.2012.03.27.11.57.41 (version=SSLv3 cipher=OTHER); Tue, 27 Mar 2012 11:57:46 -0700 (PDT) Message-ID: <20120327.185746.474.1@DOMY-PC> From: rank1seeker@gmail.com To: "Chris Rees" , "John Baldwin" , hackers@freebsd.org Date: Tue, 27 Mar 2012 20:57:46 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20120325.184917.751.1@DOMY-PC> <201203261018.53717.jhb@freebsd.org> <20120326.181050.391.3@DOMY-PC> X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: Active slice, only for a next boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 18:57:51 -0000 ----- Original Message -----=0D=0AFrom: Chris Rees = =0D=0ATo: rank1seeker@gmail.com=0D=0ACc: John Baldwin = , hackers@freebsd.org=0D=0ADate: Mon, 26 Mar 2012 = 21:28:07 +0000=0D=0ASubject: Re: Active slice, only for a next = boot=0D=0A=0D=0A> On 26 March 2012 18:10, = wrote:=0D=0A> > ----- Original Message -----=0D=0A> > From: John Baldwin = =0D=0A> > To: freebsd-hackers@freebsd.org=0D=0A> > Cc: = rank1seeker@gmail.com, hackers@freebsd.org=0D=0A> > Date: Mon, 26 Mar = 2012 10:18:53 -0400=0D=0A> > Subject: Re: Active slice, only for a next = boot=0D=0A> >=0D=0A> >> On Sunday, March 25, 2012 2:49:17 pm = rank1seeker@gmail.com wrote:=0D=0A> >> > After having a thought about = this issue and also currently looking at a=0D=0A> >> BootEasy boot = manager ...=0D=0A> >> > 'boot0cfg' is almost perfect for this task and = should/could be "exploited".=0D=0A> >> >=0D=0A> >> > It's '-o noupdate' = already does a major task, of keeping main slice active.=0D=0A> >> > Now = all we need is a flag, through which we specify slice to boot = (replacing=0D=0A> >> human presing button).=0D=0A> >> > From that point = on, existing code simply proceeds with received value.=0D=0A> >> >=0D=0A> = >> > '-o noupdate' ensures next boot will bring up main/active = slice.=0D=0A> >>=0D=0A> >> You mean like 'boot0cfg -s 4'?=0D=0A> = >>=0D=0A> >> --=0D=0A> >> John Baldwin=0D=0A> >>=0D=0A> >=0D=0A> >=0D=0A> = > Yes, but new flag for that purpose ('-n' for example =3D> = nextboot).=0D=0A> >=0D=0A> > I.e;=0D=0A> > =A0 =A0# 'boot0cfg -s 4 -o = noupdate -n 3'=0D=0A> >=0D=0A> > Would, set the default/main boot = selection to slice 4 and =A0'-o noupdate' =A0ensures it remains that way, = while '-n 3' would auto press/choose slice 3 in selection menu, as human = would.=0D=0A> > Well in that case, better to not show menu at all, thus = only "blic" into slice 3.=0D=0A> > At next boot it is at slice 4 = again.=0D=0A> =0D=0A> I'm afraid this sounds like a great way to make a = very confusing=0D=0A> scenario, where you have to reboot twice to be sure = of a consistent=0D=0A> boot sector, unless I've misunderstood you.=0D=0A> = =0D=0A> Chris=0D=0A=0D=0A=0D=0ALet me put it this way.=0D=0A'boot0cfg' = should continue to behave as it does. Exactly in this form, it is a = perfect (almost) solution.=0D=0AThis means that none of it's current flag = shall be edited in terms of functionality, thus preserving backward = compatibility with everthing.=0D=0A=0D=0ASo, on top of all it's code, we = add just a 1 flag which auto selects boot option/slice, as human would = from it's boot menu.=0D=0ASimple as that. We can call that flag:=0D=0A = -n nextboot slice=0D=0Aor maybe=0D=0A -a (auto)answer=0D=0A=0D=0AOn = existing machine with active and booted, i.e; slice 3=0D=0A# 'boot0cfg -n = 1'=0D=0A Would upon next power on, instead showing boot menu, simply = choose slice 3 to boot. Same result as if human would press F3 for slice = 3.=0D=0A=0D=0ANothing more, nothing else. Simple as that.=0D=0AIt's = indirect effect is determined by combination of other already existing = flags, i.e; '-o noupdate'=0D=0A=0D=0AIn above example without '-o = noupdate' it would also make slice 1 active.=0D=0AContrary to that, with = specified '-o noupdate' , it would boot slice 1 only once, preserving = slice 3 as active (all furter boots stick to it)=0D=0A=0D=0AIt is now = clearer?=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 19:03:40 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28EE11065676; Tue, 27 Mar 2012 19:03:40 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 763178FC1A; Tue, 27 Mar 2012 19:03:39 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so300826bkc.13 for ; Tue, 27 Mar 2012 12:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=14sUgDQ3IyPGCcqp5AQXpWgviKCu+T3ygKxmgnG0Yt8=; b=oKtyBLaOxSDmjifFwvCAtG3GHfSrw9CJC7cRQdQOrJEC5bgj3tCBMVQCa+gBqIfvdm VQ8ynJKts1xu72pPK3Qod/M4Sd2TkMjEqxGzbyyjfqc86qMtIwFOtxB99DATjZwkDkhO 1hMy4m+gThA8/DwCb1XJaZ6zHvCjpCyj5QpsGOqTA2jz+MPvsWSLqNWrxPlIwX4Vzr71 JXRfvzyZEvG23J1I97NzIDWVnpw67/EXDSyyxTg6gajtZv7tf9eQAlCdZ8kxa9S1PhRg sCEnGiSZn+P9dLOuDfK+QpshCc6K8J2Nq4fpdo4meXF1ErCGXjcqA6vs0KhWOr91pJJD 03Jg== Received: by 10.204.154.139 with SMTP id o11mr10490224bkw.4.1332875018515; Tue, 27 Mar 2012 12:03:38 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id u14sm1450624bkp.2.2012.03.27.12.03.26 (version=SSLv3 cipher=OTHER); Tue, 27 Mar 2012 12:03:37 -0700 (PDT) Message-ID: <20120327.190337.361.2@DOMY-PC> From: rank1seeker@gmail.com To: "John Baldwin" , hackers@freebsd.org Date: Tue, 27 Mar 2012 21:03:37 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: <201203261629.58303.jhb@freebsd.org> References: <20120325.150506.135.2@DOMY-PC> <201203261017.41420.jhb@freebsd.org> <20120326.180253.607.2@DOMY-PC> <201203261629.58303.jhb@freebsd.org> X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 19:03:40 -0000 ----- Original Message -----=0D=0AFrom: John Baldwin = =0D=0ATo: rank1seeker@gmail.com=0D=0ACc: = hackers@freebsd.org=0D=0ADate: Mon, 26 Mar 2012 16:29:58 = -0400=0D=0ASubject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of = non 512 byte sectorsize=0D=0A=0D=0A> On Monday, March 26, 2012 2:02:53 pm = rank1seeker@gmail.com wrote:=0D=0A> > ----- Original Message -----=0D=0A> = > From: John Baldwin =0D=0A> > To: = freebsd-hackers@freebsd.org=0D=0A> > Cc: rank1seeker@gmail.com, = hackers@freebsd.org=0D=0A> > Date: Mon, 26 Mar 2012 10:17:41 -0400=0D=0A> = > Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 = byte =0D=0A> sectorsize=0D=0A> > =0D=0A> > > On Sunday, March 25, 2012 = 11:05:06 am rank1seeker@gmail.com wrote:=0D=0A> > > > I've created a = vnode image (md0) with sectorsizes of 8192 and 4096=0D=0A> > > > =0D=0A> = > > > After installing MBR's bootcode '/boot/boot0', in provider 'md0' I = did:=0D=0A> > > > # boot0cfg -o noupdate -m 0xc md0=0D=0A> > > > = boot0cfg: read /dev/md0: Invalid argument=0D=0A> > > > # boot0cfg -v = md0=0D=0A> > > > boot0cfg: read /dev/md0: Invalid argument=0D=0A> > > > = =0D=0A> > > > If custom sectorsize isn't specifed(512 bytes), then both = above CMDs =0D=0A> will =0D=0A> > > work.=0D=0A> > > =0D=0A> > > MBR = bootstraps (such as boot0) assume a 512 byte sector. They won't boot = =0D=0A> > > correctly on media with a different sector size. So even if = you "fixed" =0D=0A> > > boot0cfg, you wouldn't have a bootable = system.=0D=0A> > > =0D=0A> > > -- =0D=0A> > > John Baldwin=0D=0A> > > = =0D=0A> > =0D=0A> > =0D=0A> > Is it so?=0D=0A> > This is also true for = '/boot/mbr' file?=0D=0A> =0D=0A> Yes.=0D=0A=0D=0A=0D=0ASo If in above = image with custom sector size (4k for 4k HDD) with slices and bsdlabels = and world + kernel=0D=0AIf I would 'dd' it to BIOS bassed PC and then = power on, it wouldn't boot?!=0D=0A=0D=0A> =0D=0A> > Well, majority of = PC's are still BIOS bassed so MBR scheme is still around =0D=0A> and = there are also now HDD's with 4b sector sizes and SSD's with 4b and 8k = =0D=0A> sector sizes.=0D=0A> > =0D=0A> > So how does things work in those = cases, without GPT?=0D=0A> =0D=0A> The BIOS still emulates 512 byte = sectors.=0D=0A> =0D=0A=0D=0AIn above example sector has a size of = 4k=0D=0AMBR of 512 bytes is written to it, so there are empyt 3,5k of = sector 0.=0D=0AWhat happens upon power on?=0D=0A=0D=0A=0D=0ADomagoj = Smol=E8i=E6=0D=0A From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 20:06:37 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B53D61065670; Tue, 27 Mar 2012 20:06:37 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id DE7628FC19; Tue, 27 Mar 2012 20:06:36 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so384340bkc.13 for ; Tue, 27 Mar 2012 13:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=oEPEPCUovjcsj96oA3BheSUPFIzHvAKYkV7DkWcWmTs=; b=e6OXEIywuDkqlExmNv1lfd6B/RmucckyzWgqXabnFWjvXsYuzvN7eNxP0epNu2K4AY H0V6QM3pV7dHM84vcX5qfwJpDjCb3f9/uf+HG3fVkfNdMcfxaWYH0pY4xYJS54SDBDQ7 hlO1+vVP4nH2GvxEvtyxroPNpmeJvlBWNNaNOdD98d6JVbQD73wjCCu+OYCP9hshZs7F hzaFXeK4C9ejRFgHlmJbjIy0ME5AiCHtl/1SpMdluM+CB5TE3VycHAZgTLyBupihV/hP rZsSC93wwEdBetAHiQABr8j07S419Xkg5BRluF9KOAXCEEfIXTGeN5BCwebAJXKFFqdD qaHg== Received: by 10.204.150.82 with SMTP id x18mr10548348bkv.10.1332878795526; Tue, 27 Mar 2012 13:06:35 -0700 (PDT) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id p19sm1773126bka.1.2012.03.27.13.06.33 (version=SSLv3 cipher=OTHER); Tue, 27 Mar 2012 13:06:34 -0700 (PDT) Date: Tue, 27 Mar 2012 23:06:31 +0300 From: Gleb Kurtsou To: Efstratios Karatzas Message-ID: <20120327200631.GA48486@reks> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org, kib@freebsd.org, gleb@freebsd.org Subject: Re: NTFS GSoC Project Idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 20:06:37 -0000 On (26/03/2012 21:13), Efstratios Karatzas wrote: > Greetings, > > I am a FreeBSD GSoC 2010 student, looking to participate in this years > GSoC. The project that I wish to work on is the FreeBSD NTFS driver. > > I 've already discussed my project idea with Attilio@ who suggested that I > forward my proposal to the hackers mailing list in order to get more > feedback and see if there's anyone interested in mentoring a NTFS project. > > The current draft of the technical part of my proposal(pdf & plain text) > can be found here: > > http://cgi.di.uoa.gr/~std06101/ntfs/ntfs_proposal.tar > > The project idea focuses on mp-safing the NTFS driver as well as adding > extra write support. I've tried to merge the two conflicting NTFS project > ideas in the ideas wiki page, into one. One of them suggesting that work > should be done on the current driver (mp-safe it etc) and the other one > suggesting that we port Apple's NTFS driver from scratch. The concept is > that we keep most of our vnode/vfs code (i.e. ntfs_vfsops.c, ntfs_vnops.c) > and rework existing infrastructure as needed as well as implement new > features using Apple's driver as a guide. I'm not sure I follow your idea, but I'd suggest sticking to a single project: either improve FreeBSD NTFS or do the port. FreeBSD and Darwin ntfs implementations are completely unrelated thus porting features from Darwin won't be easy. > This way, we avoid the major > changes in Apple's VFS (is there any documentation to be found?) and port > code that won't break current functionality. I bet "major changes in Apple's VFS" are easier to deal with than "merging" two unrelated file systems. XNU VFS is based on FreeBSD 5 VFS and they still share a lot in common, e.g. vnode operations themselves are nearly the same, e.g. extended attributes, locking, buffer cache are different. Take a look at HFS+ port. It's unmaintained and outdated but page contains link to CVS repository snapshot. http://people.freebsd.org/~yar/hfs/ > I tried to keep this e-mail brief so If you wish to know more, please refer > to the proposal. > > Thank you > > -- > > Efstratios "GPF" Karatzas From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 20:30:55 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98DC8106564A; Tue, 27 Mar 2012 20:30:55 +0000 (UTC) (envelope-from gpf.kira@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 240618FC12; Tue, 27 Mar 2012 20:30:55 +0000 (UTC) Received: by qao25 with SMTP id 25so461554qao.13 for ; Tue, 27 Mar 2012 13:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cGPqtw8B40fmGkV0BbcMznfyHwvS0xBRG1s37xUVaY8=; b=I5E59dg7jwaen6pJiHdi1AqGzWrKRTc1XnLMznx8U7w1XjAwQqAJCRcqloQ5yiPNKN oU9y9v3SuJR3O7VjBbzbWaCSb/Hj5QRUOcaLNAgziJk7mTcpLUs0Q+0wavsTWFkbwfOe +UA2f9e7N9H7xWDGLdg21ku0Vij+PbyvZcOIqzXQw8qoqN5nRWkFp+h0BqHHk6XjcnGw 1hoLV06hTrD2oTO2/XwkdYapxxN3TL1H/bCDtMp+ewQ7UszSHEJ0sc80g3LK0/UcSMAE foLxj8O4xUcV3SizCYXtMXzvWeAjeOFobWv4Csp96M1blqX/1KruOO5h16TQy8F8uFRq gw1w== MIME-Version: 1.0 Received: by 10.224.209.67 with SMTP id gf3mr30594644qab.75.1332880253477; Tue, 27 Mar 2012 13:30:53 -0700 (PDT) Received: by 10.229.239.18 with HTTP; Tue, 27 Mar 2012 13:30:53 -0700 (PDT) In-Reply-To: <20120327200631.GA48486@reks> References: <20120327200631.GA48486@reks> Date: Tue, 27 Mar 2012 23:30:53 +0300 Message-ID: From: Efstratios Karatzas To: Gleb Kurtsou Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, kib@freebsd.org, gleb@freebsd.org Subject: Re: NTFS GSoC Project Idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 20:30:55 -0000 On Tue, Mar 27, 2012 at 11:06 PM, Gleb Kurtsou wrote: > On (26/03/2012 21:13), Efstratios Karatzas wrote: > > Greetings, > > > > I am a FreeBSD GSoC 2010 student, looking to participate in this years > > GSoC. The project that I wish to work on is the FreeBSD NTFS driver. > > > > I 've already discussed my project idea with Attilio@ who suggested > that I > > forward my proposal to the hackers mailing list in order to get more > > feedback and see if there's anyone interested in mentoring a NTFS > project. > > > > The current draft of the technical part of my proposal(pdf & plain text) > > can be found here: > > > > http://cgi.di.uoa.gr/~std06101/ntfs/ntfs_proposal.tar > > > > The project idea focuses on mp-safing the NTFS driver as well as adding > > extra write support. I've tried to merge the two conflicting NTFS project > > ideas in the ideas wiki page, into one. One of them suggesting that work > > should be done on the current driver (mp-safe it etc) and the other one > > suggesting that we port Apple's NTFS driver from scratch. The concept is > > that we keep most of our vnode/vfs code (i.e. ntfs_vfsops.c, > ntfs_vnops.c) > > and rework existing infrastructure as needed as well as implement new > > features using Apple's driver as a guide. > > I'm not sure I follow your idea, but I'd suggest sticking to a single > project: either improve FreeBSD NTFS or do the port. FreeBSD and Darwin > ntfs implementations are completely unrelated thus porting features from > Darwin won't be easy. > > > This way, we avoid the major > > changes in Apple's VFS (is there any documentation to be found?) and port > > code that won't break current functionality. > > I bet "major changes in Apple's VFS" are easier to deal with than > "merging" two unrelated file systems. XNU VFS is based on FreeBSD 5 VFS > and they still share a lot in common, e.g. vnode operations themselves > are nearly the same, e.g. extended attributes, locking, buffer cache are > different. > > Take a look at HFS+ port. It's unmaintained and outdated but page > contains link to CVS repository snapshot. > http://people.freebsd.org/~yar/hfs/ > > > I tried to keep this e-mail brief so If you wish to know more, please > refer > > to the proposal. > > > > Thank you > > > > -- > > > > Efstratios "GPF" Karatzas > Since the FreeBSD wiki has two conflicting NTFS ideas, I thought of submitting two proposals: one to work on the current driver and one to port Apple's driver and let the FreeBSD team choose, should they wish to pick one of them. Attilio suggested that perhaps a merge of those two ideas was better than two separate proposals and this was my attempt to merge those ideas; I hear what you say though. Personally, I'd rather work on the current FreeBSD NTFS driver, but if there are no mentors for that idea, it's a no-go. Which NTFS idea do you prefer? I'll take a look at the HFS port asap. Thanks for the input. -- Efstratios "GPF" Karatzas From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 20:55:29 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8DEF1065673 for ; Tue, 27 Mar 2012 20:55:28 +0000 (UTC) (envelope-from ssanders@softhammer.net) Received: from smtp-hq2.opnet.com (smtp-hq2.opnet.com [192.104.65.247]) by mx1.freebsd.org (Postfix) with ESMTP id A4ED88FC14 for ; Tue, 27 Mar 2012 20:55:28 +0000 (UTC) Received: from [172.16.9.10] (wtn09010.opnet.com [172.16.9.10]) by smtp.opnet.com (Postfix) with ESMTPSA id 076BD211017D for ; Tue, 27 Mar 2012 16:48:56 -0400 (EDT) Message-ID: <4F7227B8.5020505@softhammer.net> Date: Tue, 27 Mar 2012 16:48:56 -0400 From: Stephen Sanders User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4F3922A8.2090808@softhammer.net> <4F71C333.9010506@softhammer.net> In-Reply-To: <4F71C333.9010506@softhammer.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: Odd RAID Performance Issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 20:55:29 -0000 Bit of a head space on the running space usage question. One of the test systems has 4 g_up/g_down threads running hence the better runningbufspace usages. biodone() gets called a lot more often so the buffer usage is not backing up. It also appears that devstat_start_transaction() / devstat_end_transaction() is getting called from g_up/g_down. It seems that this should cause some of the counter updates to be subjected to thread scheduling issues. Like g_up() running a lot more than g_down() so that the start_count becomes less than end_count. On 3/27/2012 9:40 AM, Steve Sanders wrote: > Thanks for all of the suggestions. We do tune the logging ufs partition > to have 64K blocks. > > We found a solution that makes this problem go away. > > We've modified the cam such that if a controller has 2 or more disks > attached, it divides the number of I/O slots on the card between the > disks. So a twa card as 252 slots available and the cam splits this > between the two 'disks' attached to the controller, each disk getting > 126 slots. > > The queue depths reported from iostat get ridiculously long (~1000) but > we do not end up using memory from the runningspace buffers. Since we > don't go over the vfs.hirunningspace mark, the system does not pause. > > I'm now wondering what causes runningspace usage? Could someone point > me to the code where we end up allocating blocks from high running space? > > An interesting side effect of this has been to make a mess of the > iostat's reports. 'iostats -x 1' now shows the database disk as > 150-200% used and very often shows service time as being 15 seconds. > Given the fact that the data looks good and the system isn't pausing, a > 15 second operation time seems unlikely. > > I believe this to be an effect of a large number of NCQ operations > terminating in the 1 second elapsed time window. So the operation > duration is adding up to be much larger than the 1 second elapsed time > window. > > Not realistic but illustrative, imagine 5 1 second NCQ operations > terminating in the 1 second window. The current code will calculate the > duration as 5 seconds, dividing by 1 will yield 500%. > > Thanks > > > On 02/13/2012 11:51 AM, Ivan Voras wrote: >> On 13/02/2012 15:48, Stephen Sanders wrote: >>> We've an application that logs data on one very large raid6 array >>> and updates/accesses a database on another smaller raid5 array. >> You would be better off with RAID10 for a database (or anything which >> does random IO). >> >>> Both arrays are connected to the same PCIe 3ware RAID controller. The >>> system has 2 six core 3Ghz processors and 24 GB of RAM. The system is >>> running FreeBSD 8.1. >> Did you do any additional OS tuning? Do you use UFS or ZFS? >> >>> The problem we're encountering is that the disk subsystem appears to >>> 'pause' periodically. It looks as if this is a result of disk read/write >>> operations from the database array taking a very long time to complete >>> (up to 8 sec). >> You should be able to monitor this with "iostat -x 1" (or whatever >> number of seconds instead of "1") - the last three columns should tell >> you if the device(s) are extraordinarily busy, and the r/s and w/s >> columns should tell you what the real IOPS rate is. You should probably >> post a sample output from this command when the problem appears. >> >> >> > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 21:23:48 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 430B11065674 for ; Tue, 27 Mar 2012 21:23:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 173838FC21 for ; Tue, 27 Mar 2012 21:23:48 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 719ACB925; Tue, 27 Mar 2012 17:23:47 -0400 (EDT) From: John Baldwin To: rank1seeker@gmail.com Date: Tue, 27 Mar 2012 17:19:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <20120325.150506.135.2@DOMY-PC> <201203261629.58303.jhb@freebsd.org> <20120327.190337.361.2@DOMY-PC> In-Reply-To: <20120327.190337.361.2@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201203271719.13196.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 27 Mar 2012 17:23:47 -0400 (EDT) Cc: hackers@freebsd.org Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 21:23:48 -0000 On Tuesday, March 27, 2012 3:03:37 pm rank1seeker@gmail.com wrote: > ----- Original Message ----- > From: John Baldwin > To: rank1seeker@gmail.com > Cc: hackers@freebsd.org > Date: Mon, 26 Mar 2012 16:29:58 -0400 > Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte sectorsize > > > On Monday, March 26, 2012 2:02:53 pm rank1seeker@gmail.com wrote: > > > ----- Original Message ----- > > > From: John Baldwin > > > To: freebsd-hackers@freebsd.org > > > Cc: rank1seeker@gmail.com, hackers@freebsd.org > > > Date: Mon, 26 Mar 2012 10:17:41 -0400 > > > Subject: Re: BUG: REL 9.0 - 'boot0cfg' fails with providers of non 512 byte > > sectorsize > > > > > > > On Sunday, March 25, 2012 11:05:06 am rank1seeker@gmail.com wrote: > > > > > I've created a vnode image (md0) with sectorsizes of 8192 and 4096 > > > > > > > > > > After installing MBR's bootcode '/boot/boot0', in provider 'md0' I did: > > > > > # boot0cfg -o noupdate -m 0xc md0 > > > > > boot0cfg: read /dev/md0: Invalid argument > > > > > # boot0cfg -v md0 > > > > > boot0cfg: read /dev/md0: Invalid argument > > > > > > > > > > If custom sectorsize isn't specifed(512 bytes), then both above CMDs > > will > > > > work. > > > > > > > > MBR bootstraps (such as boot0) assume a 512 byte sector. They won't boot > > > > correctly on media with a different sector size. So even if you "fixed" > > > > boot0cfg, you wouldn't have a bootable system. > > > > > > > > -- > > > > John Baldwin > > > > > > > > > > > > > Is it so? > > > This is also true for '/boot/mbr' file? > > > > Yes. > > > So If in above image with custom sector size (4k for 4k HDD) with slices and bsdlabels and world + kernel > If I would 'dd' it to BIOS bassed PC and then power on, it wouldn't boot?! It would load the first sector fine (i.e. BIOS would read first 512 bytes off the disk and start executing it), but it would not be able to properly parse the MBR table layout so it would probably blow up when it tried to find boot1 to boot it, yes. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 21:42:39 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B175106564A for ; Tue, 27 Mar 2012 21:42:39 +0000 (UTC) (envelope-from josh@tcbug.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 0F7508FC14 for ; Tue, 27 Mar 2012 21:42:38 +0000 (UTC) Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 5282021254 for ; Tue, 27 Mar 2012 17:36:18 -0400 (EDT) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute5.internal (MEProxy); Tue, 27 Mar 2012 17:36:18 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=3VQyhKteQsceWz09Qm+ZkR 7MWNE=; b=QGtrJ0/DQdtG4cOL6fTXpidkAIni3ovIK3WusJAYGLfQgtCh8ubZ4A 1o0B5EAND9GwuAzbQFwqowAdkwsLVRtmJnV8pMwT0Vnptciogb3u3yAJOUllQ1Zu TFBJUsoVY+uIkKBPyuHZLU0rvrZQy1IhKmb4LctzyK4cnokhfP154= X-Sasl-enc: ae1OWricR44Hyk7geaFnnQu30Ft6Vv2UZhJbtip0PDQN 1332884178 Received: from commander.ixsystems.com (drawbridge.ixsystems.com [206.40.55.65]) by mail.messagingengine.com (Postfix) with ESMTPSA id EAA7C8E00D3 for ; Tue, 27 Mar 2012 17:36:17 -0400 (EDT) Message-ID: <4F71D063.9080402@tcbug.org> Date: Tue, 27 Mar 2012 14:36:19 +0000 From: Josh Paetzel User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120226 Thunderbird/10.0.2 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20120322221900.GA3458@nargothrond.kdm.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: LSI mps(4) driver issues with PIKE 2008/IMR (LSI SAS2008) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 21:42:39 -0000 On 03/27/2012 10:54, Desai, Kashyap wrote: > > >> -----Original Message----- >> From: owner-freebsd-scsi@freebsd.org [mailto:owner-freebsd- >> scsi@freebsd.org] On Behalf Of Kenneth D. Merry >> Sent: Friday, March 23, 2012 3:49 AM >> To: Jake Smith >> Cc: freebsd-scsi@freebsd.org; freebsd-hackers@freebsd.org; freebsd- >> hardware@freebsd.org >> Subject: Re: LSI mps(4) driver issues with PIKE 2008/IMR (LSI SAS2008) >> >> On Thu, Mar 22, 2012 at 16:24:16 +0100, Jake Smith wrote: >>> Hello, >>> >>> I am trying to get the latest mps(4) driver in FreeBSD 9-STABLE >> working >>> with am LSI SAS2008 variant from ASUS, they call it PIKE 2008/IMR. >> Link >>> http://www.asus.com/Server_Workstation/Accessories/PIKE_2008IMR/ >>> >>> From what I can see this card should be compatible with the mps(4) >>> driver MFC'd to 9-STABLE about 6 weeks ago. >>> >>> # uname -a >>> FreeBSD xxx 9.0-STABLE FreeBSD 9.0-STABLE #3 r233304M: Thu Mar 22 >>> 12:53:17 GMT 2012 root@xxx:/usr/obj/usr/src/sys/GENERIC amd64 >>> >>> Revision: 233304 >>> >>> Initially the card is not seen at all by the driver, however pciconf >>> shows us why that is. >>> >>> mps0@pci0:2:0:0: class=0x010700 card=0x843b1043 chip=0x00731000 >>> rev=0x03 hdr=0x00 >>> vendor = 'LSI Logic / Symbios Logic' >>> device = 'MegaRAID SAS 9240' >>> class = mass storage >>> subclass = SAS >>> >>> It seems on other models of LSI SAS2008 the chip device ID is 0x0072, >>> however for some reason this card has 0x0073. So I patched the mps(4) >>> driver and recompiled. >>> >>> diff -ruN mps.orig/mpi/mpi2_cnfg.h mps/mpi/mpi2_cnfg.h >>> --- mps.orig/mpi/mpi2_cnfg.h 2012-03-22 14:50:53.000000000 +0000 >>> +++ mps/mpi/mpi2_cnfg.h 2012-03-22 14:52:23.000000000 +0000 >>> @@ -416,7 +416,8 @@ >>> >>> /* SAS */ >>> #define MPI2_MFGPAGE_DEVID_SAS2004 (0x0070) >>> -#define MPI2_MFGPAGE_DEVID_SAS2008 (0x0072) >>> +#define MPI2_MFGPAGE_DEVID_SAS2008_1 (0x0072) >>> +#define MPI2_MFGPAGE_DEVID_SAS2008_2 (0x0073) >>> #define MPI2_MFGPAGE_DEVID_SAS2108_1 (0x0074) >>> #define MPI2_MFGPAGE_DEVID_SAS2108_2 (0x0076) >>> #define MPI2_MFGPAGE_DEVID_SAS2108_3 (0x0077) >>> diff -ruN mps.orig/mps_pci.c mps/mps_pci.c >>> --- mps.orig/mps_pci.c 2012-03-22 14:48:41.000000000 +0000 >>> +++ mps/mps_pci.c 2012-03-22 14:51:59.000000000 +0000 >>> @@ -99,7 +99,9 @@ >>> } mps_identifiers[] = { >>> { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2004, >>> 0xffff, 0xffff, 0, "LSI SAS2004" }, >>> - { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008, >>> + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008_1, >>> + 0xffff, 0xffff, 0, "LSI SAS2008" }, >>> + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008_2, >>> 0xffff, 0xffff, 0, "LSI SAS2008" }, >>> { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2108_1, >>> 0xffff, 0xffff, 0, "LSI SAS2108" }, >>> >>> After reboot it now loads the mps(4) module and attempts to init the >>> card but fails. >>> >>> # dmesg | grep mps >>> mps0: port 0xd800-0xd8ff mem >>> 0xfbd7c000-0xfbd7ffff,0xfbdc0000-0xfbdfffff irq 16 at device 0.0 on >> pci2 >>> mps0: Doorbell failed to activate >>> device_attach: mps0 attach returned 6 >>> >>> From this point I'm stuck on what to try next, google does not provide >>> any answers for this situation. Does any one have any advice or ideas >> as >>> to why this is not working? >>> I am able to provide ssh access to the server if any one wants to log >>> on and have a look at it. >> >> In looking at the specs, that card supports RAID-5 and RAID-50. That >> means >> it isn't a SAS card supported by mps(4), but rather a MegaRAID card. > > This is Megaraid card. And it should not be supported by mps. Again, Just adding "0x73" in your pci list in mfi driver will not solve your problem. > Please Check with Megaraid FreeBSD drivers. > > ~ Kashyap > >> >> It should be supported by mfi(4). Try adding the PCI ID to that >> driver and see if that works. Or you can grab the driver from the >> head_mfi branch, it looks like it already supports that card. Here's >> the >> mfi_pci.c file, you can see the PCI ID in there: >> >> http://svnweb.freebsd.org/base/projects/head_mfi/sys/dev/mfi/mfi_pci.c?r >> evision=232888&view=markup >> >> Ken >> -- >> Kenneth Merry >> ken@FreeBSD.ORG The FreeBSD mfi will not support that card. The LSI mfi will, but they aren't done with it as far as I know (spoke with their driver team a few weeks ago) The slightly riskier option is to flash the card with IR firmware for a 9211, the MegaRAID component of that card is purely software and the underlying hardware is supported by mps. Of course a firmware flash gone bad will turn it into an expensive chunk of fiberglass, but if you google around you'll find people who have done so successfully. -- Thanks, Josh Paetzel From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 28 11:45:16 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E3261065670; Wed, 28 Mar 2012 11:45:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6336C8FC15; Wed, 28 Mar 2012 11:45:15 +0000 (UTC) Received: by lagv3 with SMTP id v3so1600309lag.13 for ; Wed, 28 Mar 2012 04:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Dz6FRNL05mKVLWuTpOFivzImvxK3DBC4bu39qvdX870=; b=nKawiPJm7wlSIYQSBWX4dH6gbKFFP/D9dorDTxICWeUT/3kw3Gu2pKv6EEMH1qE2hU t9/K4f82D123r0vPNiaqZvJHsV/4tvbyDpl6MMb/sa+DQw61s3bRkA0Ocm32UnbMrmAs MwJw+Ax2fjhWP6c2IB60TTqyvi5cEQpXXcvQCAFoGrpgcyE0BxPUAmL5rgduOklRBljY VoKSlljMLKPrb31QnYZaZsLu37J+wZUvOQNBYgo4IssS0EibiFEtANtHqUBQlMzMRgEU TAAMjmmVwAMa01SoMCroFDETbirA+uz4DIMgmq3cVguNSL6U22pAaRwf9HR5BWO6zn2w xYyg== MIME-Version: 1.0 Received: by 10.152.105.241 with SMTP id gp17mr24903196lab.21.1332935113992; Wed, 28 Mar 2012 04:45:13 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.17.196 with HTTP; Wed, 28 Mar 2012 04:45:13 -0700 (PDT) In-Reply-To: References: <20120327200631.GA48486@reks> Date: Wed, 28 Mar 2012 12:45:13 +0100 X-Google-Sender-Auth: k-ExhoKREutUEdv7pmJ4-yqrHK8 Message-ID: From: Attilio Rao To: Efstratios Karatzas Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, Gleb Kurtsou , kib@freebsd.org, gleb@freebsd.org Subject: Re: NTFS GSoC Project Idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 11:45:16 -0000 2012/3/27, Efstratios Karatzas : > On Tue, Mar 27, 2012 at 11:06 PM, Gleb Kurtsou > wrote: > >> On (26/03/2012 21:13), Efstratios Karatzas wrote: >> > Greetings, >> > >> > I am a FreeBSD GSoC 2010 student, looking to participate in this years >> > GSoC. The project that I wish to work on is the FreeBSD NTFS driver. >> > >> > I 've already discussed my project idea with Attilio@ who suggested >> that I >> > forward my proposal to the hackers mailing list in order to get more >> > feedback and see if there's anyone interested in mentoring a NTFS >> project. >> > >> > The current draft of the technical part of my proposal(pdf & plain text) >> > can be found here: >> > >> > http://cgi.di.uoa.gr/~std06101/ntfs/ntfs_proposal.tar >> > >> > The project idea focuses on mp-safing the NTFS driver as well as adding >> > extra write support. I've tried to merge the two conflicting NTFS >> > project >> > ideas in the ideas wiki page, into one. One of them suggesting that work >> > should be done on the current driver (mp-safe it etc) and the other one >> > suggesting that we port Apple's NTFS driver from scratch. The concept is >> > that we keep most of our vnode/vfs code (i.e. ntfs_vfsops.c, >> ntfs_vnops.c) >> > and rework existing infrastructure as needed as well as implement new >> > features using Apple's driver as a guide. >> >> I'm not sure I follow your idea, but I'd suggest sticking to a single >> project: either improve FreeBSD NTFS or do the port. FreeBSD and Darwin >> ntfs implementations are completely unrelated thus porting features from >> Darwin won't be easy. >> >> > This way, we avoid the major >> > changes in Apple's VFS (is there any documentation to be found?) and >> > port >> > code that won't break current functionality. >> >> I bet "major changes in Apple's VFS" are easier to deal with than >> "merging" two unrelated file systems. XNU VFS is based on FreeBSD 5 VFS >> and they still share a lot in common, e.g. vnode operations themselves >> are nearly the same, e.g. extended attributes, locking, buffer cache are >> different. >> >> Take a look at HFS+ port. It's unmaintained and outdated but page >> contains link to CVS repository snapshot. >> http://people.freebsd.org/~yar/hfs/ >> >> > I tried to keep this e-mail brief so If you wish to know more, please >> refer >> > to the proposal. >> > >> > Thank you >> > >> > -- >> > >> > Efstratios "GPF" Karatzas >> > > Since the FreeBSD wiki has two conflicting NTFS ideas, I thought of > submitting two proposals: one to work on the current driver and one to port > Apple's driver and let the FreeBSD team choose, should they wish to pick > one of them. Attilio suggested that perhaps a merge of those two ideas was > better than two separate proposals and this was my attempt to merge those > ideas; I hear what you say though. What I specifically had in mind is: - make NTFS mpsafe - bugbusting - surf in Apple implementation/history, check for bugfixes there and import in the FreeBSD implementation Unfortunately our idea page is not as updated as you want it to be, thus it happens to find duplicate ideas list, not well merged, etc. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 28 14:01:19 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FE58106566B; Wed, 28 Mar 2012 14:01:19 +0000 (UTC) (envelope-from gpf.kira@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 120F88FC14; Wed, 28 Mar 2012 14:01:18 +0000 (UTC) Received: by qcsg15 with SMTP id g15so811971qcs.13 for ; Wed, 28 Mar 2012 07:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+tAOskEPW3DkT34Ktc5KVHz+FLR6A9TdALC/kh/UBig=; b=gC2m3ZvB+0OAlkS1DU2Tz/R+CpXzTVKM4imf1qo7aHNzN0bhk//YO9ksyValnvhOt8 NvaNN13H6HYFdV/RJXjTmnDjupjTuUY/xFbECS0wm8AXGh5uSmOziS7QPb3KFamryJ9n K6MPE5tUNLqDQjQpqIXGyx+ilHFyc2VnetYtJ1kl4oiOCcZa8pc+0wiwxXOHdIBxbetG +KUqVuVQT6uztr2G2GCxFX08oFiI9COEf6ZbeOXYbgJyB+0pLJI+TzCl6yK3Azcdt57h dR68ztDXgYv75raa+6HY2GLG+qJhWtbU6/HyYA3+XLpHQwZEsFllVsWdkaHBY5OEz7h+ rg9g== MIME-Version: 1.0 Received: by 10.224.209.67 with SMTP id gf3mr33906475qab.75.1332943272921; Wed, 28 Mar 2012 07:01:12 -0700 (PDT) Received: by 10.229.239.18 with HTTP; Wed, 28 Mar 2012 07:01:12 -0700 (PDT) In-Reply-To: References: <20120327200631.GA48486@reks> Date: Wed, 28 Mar 2012 17:01:12 +0300 Message-ID: From: Efstratios Karatzas To: Attilio Rao Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, Gleb Kurtsou , kib@freebsd.org, gleb@freebsd.org Subject: Re: NTFS GSoC Project Idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 14:01:19 -0000 On Wed, Mar 28, 2012 at 2:45 PM, Attilio Rao wrote: > 2012/3/27, Efstratios Karatzas : > > On Tue, Mar 27, 2012 at 11:06 PM, Gleb Kurtsou > > wrote: > > > >> On (26/03/2012 21:13), Efstratios Karatzas wrote: > >> > Greetings, > >> > > >> > I am a FreeBSD GSoC 2010 student, looking to participate in this years > >> > GSoC. The project that I wish to work on is the FreeBSD NTFS driver. > >> > > >> > I 've already discussed my project idea with Attilio@ who suggested > >> that I > >> > forward my proposal to the hackers mailing list in order to get more > >> > feedback and see if there's anyone interested in mentoring a NTFS > >> project. > >> > > >> > The current draft of the technical part of my proposal(pdf & plain > text) > >> > can be found here: > >> > > >> > http://cgi.di.uoa.gr/~std06101/ntfs/ntfs_proposal.tar > >> > > >> > The project idea focuses on mp-safing the NTFS driver as well as > adding > >> > extra write support. I've tried to merge the two conflicting NTFS > >> > project > >> > ideas in the ideas wiki page, into one. One of them suggesting that > work > >> > should be done on the current driver (mp-safe it etc) and the other > one > >> > suggesting that we port Apple's NTFS driver from scratch. The concept > is > >> > that we keep most of our vnode/vfs code (i.e. ntfs_vfsops.c, > >> ntfs_vnops.c) > >> > and rework existing infrastructure as needed as well as implement new > >> > features using Apple's driver as a guide. > >> > >> I'm not sure I follow your idea, but I'd suggest sticking to a single > >> project: either improve FreeBSD NTFS or do the port. FreeBSD and Darwin > >> ntfs implementations are completely unrelated thus porting features from > >> Darwin won't be easy. > >> > >> > This way, we avoid the major > >> > changes in Apple's VFS (is there any documentation to be found?) and > >> > port > >> > code that won't break current functionality. > >> > >> I bet "major changes in Apple's VFS" are easier to deal with than > >> "merging" two unrelated file systems. XNU VFS is based on FreeBSD 5 VFS > >> and they still share a lot in common, e.g. vnode operations themselves > >> are nearly the same, e.g. extended attributes, locking, buffer cache are > >> different. > >> > >> Take a look at HFS+ port. It's unmaintained and outdated but page > >> contains link to CVS repository snapshot. > >> http://people.freebsd.org/~yar/hfs/ > >> > >> > I tried to keep this e-mail brief so If you wish to know more, please > >> refer > >> > to the proposal. > >> > > >> > Thank you > >> > > >> > -- > >> > > >> > Efstratios "GPF" Karatzas > >> > > > > Since the FreeBSD wiki has two conflicting NTFS ideas, I thought of > > submitting two proposals: one to work on the current driver and one to > port > > Apple's driver and let the FreeBSD team choose, should they wish to pick > > one of them. Attilio suggested that perhaps a merge of those two ideas > was > > better than two separate proposals and this was my attempt to merge those > > ideas; I hear what you say though. > > What I specifically had in mind is: > - make NTFS mpsafe > - bugbusting > - surf in Apple implementation/history, check for bugfixes there and > import in the FreeBSD implementation > > Unfortunately our idea page is not as updated as you want it to be, > thus it happens to find duplicate ideas list, not well merged, etc. > > Attilio > > > -- > Peace can only be achieved by understanding - A. Einstein > Here's a draft for a NTFS proposal that focuses on improving our current driver(mp-safe + extra write support). I believe it's well defined and shouldn't cause any confusion. Also a couple of fixes due to Pedro's e-mail (thanks!). The draft can be found here: http://cgi.di.uoa.gr/~std06101/ntfs/ntfs_mpsafe_proposal.tar Let me know what you think. -- Efstratios "GPF" Karatzas From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 28 20:22:44 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E66A5106566B for ; Wed, 28 Mar 2012 20:22:43 +0000 (UTC) (envelope-from bsd.chris@yahoo.com) Received: from nm38-vm6.bullet.mail.bf1.yahoo.com (nm38-vm6.bullet.mail.bf1.yahoo.com [72.30.239.22]) by mx1.freebsd.org (Postfix) with SMTP id 8E8978FC08 for ; Wed, 28 Mar 2012 20:22:43 +0000 (UTC) Received: from [98.139.212.151] by nm38.bullet.mail.bf1.yahoo.com with NNFMP; 28 Mar 2012 20:22:42 -0000 Received: from [98.139.212.217] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 28 Mar 2012 20:22:42 -0000 Received: from [127.0.0.1] by omp1026.mail.bf1.yahoo.com with NNFMP; 28 Mar 2012 20:22:42 -0000 X-Yahoo-Newman-Id: 715755.85498.bm@omp1026.mail.bf1.yahoo.com Received: (qmail 74503 invoked from network); 28 Mar 2012 20:22:42 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding:Subject:From:Date:To:Message-ID; b=1Yf+MNeIjrJHF5X6k9NUAnCXXM08y8a1wikf/mfk1KU2JXZi8DLnZYCBqK7I+NHoF4BJA1Iqm/dKcEyPM3qhDlB3l7pOUHmRrw41Wz4p/Ectn2slXY6t5+zbBvCb3wfvVYpBq3BdK0ICEv0GQiyF7IN+6C2VX9wlMxMJN9N50gQ= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1332966162; bh=5h0I/a35Bub1iCHXaQxbq46Cz3baKJI9KNZQxUkZ/lU=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding:Subject:From:Date:To:Message-ID; b=KjQtT0yjOsT/cWvU9Ab0KieQ3xj0mLgk+zm+bOuqBRiEECL4j5xo6KJniySn7afxmFUDJGGL6+Zg7pzN3Mg/js3x3wqHp6rxnlkcCM+siC46FXcNQ91vjG1stY4/lU619wajm1hexIB90oTCSF3kr0ibNsYlJj5ssS66V9PweCg= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _pQJeBoVM1mOQbT3RaDmvaf6UByWaVSygOpNeVv_QUh_y4_ yBLvKrGph24LfZz.SHzBZAYpzXQzzHzhZPNaLy7.pVPxnd.V6RN6gI9AK.XU LUFjgsGpjVOkjswpKHXsnwB4M1v4TnXkenHWQyQn6NRKYxMYWKz5P.KeLKBE EmhJLNthGKNoJbGPklGF738Zc7peM7dZIG90zfBxnCIcogRjBsInNSf3WMx8 sjIJ3U4LDN0TP4hqC6aqLM3bmW3J0A2NWqU8tS3xt5CBNN284TK4H1GtEsuJ gKX.P7iic4qLzxD7nDdaBTqvTweR_Oq__B1zntigO5Yyi0k9LkRjgL50.Ksh ZVrM7liRZuo8hlfI3BryTTB6o7b2fKBM40rAPVpjG5NIC5LL.xN6ZNl6RfZh 7OjdbsgjZhuN6hL.xOnHXg4270Ec- X-Yahoo-SMTP: uW3vktqswBBwhzUUqSfIo9IQDlOyJjOVATmsCrk- Received: from 107-60-229-3.pools.spcsdns.net (bsd.chris@107.60.229.3 with plain) by smtp115-mob.biz.mail.bf1.yahoo.com with SMTP; 28 Mar 2012 13:22:41 -0700 PDT User-Agent: K-9 Mail for Android MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: "Chris.H" Date: Wed, 28 Mar 2012 13:22:47 -0700 To: freebsd-hackers@freebsd.org Message-ID: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> Subject: Reverse engineering; How to... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 20:22:44 -0000 Greetings, Over the past year, in an effort to convert my server farm to wireless, I've purchased some half a dozen USB wireless dongles, at a total cost of ~150.00. Unfortunately, none of them are (yet) supported — I know, I know, I've already had this debate with both dev's, & users. On the up-side, I've devised a resource that will greatly assist would-be adopters in selecting, and researching these, and other adapters _currently supported_ under under FreeBSD. That said; the adapter I most recently purchased, is quite nice (Cisco(Linksys) AE2500 Wireless-N). Boasts 2.5/5GHz @300Mbps. I figured (wrongly) because Linksys is so well supported on FreeBSD, that the likelihood of this being supported would be good. At any rate, given it's not, and because I _do_ have the Window$ drivers on the install CD. What are the possibilities I can reverse-engineer the drivers into a FreeBSD loadable module? I can unpack the setup file to extract the .sys files. While I _could_ utilize the ndisulator to load them, that's not my goal. Should I unpack the .sys file, and attempt to decompile/disassemble it? Or attempt to load it, and dump it from memory? — hacker/cracker advice _strongly_ desired — ############## #usbconfig -d ugen1.2 dump_device_desc ugen1.2: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ff bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x13b1 idProduct = 0x003a bcdDevice = 0x0001 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 <000000000001> bNumConfigurations = 0x0001 ############## P.S. This message was sent from my "smart phone". Apologies for any (mis)formatting. :-( --Chris.H -- FreeBSD 8.2-STABLE /AMD64 From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 28 20:33:24 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C80461065670 for ; Wed, 28 Mar 2012 20:33:24 +0000 (UTC) (envelope-from bfalk_bsd@brandonfa.lk) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 765CD8FC0A for ; Wed, 28 Mar 2012 20:33:24 +0000 (UTC) Received: by obbuo13 with SMTP id uo13so2367970obb.13 for ; Wed, 28 Mar 2012 13:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brandonfa.lk; s=google; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Nq2k3SNSLLnkQsQBXj7j2t80LT+b2DAHGFAwig4E6Ac=; b=W+S2qAPxCZ9OZcH+z9SqzpRyMMqgVeJ8dBqHxB2vhtTcQHCSZYQ/JldYesZjR/BDF7 dbWr8kQ1dntcTc3BMIhMVM5/Jf8tTqvy2uTd1aQB9pHhjDocIPOQ4pHLKoi3DAI/QsB2 uGy4bKOj56yIo89kFMcCuAAsNTTyIXQbZpht4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=Nq2k3SNSLLnkQsQBXj7j2t80LT+b2DAHGFAwig4E6Ac=; b=Q7ZcdA/uVHb8FVODUvRRn0wIMzRmPOSWugkk3KBB8MAHx7pDSr9Pj5/9UrCK+4lec2 3Lr6t50ZpsY0ibHrWnjGgc+06jJxnynv8xnfdwP9/SstJPfqQLsjzgbqBwNb2m8Jw0SK jqe7N7MsKgbZCVx/6M5PvkXzE0kLLfcSySH+uUmGKBXTuNkBPBOI4MPL4JeGwTd/Cf40 ITU7GgwWPExd6+SKmCK4rizVYYaRz4Ymb9fCB9L7r68EwVOV73C00tKgz/hTyWP7DSSO wRm2NupHWSNxbE+lAPiaqn8Q58NDe3SPM3o/ysslNrgLymzhftV5Pzl/fdZsP2T/+sya jJVQ== Received: by 10.182.31.102 with SMTP id z6mr40128824obh.78.1332966803658; Wed, 28 Mar 2012 13:33:23 -0700 (PDT) Received: from [192.168.42.145] (wsip-184-183-177-134.dc.dc.cox.net. [184.183.177.134]) by mx.google.com with ESMTPS id aj16sm3239269oec.4.2012.03.28.13.33.22 (version=SSLv3 cipher=OTHER); Wed, 28 Mar 2012 13:33:23 -0700 (PDT) Message-ID: <4F73758D.3040000@brandonfa.lk> Date: Wed, 28 Mar 2012 16:33:17 -0400 From: Brandon Falk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: "Chris.H" References: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> In-Reply-To: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Gm-Message-State: ALoCoQkeRAxyAQR669RwSgmd+pr32cJMfGUsMAuRYQL3vNr01nE2NtNqMr7m7h/LyLoK28igmsSO Cc: freebsd-hackers@freebsd.org Subject: Re: Reverse engineering; How to... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 20:33:25 -0000 Reverse engineering a whole driver could take a very long time, even with the proper tools. If it's possible, return the adapter, and buy a new one and verify that the chipset is supported before you buy it. Last time I bought a wireless card I sat in the store looking at the Wireless support list for BSD before buying. http://www.freebsd.org/relnotes/CURRENT/hardware/support.html#WLAN I very strongly suggest that you get a card with an Atheros chipset, as those are by far the best supported on BSD. -Brandon On 3/28/2012 4:22 PM, Chris.H wrote: > Greetings, > Over the past year, in an effort to convert my server farm to wireless, I've purchased some half a dozen USB wireless dongles, at a total cost of ~150.00. Unfortunately, none of them are (yet) supported — I know, I know, I've already had this debate with both dev's, & users. On the up-side, I've devised a resource that will greatly assist would-be adopters in selecting, and researching these, and other adapters _currently supported_ under under FreeBSD. That said; the adapter I most recently purchased, is quite nice (Cisco(Linksys) AE2500 Wireless-N). > Boasts 2.5/5GHz @300Mbps. I figured (wrongly) because Linksys is so well supported on FreeBSD, that the likelihood of this being supported would be good. At any rate, given it's not, and because I _do_ have the Window$ drivers on the install CD. What are the possibilities I can reverse-engineer the drivers into a FreeBSD loadable module? > I can unpack the setup file to extract the .sys files. While I _could_ utilize the ndisulator to load them, that's not my goal. Should I unpack the .sys file, and attempt to decompile/disassemble it? Or attempt to load it, and dump it from memory? > — hacker/cracker advice _strongly_ desired — > > ############## > #usbconfig -d ugen1.2 dump_device_desc > ugen1.2: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x00ff > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x13b1 > idProduct = 0x003a > bcdDevice = 0x0001 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0003 <000000000001> > bNumConfigurations = 0x0001 > ############## > > P.S. This message was sent from my "smart phone". > Apologies for any (mis)formatting. :-( > > --Chris.H > From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 28 20:59:50 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1538E1065670; Wed, 28 Mar 2012 20:59:50 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id D2F4C8FC12; Wed, 28 Mar 2012 20:59:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=Message-Id:From:Mime-Version:Date:Subject:To:Content-Type; bh=8KJ1nhaGAeZ3zrt0SBSXxjlRFNgvWZ5qUOX/5vh4Uoc=; b=LN3CgwjVYcrhf7xeK5wrLB0JQhckdgP0XXAXW6Cws7QEQFpi/qZsOqhGtiKmHi99ezSS1Yf/OQID+fCsc0U7lomg4/BhCuj7nwy2417i6d+sasSQwO5B8jRZbdU+ZNWc; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SCzy8-000CnR-I4; Wed, 28 Mar 2012 15:59:49 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1332968382-20726-20725/5/7; Wed, 28 Mar 2012 20:59:42 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Date: Wed, 28 Mar 2012 15:59:42 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.0 Cc: Subject: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 20:59:50 -0000 Alright guys, I'm at the end of my rope here. For those that haven't seen my previous emails here's the (not so) quick breakdown: Overview: FreeBSD ?? - 7.4 never crash FreeBSD 8.0 - 8.2 crashes FreeBSD 8-STABLE, 8.3, and 9.0 are untested (Sorry, not possible in our production at this time, and we were hoping we could base some stuff on 8.3 for long term stability...) ESXi: Confirmed ESXi 4.0 - 5.0 has this problem. Haven't tested on others. History: Over the course of the last 2 years we've been banging our heads on the wall. VMWare is done debugging this. They claim it's not a VMWare issue. They can't identify what the heck happens. We had a glimmer of hope with ESXi 5.0 fixing it because we never saw any crashes in the handful of deployments, but our dreams were crushed today -- two days before an outage to begin migration to ESXi 5.0 -- when a customer's ESXi 5.0 server and FreeBSD 8.2 guest crashed. Crash Details: The keyboard/mouse usually stops responding for input on the console; normally we can't type in a username or password. However, we can switch VTs. If there's a shell on the console and we can type, we can only run things in memory. Any time we try to access the disk it will hang indefinitely. The server still has network access. We can ping it without issue. SSH of course kicks you out because it can't do any I/O. If we were to serve a lightweight http server off a memory backed filesystem I'm confident it would run just fine as long as it wasn't logging or anything. On ESXi you see that there is a CPU spike of 100% that goes on indefinitely. No idea what the FreeBSD OS itself thinks it is doing because we can't run top during the crash. This crash can affect a server and happen multiple times a week. It can also not show up for 180 days or more. But it does happen. The server can be 100% idle and crash. We have servers that do more I/O than the ones that crash could ever attempt to do and these don't crash at all. Completely inexplicable. Things we've looked into: Nothing about the installed software matters. We've tried cross referencing the crashed servers by the programs they run but the base OS is the only common denominator due to the wide variety of servers it has affected. Storage doesn't matter. We've tried different iSCSI SANs, we've tried different switches, we've tried local datastores on the ESXi servers themselves. HP servers, Dell servers -- doesn't seem to matter either. (All with latest firmwares, BIOSes, etc) VMWare gave us a ton of debugging tasks, and we've given them gigabytes of debugging info and data; they can't find anything. VMWare tools -- with, without, using open-vm-tools makes no difference. I think we've done a fair job ruling out VMWare. I think we've finally found enough data that this is definitely something in the FreeBSD world. I'm going to begin prepping some of the known crashy servers with more debugging. Any suggestions on what I should build the kernel with? They never do a proper panic, but I definitely want to at least *try* to get into the debugger the next time it crashes. And when it crashes, what the heck should I be running? I've never played with the KDB before... Thank you for any suggestions and help you can give me.... From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 28 23:27:16 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4164A1065670 for ; Wed, 28 Mar 2012 23:27:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 138C08FC0A for ; Wed, 28 Mar 2012 23:27:16 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so2850509pbc.13 for ; Wed, 28 Mar 2012 16:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Ca9owHJA4NQ3XybrbaHgV6jqssXYaOxnZX7K1umx0HM=; b=a2COqigcMV1i3BYFs5XBqJ9pm2HiMoz+xbuYSyDH7/mmIa5s5s0i4RKfXDjcMotipY Y0AbhMXmLfcKO9f2JbNoAedOFpOjz2nt+PkFlO3jEAERSQJ23Xnr+jcsXmIX6i1b7AKT Vqzty+k0fnX+camB1eZNlmCmOeDbArxo6zX8jUnTr7/ov+X6ZlKlWtpIgZ6mXrfEpksJ ODsxHu9TyqjJpiNf9KwmOjnoShaMICYfnKlBsXVATqgc5zL13e9X+ju3VROcx1YnZ4mt yhtwnDVSwNJjbRQB/4GAAsIUUM1jaUuCO5JExsD5AaJEzdF1IBhuNfHM71efuhmasJIb EiZw== MIME-Version: 1.0 Received: by 10.68.202.195 with SMTP id kk3mr492379pbc.96.1332977235873; Wed, 28 Mar 2012 16:27:15 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.143.33.5 with HTTP; Wed, 28 Mar 2012 16:27:15 -0700 (PDT) In-Reply-To: <4F73758D.3040000@brandonfa.lk> References: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> <4F73758D.3040000@brandonfa.lk> Date: Wed, 28 Mar 2012 16:27:15 -0700 X-Google-Sender-Auth: HT-ZNg9aZWYqueUQ5mqu7R4-dKk Message-ID: From: Adrian Chadd To: Brandon Falk Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, "Chris.H" Subject: Re: Reverse engineering; How to... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 23:27:16 -0000 Hi, If there's a linux/netbsd/openbsd driver then you could work with us to port them. We in the wireless stack hacker group are sorely lacking developers working on the chipsets that are out there. OpenBSD tends to have a bunch of wireless drivers that Damien has either ported or reimplemented from various (Linux) upstreams, so you could use that as a basis for future work. If someone has the following hardware AND can actually actively work on helping me port support from OpenBSD/Linux to FreeBSD, please drop me a line ASAP: (These are all USB) * AR9170 series NICs (Linux - carl9170, OpenBSD: ar9170) * AR7010 CPU + (AR9280, AR9285, AR9287) NICs (Linux, ath9k_htc, OpenBSD: athn) * AR9271 CPU+Wifi NIC (ath9k_htc/athn) I've got documentation and reference hardware here, so I can assist in helping debug and add 802.11n support. I just have no time to do all the initial USB bring up of these things. If in doubt, jump on freebsd-wireless@freebsd.org and start talking. :) Adrian From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 28 23:31:40 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F0D4106566B; Wed, 28 Mar 2012 23:31:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 08C138FC17; Wed, 28 Mar 2012 23:31:39 +0000 (UTC) Received: by ggnk4 with SMTP id k4so1404121ggn.13 for ; Wed, 28 Mar 2012 16:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1Ip4r1cb8u+Wb0t3PZzy/VB+ZEJ2ye/i0MpqylcB+mc=; b=KTHB/7mdb51aLnCUxrJGeqKlRsccRBHJolgi4cNHCSo6M34SFFiQ3cahbjV7c/tVbV 3d+0r4XgNl6TwZ72+p9McKJ8WVW28GSHi58ab8IyNzmEE5xQ9BlS76xknhFGKrjjrEH9 M9HHRj4aEUJS7SsHtiqhig1W6T4AMZyVpXXXkxXRCOB6jh1nQMGyudaXvWvxJrEuP5Ta 3U/2n5Qrg6vov0Z5QukTZkw5YSQYxB7SMASr1g39bn4vMXmA6mW0NPUJWYe7s9swHUSS mB3AJLYW1oZi8kR03S1pVmSEapXZjzu0EEstglMFnPSUkmHIVOtpdfkoDW7Rwt1gH2wU Ozcw== MIME-Version: 1.0 Received: by 10.68.240.135 with SMTP id wa7mr518086pbc.7.1332977499034; Wed, 28 Mar 2012 16:31:39 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.143.33.5 with HTTP; Wed, 28 Mar 2012 16:31:38 -0700 (PDT) In-Reply-To: References: Date: Wed, 28 Mar 2012 16:31:38 -0700 X-Google-Sender-Auth: lTqAiQP5uyDsguC_T2A8DbL3tpE Message-ID: From: Adrian Chadd To: Mark Felder Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 23:31:40 -0000 Hi, * have you filed a PR? * is the crash easily reproducable? * are you able to boot some ramdisk-only FreeBSD-8.2 images (eg create a ramdisk image using nanobsd?) and do some stress testing inside that? It sounds like you've established it's a storage issue, or at least interrupt handling for storage issue. So I'd definitely try the ramdisk-only boot and thrash it using lighttpd/httperf or something. If that survives fine, I'd look at trying to establish whether there's something wrong in the disk driver(s) freebsd is using. I'm not that cluey on ESXi, but there may be some PIC/APIC/ACPI change between 7.x and 8.0 which has caused this to surface. 2c, Adrian From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 28 23:44:24 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BB27106566B for ; Wed, 28 Mar 2012 23:44:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm3.bullet.mail.sp2.yahoo.com (nm3.bullet.mail.sp2.yahoo.com [98.139.91.73]) by mx1.freebsd.org (Postfix) with SMTP id 34C7F8FC14 for ; Wed, 28 Mar 2012 23:44:24 +0000 (UTC) Received: from [98.139.91.70] by nm3.bullet.mail.sp2.yahoo.com with NNFMP; 28 Mar 2012 23:44:18 -0000 Received: from [208.71.42.198] by tm10.bullet.mail.sp2.yahoo.com with NNFMP; 28 Mar 2012 23:43:18 -0000 Received: from [127.0.0.1] by smtp209.mail.gq1.yahoo.com with NNFMP; 28 Mar 2012 23:43:17 -0000 X-Yahoo-Newman-Id: 933037.38401.bm@smtp209.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: es88t_EVM1nMg6YCEbLTnHFRBdsb9pO.fAuH3Lrjgs6yt_o zcjKSm2WRurJDWWjfKK5g3UW9JxEjtrtZ9AJn8ZHtbFGX.J4CFgluHQPiILs LlvlezULUlhNBF_CKnZLBSYsXALdLDoAKaw.bTGl6ovhzlFluxNg2QchxMob KjNGwS.qGcQe_AvG7M6J6_y7.Al.lQp_NxC7vimR70pr1uyW3fBDSZX_U.Hk bCD_MaFO2sOT_esrXu919igWEofq3yIcSkQ1EptJc5D6rfv_wro5J7lKiEfJ _xYgDttkfKzyQYlcoPrdFj.7RdPCYL91fu6JGv1UPVghKP6x2iaNtdLq.x4N RdTXMji6F0lF7Q0uQcJyn8149mAK39QEDQT4eFW8m2I7LoD.45pLasfBD38b WB1SBIhzD7ZA1Q0KNX7BLN6f2c65aDb5JmOEhJacYsggvZ5pw8hZyF3kvEc4 rgzQ5iiMLSXk64cYG745NHSok_7DCoUtubgys9vICluVG9ga7vGePUPSUAhE qAFEE0cpMN5_eiEMeuHwFkSCwtYc9pfHv1AqXK2794v45qQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Received: from [192.168.10.102] (pfg@200.118.157.7 with plain) by smtp209.mail.gq1.yahoo.com with SMTP; 28 Mar 2012 16:43:17 -0700 PDT Message-ID: <4F73A212.6060503@FreeBSD.org> Date: Wed, 28 Mar 2012 18:43:14 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120226 Thunderbird/10.0.2 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <1332875025.86491.YahooMailClassic@web113511.mail.gq1.yahoo.com> In-Reply-To: <1332875025.86491.YahooMailClassic@web113511.mail.gq1.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: gleb@freebsd.org, Efstratios Karatzas Subject: Re: NTFS GSoC Project Idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 23:44:24 -0000 Hello Efstratios ; In general, I agree with Gleb that you should start from the Apple Darwin port instead of spending time on the current FreeBSD driver. Please note that last year someone attempted to bring in smbfs from Darwin with your same strategy and failed: http://lists.freebsd.org/pipermail/soc-status/2011-June/000340.html Making it MPsafe may look relatively easy but it will take valuable time. In the case of ext2fs, for example, I am convinced it was only done in time because the ext2fs code is based on UFS1. Also the lack of write support has made the current NTFS driver undesirable and for a while, even before the MP-unsafe axing was defined, the driver was being considered for deprecation. Quite honestly I think we want the Darwin driver. If it serves as further encouragement, when I asked Yar about his HFS port he said everything he took from Darwin "basically" compiled. cheers, Pedro. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 00:18:49 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D215106566B; Thu, 29 Mar 2012 00:18:49 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id ABCB78FC08; Thu, 29 Mar 2012 00:18:48 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so1952262bkc.13 for ; Wed, 28 Mar 2012 17:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=sk6K51sYsxX8rq+5t1JIJTlZ2NjWyiN188tjmlMKsvw=; b=xaHp7fRvU0f1xmPBvrhuPSBFvTfUp/MMjux7oY6m8Pf/8E1OebRyw/yyawmwUTEFw9 FX5Rs/aunvgzvVywiwD1VEGwDooBfGjsIWF7CKL0+tBvXF2GzQSZDjUaoSIne2drgM/V v1s3EUwnVxlFRG7cgvo4lREj4rEefp5WAhSd8MRG+DXMOXhx2f8GCueHKspt5K2UoUCs mFFvv/SOocI0CUo/5JLEtSxaLTtrzIlOHQ8Cw6rKchBqnAT8ImzvH2ArwfyixFZ4C3e2 UeAbLUz+kIV9nIH4DkfDbzGVxr3m/NidexHlUVaiHsm8yP32aDCvwxwAU+leLrReJKG+ Q2mw== Received: by 10.205.125.142 with SMTP id gs14mr13142909bkc.95.1332980327216; Wed, 28 Mar 2012 17:18:47 -0700 (PDT) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id u14sm9946819bkp.2.2012.03.28.17.18.45 (version=SSLv3 cipher=OTHER); Wed, 28 Mar 2012 17:18:46 -0700 (PDT) Date: Thu, 29 Mar 2012 03:18:43 +0300 From: Gleb Kurtsou To: Pedro Giffuni Message-ID: <20120329001843.GA17435@reks> References: <1332875025.86491.YahooMailClassic@web113511.mail.gq1.yahoo.com> <4F73A212.6060503@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F73A212.6060503@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org, Efstratios Karatzas Subject: Re: NTFS GSoC Project Idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 00:18:49 -0000 On (28/03/2012 18:43), Pedro Giffuni wrote: > Hello Efstratios ; > > In general, I agree with Gleb that you should start from > the Apple Darwin port instead of spending time on the > current FreeBSD driver. I'd suggest submitting two proposals -- too much depends on a mentor availability for a particular project. > Please note that last year someone attempted to bring > in smbfs from Darwin with your same strategy and > failed: > http://lists.freebsd.org/pipermail/soc-status/2011-June/000340.html > > Making it MPsafe may look relatively easy but it will > take valuable time. In the case of ext2fs, for example, > I am convinced it was only done in time because the > ext2fs code is based on UFS1. > > Also the lack of write support has made the current > NTFS driver undesirable and for a while, even before > the MP-unsafe axing was defined, the driver was > being considered for deprecation. > > Quite honestly I think we want the Darwin driver. If it > serves as further encouragement, when I asked Yar > about his HFS port he said everything he took from > Darwin "basically" compiled. My experience with Darwin NTFS was similar. I had most of it compiling in several evenings. At least extended attributes and utf-8 routines had to be disabled. Sorry, I can't recall the details, had no time to get back to it afterwards. Thanks, Gleb. > > cheers, > > Pedro. > From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 07:15:31 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D74E106566C for ; Thu, 29 Mar 2012 07:15:31 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 164148FC08 for ; Thu, 29 Mar 2012 07:15:30 +0000 (UTC) Received: by lagv3 with SMTP id v3so3130967lag.13 for ; Thu, 29 Mar 2012 00:15:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=Dex0IhgUnj8+MhwtWxq9fhNf0BuWUca8O8hnbAaePQQ=; b=cmgo/zORyD/ghuX/gpqCB/l2JaA1hNZgtoEiQQNyezRgeAJfufsweBwJes6OjFioJP SnsQVKSUFUXVXg8ILGHxXJEP74TzlL/Tc2HBF6P+UBuB7AUhtxMrTMO077fJdfeIBpw6 js0y2a1pReRZRdks+/5M1MY2JRz1/WEURm22aaT8xwAzpnPOOsE+lv6LV2NWuu42/ykV 59j2zyiQycmEwnmm2S/Lv02dsHZ0CF+xA21W1dqh+0+Zw+4glK+yKd66gz2IEHUoS0nr Q5/+gilhu+W3u7xGnF6NnWxXkgoCyvokdeILGk8ulSkuzv2aFxOqqSYdBGGWHBFa0DZh T5sw== MIME-Version: 1.0 Received: by 10.152.104.43 with SMTP id gb11mr26397273lab.8.1333005329890; Thu, 29 Mar 2012 00:15:29 -0700 (PDT) Received: by 10.152.112.38 with HTTP; Thu, 29 Mar 2012 00:15:29 -0700 (PDT) X-Originating-IP: [79.140.39.245] In-Reply-To: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> References: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> Date: Thu, 29 Mar 2012 09:15:29 +0200 Message-ID: From: Bernhard Schmidt To: "Chris.H" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnVH84n6O9vHFfJXtoGVd6m5CaN9GEvfTDIVVGrfErUKC4oAMurOGIQSjwe2qFAWgdy8XSg Cc: freebsd-hackers@freebsd.org Subject: Re: Reverse engineering; How to... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 07:15:31 -0000 On Wed, Mar 28, 2012 at 22:22, Chris.H wrote: > Greetings, > =A0Over the past year, in an effort to convert my server farm to wireless= , I've purchased some half a dozen USB wireless dongles, at a total cost of= ~150.00. Unfortunately, none of them are (yet) supported =97 I know, I kno= w, I've already had this debate with both dev's, & users. On the up-side, I= 've devised a resource that will greatly assist would-be adopters in select= ing, and researching these, and other adapters _currently supported_ under = under FreeBSD. That said; the adapter I most recently purchased, is quite n= ice (Cisco(Linksys) AE2500 Wireless-N). > [..] > idVendor =3D 0x13b1 > idProduct =3D 0x003a > bcdDevice =3D 0x0001 > iManufacturer =3D 0x0001 > iProduct =3D 0x0002 > iSerialNumber =3D 0x0003 <000000000001> > bNumConfigurations =3D 0x0001 Seems to be Broadcom based, BCM43236[1]. I'm afraid, you won't have much fun which that thing.. though, afaik Linux' brcm80211[2] supports it. If you want to port that driver, by all means, go for it! The license looks pretty useful at least. [1] http://wikidevi.com/wiki/Linksys_AE2500 [2] http://git.kernel.org/?p=3Dlinux/kernel/git/linville/wireless-testing.g= it;a=3Dblob_plain;f=3Ddrivers/net/wireless/brcm80211/brcmfmac/usb.c;hb=3DHE= AD --=20 Bernhard From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 07:36:50 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 2C0EA106566B; Thu, 29 Mar 2012 07:36:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id E60C414E828; Thu, 29 Mar 2012 07:36:49 +0000 (UTC) Message-ID: <4F741111.6050501@FreeBSD.org> Date: Thu, 29 Mar 2012 00:36:49 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Mark Felder References: In-Reply-To: X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 07:36:50 -0000 On 3/28/2012 1:59 PM, Mark Felder wrote: > FreeBSD 8-STABLE, 8.3, and 9.0 are untested As much as I'm sensitive to your production requirements, realistically it's not likely that you'll get a helpful result without testing a newer version. 8.2 came out over a year ago, many many things have changed since then. Doug From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 08:38:22 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 976E8106566B for ; Thu, 29 Mar 2012 08:38:22 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id 509C38FC18 for ; Thu, 29 Mar 2012 08:38:22 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirj.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SDAaq-0001Rk-Ai; Thu, 29 Mar 2012 09:20:28 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SDAap-0004MT-VT; Thu, 29 Mar 2012 09:20:28 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q2T8KRKQ068141; Thu, 29 Mar 2012 09:20:27 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q2T8KRXd068140; Thu, 29 Mar 2012 09:20:27 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Thu, 29 Mar 2012 09:20:27 +0100 From: Anton Shterenlikht To: Brandon Falk Message-ID: <20120329082027.GA68062@mech-cluster241.men.bris.ac.uk> References: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> <4F73758D.3040000@brandonfa.lk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F73758D.3040000@brandonfa.lk> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, "Chris.H" Subject: Re: Reverse engineering; How to... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 08:38:22 -0000 On Wed, Mar 28, 2012 at 04:33:17PM -0400, Brandon Falk wrote: > Reverse engineering a whole driver could take a very long time, even with the > proper tools. If it's possible, return the adapter, and buy a new one and verify > that the chipset is supported before you buy it. Last time I bought a wireless > card I sat in the store looking at the Wireless support list for BSD before buying. > > http://www.freebsd.org/relnotes/CURRENT/hardware/support.html#WLAN > > I very strongly suggest that you get a card with an Atheros chipset, as those > are by far the best supported on BSD. sure, but how? I've tried very hard to get a pccard with an atheros chip, but you just can't trust the label. Guides like e.g. this: http://atheros.rapla.net/ are unreliable. I've bought several cards, which supposedly have an atheros chip in them, only to discover they had something else inside. Can you recommend a pccard model that is guaranteed to have a supported atheros chip inside? -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 13:15:45 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DECC4106566C; Thu, 29 Mar 2012 13:15:44 +0000 (UTC) (envelope-from maninya@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6E2338FC16; Thu, 29 Mar 2012 13:15:44 +0000 (UTC) Received: by ghrr20 with SMTP id r20so1732740ghr.13 for ; Thu, 29 Mar 2012 06:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=e5U98xUZMopbL3SoWsQYKZ9fFuAghQyJVXF7LU4Au8c=; b=PwEQ+9o7O4LhrMa3H1cEMbnxefngm5hp3NwF8NlXGdPhVJz+Q2h5sT5Qg2+grUd/dI GJuwGq1kdY07v/wDP1LFTZkmjnEICSV9Z7+5x1qEU9rRNoHDIP5seo0yYz87bEo2jFWh RYdMUQjHvxBdaKlGII1SM8huNj4e3poiBW/9S487hioSzc9606IlkIlf/TsH7pEcn8TA ydWUEoMdMjH5o9GHS/UnFw9NP6g7SwO3O1UOXCKam542bc3otQrQzeUjxlH6s40X/Qa1 kg46GCI3AUtHkG/LCqt33AuXbgWVPVePpqzzBE8Qd5Vg2ER+1PCjWb+sHEQOupEHlCBQ Q2sg== MIME-Version: 1.0 Received: by 10.101.3.33 with SMTP id f33mr10605944ani.80.1333026943608; Thu, 29 Mar 2012 06:15:43 -0700 (PDT) Received: by 10.146.238.13 with HTTP; Thu, 29 Mar 2012 06:15:43 -0700 (PDT) In-Reply-To: <201203270753.21534.jhb@freebsd.org> References: <201203270753.21534.jhb@freebsd.org> Date: Thu, 29 Mar 2012 18:45:43 +0530 Message-ID: From: Maninya M To: freebsd-hackers@freebsd.org, John Baldwin , Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: __NR_mmap2 in FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 13:15:45 -0000 Thanks a lot for replying! Ok I've tried this to push arguments onto stack. Is it right? I get an error at this line: die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while dasfallocating memory",exec_pid,temp_regs.r_eip); Please tell me what to do. void map_memory(unsigned long addr, unsigned long size, int flags) { int status; struct reg regs,temp_regs; unsigned long int_instr = 0x000080cd; /* INT 0x80 */ if (ptrace(PT_GETREGS,exec_pid,(caddr_t)®s,0) < 0) die_perror("ptrace(PTRACE_GETREGS,%d,(caddr_t)®s,0)",exec_pid); /* mmap2 system call seems to take arguments as follows: * eax = __NR_mmap2 * ebx = (unsigned long) page aligned address * ecx = (unsigned long) page aligned file size * edx = protection * esi = flags * Other arguments (fd and pgoff) are not required for anonymous mapping */ temp_regs = regs; //printf("temp=%u,\teip=%u\tregs=%u\teip=%u\n",&temp_regs,temp_regs.r_eip,®s,regs.r_eip); // temp_regs.r_eax = __NR_mmap2; temp_regs.r_eax=71; /*temp_regs.r_ebx = addr; temp_regs.r_ecx = size; temp_regs.r_edx = flags; temp_regs.r_esi = MAP_PRIVATE | MAP_ANONYMOUS;*/ //push size //temp_regs.r_eip = temp_regs.r_esp - 4; //printf("temp=%u,\teip=%u\tregs=%u\teip=%u\n",&temp_regs,temp_regs.r_eip,®s,regs.r_eip); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-4),MAP_PRIVATE | MAP_ANONYMOUS) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating memory",exec_pid,temp_regs.r_eip); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-8),flags) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating memory",exec_pid,temp_regs.r_eip); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-12),size) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating memory",exec_pid,temp_regs.r_eip); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-16), addr) < 0); die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while dasfallocating memory",exec_pid,temp_regs.r_eip); /* if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x000080cd) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating memory",exec_pid,temp_regs.r_eip); */ if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x000080cd) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating memory",exec_pid,temp_regs.r_eip); if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { die_perror("ptrace(PT_SETREGS,%d,...) failed while allocating memory",exec_pid); } if (ptrace(PT_STEP,exec_pid,NULL,0) < 0) die_perror("ptrace(PT_STEP,...) failed while executing mmap2"); wait(&status); if (WIFEXITED(status)) die("Restarted process abrubtly (exited with value %d). Aborting Restart.",WEXITSTATUS(status)); else if (WIFSIGNALED(status)) die("Restarted process abrubtly exited because of uncaught signal (%d). Aborting Restart.",WTERMSIG(status)); if (ptrace(PT_GETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { die_perror("ptrace(PT_GETREGS,...) failed after executing mmap2 system call"); } //fprintf(stdout,"hello iam here \n"); if (temp_regs.r_eax != addr) warn("Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. This could be a problem.",addr,temp_regs.r_eax); else if (cr_options.verbose) fprintf(stdout,"Successfully allocated [0x%.8lx - 0x%.8lx]\n",addr,addr+size); /* Restore original registers */ if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { die_perror("ptrace(PT_SETREGS,...) when restoring registering after allocating memory (mmap2)"); } } On 27 March 2012 17:23, John Baldwin wrote: > On Monday, March 26, 2012 1:56:08 pm Maninya M wrote: > > I am trying to convert a function written for Linux to FreeBSD. > > What is the equivalent of the __NR_mmap2 system call in FreeBSD? > > > > I keep getting the error because of this exception: > > warn("Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. > > This could be a problem.",addr,temp_regs.eax); > > I think you could just use plain mmap() for this? > > However, it seems that this is injecting a call into an existing binary, > not calling mmap() directly. A few things will need to change. First, > FreeBSD system calls on i386 put their arguments on the stack, not in > registers, so you will need to do a bit more work to push the arguments > onto > the stack rather than just setting registers. > > > I changed > > temp_regs.eax = __NR_mmap2; > > to > > temp_regs.eax = 192; > > > > but it didn't work. I suppose I couldn't understand this function. Please > > help. > > > > This is the function: > > > > void map_memory(unsigned long addr, unsigned long size, int flags) > > { > > int status; > > struct user_regs_struct regs,temp_regs; > > unsigned long int_instr = 0x000080cd; /* INT 0x80 */ > > > > if (ptrace(PTRACE_GETREGS,exec_pid,NULL,®s) < 0) > > die_perror("ptrace(PTRACE_GETREGS,%d,NULL,®s)",exec_pid); > > > > /* mmap2 system call seems to take arguments as follows: > > * eax = __NR_mmap2 > > * ebx = (unsigned long) page aligned address > > * ecx = (unsigned long) page aligned file size > > * edx = protection > > * esi = flags > > * Other arguments (fd and pgoff) are not required for anonymous > mapping > > */ > > temp_regs = regs; > > temp_regs.eax = __NR_mmap2; > > temp_regs.ebx = addr; > > temp_regs.ecx = size; > > temp_regs.edx = flags; > > temp_regs.esi = MAP_PRIVATE | MAP_ANONYMOUS; > > temp_regs.eip = temp_regs.esp - 4; > > > > if (ptrace(PTRACE_POKETEXT,exec_pid,(void > > *)(temp_regs.eip),(void*)int_instr) < 0) > > die_perror("ptrace(PTRACE_POKETEXT,%d,0x%.8x,INT 0x80) failed while > > allocating memory",exec_pid,temp_regs.eip); > > if (ptrace(PTRACE_SETREGS,exec_pid,NULL,&temp_regs) < 0) { > > die_perror("ptrace(PTRACE_SETREGS,%d,...) failed while allocating > > memory",exec_pid); > > } > > if (ptrace(PTRACE_SINGLESTEP,exec_pid,NULL,NULL) < 0) > > die_perror("ptrace(PTRACE_SINGLESTEP,...) failed while executing > > mmap2"); > > > > wait(&status); > > if (WIFEXITED(status)) > > die("Restarted process abrubtly (exited with value %d). Aborting > > Restart.",WEXITSTATUS(status)); > > else if (WIFSIGNALED(status)) > > die("Restarted process abrubtly exited because of uncaught signal > (%d). > > Aborting Restart.",WTERMSIG(status)); > > > > if (ptrace(PTRACE_GETREGS,exec_pid,NULL,&temp_regs) < 0) { > > die_perror("ptrace(PTRACE_GETREGS,...) failed after executing mmap2 > > system call"); > > } > > > > if (temp_regs.eax != addr) > > warn("Wanted space at address 0x%.8x, mmap2 system call returned > > 0x%.8x. This could be a problem.",addr,temp_regs.eax); > > else if (cr_options.verbose) > > fprintf(stdout,"Successfully allocated [0x%.8lx - > > 0x%.8lx]\n",addr,addr+size); > > > > /* Restore original registers */ > > if (ptrace(PTRACE_SETREGS,exec_pid,NULL,®s) < 0) { > > die_perror("ptrace(PTRACE_SETREGS,...) when restoring registering > after > > allocating memory (mmap2)"); > > } > > } > > > > -- > > Maninya > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to " > freebsd-hackers-unsubscribe@freebsd.org" > > > > -- > John Baldwin > -- Maninya From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 13:56:10 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 355C3106566B; Thu, 29 Mar 2012 13:56:10 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id EF3648FC19; Thu, 29 Mar 2012 13:56:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:To:Content-Type; bh=+6ASjC/RmnMRE2uUuT/vjGeoKDHxS+fN++4yds1bt0w=; b=Zxo5WDY3XmbsXrR5Ei71FCY/wCPwFXoIlbyY9Ct8r9PjSWCVtwIOWZssDov1JkqkDN82wFZFHzz7JTVLRXAD39HqsMo7dJ7LBz2htuQi98bnqmfve8HQGLg2dhxT95td; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDFpc-000EHe-H3; Thu, 29 Mar 2012 08:56:09 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333029358-20726-20725/5/10; Thu, 29 Mar 2012 13:55:58 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-questions@FreeBSD.org, freebsd-hackers@freebsd.org References: Date: Thu, 29 Mar 2012 08:55:57 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 13:56:10 -0000 On Wed, 28 Mar 2012 18:31:38 -0500, Adrian Chadd wrote: > * have you filed a PR? No > * is the crash easily reproducable? Unfortunately not. It's totally random. Some servers will "get the bug" and crash daily, some will crash weekly, some might seem to be fine but 3 months later hit this crash. > * are you able to boot some ramdisk-only FreeBSD-8.2 images (eg create > a ramdisk image using nanobsd?) and do some stress testing inside > that? That's a plan I'd like to execute but my free time for building that environment is rather short at the moment :( > I'm not that > cluey on ESXi, but there may be some PIC/APIC/ACPI change between 7.x > and 8.0 which has caused this to surface. Was there a setting to revert ACPI behavior from 8.x to 7.x? I thought I read about that at one point.... or perhaps this was something available back in the dev cycle when 8 was -CURRENT. *shrug* I know 9.0 and onward has even more ACPI changes so assuming it truly is an ACPI bug I guess we could cross our fingers and hope that the bug has mysteriously vanished? From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 13:58:09 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A7A41106566C; Thu, 29 Mar 2012 13:58:09 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7D02C8FC08; Thu, 29 Mar 2012 13:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:To:Content-Type; bh=/dsUITKdxSAfN/hLO6ieTu0ip1f+MQ4OUcyMb+jOJyA=; b=M9JQxVOb68kL2tEY/ZMBrD7vVzWu/oGUh7HQ2DvCpWqQGLBlTrC9lEkLXtYL3FnDbSsCfCxrXid/NTOJ9PG3MRw6gtn8Aan/dSjWRmXFuR/Ob4LijodNfSTrWuVSUZ83; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDFrY-000EHe-80; Thu, 29 Mar 2012 08:58:09 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333029483-20726-20725/5/11; Thu, 29 Mar 2012 13:58:03 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-questions@FreeBSD.org, freebsd-hackers@freebsd.org References: <4F741111.6050501@FreeBSD.org> Date: Thu, 29 Mar 2012 08:58:02 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <4F741111.6050501@FreeBSD.org> User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 13:58:09 -0000 On Thu, 29 Mar 2012 02:36:49 -0500, Doug Barton wrote: > As much as I'm sensitive to your production requirements, realistically > it's not likely that you'll get a helpful result without testing a newer > version. 8.2 came out over a year ago, many many things have changed > since then. The sad part is that VMWare's "supported FreeBSD versions" are a joke, and we've been trying to keep VMWare happy by only running "supported versions". I honestly don't think they even test. It's so stupid. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 14:03:51 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 672961065673; Thu, 29 Mar 2012 14:03:51 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3DF778FC1D; Thu, 29 Mar 2012 14:03:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:To:Content-Type; bh=m2EKieDo7xd9C5Mwpp5xpJs3gZU6BVRUf050Sfd6fWE=; b=ATty4yVODN2ef0RPnYtfIRwTbUjVcYIArfRZSXTGAP7JAirIqfmP1yBLxWC/GKq4CTXUl4npUf10yElo/ZjG2GMSXIgCK6pTUQ9SShhDGa1Yq9hBkj20Z/O4+/H7UYz/; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDFx3-000EHe-CX; Thu, 29 Mar 2012 09:03:50 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333029824-20726-20725/5/13; Thu, 29 Mar 2012 14:03:44 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-questions@FreeBSD.org, freebsd-hackers@freebsd.org References: Date: Thu, 29 Mar 2012 09:03:44 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 14:03:51 -0000 Alright, new data. It happened to crash about 10 minutes after I came in this morning and I ran some stuff in the DDB. I have no idea what information is useful, but perhaps someone will see something out of the ordinary? http://feld.me/freebsd/esx_crash/ Thanks... From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 14:05:34 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D1CD106564A; Thu, 29 Mar 2012 14:05:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D2B4A8FC15; Thu, 29 Mar 2012 14:05:33 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 492E4B93F; Thu, 29 Mar 2012 10:05:33 -0400 (EDT) From: John Baldwin To: Maninya M Date: Thu, 29 Mar 2012 09:44:11 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203270753.21534.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201203290944.11446.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 29 Mar 2012 10:05:33 -0400 (EDT) Cc: freebsd-hackers@freebsd.org Subject: Re: __NR_mmap2 in FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 14:05:34 -0000 On Thursday, March 29, 2012 9:15:43 am Maninya M wrote: > Thanks a lot for replying! > Ok I've tried this to push arguments onto stack. > Is it right? > I get an error at this line: > > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while > dasfallocating memory",exec_pid,temp_regs.r_eip); > > > Please tell me what to do. > > > > > > void map_memory(unsigned long addr, unsigned long size, int flags) > { > int status; > struct reg regs,temp_regs; > unsigned long int_instr = 0x000080cd; /* INT 0x80 */ > > if (ptrace(PT_GETREGS,exec_pid,(caddr_t)®s,0) < 0) > die_perror("ptrace(PTRACE_GETREGS,%d,(caddr_t)®s,0)",exec_pid); > > /* mmap2 system call seems to take arguments as follows: > * eax = __NR_mmap2 > * ebx = (unsigned long) page aligned address > * ecx = (unsigned long) page aligned file size > * edx = protection > * esi = flags > * Other arguments (fd and pgoff) are not required for anonymous mapping > */ > temp_regs = regs; > > //printf("temp=%u, \teip=%u\tregs=%u\teip=%u\n",&temp_regs,temp_regs.r_eip,®s,regs.r_eip); > // temp_regs.r_eax = __NR_mmap2; > temp_regs.r_eax=71; > /*temp_regs.r_ebx = addr; > temp_regs.r_ecx = size; > temp_regs.r_edx = flags; > temp_regs.r_esi = MAP_PRIVATE | MAP_ANONYMOUS;*/ > //push size > > //temp_regs.r_eip = temp_regs.r_esp - 4; You still want this, it is putting the instruction on the stack. However, your stack layout is wrong I think. You actually want it to be something like this: r_esp - 4: r_esp - 8: r_esp - 12: r_esp - 16: (MAP_FIXED?) r_esp - 20: r_esp - 24: r_esp - 28: r_esp - 32: Then you want to set: r_eip = r_esp - 32; r_esp -= 28; I think you want MAP_FIXED since it complains if the returned address doesn't match 'addr' at the end of your routine. However, it might be best if you just compiled a program that called mmap() and then looked at the disassembly and to make sure the stack layout is correct. > //printf("temp=%u, \teip=%u\tregs=%u\teip=%u\n",&temp_regs,temp_regs.r_eip,®s,regs.r_eip); > if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-4),MAP_PRIVATE | > MAP_ANONYMOUS) < 0) > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating > memory",exec_pid,temp_regs.r_eip); > > if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-8),flags) < 0) > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating > memory",exec_pid,temp_regs.r_eip); > > if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-12),size) < 0) > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating > memory",exec_pid,temp_regs.r_eip); > > if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-16), addr) < 0); > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while > dasfallocating memory",exec_pid,temp_regs.r_eip); > /* > if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x000080cd) < 0) > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating > memory",exec_pid,temp_regs.r_eip); > */ > if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x000080cd) < 0) > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating > memory",exec_pid,temp_regs.r_eip); > if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { > die_perror("ptrace(PT_SETREGS,%d,...) failed while allocating > memory",exec_pid); > } > if (ptrace(PT_STEP,exec_pid,NULL,0) < 0) > die_perror("ptrace(PT_STEP,...) failed while executing mmap2"); > > wait(&status); > if (WIFEXITED(status)) > die("Restarted process abrubtly (exited with value %d). Aborting > Restart.",WEXITSTATUS(status)); > else if (WIFSIGNALED(status)) > die("Restarted process abrubtly exited because of uncaught signal (%d). > Aborting Restart.",WTERMSIG(status)); > > if (ptrace(PT_GETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { > die_perror("ptrace(PT_GETREGS,...) failed after executing mmap2 system > call"); > } > //fprintf(stdout,"hello iam here \n"); > if (temp_regs.r_eax != addr) > warn("Wanted space at address 0x%.8x, mmap2 system call returned > 0x%.8x. This could be a problem.",addr,temp_regs.r_eax); > else if (cr_options.verbose) > > fprintf(stdout,"Successfully allocated [0x%.8lx - > 0x%.8lx]\n",addr,addr+size); > > /* Restore original registers */ > if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { > die_perror("ptrace(PT_SETREGS,...) when restoring registering after > allocating memory (mmap2)"); > > } > } > > > > > > > On 27 March 2012 17:23, John Baldwin wrote: > > > On Monday, March 26, 2012 1:56:08 pm Maninya M wrote: > > > I am trying to convert a function written for Linux to FreeBSD. > > > What is the equivalent of the __NR_mmap2 system call in FreeBSD? > > > > > > I keep getting the error because of this exception: > > > warn("Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. > > > This could be a problem.",addr,temp_regs.eax); > > > > I think you could just use plain mmap() for this? > > > > However, it seems that this is injecting a call into an existing binary, > > not calling mmap() directly. A few things will need to change. First, > > FreeBSD system calls on i386 put their arguments on the stack, not in > > registers, so you will need to do a bit more work to push the arguments > > onto > > the stack rather than just setting registers. > > > > > I changed > > > temp_regs.eax = __NR_mmap2; > > > to > > > temp_regs.eax = 192; > > > > > > but it didn't work. I suppose I couldn't understand this function. Please > > > help. > > > > > > This is the function: > > > > > > void map_memory(unsigned long addr, unsigned long size, int flags) > > > { > > > int status; > > > struct user_regs_struct regs,temp_regs; > > > unsigned long int_instr = 0x000080cd; /* INT 0x80 */ > > > > > > if (ptrace(PTRACE_GETREGS,exec_pid,NULL,®s) < 0) > > > die_perror("ptrace(PTRACE_GETREGS,%d,NULL,®s)",exec_pid); > > > > > > /* mmap2 system call seems to take arguments as follows: > > > * eax = __NR_mmap2 > > > * ebx = (unsigned long) page aligned address > > > * ecx = (unsigned long) page aligned file size > > > * edx = protection > > > * esi = flags > > > * Other arguments (fd and pgoff) are not required for anonymous > > mapping > > > */ > > > temp_regs = regs; > > > temp_regs.eax = __NR_mmap2; > > > temp_regs.ebx = addr; > > > temp_regs.ecx = size; > > > temp_regs.edx = flags; > > > temp_regs.esi = MAP_PRIVATE | MAP_ANONYMOUS; > > > temp_regs.eip = temp_regs.esp - 4; > > > > > > if (ptrace(PTRACE_POKETEXT,exec_pid,(void > > > *)(temp_regs.eip),(void*)int_instr) < 0) > > > die_perror("ptrace(PTRACE_POKETEXT,%d,0x%.8x,INT 0x80) failed while > > > allocating memory",exec_pid,temp_regs.eip); > > > if (ptrace(PTRACE_SETREGS,exec_pid,NULL,&temp_regs) < 0) { > > > die_perror("ptrace(PTRACE_SETREGS,%d,...) failed while allocating > > > memory",exec_pid); > > > } > > > if (ptrace(PTRACE_SINGLESTEP,exec_pid,NULL,NULL) < 0) > > > die_perror("ptrace(PTRACE_SINGLESTEP,...) failed while executing > > > mmap2"); > > > > > > wait(&status); > > > if (WIFEXITED(status)) > > > die("Restarted process abrubtly (exited with value %d). Aborting > > > Restart.",WEXITSTATUS(status)); > > > else if (WIFSIGNALED(status)) > > > die("Restarted process abrubtly exited because of uncaught signal > > (%d). > > > Aborting Restart.",WTERMSIG(status)); > > > > > > if (ptrace(PTRACE_GETREGS,exec_pid,NULL,&temp_regs) < 0) { > > > die_perror("ptrace(PTRACE_GETREGS,...) failed after executing mmap2 > > > system call"); > > > } > > > > > > if (temp_regs.eax != addr) > > > warn("Wanted space at address 0x%.8x, mmap2 system call returned > > > 0x%.8x. This could be a problem.",addr,temp_regs.eax); > > > else if (cr_options.verbose) > > > fprintf(stdout,"Successfully allocated [0x%.8lx - > > > 0x%.8lx]\n",addr,addr+size); > > > > > > /* Restore original registers */ > > > if (ptrace(PTRACE_SETREGS,exec_pid,NULL,®s) < 0) { > > > die_perror("ptrace(PTRACE_SETREGS,...) when restoring registering > > after > > > allocating memory (mmap2)"); > > > } > > > } > > > > > > -- > > > Maninya > > > _______________________________________________ > > > freebsd-hackers@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > > To unsubscribe, send any mail to " > > freebsd-hackers-unsubscribe@freebsd.org" > > > > > > > -- > > John Baldwin > > > > > > -- > Maninya > -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 14:41:07 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 926C31065670; Thu, 29 Mar 2012 14:41:07 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from mail1.sol.net (mail1.sol.net [206.55.64.72]) by mx1.freebsd.org (Postfix) with ESMTP id 5E0328FC15; Thu, 29 Mar 2012 14:41:06 +0000 (UTC) Received: from aurora.sol.net (IDENT:jgreco@aurora.sol.net [206.55.70.98]) by mail1.sol.net (8.14.4/8.14.4/SNNS-1.04) with ESMTP id q2TDgggZ045118; Thu, 29 Mar 2012 08:42:43 -0500 (CDT) Received: (from jgreco@localhost) by aurora.sol.net (8.14.3/8.14.3/Submit) id q2TDggoG079149; Thu, 29 Mar 2012 08:42:42 -0500 (CDT) From: Joe Greco Message-Id: <201203291342.q2TDggoG079149@aurora.sol.net> To: adrian@freebsd.org (Adrian Chadd) Date: Thu, 29 Mar 2012 08:42:42 -0500 (CDT) In-Reply-To: X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Mark Felder , freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 14:41:07 -0000 > Hi, > > * have you filed a PR? > * is the crash easily reproducable? > * are you able to boot some ramdisk-only FreeBSD-8.2 images (eg create > a ramdisk image using nanobsd?) and do some stress testing inside > that? > > It sounds like you've established it's a storage issue, or at least > interrupt handling for storage issue. So I'd definitely try the > ramdisk-only boot and thrash it using lighttpd/httperf or something. > If that survives fine, I'd look at trying to establish whether there's > something wrong in the disk driver(s) freebsd is using. I'm not that > cluey on ESXi, but there may be some PIC/APIC/ACPI change between 7.x > and 8.0 which has caused this to surface. We've seen this. Or something that seems really like it. We run dozens of FreeBSD VM's, many of which are 8.mumble. We have a scripted build environment dating back many years, so generally servers come out in a fairly reproducible form. After several months of smooth running, we had need to shuffle some things around, and migrated some servers to a different datastore. Suddenly, one particular VM, our corp Jabber server, started randomly disconnecting people every morning. Some inspection showed that the machine was running, but disk I/O in the VM was freezing up. Subsequent inspection suggested that it was happening during the periodic daily, though we never managed to get it to happen by manually forcing periodic daily, so that's only a theory. Given that several times it appeared that one of the find commands was running, I was guessing that something in the thin provisioned disk image for the system had gone bad, but reading the entire disk with dd didn't cause a hang, running the periodic daily by hand didn't cause a hang, etc. Migrating the VM to a different host and datastore did not fix the issue. Migrating the VM from an Opteron to a Xeon host with all the latest ESXi 4 patches also didn't make any difference. Migrating the disk image from thin to full seemed to fix it, but I only gave it a day or two, then decided there were other good reasons to reload the VM, so I nuked the VM, which, of course, fixed it. In the meantime, a dozen other similar VM's alongside it run just fine. My conclusion was that it was something specific that had gone awry in the virtual machine, probably in the disk image, but I could not identify it without significant digging that I had no particular reason or inclination to do; since it appeared to be a VMware problem, the "reload it and be done with it" seemed the quickest path to resolution. That having been said, if anyone has any brilliant ideas about what would constitute useful further steps to isolate this, I can look at recovering the faulty VM from backup and seeing if it still exhibits the problem. ... JG -- Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net "We call it the 'one bite at the apple' rule. Give me one chance [and] then I won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN) With 24 million small businesses in the US alone, that's way too many apples. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 14:59:48 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72D44106566C; Thu, 29 Mar 2012 14:59:48 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.c2i.net [212.247.154.162]) by mx1.freebsd.org (Postfix) with ESMTP id 951848FC12; Thu, 29 Mar 2012 14:59:47 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 255628664; Thu, 29 Mar 2012 16:59:38 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Thu, 29 Mar 2012 16:58:16 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <201203291342.q2TDggoG079149@aurora.sol.net> In-Reply-To: <201203291342.q2TDggoG079149@aurora.sol.net> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203291658.16114.hselasky@c2i.net> Cc: freebsd-questions@freebsd.org, Adrian Chadd , Mark Felder , Joe Greco Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 14:59:48 -0000 On Thursday 29 March 2012 15:42:42 Joe Greco wrote: > > Hi, Do both 32- and 64-bit versions of FreeBSD crash? --HPS From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 15:01:10 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B00291065673; Thu, 29 Mar 2012 15:01:10 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from mail2.sol.net (mail2.sol.net [206.55.64.73]) by mx1.freebsd.org (Postfix) with ESMTP id 6A7E28FC15; Thu, 29 Mar 2012 15:01:10 +0000 (UTC) Received: from aurora.sol.net (IDENT:jgreco@aurora.sol.net [206.55.70.98]) by mail2.sol.net (8.14.4/8.14.4/SNNS-1.04) with ESMTP id q2TE1pH9062147; Thu, 29 Mar 2012 09:01:51 -0500 (CDT) Received: (from jgreco@localhost) by aurora.sol.net (8.14.3/8.14.3/Submit) id q2TE1pLt079422; Thu, 29 Mar 2012 09:01:51 -0500 (CDT) From: Joe Greco Message-Id: <201203291401.q2TE1pLt079422@aurora.sol.net> To: dougb@freebsd.org Date: Thu, 29 Mar 2012 09:01:51 -0500 (CDT) In-Reply-To: X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Mark Felder , freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 15:01:10 -0000 > On 3/28/2012 1:59 PM, Mark Felder wrote: > > FreeBSD 8-STABLE, 8.3, and 9.0 are untested > > As much as I'm sensitive to your production requirements, realistically > it's not likely that you'll get a helpful result without testing a newer > version. 8.2 came out over a year ago, many many things have changed > since then. > > Doug So you're saying that he should have been using 8.3-RELEASE, then. If you'll kindly go over to http://www.freebsd.org and look under "Latest Releases", please note that "8.2" is a production release. If you don't want it to be a production release, then find a way to make it so, but please don't snipe at people who are using the code that the FreeBSD project has indicated is a current production offering. There are many good reasons not to run arbitrary snapshots on your production gear. It's unrealistic to expect people to run non- RELEASE non-production code on their production gear. We can have that discussion if you don't understand that, drop me a note off- list and I'll be happy to explain it. Otherwise, you've told him to run a "newer version," of which NONE IS AVAILABLE, unless you're thinking 9.0, but FreeBSD has a rather catastrophic history of "point zero" releases, and most clueful admins won't run those in production without carefully measuring the risks and benefits. So you've basically told him to run a newer version without any such version being realistically available. WTF? You want people not to use releases that "came out over a year ago"? The generally sensible solution to that is to release RELEASEs more than once every fourteen or fifteen months. ... JG -- Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net "We call it the 'one bite at the apple' rule. Give me one chance [and] then I won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN) With 24 million small businesses in the US alone, that's way too many apples. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 15:16:13 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B666F1065673; Thu, 29 Mar 2012 15:16:13 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8AC918FC12; Thu, 29 Mar 2012 15:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=QtNT9CuE7s3EECKHrPvEloB7i4+AF+5F1dVY17t037c=; b=XI6C1ZjXrFZniyUvTFwI7Zr3QJ4Oh1GIk6e/noywBZNGpFZAhSWKuyqvlotRVUh0OSE2a/iHE023yQmkXS2wiEDSnu+qh3mYYkEt2EvF28VQ5xCP9qzBA1sxuLhHYXOu; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDH55-000GOj-8d; Thu, 29 Mar 2012 10:16:13 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333034161-20726-20725/5/16; Thu, 29 Mar 2012 15:16:01 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@FreeBSD.org References: <201203291342.q2TDggoG079149@aurora.sol.net> <201203291658.16114.hselasky@c2i.net> Date: Thu, 29 Mar 2012 10:16:00 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <201203291658.16114.hselasky@c2i.net> User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Hans Petter Selasky Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 15:16:13 -0000 On Thu, 29 Mar 2012 09:58:16 -0500, Hans Petter Selasky wrote: > Do both 32- and 64-bit versions of FreeBSD crash? Correct, we see both i386 and amd64 flavors crash in the same way. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 15:35:25 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CE2B1065674; Thu, 29 Mar 2012 15:35:25 +0000 (UTC) (envelope-from nec556@retena.com) Received: from resmaa13.ono.com (smtp13.ono.com [62.42.230.16]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2FA8FC16; Thu, 29 Mar 2012 15:35:24 +0000 (UTC) Received: from GogPortatil.retena.com (95.20.242.150) by resmaa13.ono.com (8.5.113) (authenticated as nec556@retena.com) id 4EFDA606014D4793; Thu, 29 Mar 2012 17:29:55 +0200 Message-ID: <4EFDA606014D4793@> (added by postmaster@resmaa13.ono.com) X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Thu, 29 Mar 2012 17:31:24 +0200 To: Mark Felder From: Eduardo Morras In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Antivirus: AVG for E-mail 2012.0.1913 [2114/4902] Cc: freebsd-hackers@freebsd.org, freebsd-questions@FreeBSD.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 15:35:25 -0000 At 16:03 29/03/2012, you wrote: >Alright, new data. It happened to crash about 10 minutes after I came in >this morning and I ran some stuff in the DDB. I have no idea what >information is useful, but perhaps someone will see something out of the >ordinary? > > >http://feld.me/freebsd/esx_crash/ Don't know about ESXi but on others VM Managers i can change the chipset emulation from ICH10 to ICH4. Can you change it to an older chipset too? >Thanks... From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 15:49:41 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B8B0106566C; Thu, 29 Mar 2012 15:49:41 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from mail2.sol.net (mail2.sol.net [206.55.64.73]) by mx1.freebsd.org (Postfix) with ESMTP id 4164E8FC18; Thu, 29 Mar 2012 15:49:40 +0000 (UTC) Received: from aurora.sol.net (IDENT:jgreco@aurora.sol.net [206.55.70.98]) by mail2.sol.net (8.14.4/8.14.4/SNNS-1.04) with ESMTP id q2TFnU5K063590; Thu, 29 Mar 2012 10:49:30 -0500 (CDT) Received: (from jgreco@localhost) by aurora.sol.net (8.14.3/8.14.3/Submit) id q2TFnUc7080406; Thu, 29 Mar 2012 10:49:30 -0500 (CDT) From: Joe Greco Message-Id: <201203291549.q2TFnUc7080406@aurora.sol.net> To: hselasky@c2i.net (Hans Petter Selasky) Date: Thu, 29 Mar 2012 10:49:30 -0500 (CDT) In-Reply-To: <201203291658.16114.hselasky@c2i.net> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Adrian Chadd , Mark Felder , freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 15:49:41 -0000 > On Thursday 29 March 2012 15:42:42 Joe Greco wrote: > > > Hi, > > Do both 32- and 64-bit versions of FreeBSD crash? We've only seen it happen on one virtual machine. That was a 32-bit version. And it's not so much a crash as it is a "disk I/O hang". The fact that it was happening regularly to that one VM, while a bunch of other similar VM's were running alongside it without any incident, along with the problem moving with the VM as it is moved from host to host and from Opteron to Xeon, strongly points at something being wrong with the VM itself. Our systems are built mostly by script; I rebuilt the VM a few months ago and the problem vanished. The rebuilt system "should" have been virtually identical to the original. I never actually compared them though. My working theory was that something bad had happened to the VM during a migration from one datastore to another. We have a really slow-writing iSCSI server that it had been migrated onto for a little bit, which was where the problem first appeared, I believe. At first I thought it was the nightly cron jobs just exceeding the iSCSI server's capacity to cope, so we migrated the VM onto a host with local datastores, and it remained broken thereafter. So my conclusion was that it seemed likely that somehow VMware's thin provisioned disk image had gotten fouled up, and under some unknown use case, it could be teased into locking up further I/O on the VM. I wasn't able to prove it. I tried a read-dd of the entire disk - passed, flying. I tried several things to duplicate the nightly periodic tasks where it seemed so prone to locking up. They all ran fine. But if I left the machine run, it'd do it again eventually. I explained it at the time to one of my VMware friends: > But here's where it gets weird. Three times, now, one VM - our Jabber > server - has gone wonky in the wee early AM hours. Disk I/O on the VM > just locks up. You can type at the console until it does I/O, so you > can put in "root" at the login: prompt but never get a pw prompt. My > systems all run "top" from /etc/ttys and I can see that a whole bunch > of processes are stopped in "getblk". It's like the iSCSI disk has gone > away, except it hasn't, since the other VM's are all happily churning > away, on the same datastore, on the same VMware host. http://www.sol.net/tmp/freebsd/freebsd-esxi-lockup.gif > Now it's *possible* that the problem actually happens after the 3AM cron > run (note slight CPU/memory drop) but the Jabber implosion actually > happens around 0530, see drop in memory%. But the root problem at the > VM level seems to be that disk I/O has frozen. I can't tell for sure when > that happens. All three instances are similar to this. > > I can't explain this or figure out how to debug it. Since it's locked up > right now, thought I'd ping you for ideas before resetting it. Now that was actually before we migrated it back to local datastore, but when we did, the problem remained, suggesting that whatever has happened to the VM, it is contained within the VM's vmdk or other files. ... JG -- Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net "We call it the 'one bite at the apple' rule. Give me one chance [and] then I won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN) With 24 million small businesses in the US alone, that's way too many apples. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 15:57:08 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2602A1065676; Thu, 29 Mar 2012 15:57:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id 4254F8FC19; Thu, 29 Mar 2012 15:57:06 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 258963190; Thu, 29 Mar 2012 17:56:59 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Thu, 29 Mar 2012 17:55:36 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <201203291549.q2TFnUc7080406@aurora.sol.net> In-Reply-To: <201203291549.q2TFnUc7080406@aurora.sol.net> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203291755.36651.hselasky@c2i.net> Cc: freebsd-questions@freebsd.org, Adrian Chadd , Mark Felder , Joe Greco Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 15:57:08 -0000 On Thursday 29 March 2012 17:49:30 Joe Greco wrote: > > On Thursday 29 March 2012 15:42:42 Joe Greco wrote: > > > > Hi, > > > > Do both 32- and 64-bit versions of FreeBSD crash? > > We've only seen it happen on one virtual machine. That was a 32-bit > version. And it's not so much a crash as it is a "disk I/O hang". It almost sounds like the lost interrupt issue I've seen with USB EHCI devices, though disk I/O should have a retry timeout? What does "wmstat -i" output? --HPS From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 16:13:04 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB3471065674; Thu, 29 Mar 2012 16:13:04 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 91F078FC27; Thu, 29 Mar 2012 16:13:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=2c0kHlszecUeXnBmcm+2Zra+4YlCwqf+DuwqwGygbqA=; b=X5ujxYo8/38i++eYwHZi6/ynmY4yVwC76h1WfWqU2IP/MStZFnxo8TjOvflEKhyBObARQEhR8VBpPMHH3OUJZRFziaMqVtvErRMT4xyUeX+dtcu9x56aqgCt+zCUIzZC; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDHTL-000H47-AC; Thu, 29 Mar 2012 10:41:11 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333035665-20726-20725/5/18; Thu, 29 Mar 2012 15:41:05 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org References: Date: Thu, 29 Mar 2012 10:41:04 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Eduardo Morras Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 16:13:04 -0000 On Thu, 29 Mar 2012 10:31:24 -0500, Eduardo Morras wrote: > > Don't know about ESXi but on others VM Managers i can change the chipset > emulation from ICH10 to ICH4. Can you change it to an older chipset too? Unfortunately there's no setting in the GUI for that but I'll keep looking to see if there's a hidden option -- perhaps in the VM's config file. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 16:16:01 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40BD51065675 for ; Thu, 29 Mar 2012 16:16:01 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id BDC6E8FC08 for ; Thu, 29 Mar 2012 16:16:00 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so2804666bkc.13 for ; Thu, 29 Mar 2012 09:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hbkX03STtOI5qMFPQoCmWXi3UXB15nN2phE4ORP2FQ0=; b=Km0zd3Ak65qaSR1csAKne/QWbzl2Wis1bgAwsz3tEpRuDqb3CxKrqjcb+E3ekfzCaX I7qsIZdDYG54qYW5yLu66ZnOAE9LcArD60ietgmh4zB73XPeYD11PFS1iNRb2u1tJeYb oITaCWJfDKgh4Mm5XIX8WAVL8tnxT42CDmRCgEs2yHAbu154jHK0NEaWCxFwB+wJ4qVJ Vzy8bft16FAtWodEYFpqEC/rCmdWfrY+OpuSAPhNUfE9PdyhJ9B/5fkZIcU83dAZIXAa jhDKRGZgh+Dfk+wUBJqVWl/FmMGmccQ+o5nWlPWEtjCagFzTpWc+lJMyZF3IjnoUKPQw /r0Q== MIME-Version: 1.0 Received: by 10.204.153.219 with SMTP id l27mr14562983bkw.126.1333037759381; Thu, 29 Mar 2012 09:15:59 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Thu, 29 Mar 2012 09:15:59 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Thu, 29 Mar 2012 09:15:59 -0700 (PDT) In-Reply-To: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> References: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> Date: Thu, 29 Mar 2012 16:15:59 +0000 Message-ID: From: Chris Rees To: "Chris.H" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Reverse engineering; How to... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 16:16:01 -0000 On 28 Mar 2012 21:23, "Chris.H" wrote: > > Greetings, > Over the past year, in an effort to convert my server farm to wireless, I've purchased some half a dozen USB wireless dongles, at a total cost of ~150.00. Unfortunately, none of them are (yet) supported =97 I know, I know= , I've already had this debate with both dev's, & users. On the up-side, I've devised a resource that will greatly assist would-be adopters in selecting, and researching these, and other adapters _currently supported_ under under FreeBSD. That said; the adapter I most recently purchased, is quite nice (Cisco(Linksys) AE2500 Wireless-N). > Boasts 2.5/5GHz @300Mbps. I figured (wrongly) because Linksys is so well supported on FreeBSD, that the likelihood of this being supported would be good. At any rate, given it's not, and because I _do_ have the Window$ drivers on the install CD. What are the possibilities I can reverse-engineer the drivers into a FreeBSD loadable module? > I can unpack the setup file to extract the .sys files. While I _could_ utilize the ndisulator to load them, that's not my goal. Should I unpack the .sys file, and attempt to decompile/disassemble it? Or attempt to load it, and dump it from memory? > =97 hacker/cracker advice _strongly_ desired =97 You've had great answers from a few people on the native driver front, but if you're desperate for a short term fix ndiswrapper has worked miracles for me in the past. Chris From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 16:27:42 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00D851065670; Thu, 29 Mar 2012 16:27:42 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id C9D508FC12; Thu, 29 Mar 2012 16:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=OgUiSRDFY6uvWK0DlzrRv2SWbHw2dnaKH4UPxJtCkRo=; b=Oq5W/har4j+fd6KPf4INeY+S8mqAkezW9PoLU2VtsdPPcQhNRKGFTITFzaqDfDxmSsaac5JlCIp39kS3V7NhzDRVPtkONaznlyAXFbVf3OFVT27NAyjDMbYxVIGflP54; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDICG-000IA5-9P; Thu, 29 Mar 2012 11:27:41 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333038455-20726-20725/5/20; Thu, 29 Mar 2012 16:27:35 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@FreeBSD.org References: <201203291549.q2TFnUc7080406@aurora.sol.net> <201203291755.36651.hselasky@c2i.net> Date: Thu, 29 Mar 2012 11:27:35 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <201203291755.36651.hselasky@c2i.net> User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Hans Petter Selasky Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 16:27:42 -0000 On Thu, 29 Mar 2012 10:55:36 -0500, Hans Petter Selasky wrote: > > It almost sounds like the lost interrupt issue I've seen with USB EHCI > devices, though disk I/O should have a retry timeout? > > What does "wmstat -i" output? > > --HPS Here's a server that has a week uptime and is due for a crash any hour now: root@server:/# vmstat -i interrupt total rate irq1: atkbd0 34 0 irq6: fdc0 9 0 irq15: ata1 34 0 irq16: em1 778061 1 irq17: mpt0 19217711 31 irq18: em0 283674769 460 cpu0: timer 246571507 400 Total 550242125 892 From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 16:34:15 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81872106564A; Thu, 29 Mar 2012 16:34:15 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 471468FC1B; Thu, 29 Mar 2012 16:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:To:Content-Type; bh=HJjClu8HgYP+a+wGeZEw3O0VCjjvrx/0QUiqkc7huXc=; b=ZU66DcldMHJlV2fUcEv18KQ9JmranSfcd/iQiGE/2WY+xz9HFD/JJi3qE/HlBcbpLmD4dDSzcrsQrfDZPpQskQHUhJxgr6eJqJyEzXIo4sqfQHdGpC2bhQSMy1WATWou; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDIIW-000IA5-Ar; Thu, 29 Mar 2012 11:34:07 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333038842-20726-20725/5/23; Thu, 29 Mar 2012 16:34:02 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org References: <201203291342.q2TDggoG079149@aurora.sol.net> <201203291658.16114.hselasky@c2i.net> <201203291549.q2TFnUc7080406@aurora.sol.net> Date: Thu, 29 Mar 2012 11:34:02 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <201203291549.q2TFnUc7080406@aurora.sol.net> User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 16:34:15 -0000 On Thu, 29 Mar 2012 10:49:30 -0500, Joe Greco wrote: > I explained it at the time to one of my VMware friends: This is 100% identical to what we see, Joe! And we're so unlucky that we have this happen on probably a dozen servers, but a handful are the really bad ones. We've rebuilt them from scratch many times with no improvement. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 16:43:42 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D16AB1065670; Thu, 29 Mar 2012 16:43:42 +0000 (UTC) (envelope-from kc5vdj.freebsd@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 72D608FC16; Thu, 29 Mar 2012 16:43:42 +0000 (UTC) Received: by ggnk4 with SMTP id k4so1984551ggn.13 for ; Thu, 29 Mar 2012 09:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=h/bAQkqeFv20XrTFvuwLogCff6PuWrAUfTUT65mamLw=; b=d4QoecpFCqJtBAlqSyFeMq0ryOup1o0oS+6S/WWtLjcEn0DiU+sxCT+3oaRlTtCi5Q YvCbHRwNSO4TEM4I/YM4pUPZK9YE2iv04Lc+c1A7iNOk9jyv8sfnwZEsbGTc3pqkaa/D NuT87FbF5ROVHnq75cXRccwo3N3jmVNYZV/vAbKUpMEPzaob/jB9KIMjr6uv7QCR3SqM ngklGX4oPa2bKocLO0nNb/llDHtFt41qR+y/lkuyGUZjVGlAvTeszrMymfkkinfQXHGt fll2/dZ7WD2NpLEVdhUcPAII/jgFM9nWxtOuDd6f9Rcla3fJ8JvgHhPHv+O6RuFsO/ce QMBQ== Received: by 10.60.1.4 with SMTP id 4mr43731334oei.28.1333039421551; Thu, 29 Mar 2012 09:43:41 -0700 (PDT) Received: from argus.electron-tube.net (173-28-218-168.client.mchsi.com. [173.28.218.168]) by mx.google.com with ESMTPS id vp14sm5212474oeb.5.2012.03.29.09.43.40 (version=SSLv3 cipher=OTHER); Thu, 29 Mar 2012 09:43:40 -0700 (PDT) Message-ID: <4F749141.8010109@gmail.com> Date: Thu, 29 Mar 2012 11:43:45 -0500 From: Jim Bryant User-Agent: Thunderbird 2.0.0.24 (X11/20100911) MIME-Version: 1.0 To: Mark Felder References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 16:43:42 -0000 This sounds just like a race condition that happens under Windows 7 on this laptop. The race condition, as far as I can tell involves heavy disk access and heavy network access, and usually leaves the drive light on, while all activity monitors (alldisk, allcpu, allnetwork) are still active, although on this laptop disk takes priority, and network slows to a crawl. occasionally, the mouse will stop working, along with everything else, but usually not. keyboard is lower priority, and doesn't do anything. You might want to check with mickeysoft, this might just be their problem. This sounds so freaking similar to the issue I get, and I think it's a race condition (shared interrupts??). This laptop is a Compaq Presario C300 series, with the 945GM chipset and a T7600 Core2 Duo CPU, with 3G of RAM. Mark Felder wrote: > Alright guys, I'm at the end of my rope here. For those that haven't > seen my previous emails here's the (not so) quick breakdown: > > Overview: > > FreeBSD ?? - 7.4 never crash > FreeBSD 8.0 - 8.2 crashes > FreeBSD 8-STABLE, 8.3, and 9.0 are untested (Sorry, not possible in > our production at this time, and we were hoping we could base some > stuff on 8.3 for long term stability...) > ESXi: Confirmed ESXi 4.0 - 5.0 has this problem. Haven't tested on > others. > > > History: > > Over the course of the last 2 years we've been banging our heads on > the wall. VMWare is done debugging this. They claim it's not a VMWare > issue. They can't identify what the heck happens. We had a glimmer of > hope with ESXi 5.0 fixing it because we never saw any crashes in the > handful of deployments, but our dreams were crushed today -- two days > before an outage to begin migration to ESXi 5.0 -- when a customer's > ESXi 5.0 server and FreeBSD 8.2 guest crashed. > > > Crash Details: > > The keyboard/mouse usually stops responding for input on the console; > normally we can't type in a username or password. However, we can > switch VTs. > > If there's a shell on the console and we can type, we can only run > things in memory. Any time we try to access the disk it will hang > indefinitely. > > The server still has network access. We can ping it without issue. SSH > of course kicks you out because it can't do any I/O. > > If we were to serve a lightweight http server off a memory backed > filesystem I'm confident it would run just fine as long as it wasn't > logging or anything. > > On ESXi you see that there is a CPU spike of 100% that goes on > indefinitely. No idea what the FreeBSD OS itself thinks it is doing > because we can't run top during the crash. > > This crash can affect a server and happen multiple times a week. It > can also not show up for 180 days or more. But it does happen. The > server can be 100% idle and crash. We have servers that do more I/O > than the ones that crash could ever attempt to do and these don't > crash at all. Completely inexplicable. > > > Things we've looked into: > > Nothing about the installed software matters. We've tried cross > referencing the crashed servers by the programs they run but the base > OS is the only common denominator due to the wide variety of servers > it has affected. > > Storage doesn't matter. We've tried different iSCSI SANs, we've tried > different switches, we've tried local datastores on the ESXi servers > themselves. > > HP servers, Dell servers -- doesn't seem to matter either. (All with > latest firmwares, BIOSes, etc) > > VMWare gave us a ton of debugging tasks, and we've given them > gigabytes of debugging info and data; they can't find anything. > > VMWare tools -- with, without, using open-vm-tools makes no > difference. I think we've done a fair job ruling out VMWare. > > > I think we've finally found enough data that this is definitely > something in the FreeBSD world. I'm going to begin prepping some of > the known crashy servers with more debugging. Any suggestions on what > I should build the kernel with? They never do a proper panic, but I > definitely want to at least *try* to get into the debugger the next > time it crashes. And when it crashes, what the heck should I be > running? I've never played with the KDB before... > > > Thank you for any suggestions and help you can give me.... > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 16:53:03 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6AC31065670; Thu, 29 Mar 2012 16:53:03 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 711788FC0A; Thu, 29 Mar 2012 16:53:03 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so423760pbc.13 for ; Thu, 29 Mar 2012 09:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=ygMI8sgrwYQMlKyI/jI7SjAob7XiQCRGlhvltif9IFo=; b=uRHiDNboJE3KaveXIoNs4XTD+lbDl4Ftn1sIW0CyyvLXlzsILfafwUFqaAjZ24R3gF d89M7VlqtQ5pdDCxJQ6wZPODcWF56yBAntS6JZ3Tvlh1rn+J9kMEP2j2BhHDI9Mhc+Mb dSSryGBfb864iArKTrfldlMJTqSNDWJv6dJ/l1TcbcFZz5OCX8jYzBB00hR6cOWDPo3k gGUZVUVFlyv2G3R/i+tIOneu+s3nQO9lBIinAG0TfnzN98vtyZJnEWzmFm3ZlXnXux4o KloPFEfjzkn/TjrH+mmRO6cUx4mbirhqAlPjp7V4fxdB5rvGPfPcMvTVFozltImu6XX2 yXNg== MIME-Version: 1.0 Received: by 10.68.134.101 with SMTP id pj5mr1444886pbb.48.1333039982800; Thu, 29 Mar 2012 09:53:02 -0700 (PDT) Received: by 10.68.228.168 with HTTP; Thu, 29 Mar 2012 09:53:02 -0700 (PDT) In-Reply-To: References: <201203291549.q2TFnUc7080406@aurora.sol.net> <201203291755.36651.hselasky@c2i.net> Date: Thu, 29 Mar 2012 11:53:02 -0500 Message-ID: From: Alan Cox To: Mark Felder Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org, Hans Petter Selasky Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: alc@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 16:53:03 -0000 On Thu, Mar 29, 2012 at 11:27 AM, Mark Felder wrote: > On Thu, 29 Mar 2012 10:55:36 -0500, Hans Petter Selasky > wrote: > >> >> It almost sounds like the lost interrupt issue I've seen with USB EHCI >> devices, though disk I/O should have a retry timeout? >> >> What does "wmstat -i" output? >> >> --HPS >> > > > Here's a server that has a week uptime and is due for a crash any hour now: > > root@server:/# vmstat -i > interrupt total rate > irq1: atkbd0 34 0 > irq6: fdc0 9 0 > irq15: ata1 34 0 > irq16: em1 778061 1 > irq17: mpt0 19217711 31 > irq18: em0 283674769 460 > cpu0: timer 246571507 400 > Total 550242125 892 > > Not so long ago, VMware implemented a clever scheme for reducing the overhead of virtualized interrupts that must be delivered by at least some (if not all) of their emulated storage controllers: http://static.usenix.org/events/atc11/tech/techAbstracts.html#Ahmad Perhaps, there is a bad interaction between this scheme and FreeBSD's mpt driver. Alan From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 17:00:09 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8135106566B for ; Thu, 29 Mar 2012 17:00:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.c2i.net [212.247.154.162]) by mx1.freebsd.org (Postfix) with ESMTP id 638BD8FC16 for ; Thu, 29 Mar 2012 17:00:09 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 255671443; Thu, 29 Mar 2012 19:00:07 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Thu, 29 Mar 2012 18:58:44 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.3-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> In-Reply-To: X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@ =?utf-8?q?d2+AyewRX=7DmAm=3BYp=0A=09=7CU=5B?=@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y> =?utf-8?q?Y=7Dk1C4TfysrsUI=0A=09-=25GU9V5=5DiUZF=26nRn9mJ=27=3F=26?=>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201203291858.44717.hselasky@c2i.net> Cc: "Chris.H" , Chris Rees Subject: Re: Reverse engineering; How to... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 17:00:10 -0000 On Thursday 29 March 2012 18:15:59 Chris Rees wrote: > On 28 Mar 2012 21:23, "Chris.H" wrote: > > Greetings, > > > > I can unpack the setup file to extract the .sys files. While I _could_ > > utilize the ndisulator to load them, that's not my goal. Should I unpack > the .sys file, and attempt to decompile/disassemble it? Or attempt to load > it, and dump it from memory? Hi, You could install a USB sniffer and figure out how the basic programming goes. Search for USB snoopy on Google. Or, install the driver from within VirtualBox. Then sniff your device using the "usbdump" utility. This approach should give you a very clear picture about what is going on. --HPS From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 17:10:09 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 948B9106564A for ; Thu, 29 Mar 2012 17:10:09 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id 45FD68FC08 for ; Thu, 29 Mar 2012 17:10:09 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SDIrN-0006y8-Hd for freebsd-hackers@freebsd.org; Thu, 29 Mar 2012 19:10:05 +0200 Received: from 208.85.208.53 ([208.85.208.53]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Mar 2012 19:10:05 +0200 Received: from atkin901 by 208.85.208.53 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Mar 2012 19:10:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Mark Atkinson Date: Thu, 29 Mar 2012 10:05:30 -0700 Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 208.85.208.53 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.3) Gecko/20120320 Thunderbird/10.0.3 In-Reply-To: X-Enigmail-Version: 1.4 Cc: freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 17:10:09 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03/29/2012 07:03, Mark Felder wrote: > Alright, new data. It happened to crash about 10 minutes after I > came in this morning and I ran some stuff in the DDB. I have no > idea what information is useful, but perhaps someone will see > something out of the ordinary? > > > http://feld.me/freebsd/esx_crash/ If this is an interrupt problem with disk i/o, then you might want to look into (DDB(4)) show intr show intrcount maybe show allrman -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk90lloACgkQrDN5kXnx8yaCZACbBamQksNyWC26PUsOn5N9LJLV ql0AoJwYCFDfXhCpZIN735V9qg0VepFf =fCLN -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 17:13:20 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 01F97106564A for ; Thu, 29 Mar 2012 17:13:20 +0000 (UTC) (envelope-from maheshbabu90@yahoo.co.in) Received: from nm23-vm2.bullet.mail.sg3.yahoo.com (nm23-vm2.bullet.mail.sg3.yahoo.com [106.10.151.65]) by mx1.freebsd.org (Postfix) with SMTP id 3DDC78FC08 for ; Thu, 29 Mar 2012 17:13:18 +0000 (UTC) Received: from [106.10.166.126] by nm23.bullet.mail.sg3.yahoo.com with NNFMP; 29 Mar 2012 17:10:39 -0000 Received: from [106.10.151.254] by tm15.bullet.mail.sg3.yahoo.com with NNFMP; 29 Mar 2012 17:10:39 -0000 Received: from [127.0.0.1] by omp1003.mail.sg3.yahoo.com with NNFMP; 29 Mar 2012 17:10:39 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 536462.67143.bm@omp1003.mail.sg3.yahoo.com Received: (qmail 87741 invoked by uid 60001); 29 Mar 2012 17:10:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s1024; t=1333041039; bh=WhAoKCkhJ4KLNBLG3zaXHIiUNlKkyLMeCxXcdJL06pU=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=5g5rIorjhPxZqYskxKoLJD5/lAu5yNr7NEkz7hMKF/kbDLhd+3wC1cnf1lswGXUsyGBU1twzVA2Z0QV8AAJGSYO/FdBNHJ+JtKuyoKK2WYFKfoWRnsSGCAh7TwAiTcnkmle97APyZsWQgBQ4mwS8fasK7GUUGYF1C4OPb6cY1kA= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=E4Pe61706eYm1HwAs1bPcmbY+QNkCs78cDIpUWLidg9kvDnL2bbfbgEBMYhg25CPLm4QWLFjf4S1uqDF1h3jEynveZIGVTqNQCk6JcIJYKEW2pbGZ67f8EoW6t4xRRSwHBET1RxtBDzU02r9EhdTE76sLUFJqY9D9VNVwma8sdg=; X-YMail-OSG: vsoVokYVM1nSblbVTiWvAE1PpKLfeCcV3bOXemxUayh9UNi GvqlGLqXubO7Mx4EIqkf3xN.Od30PSqGfjLarR_ej1CnD71NgcKC9cXnjFNI k4e606uo9HUSD_oYp1qLZV8bfxOXMvlD1Zx.Ewg5cMF6FWRfVMMKwb7cZNga Y3ulaHysZzDuhTOrXwT3cCDp40VybE0N796YfT.syJULDVTE2Ma_TCY4mQfe 6TDkL.I7yR8jZJu4rN4vJ.pMf2OqNrr1.1uz23nYVjiUstuGwWwJMoFQzgmL ndPjqM97CNQqQAPus1LePCikQphrtOXRz4F7FUYLie9Qb_.lAMzALb842Peq 447QXP.EsKzJiqCGROW3hG_N64JsPqTHw7ifRt27exRYgPIZvAXy39Iyl0lX as4r11Vxw Received: from [115.113.47.66] by web193202.mail.sg3.yahoo.com via HTTP; Fri, 30 Mar 2012 01:10:39 SGT X-Mailer: YahooMailWebService/0.8.117.340979 Message-ID: <1333041039.22864.YahooMailNeo@web193202.mail.sg3.yahoo.com> Date: Fri, 30 Mar 2012 01:10:39 +0800 (SGT) From: Mahesh Babu To: "freebsd-hackers@freebsd.org" MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 29 Mar 2012 17:20:47 +0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Regarding coredump and restart X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mahesh Babu List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 17:13:20 -0000 I am currently working on coredump and then restarting the process in FreeB= SD 9.=0A=0A=0AI have created the coredump file for a process using gcore of= gdb.=0A=0AI am not able restart the process from the coredump file.=0A=0AI= s there any ways to restart the process using gdb itself or any other ways = to implement restarting of the process from the coredump file?=0A=0A=0AThan= ks,=0AMahesh=0A From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 17:28:14 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 325601065676; Thu, 29 Mar 2012 17:28:14 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id D6CC28FC23; Thu, 29 Mar 2012 17:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=emgPWYOK+77W7Rja+EVBGyqjyN+hjs9k8BKIMxIlhjo=; b=bO7EWE/seVTeW1GmechDZq/17NAfHNLrl+I/ykU9LMCRz3nxT4TzzQz0cCYdujtnl2GvX3Rex74y3c/KHNLx7lwkQADMdzgLmnf7K31mecxWjYG/15GXrGcKxbd7CWhn; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDJ8u-000Jqv-Hg; Thu, 29 Mar 2012 12:28:13 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333042086-20726-20725/5/27; Thu, 29 Mar 2012 17:28:06 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@FreeBSD.org References: Date: Thu, 29 Mar 2012 12:28:05 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Mark Atkinson Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 17:28:14 -0000 On Thu, 29 Mar 2012 12:05:30 -0500, Mark Atkinson wrote: > > If this is an interrupt problem with disk i/o, then you might want to > look into (DDB(4)) > show intr > show intrcount > maybe > show allrman Thank you! I really don't know what things we should be running in DDB to diagnose this and we will try this upon the next crash. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 17:18:22 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3C24106564A for ; Thu, 29 Mar 2012 17:18:22 +0000 (UTC) (envelope-from maheshbabu90@yahoo.co.in) Received: from nm33-vm7.bullet.mail.sg3.yahoo.com (nm33-vm7.bullet.mail.sg3.yahoo.com [106.10.151.230]) by mx1.freebsd.org (Postfix) with SMTP id D788E8FC15 for ; Thu, 29 Mar 2012 17:18:21 +0000 (UTC) Received: from [106.10.166.112] by nm33.bullet.mail.sg3.yahoo.com with NNFMP; 29 Mar 2012 17:18:15 -0000 Received: from [106.10.150.27] by tm1.bullet.mail.sg3.yahoo.com with NNFMP; 29 Mar 2012 17:18:15 -0000 Received: from [127.0.0.1] by omp1028.mail.sg3.yahoo.com with NNFMP; 29 Mar 2012 17:18:15 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 615057.81853.bm@omp1028.mail.sg3.yahoo.com Received: (qmail 58330 invoked by uid 60001); 29 Mar 2012 17:18:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s1024; t=1333041495; bh=qn05gU/HCF0pBVihBAERJBAW2rTrx/vehpwSgo4GR1s=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=MOdFeV6HdY7JQY2f27afMn9RPiqaFheFw8dLo5pD0R87kz1wm/SB2CumIq5ccIJRyEv3nXBYbNeDv+Vuq/dxz9XhDcua6v3riBCyw70gWn0ov+qMOAUDUho779Dfhx76pWrIKQJ5ssyzB+5CCqUIGk8IA/tt88slBf67BgOiKw8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=U6arskHME3ZuwimkR5Yj4TdYgnEbQuYUSrXxMUHw/ffMUgccMX13LvLLv9FuMBLLut1qVqF1vvv5ZtGXoXp5LL6cNtYavvIzsDP79LrLYqWT/0zfSvvASyP4zpEHqZ+4Uyi64j/IvfxozAGcM7uoB2TE5rFsvrLtE/bPxJlbfLo=; X-YMail-OSG: vssp5HIVM1ksQu9wghJ2Irgahxsp9ReR7MGS4HpRuK2DJsm HByRb9OdX2WI33hc22WbtDa0qU_LfAG0hctoog.1GFy.VU0TlfCt6SZW3KMf STWmVKrdTtiClfvLlHi5WPXUq.omyFYxeBB9vqXGPVi7OVe3oLfnuyQ2VbFi nSdpK0WoDhWSY85Y2f6vvul5fECKhnUZ0Oxq35KEAed_fWAJFug.WVesblxP HNF1cJ_APLy9sudURbLvfsIcCT5ETh56IzJrit2TpReExpCJyI8NuRB4DGnM Aw5h8d9w6mFTCrvQfC_TMNeW0xIfw3nIX7VCdLQp7WCiwSrFsQZGzweuBADW J1PAgGfIRzfaYnfCPuoiXoF1.Ynp3z9ms2CYNP96jYEpxNCw0jbBjpNi4RLe hElCEFqZzb_et Received: from [115.113.47.66] by web193201.mail.sg3.yahoo.com via HTTP; Fri, 30 Mar 2012 01:18:15 SGT X-Mailer: YahooMailWebService/0.8.117.340979 Message-ID: <1333041495.92141.YahooMailNeo@web193201.mail.sg3.yahoo.com> Date: Fri, 30 Mar 2012 01:18:15 +0800 (SGT) From: Mahesh Babu To: "freebsd-hackers@freebsd.org" MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 29 Mar 2012 17:48:55 +0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Context Switch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mahesh Babu List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 17:18:22 -0000 Which part of the source code in FreeBSD 9 is responsible for making contex= t switching i.e. storing and restoring the process state.=0A From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 18:08:46 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A0F9106566B; Thu, 29 Mar 2012 18:08:46 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE6C8FC08; Thu, 29 Mar 2012 18:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Cc:Date:References:Subject:To:Content-Type; bh=BD4obHGT9ppxvMLZZKh3LKUVOtBil/d3MYBw1lObOYM=; b=pMy8NPGGZgL5sF4wHiyWZJs5uJeM4FBrkNFbkFVcrYS6dYBIv9ugpTrU0kyYZmtwI/1ZgbJTriYHJLFy1+cXw2j0okzu5V88UO6oj5jncoERwpI+xHw0T5IBtG0PPUd2; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDJm9-000KwF-B5; Thu, 29 Mar 2012 13:08:45 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333044519-20726-20725/5/28; Thu, 29 Mar 2012 18:08:39 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: FreeBSD , freebsd-hackers@freebsd.org References: <4F749141.8010109@gmail.com> <20120329132430.13dc08e7@scorpio> Date: Thu, 29 Mar 2012 13:08:39 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <20120329132430.13dc08e7@scorpio> User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: jerry@seibercom.net Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 18:08:46 -0000 On Thu, 29 Mar 2012 12:24:30 -0500, wrote: > > I just started reading this tread, but I am wondering if I missed > something here. What does this have to do with "Windows 7"? I emailed him off-list but I'm guessing he thought this was on VMWare Workstation or another product that would virtualize FreeBSD on top of Windows as the host OS. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 18:23:00 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B292106566B; Thu, 29 Mar 2012 18:23:00 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id D0F438FC14; Thu, 29 Mar 2012 18:22:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=L41xhzYIUziylE2npfuvjW7UKgbZ60c/QSWKj0eGJSs=; b=DDU2g36zHGaiYqnXW/gVMB8c0j4JtH334KN6nmwBtQk8OGI16MUXJ5d/9n+n6K3pvE43p9lMt/hHbyJn3SOzKOuF10K94RjaaK++50VDPHHNeKooOdo5/2AWmFOeo1Ex; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDJzp-000LKs-7F; Thu, 29 Mar 2012 13:22:58 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333045367-20726-20725/5/29; Thu, 29 Mar 2012 18:22:47 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org References: <201203291549.q2TFnUc7080406@aurora.sol.net> <201203291755.36651.hselasky@c2i.net> Date: Thu, 29 Mar 2012 13:22:46 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: alc@freebsd.org, Alan Cox Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 18:23:00 -0000 On Thu, 29 Mar 2012 11:53:02 -0500, Alan Cox wrote: > > Not so long ago, VMware implemented a clever scheme for reducing the > overhead of virtualized interrupts that must be delivered by at least > some > (if not all) of their emulated storage controllers: > > http://static.usenix.org/events/atc11/tech/techAbstracts.html#Ahmad > > Perhaps, there is a bad interaction between this scheme and FreeBSD's mpt > driver. > > Alan If we assume mpt is the culprit how can I go about diagnosing this more accurately? Is there something I should be looking for in vmstat -i? Too many interrupts? Not enough? Rate too high or too low? Or is this something that is much harder to track down because we're dealing with emulated hardware? If any BSD devs are interested in access to our environment I think we could comply. I might even be able to get authorization to give you an account on the most crash-prone server which doesn't have any sensitive customer data on it. I think at this point we'd even be willing to pay someone to look at a server in this state just so we (and hopefully others) can benefit.... and hopefully we end up with a more reliable FreeBSD-on-VMWare for everyone. I know Doug mentioned running newer OS versions and that is definitely tempting but because it's not 100% reproducible on demand it's hard to prove it fixes it without waiting 6 months. We're fighting internally here with "trust 9.0 fixes it" vs "jump back to 7.4 because we KNOW it doesn't happen there". Having someone look at this and say "oh, yes, that's a deficiency in mpt that appears to be fixed in the newer driver that was MFC'd to 8-STABLE and you'll find in 8.3-RELEASE and 9.0-RELEASE" would be more comforting. Thanks to everyone for their time on this! From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 20:10:23 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDB771065670 for ; Thu, 29 Mar 2012 20:10:23 +0000 (UTC) (envelope-from dieterbsd@engineer.com) Received: from mailout-us.gmx.com (mailout-us.gmx.com [74.208.5.67]) by mx1.freebsd.org (Postfix) with SMTP id 8253B8FC14 for ; Thu, 29 Mar 2012 20:10:23 +0000 (UTC) Received: (qmail 995 invoked by uid 0); 29 Mar 2012 19:17:37 -0000 Received: from 67.206.186.239 by rms-us012.v300.gmx.net with HTTP Content-Type: text/plain; charset="utf-8" Date: Thu, 29 Mar 2012 15:17:34 -0400 From: "Dieter BSD" Message-ID: <20120329191735.155070@gmx.com> MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Authenticated: #74169980 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: GNAGb/dd3zOlNR3dAHAhrbh+IGRvb0BN Subject: mlock(2) man page errata X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 20:10:23 -0000 mlock(2) says: > A single process can mlock() the minimum of a system-wide > ``wired pages'' limit and the per-process RLIMIT_MEMLOCK > resource limit. Shouldn't this say maximum rather than minimum? > [EAGAIN] Locking the indicated range would exceed either the > system or per-process limit for locked memory. > > [ENOMEM] Some portion of the indicated address range is not > allocated. There was an error faulting/mapping a page. In some cases, the code returns ENOMEM if the limit is exceeded. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 20:16:25 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 311C7106567E; Thu, 29 Mar 2012 20:16:25 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from mail1.sol.net (mail1.sol.net [206.55.64.72]) by mx1.freebsd.org (Postfix) with ESMTP id E9B978FC08; Thu, 29 Mar 2012 20:16:24 +0000 (UTC) Received: from aurora.sol.net (IDENT:jgreco@aurora.sol.net [206.55.70.98]) by mail1.sol.net (8.14.4/8.14.4/SNNS-1.04) with ESMTP id q2TKGGFX053716; Thu, 29 Mar 2012 15:16:16 -0500 (CDT) Received: (from jgreco@localhost) by aurora.sol.net (8.14.3/8.14.3/Submit) id q2TKGFmA083082; Thu, 29 Mar 2012 15:16:15 -0500 (CDT) From: Joe Greco Message-Id: <201203292016.q2TKGFmA083082@aurora.sol.net> To: hselasky@c2i.net (Hans Petter Selasky) Date: Thu, 29 Mar 2012 15:16:15 -0500 (CDT) In-Reply-To: <201203291755.36651.hselasky@c2i.net> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Adrian Chadd , Mark Felder , freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 20:16:25 -0000 > On Thursday 29 March 2012 17:49:30 Joe Greco wrote: > > > On Thursday 29 March 2012 15:42:42 Joe Greco wrote: > > > > > Hi, > > > > > > Do both 32- and 64-bit versions of FreeBSD crash? > > > > We've only seen it happen on one virtual machine. That was a 32-bit > > version. And it's not so much a crash as it is a "disk I/O hang". > > It almost sounds like the lost interrupt issue I've seen with USB EHCI > devices, though disk I/O should have a retry timeout? That doesn't seem to fit. Why would a perfectly functional VM suddenly develop this problem when given a slow underlying datastore (fits so far) but then the problem *remains* when returned to a fast local datastore, even on a different host and architecture? And why wouldn't the other VM's running alongside develop the same problem? > What does "wmstat -i" output? No idea, we reloaded the VM months ago. ... JG -- Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net "We call it the 'one bite at the apple' rule. Give me one chance [and] then I won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN) With 24 million small businesses in the US alone, that's way too many apples. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 20:20:19 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A002A10657EB for ; Thu, 29 Mar 2012 20:20:19 +0000 (UTC) (envelope-from dieterbsd@engineer.com) Received: from mailout-us.gmx.com (mailout-us.gmx.com [74.208.5.67]) by mx1.freebsd.org (Postfix) with SMTP id 450E78FC16 for ; Thu, 29 Mar 2012 20:20:16 +0000 (UTC) Received: (qmail 26259 invoked by uid 0); 29 Mar 2012 17:53:50 -0000 Received: from 67.206.186.239 by rms-us002.v300.gmx.net with HTTP Content-Type: text/plain; charset="utf-8" Date: Thu, 29 Mar 2012 13:53:49 -0400 From: "Dieter BSD" Message-ID: <20120329175350.155040@gmx.com> MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Authenticated: #74169980 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: +cQGb/Rd3zOlNR3dAHAhKd9+IGRvbwDo Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 20:20:19 -0000 > FreeBSD ?? - 7.4 never crash > FreeBSD 8.0 - 8.2 crashes Obvious short term workaround is to run production on 7.4 (assuming you can) until you figure out what is wrong with 8.x. What filesystem(s) are you running? UFS? ZFS? other? > started randomly disconnecting people every morning Due to timeouts? Something might be keeping interrupts disabled too long. > there were other good reasons to reload the > VM, so I nuked the VM, which, of course, fixed it. > I can look at recovering the faulty VM from backup Sounds like corruption.  Can you compare the bad VM against a good one?  If you find corruption, the question then becomes what is causing the corruption?  Sounds like the same thing is getting corrupted every time, rather than something at random. Sounds like the corruption is causing a deadlock in something common, like the buffer cache, or filesystem, or... Is it possible to have root be a ramdisk?  This might give you access to the utilities, depending on where the problem is. I have vague memories that the sticky bit used to lock a program in memory, but sticky(8) indicates that this is no longer the case. Is there a way to lock a program in memory? (So that it will be available when the system can't do disk i/o.)  If not, you could keep some windows open with things like top and systat -vmstat running. Some of the utilities have options to look at a disk file rather than the live system, if you can get a core dump (swap to NFS?). From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 20:44:58 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B167F106566B for ; Thu, 29 Mar 2012 20:44:58 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0498FC12 for ; Thu, 29 Mar 2012 20:44:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:To:Content-Type; bh=au5i0dXzh7xIWORJs/W0Stg98VtkpRMkaVi00H9Gu/M=; b=s0dpuU4Q9uGPkaukNXDsFt+4cv/GOYTLjlKxrHYEsyd1Vqtmyu0dGyGeE3ZwmoNlLfEH7Uv3tBL9OllTL9F29iA36AtK7ufZ+bK3gjxE2eHIjFEW1a7iSEzztuRH15H1; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDMDI-0001Rk-Em for freebsd-hackers@freebsd.org; Thu, 29 Mar 2012 15:44:57 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333053890-20726-20725/5/30; Thu, 29 Mar 2012 20:44:50 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org References: <20120329175350.155040@gmx.com> Date: Thu, 29 Mar 2012 15:44:50 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <20120329175350.155040@gmx.com> User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 20:44:58 -0000 On Thu, 29 Mar 2012 12:53:49 -0500, Dieter BSD wrote: >> FreeBSD ?? - 7.4 never crash >> FreeBSD 8.0 - 8.2 crashes > > Obvious short term workaround is to run production on 7.4 (assuming you > can) > until you figure out what is wrong with 8.x. We're moving our most critical servers to 7.4 this weekend. After finally seeing the crash on ESXi 5.0 we have run out of viable options and we haven't had time to test FreeBSD 9.0 or 8.3 pre-release code. > > What filesystem(s) are you running? UFS? ZFS? other? > Only UFS. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 20:53:54 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 901F0106566C; Thu, 29 Mar 2012 20:53:54 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id E655A8FC14; Thu, 29 Mar 2012 20:53:53 +0000 (UTC) Received: by wern13 with SMTP id n13so1673490wer.13 for ; Thu, 29 Mar 2012 13:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zzR8T3qEHZscmAxN7nBVG9oUvkTcuTODxK+72C9ztMc=; b=JglZpA/eB2E3kn91qdiTDeOylC5nddnHLSEOOY0fAoxVbOZ6Q41MkjL9SpMwFzrKzi dOiLsC75hLcVHgzoBaEE6XGUfmCyo1lEyGETGbOcRKkARqSiLRAy7nShuIwRltAt8xL2 D+VL53C/If82hm9WDw3NbgbbDyTtJZNc4VsRCfoPqjO0YQNGjKh/5clR4GLmOVVUxSzm Abe9fxw+rlQ0T/7lTT2LkiqfggGHOSmiBUWQGg9r/AZCpAJOFfhZSug3i9l3mzvF8E3K HEokmM9h9CM/nJIzjyZsTWGR+8hmFQBwNCR6XmZl2bzCbylTCj+UStOyD7okbX67ktww jhJw== MIME-Version: 1.0 Received: by 10.180.102.102 with SMTP id fn6mr9244527wib.10.1333054432671; Thu, 29 Mar 2012 13:53:52 -0700 (PDT) Received: by 10.223.94.73 with HTTP; Thu, 29 Mar 2012 13:53:52 -0700 (PDT) In-Reply-To: References: <201203291549.q2TFnUc7080406@aurora.sol.net> <201203291755.36651.hselasky@c2i.net> Date: Thu, 29 Mar 2012 15:53:52 -0500 Message-ID: From: Adam Vande More To: Mark Felder Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 20:53:54 -0000 On Thu, Mar 29, 2012 at 1:22 PM, Mark Felder wrote: > > If we assume mpt is the culprit > Doesn't VMWare offer different types of emulated disk controllers? If so, that might be the easiest way to narrow the field. Another thing maybe to try would be to backport the mpt Also, it's not VMWare's place to claim "not our problem" when you are paying for support. If this doesn't happen on bare metal, it's a VMWare issue, or they need to demonstrate it's not their issue. At least that would be the expectation I have. There is also a comment on this post indicating someone else with the issue and who has received unofficial vmware feedback. http://www.hailang.me/tech/virtual/freebsd-vmware-esx-a-weird-error-with-san-storage/ And then there is this one with similar symptoms and a workaround: http://forums.freebsd.org/showthread.php?t=27899 -- Adam Vande More From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 21:40:49 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9917B106564A for ; Thu, 29 Mar 2012 21:40:49 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta02.emeryville.ca.mail.comcast.net (qmta02.emeryville.ca.mail.comcast.net [76.96.30.24]) by mx1.freebsd.org (Postfix) with ESMTP id 78DE38FC0C for ; Thu, 29 Mar 2012 21:40:49 +0000 (UTC) Received: from omta10.emeryville.ca.mail.comcast.net ([76.96.30.28]) by qmta02.emeryville.ca.mail.comcast.net with comcast id rZeX1i0010cQ2SLA2ZfiFs; Thu, 29 Mar 2012 21:39:42 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta10.emeryville.ca.mail.comcast.net with comcast id rZfh1i00H4NgCEG8WZfiY0; Thu, 29 Mar 2012 21:39:42 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q2TLddnN044296; Thu, 29 Mar 2012 15:39:40 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Mahesh Babu In-Reply-To: <1333041039.22864.YahooMailNeo@web193202.mail.sg3.yahoo.com> References: <1333041039.22864.YahooMailNeo@web193202.mail.sg3.yahoo.com> Content-Type: text/plain; charset="us-ascii" Date: Thu, 29 Mar 2012 15:39:39 -0600 Message-ID: <1333057179.1111.50.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" Subject: Re: Regarding coredump and restart X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 21:40:49 -0000 On Fri, 2012-03-30 at 01:10 +0800, Mahesh Babu wrote: > I am currently working on coredump and then restarting the process in FreeBSD 9. > > > I have created the coredump file for a process using gcore of gdb. > > I am not able restart the process from the coredump file. > > Is there any ways to restart the process using gdb itself or any other ways to implement restarting of the process from the coredump file? > > > Thanks, > Mahesh A coredump does not contain the entire state of a process, it only contains the part of the state that is contained within memory belonging to the process. Other parts of the state can exist outside of that memory. For example, in open disk files, in the corresponding state of another process at the other end of a socket connection, and so on. Bringing back the memory image will not bring back the corresponding state in external resources. -- Ian From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 29 22:07:57 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F7461065670; Thu, 29 Mar 2012 22:07:57 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id E1EC58FC12; Thu, 29 Mar 2012 22:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Content-Transfer-Encoding:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=0Z91cJ7cu6JXBVRWd4Zkfxa6wwHBJJnj2Hr66vxdsTQ=; b=P5Sp4SjhY9Qdi7AoO3zNhrP4pCy4TO+RFxdwUdTxX36QZlLT3Rqod6ausHx0kozZAcUtakTXv8mjY1w/a6Ea1rjUJbG5C8u6F79dQqTnUcjMEZCQhQEpdSK/Yw0IQl3D; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDNVa-0003cj-98; Thu, 29 Mar 2012 17:07:56 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333058867-20726-20725/5/32; Thu, 29 Mar 2012 22:07:47 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@FreeBSD.org References: <201203291549.q2TFnUc7080406@aurora.sol.net> <201203291755.36651.hselasky@c2i.net> Date: Thu, 29 Mar 2012 17:07:47 -0500 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Mark Felder Message-Id: In-Reply-To: User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Adam Vande More Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 22:07:57 -0000 On Thu, 29 Mar 2012 15:53:52 -0500, Adam Vande More =20 wrote: > > Doesn't VMWare offer different types of emulated disk controllers? If = =20 > so, > that might be the easiest way to narrow the field. Another thing = maybe =20 > to > try would be to backport the mpt Yes, they offer Paravirtual (not applicable for FreeBSD), LSI Parallel =20 (default option), LSI SAS, and Buslogic (not available for 64bit). Both LSI SAS and LSI Parallel use the mpt driver. > > Also, it's not VMWare's place to claim "not our problem" when you are > paying for support. If this doesn't happen on bare metal, it's a = VMWare > issue, or they need to demonstrate it's not their issue. At least that > would be the expectation I have. You're right, but we've thrown a ton of money at their support and had =20 direct phone access to their engineers. The best we can get out of them = is =20 "no indication this is a VMWare problem". It's easy for them to blow =20 people off when they're as big as they've grown to be. > There is also a comment on this post indicating someone else with the =20 > issue > and who has received unofficial vmware feedback. > > http://www.hailang.me/tech/virtual/freebsd-vmware-esx-a-weird-error-wit= h-san-storage/ I found that post ages ago and that's me, "mf", as the only person to =20 comment on it. Unfortunately our problem does not align with what he's =20 describing. > > And then there is this one with similar symptoms and a workaround: > > http://forums.freebsd.org/showthread.php?t=3D27899 > I'm now investigating those loader.conf options. I have my crashy = machine =20 set to use them on next boot so we'll see if it crashes now that I'm = using =20 LSI SAS emulated controller. If it still crashes, we'll see what happens = =20 after that with those loader.conf options enabled. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 00:13:01 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 7C08F1065670; Fri, 30 Mar 2012 00:13:01 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 4701F150480; Fri, 30 Mar 2012 00:13:01 +0000 (UTC) Message-ID: <4F74FA8C.8060108@FreeBSD.org> Date: Thu, 29 Mar 2012 17:13:00 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Joe Greco References: <201203291401.q2TE1pLt079422@aurora.sol.net> In-Reply-To: <201203291401.q2TE1pLt079422@aurora.sol.net> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Mark Felder , freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 00:13:01 -0000 On 3/29/2012 7:01 AM, Joe Greco wrote: >> On 3/28/2012 1:59 PM, Mark Felder wrote: >>> FreeBSD 8-STABLE, 8.3, and 9.0 are untested >> >> As much as I'm sensitive to your production requirements, realistically >> it's not likely that you'll get a helpful result without testing a newer >> version. 8.2 came out over a year ago, many many things have changed >> since then. >> >> Doug > > So you're saying that he should have been using 8.3-RELEASE, then. That isn't what I said at all, sorry if I wasn't clear. The OP mentioned 9.0-RELEASE, and in the context of his message (which I snipped) he mentioned 8-stable. That's what I was referring to. > If you'll kindly go over to http://www.freebsd.org and look under > "Latest Releases", please note that "8.2" is a production release. > If you don't want it to be a production release, then find a way > to make it so, but please don't snipe at people who are using the > code that the FreeBSD project has indicated is a current production > offering. > > There are many good reasons not to run arbitrary snapshots on your > production gear. It's unrealistic to expect people to run non- > RELEASE non-production code on their production gear. We can have > that discussion if you don't understand that, drop me a note off- > list and I'll be happy to explain it. I can see that you're upset about something, sorry if my message caused you additional stress. I actually understand the realities of production environments quite well, and believe it or not I agree with some of your frustration about how we handle support for our "supported" releases. We've had various public threads about these issues, which have sparked some quite-lively private discussions amongst our committers, and I'm hoping that once the long-overdue 8.3-RELEASE is out we'll be able to buckle down and start putting some of those ideas into action. Meanwhile, this is still a volunteer project, and as a result sometimes the best way to get attention to a problem is to verify that it hasn't already been fixed. You've been around more than long enough to understand this Joe. We can spend time arguing about what *should* be (actually we can't ...) but my point was in trying to help the OP get the most/best help the fastest way possible. Doug From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 00:27:36 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 443A4106564A; Fri, 30 Mar 2012 00:27:36 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from mail1.sol.net (mail1.sol.net [206.55.64.72]) by mx1.freebsd.org (Postfix) with ESMTP id DC92A8FC08; Fri, 30 Mar 2012 00:27:35 +0000 (UTC) Received: from aurora.sol.net (IDENT:jgreco@aurora.sol.net [206.55.70.98]) by mail1.sol.net (8.14.4/8.14.4/SNNS-1.04) with ESMTP id q2U0RW7N058640; Thu, 29 Mar 2012 19:27:32 -0500 (CDT) Received: (from jgreco@localhost) by aurora.sol.net (8.14.3/8.14.3/Submit) id q2U0RVZS085304; Thu, 29 Mar 2012 19:27:31 -0500 (CDT) From: Joe Greco Message-Id: <201203300027.q2U0RVZS085304@aurora.sol.net> To: feld@feld.me (Mark Felder) Date: Thu, 29 Mar 2012 19:27:31 -0500 (CDT) In-Reply-To: X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 00:27:36 -0000 > > And then there is this one with similar symptoms and a workaround: > > > > http://forums.freebsd.org/showthread.php?t=3D27899 > > I'm now investigating those loader.conf options. I have my crashy machine > set to use them on next boot so we'll see if it crashes now that I'm using > LSI SAS emulated controller. If it still crashes, we'll see what happens > after that with those loader.conf options enabled. Um, if I may, that's something completely different. VMDirectPath, or PCIe passthru, is making a hardware device on a VMware host available directly to a guest. It'll take your LSI controller, in the example cited, and make it unavailable to VMware ESXi, and present it instead inside the guest environment. You do this when you have an app whose performance would suffer greatly when made to operate through the indirection that a VM naturally lives in; for example, it is quite common for FreeNAS users to pass a disk controller through to a VM guest in order to allow a virtualized FreeNAS instance to directly manage the physical disks. In that case, there are some issues with ESXi and interrupt delivery to the guest VM; virtualization doesn't actually get rid of the possibility of ESXi problems, since the hypervisor is still ultimately involved. It is certainly possible that there's some common issue involving interrupt delivery somehow, but I wouldn't get my hopes up. It also doesn't explain the experience here, where one VM basically crapped out but only after a migration - and then stayed crapped out. It would be interesting to hear about your datastore, how busy it is, what technology, whether you're using thin, etc. I just have this real strong feeling that it's some sort of corruption with the vmfs3 and thin provisioned disk format, but it'd be interesting to know if that's totally off-track. ... JG -- Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net "We call it the 'one bite at the apple' rule. Give me one chance [and] then I won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN) With 24 million small businesses in the US alone, that's way too many apples. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 00:47:50 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69C3F106566B; Fri, 30 Mar 2012 00:47:50 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3097E8FC16; Fri, 30 Mar 2012 00:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=9p4s/1itnCxpchoFGNrjfFOq0EzEyG3izZCZBVoQUEE=; b=UeV1TvdcRx2Dc3ZG7iUphhdp0Fnvks8xxl2rH+6uiuKkRT1wLc3lzjU9m6NySWvfJES3qMKTqGsNexM/deAqJk8ybR97t0tsm5cn5dSYMlDwC6NeW4bXj7PJ4lcR6pYB; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDQ0K-0007oP-43; Thu, 29 Mar 2012 19:47:49 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333068462-20726-20725/5/33; Fri, 30 Mar 2012 00:47:42 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@FreeBSD.org References: <201203300027.q2U0RVZS085304@aurora.sol.net> Date: Thu, 29 Mar 2012 19:47:29 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <201203300027.q2U0RVZS085304@aurora.sol.net> User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Joe Greco Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 00:47:50 -0000 On Thu, 29 Mar 2012 19:27:31 -0500, Joe Greco wrote: > It also doesn't explain the experience here, where one VM basically > crapped out but only after a migration - and then stayed crapped out. > It would be interesting to hear about your datastore, how busy it is, > what technology, whether you're using thin, etc. I just have this real > strong feeling that it's some sort of corruption with the vmfs3 and thin > provisioned disk format, but it'd be interesting to know if that's > totally off-track. We've ruled out SAN, but we haven't ruled out VMFS. Even FreeBSD Guests on standalone ESXi servers with no SAN exhibit this crash. For the record, we only use thick provisioning and if it was corruption I'm not sure what layer the corruption could be at. The crashy servers show no abnormalities when I run either `freebsd-update IPS` or `pkg_libchk` to confirm checksums of all installed programs. Now the other data on there... it's not exactly verified, but our backups via rsnapshot seem to prove there is no issue there or we'd have lots of new files each run. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 01:13:56 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BFD6106564A for ; Fri, 30 Mar 2012 01:13:56 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 30C758FC0A for ; Fri, 30 Mar 2012 01:13:55 +0000 (UTC) Received: by wibhj6 with SMTP id hj6so96041wib.13 for ; Thu, 29 Mar 2012 18:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=V5f866Fk+gy22ebK4dusBYsFrhgTVQ+iEUBMQDqpLbw=; b=oUiAKdEm2AaIW70iKoZURXrxxASY+0aBb9kjYzdRJI40I2qy9LU/H+m/P4d3/4LiRv a/rbHy8HNBTj7abPC5H09afXHhwV0tpVaeS/MKAbGtS4B28CJG6GszetnGUiuL1emW4c U7ZGsIlPLB439J2j78irqwh1PmdxtC7hDULDn7MJsDXlOzJs0YCOGHQWfnlMrF1ET0PV nY2WCBq1PabTJrL5Aa9ggDznOIwzkSEg75Jyv2CeUa9CxM18tOhCTMvPYep9HYYXSgjk NpUrkJj3xhNitYfCGGZzUKra8z5/qgVcoKPtJQokeA54K1QuVsMQhw8n4a/RmhRulpjr SMJg== MIME-Version: 1.0 Received: by 10.180.81.37 with SMTP id w5mr777295wix.16.1333070035096; Thu, 29 Mar 2012 18:13:55 -0700 (PDT) Received: by 10.180.79.137 with HTTP; Thu, 29 Mar 2012 18:13:55 -0700 (PDT) In-Reply-To: <20120329191735.155070@gmx.com> References: <20120329191735.155070@gmx.com> Date: Thu, 29 Mar 2012 21:13:55 -0400 Message-ID: From: Ryan Stone To: Dieter BSD Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: mlock(2) man page errata X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 01:13:56 -0000 On Thu, Mar 29, 2012 at 3:17 PM, Dieter BSD wrote: > mlock(2) says: > >> A single process can mlock() the minimum of a system-wide >> ``wired pages'' limit and the per-process RLIMIT_MEMLOCK >> resource limit. > > Shouldn't this say maximum rather than minimum? I don't think so. The minimum of the two would be the limit that you will hit first, and presumably is the point at which you cannot mlock any more pages. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 02:38:32 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E69EB1065670 for ; Fri, 30 Mar 2012 02:38:32 +0000 (UTC) (envelope-from tzabal@it.teithe.gr) Received: from alpha.it.teithe.gr (alpha.it.teithe.gr [195.251.240.232]) by mx1.freebsd.org (Postfix) with ESMTP id 617538FC18 for ; Fri, 30 Mar 2012 02:38:31 +0000 (UTC) Received: from localhost (babel.noc.teithe.gr [195.251.240.240]) by alpha.it.teithe.gr (8.14.3/8.14.3/Debian-9.4) with ESMTP id q2U2SWx8011390; Fri, 30 Mar 2012 05:28:33 +0300 Received: from 37.32.239.86 ([37.32.239.86]) by webmail.teithe.gr (Horde Framework) with HTTP; Fri, 30 Mar 2012 05:28:32 +0300 Message-ID: <20120330052832.84204zm2y6un8ehc@webmail.teithe.gr> Date: Fri, 30 Mar 2012 05:28:32 +0300 From: tzabal@it.teithe.gr To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.9) Subject: GSoC Project: Automated kernel crash reporting system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 02:38:33 -0000 Hello Community, I am interested in participating in Google Summer of Code 2012 with the FreeBSD Project. From the IdeasPage (http://wiki.freebsd.org/IdeasPage) I found the project "Automated kernel crash reporting system". After reading its description I decided to work on it because I think that it will benefit the FreeBSD development process in many ways, but mainly by providing more feedback to the developers. I have started working on it approximately before 1 week. First I contacted Xin Li, Howard Su and Gavin Atkinson because they are listed as appropriate contacts in the section Contact Info of the project, and now I would like to ask the community for any feedback before submitting my proposal in the GSoC website. I created a page that describes my technical view about the project and it will be part of my proposal. It does not contain any actual code, but an overview of the whole project (specification) and a plan on how I will work on it. It can be found in this address: http://aetos.it.teithe.gr/~tzabal/gsoc/akcrs.html Any comments are more than welcome. Thank you in advance, Tzanetos Balitsaris ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 04:48:31 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F7361065678; Fri, 30 Mar 2012 04:48:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id ED9FB8FC0C; Fri, 30 Mar 2012 04:48:30 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so1312200pbc.13 for ; Thu, 29 Mar 2012 21:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=3dacrXfTE4Dg8wfXnJwWVKoBu1Iz5O3D+oyN7SrZMuE=; b=gDeVv7pNK4FV9DG6X+TBTV4rgQPeisnwZB+vL+CR8uvGFi9yW5hI2WsyBb/fgldy0r gIFpKt1MPaQSMGgvVRT3yjqyN5rVbhfx4WCwPPTOw05tv6+svST6dMGL16b17dk9Odst CrPp1h/cW6+P6aAVOIeKO55PckVvcUZiHsAEaLo9Me1GHPLzotdU5QQ8OV4+u2Z273YR 08/oFk16/tRb/an7nIw1JtG7domppP6NpxkBJyOK4p82yIs0Y4DfERVtiTeuhm1W/bAF drjNpAAVHJ21nT1kiqmsSmMU9W+AmmUzc7ZtnTFDfuMTwsxwIdrbV0ZsU5x1Q2idvs66 Qj1g== MIME-Version: 1.0 Received: by 10.68.213.202 with SMTP id nu10mr5700413pbc.37.1333082910394; Thu, 29 Mar 2012 21:48:30 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.143.33.5 with HTTP; Thu, 29 Mar 2012 21:48:30 -0700 (PDT) In-Reply-To: References: <201203300027.q2U0RVZS085304@aurora.sol.net> Date: Thu, 29 Mar 2012 21:48:30 -0700 X-Google-Sender-Auth: -UFPX1kx74a2vgImmp6dWXfr7Uc Message-ID: From: Adrian Chadd To: Mark Felder Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org, Joe Greco Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 04:48:31 -0000 Again, it's starting to sound like an interrupt handling issue which may or may not be limited to the storage device. You'll have to engage someone who knows those device drivers and likely have them add some debugging to the driver which can be easily flipped on (via binaries in a ramdisk - very important if you can't run sysctl because your disk IO has locked up!) to see what the current state of things. It's likely that the BSD mpt(4) and other storage drivers, and/or our interrupt handling code, is just slightly different enough to confuse the snot out of VMWare. I'd first look at the obvious - (eg, if you've just stopped receiving interrupts, even if new IO is scheduled). I'd also ask VMware if they have any tools that they can run on a VM to get the state of the internal emulated driver. For example, register dumps of the device to see if it's in a hung state, register dumps of the PIC/APIC to see what state they're in, etc. Maybe pull in someone like ixsystems and see if they can help debug this kind of stuff? If you're paying vmware for support, you could pull them into things with ixsystems and see if the two of them can help you sort this out? Thanks, Adrian From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 04:49:36 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9DE84106564A for ; Fri, 30 Mar 2012 04:49:36 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4D4A18FC0A for ; Fri, 30 Mar 2012 04:49:36 +0000 (UTC) Received: by iahk25 with SMTP id k25so575987iah.13 for ; Thu, 29 Mar 2012 21:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:cc:subject:message-id:references:mime-version :in-reply-to:content-type:content-disposition; bh=CwevVlp3RD1n8nUAVAf2YWaVbDt+ThkL8Djel27pLSs=; b=BAAlOjLevF9MZ7gFitokWltfa8LNIbR/79pBAM9a0lSYXQcpnESrcWsK+yCh454fkv 8HUjycnMRzjFlYgYk1UdWZDJLhs+rZ3tFGpz0/iyJH7zYFswl3HGJiawolGh3T6v0R8A HH4shUUApkVukGA9sEesSupE9Jmh5Ry/xnhII= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :in-reply-to:x-gm-message-state:content-type:content-disposition; bh=CwevVlp3RD1n8nUAVAf2YWaVbDt+ThkL8Djel27pLSs=; b=CnTHrTR/VR8mp/9ms3i2OAoZwKSZLA/KhrXlL+lRmdaVLBdcmhRmxFDB8A3htoZHop ljPihinqSHbWxzmzF4qXWl9rPvmGtxGxlp5FRZglOL3QyyoZDCIaapolrxlTfGvxeRUE /cmx9CjhTOeMqF6Tn3O0wujyVuX8AJo+0IhyrUVQ3hOe+QSmUY6X3jLsezFyMcPW+7WB 6wkDVLhF7K/j4lsgbBWb+JpPEWaSuhyVsRFu1tF/yTjwem0kwNbtC50RK5nT2RX/bdby KPPZFru0dr6VNaUrAVprfm8vWsiBfoKL3iWAIYnkecPb/eG4GiaNL7V8y3mJ2y/NcoBD wUcA== Received: by 10.43.48.65 with SMTP id uv1mr358916icb.57.1333082975695; Thu, 29 Mar 2012 21:49:35 -0700 (PDT) Received: from DataIX.net (adsl-99-181-151-192.dsl.klmzmi.sbcglobal.net. [99.181.151.192]) by mx.google.com with ESMTPS id nq4sm1154567igc.5.2012.03.29.21.49.34 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Mar 2012 21:49:35 -0700 (PDT) Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id q2U4nWM5088564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Mar 2012 00:49:33 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jhellenthal@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id q2U4nVhu087953; Fri, 30 Mar 2012 00:49:31 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Fri, 30 Mar 2012 00:49:31 -0400 From: Jason Hellenthal To: Anton Shterenlikht Message-ID: <20120330044931.GA4154@DataIX.net> References: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> <4F73758D.3040000@brandonfa.lk> <20120329082027.GA68062@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 In-Reply-To: <20120329082027.GA68062@mech-cluster241.men.bris.ac.uk> X-Gm-Message-State: ALoCoQku3IAoENUQZ4MfH9VOg1qs/0jfLmXATVHhYzws52YKjakbJV2rCSQ5ea2WxXUxHojWtH07 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: freebsd-hackers@freebsd.org, "Chris.H" , Brandon Falk Subject: Re: Reverse engineering; How to... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 04:49:36 -0000 On Thu, Mar 29, 2012 at 09:20:27AM +0100, Anton Shterenlikht wrote: > On Wed, Mar 28, 2012 at 04:33:17PM -0400, Brandon Falk wrote: > > Reverse engineering a whole driver could take a very long time, even with the > > proper tools. If it's possible, return the adapter, and buy a new one and verify > > that the chipset is supported before you buy it. Last time I bought a wireless > > card I sat in the store looking at the Wireless support list for BSD before buying. > > > > http://www.freebsd.org/relnotes/CURRENT/hardware/support.html#WLAN > > > > I very strongly suggest that you get a card with an Atheros chipset, as those > > are by far the best supported on BSD. > > sure, but how? > > I've tried very hard to get a pccard with > an atheros chip, but you just can't trust > the label. Guides like e.g. this: http://atheros.rapla.net/ > are unreliable. I've bought several > cards, which supposedly have an atheros > chip in them, only to discover they had > something else inside. > > Can you recommend a pccard model that is guaranteed > to have a supported atheros chip inside? > Linksys WMP110 -- ;s =; From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 08:50:00 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4EDB7106564A for ; Fri, 30 Mar 2012 08:50:00 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 04CFE8FC0C for ; Fri, 30 Mar 2012 08:49:59 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SDXHM-0001IC-P2; Fri, 30 Mar 2012 09:34:03 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SDXGZ-0007PC-P5; Fri, 30 Mar 2012 09:33:03 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q2U8X3mr017451; Fri, 30 Mar 2012 09:33:03 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q2U8X2mQ017450; Fri, 30 Mar 2012 09:33:02 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Fri, 30 Mar 2012 09:33:02 +0100 From: Anton Shterenlikht To: Jason Hellenthal Message-ID: <20120330083302.GC17411@mech-cluster241.men.bris.ac.uk> References: <942975b7-aa54-416d-b049-a50563bbf2a7@email.android.com> <4F73758D.3040000@brandonfa.lk> <20120329082027.GA68062@mech-cluster241.men.bris.ac.uk> <20120330044931.GA4154@DataIX.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120330044931.GA4154@DataIX.net> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, Anton Shterenlikht , "Chris.H" , Brandon Falk Subject: Re: Reverse engineering; How to... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 08:50:00 -0000 On Fri, Mar 30, 2012 at 12:49:31AM -0400, Jason Hellenthal wrote: > > > On Thu, Mar 29, 2012 at 09:20:27AM +0100, Anton Shterenlikht wrote: > > On Wed, Mar 28, 2012 at 04:33:17PM -0400, Brandon Falk wrote: > > > Reverse engineering a whole driver could take a very long time, even with the > > > proper tools. If it's possible, return the adapter, and buy a new one and verify > > > that the chipset is supported before you buy it. Last time I bought a wireless > > > card I sat in the store looking at the Wireless support list for BSD before buying. > > > > > > http://www.freebsd.org/relnotes/CURRENT/hardware/support.html#WLAN > > > > > > I very strongly suggest that you get a card with an Atheros chipset, as those > > > are by far the best supported on BSD. > > > > sure, but how? > > > > I've tried very hard to get a pccard with > > an atheros chip, but you just can't trust > > the label. Guides like e.g. this: http://atheros.rapla.net/ > > are unreliable. I've bought several > > cards, which supposedly have an atheros > > chip in them, only to discover they had > > something else inside. > > > > Can you recommend a pccard model that is guaranteed > > to have a supported atheros chip inside? > > > > Linksys WMP110 Sorry, I was asking about a Pccard (for a laptop). This is PCI. -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 13:36:12 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C3C0106564A for ; Fri, 30 Mar 2012 13:36:12 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-qa0-f42.google.com (mail-qa0-f42.google.com [209.85.216.42]) by mx1.freebsd.org (Postfix) with ESMTP id CAEB68FC1D for ; Fri, 30 Mar 2012 13:36:11 +0000 (UTC) Received: by qafi31 with SMTP id i31so499094qaf.15 for ; Fri, 30 Mar 2012 06:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=I48UusXnvdCISul1KXXNKF+jI3NyN0u3kp0ppYBpsI4=; b=Kgb93yy8XOoDgsjfT/kO4wkYEWX2W5xX7YjwGJxSeYHRQ9MYesfxZTkBE9sejOCFAE 3pNNxIl8mYOpPJDfcZNMetadtuLnrMnnpTZ/+6HulrEtuSmxYj29B9z3HlhRZFw9Trme 69Ah9wTqdRnDe1EmxA33V/TvEuzag2ldQIkbaN73VdtDeXSg9z2Fi+u97+isAtd5DK3h 4/VHE5wQeksGluP/cmr6w3fakAJqcyd+TSD+tlMTP4w5plgFefBhXBAiuwVhfd6Nno0F OZrj6xz9j69MDs8u6tjFOvjWH27ZAzBwbA/Nc07I0Qrku9bhHv3OdR0O7eUh+fqxg3FP lF6A== MIME-Version: 1.0 Received: by 10.229.136.200 with SMTP id s8mr865748qct.9.1333114570796; Fri, 30 Mar 2012 06:36:10 -0700 (PDT) Sender: giovanni.trematerra@gmail.com Received: by 10.229.36.14 with HTTP; Fri, 30 Mar 2012 06:36:10 -0700 (PDT) In-Reply-To: <1333041495.92141.YahooMailNeo@web193201.mail.sg3.yahoo.com> References: <1333041495.92141.YahooMailNeo@web193201.mail.sg3.yahoo.com> Date: Fri, 30 Mar 2012 15:36:10 +0200 X-Google-Sender-Auth: 6EqUXwQHpj0TjRZqOXSiGfNudJ8 Message-ID: From: Giovanni Trematerra To: Mahesh Babu Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-hackers@freebsd.org" Subject: Re: Context Switch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 13:36:12 -0000 On Thu, Mar 29, 2012 at 7:18 PM, Mahesh Babu wrote: > Which part of the source code in FreeBSD 9 is responsible for making context switching i.e. storing and restoring the process state. > Context switch is split up in machine indipendent code (MI Code) and machine dependent code (MD Code) For MI part take a look at mi_switch in sys/kern/kern_sync.c sched_switch in sys/kern/sched_ule.c and sys/kern_4bsd.c depending on configurated scheduler in the kernel config file. For MD part search for symbol cpu_switch inside the specific arch directory. -- Gianni From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 14:24:02 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37DE6106564A; Fri, 30 Mar 2012 14:24:02 +0000 (UTC) (envelope-from hans@beastielabs.net) Received: from mail.beastielabs.net (beasties.demon.nl [82.161.3.114]) by mx1.freebsd.org (Postfix) with ESMTP id A30828FC17; Fri, 30 Mar 2012 14:24:00 +0000 (UTC) Received: from merom.hotsoft.nl (merom.hotsoft.nl [192.168.0.12]) by mail.beastielabs.net (8.14.5/8.14.5) with ESMTP id q2UEKCi1030926; Fri, 30 Mar 2012 16:20:13 +0200 (CEST) (envelope-from hans@beastielabs.net) Message-ID: <4F75C11C.3060002@beastielabs.net> Date: Fri, 30 Mar 2012 16:20:12 +0200 From: Hans Ottevanger User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: Mahesh Babu References: <1333041495.92141.YahooMailNeo@web193201.mail.sg3.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" , Giovanni Trematerra Subject: Re: Context Switch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 14:24:02 -0000 On 03/30/12 15:36, Giovanni Trematerra wrote: > On Thu, Mar 29, 2012 at 7:18 PM, Mahesh Babu wrote: >> Which part of the source code in FreeBSD 9 is responsible for making context switching i.e. storing and restoring the process state. >> > > Context switch is split up in machine indipendent code (MI Code) and > machine dependent code (MD Code) > > For MI part take a look at > mi_switch in sys/kern/kern_sync.c > sched_switch in sys/kern/sched_ule.c and sys/kern_4bsd.c depending on > configurated scheduler in the kernel config file. > > For MD part search for symbol cpu_switch inside the specific arch directory. > For background information you could read "The Book" (a bit dated but still quite relevant): http://www.informit.com/store/product.aspx?isbn=0201702452 And you are especially lucky, since the chapter that is the most relevant to you is freely available on-line: http://www.informit.com/articles/article.aspx?p=366888 Kind regards, Hans Ottevanger From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 14:42:09 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 376D11065678; Fri, 30 Mar 2012 14:42:09 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from mail1.sol.net (mail1.sol.net [206.55.64.72]) by mx1.freebsd.org (Postfix) with ESMTP id CF4CC8FC14; Fri, 30 Mar 2012 14:42:08 +0000 (UTC) Received: from aurora.sol.net (IDENT:jgreco@aurora.sol.net [206.55.70.98]) by mail1.sol.net (8.14.4/8.14.4/SNNS-1.04) with ESMTP id q2UEfrqW075204; Fri, 30 Mar 2012 09:41:53 -0500 (CDT) Received: (from jgreco@localhost) by aurora.sol.net (8.14.3/8.14.3/Submit) id q2UEfqIE097518; Fri, 30 Mar 2012 09:41:52 -0500 (CDT) From: Joe Greco Message-Id: <201203301441.q2UEfqIE097518@aurora.sol.net> To: dougb@FreeBSD.org (Doug Barton) Date: Fri, 30 Mar 2012 09:41:52 -0500 (CDT) In-Reply-To: <4F74FA8C.8060108@FreeBSD.org> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, Mark Felder , freebsd-questions@FreeBSD.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 14:42:09 -0000 > On 3/29/2012 7:01 AM, Joe Greco wrote: > >> On 3/28/2012 1:59 PM, Mark Felder wrote: > >>> FreeBSD 8-STABLE, 8.3, and 9.0 are untested > >> > >> As much as I'm sensitive to your production requirements, realistically > >> it's not likely that you'll get a helpful result without testing a newer > >> version. 8.2 came out over a year ago, many many things have changed > >> since then. > >> > >> Doug > > > > So you're saying that he should have been using 8.3-RELEASE, then. > > That isn't what I said at all, sorry if I wasn't clear. The OP mentioned > 9.0-RELEASE, and in the context of his message (which I snipped) he > mentioned 8-stable. That's what I was referring to. And since both the poster and I made it clear that this doesn't seem to be a case of "it fails reliably on a machine of your choosing", just installing random other versions and hoping that it's going to cause a fail ... well, let's just say that doesn't make a whole lot of sense. Or at least it's a recipe for a hell of a lot of busywork, busywork not guaranteed to return any sort of useful result. What you suggest is a fine solution for "My ASUS Sempron box fails when I do X!" -- in such a case, "Try a different version of FreeBSD" makes lots of sense. The problem is, in a virtualization environment, theoretically the virtual hosts are all the same sort of hardware (modulo any specific configuration changes of course), so when someone presents a problem that afflicts only a percentage of their VM's, it is important to keep in mind that you are not interacting with physical hardware, and that reinstalling an OS on a "problem" VM...? Well, let's just say I like real hardware better for many reasons. In the meantime, it's unrealistic to tell people to use supported releases, to wait fifteen months between releases, and then to criticize people complaining about problems with a supported release for "using old code". ... JG -- Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net "We call it the 'one bite at the apple' rule. Give me one chance [and] then I won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN) With 24 million small businesses in the US alone, that's way too many apples. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 14:45:00 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8809106566C; Fri, 30 Mar 2012 14:45:00 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from mail2.sol.net (mail2.sol.net [206.55.64.73]) by mx1.freebsd.org (Postfix) with ESMTP id 8CDA08FC0A; Fri, 30 Mar 2012 14:45:00 +0000 (UTC) Received: from aurora.sol.net (IDENT:jgreco@aurora.sol.net [206.55.70.98]) by mail2.sol.net (8.14.4/8.14.4/SNNS-1.04) with ESMTP id q2UEilR2081441; Fri, 30 Mar 2012 09:44:47 -0500 (CDT) Received: (from jgreco@localhost) by aurora.sol.net (8.14.3/8.14.3/Submit) id q2UEilmj097567; Fri, 30 Mar 2012 09:44:47 -0500 (CDT) From: Joe Greco Message-Id: <201203301444.q2UEilmj097567@aurora.sol.net> To: feld@feld.me (Mark Felder) Date: Fri, 30 Mar 2012 09:44:47 -0500 (CDT) In-Reply-To: X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 14:45:00 -0000 > On Thu, 29 Mar 2012 19:27:31 -0500, Joe Greco wrote: > > > It also doesn't explain the experience here, where one VM basically > > crapped out but only after a migration - and then stayed crapped out. > > It would be interesting to hear about your datastore, how busy it is, > > what technology, whether you're using thin, etc. I just have this real > > strong feeling that it's some sort of corruption with the vmfs3 and thin > > provisioned disk format, but it'd be interesting to know if that's > > totally off-track. > > We've ruled out SAN, but we haven't ruled out VMFS. Even FreeBSD Guests on > standalone ESXi servers with no SAN exhibit this crash. > > For the record, we only use thick provisioning and if it was corruption > I'm not sure what layer the corruption could be at. The crashy servers > show no abnormalities when I run either `freebsd-update IPS` or > `pkg_libchk` to confirm checksums of all installed programs. Now the other > data on there... it's not exactly verified, but our backups via rsnapshot > seem to prove there is no issue there or we'd have lots of new files each > run. Crud, there goes part of my theory :-) Have you migrated these hosts, or were they installed in-place and never moved? fwiw the apparent integrity of things on the VM is consistent with our experience too. ... JG -- Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net "We call it the 'one bite at the apple' rule. Give me one chance [and] then I won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN) With 24 million small businesses in the US alone, that's way too many apples. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 14:51:26 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 271EC1065673; Fri, 30 Mar 2012 14:51:26 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id E10488FC17; Fri, 30 Mar 2012 14:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=o4Ce77kmHr3KnMtdiWZITrJaJitx5eitxIblFPBzrqY=; b=Uxr0MBW58BQiw7SuZTO2rLE+aoFQKbYHnCxAB43B5819hYfGOr1tOynQp5V7qHibqSm8nHJb79Q3GwW0vsj1rwaHpBD8sc/49LTbAnP1YmPi1K8p7fo7pBIaPrqdxbeF; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDdAe-0004zs-FC; Fri, 30 Mar 2012 09:51:25 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333119074-20726-20725/5/35; Fri, 30 Mar 2012 14:51:14 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@FreeBSD.org References: <201203300027.q2U0RVZS085304@aurora.sol.net> <201203301444.q2UEilmj097567@aurora.sol.net> Date: Fri, 30 Mar 2012 09:51:14 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <201203301444.q2UEilmj097567@aurora.sol.net> User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Joe Greco Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 14:51:26 -0000 On Fri, 30 Mar 2012 09:44:47 -0500, Joe Greco wrote: > Have you migrated these hosts, or were they installed in-place and > never moved? > fwiw the apparent integrity of things on the VM is consistent with > our experience too. VMMotion and StorageVMMotion does not seem to affect the stability. Even deleting the VM, rebuilding from scratch, re-installing all packages from scratch, copying over a few configs and then copying in any other data (perhaps website data) does not solve the problem. However, our two most notorious for crashing happen to be webservers. We moved one to hardware. We simply rsync'd the exact data (entire OS and files) off the VM onto hardware, made a few config changes (fstab, network interface) and it's been running for 4+ months now with zero crashes. I don't think it's corruption :/ From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 16:53:14 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1A88106566B; Fri, 30 Mar 2012 16:53:14 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from mail1.sol.net (mail1.sol.net [206.55.64.72]) by mx1.freebsd.org (Postfix) with ESMTP id 462EF8FC1F; Fri, 30 Mar 2012 16:53:13 +0000 (UTC) Received: from aurora.sol.net (IDENT:jgreco@aurora.sol.net [206.55.70.98]) by mail1.sol.net (8.14.4/8.14.4/SNNS-1.04) with ESMTP id q2UGrAT1077862; Fri, 30 Mar 2012 11:53:11 -0500 (CDT) Received: (from jgreco@localhost) by aurora.sol.net (8.14.3/8.14.3/Submit) id q2UGrAEY098765; Fri, 30 Mar 2012 11:53:10 -0500 (CDT) From: Joe Greco Message-Id: <201203301653.q2UGrAEY098765@aurora.sol.net> To: feld@feld.me (Mark Felder) Date: Fri, 30 Mar 2012 11:53:10 -0500 (CDT) In-Reply-To: X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 16:53:14 -0000 > On Fri, 30 Mar 2012 09:44:47 -0500, Joe Greco wrote: > > Have you migrated these hosts, or were they installed in-place and > > never moved? > > fwiw the apparent integrity of things on the VM is consistent with > > our experience too. > > VMMotion and StorageVMMotion does not seem to affect the stability. Even > deleting the VM, rebuilding from scratch, re-installing all packages from > scratch, copying over a few configs and then copying in any other data > (perhaps website data) does not solve the problem. On the same vmdk files? "Deleting the VM" makes it sound like not. > However, our two most notorious for crashing happen to be webservers. We > moved one to hardware. We simply rsync'd the exact data (entire OS and > files) off the VM onto hardware, made a few config changes (fstab, network > interface) and it's been running for 4+ months now with zero crashes. That part doesn't shock me at all. > I don't think it's corruption :/ Then it is hard to see what it is. >From my perspective: We had a perfectly functional, nearly zero-traffic VM, since Jabber traffic averages no more than a few messages per hour. It was working for quite some time. We moved it from a local datastore to an iSCSI datastore that ended up getting periodically crushed by the load (in particular during the periodic daily load imposed by a bunch of VM's all running at once). At this point, this one VM started hanging on I/O. We expected that this would clear up upon return to a host with a local datastore. It did not. This ended up as a broken VM, one that would hang up overnite, maybe not every night, but several times a week at least. But wait: None of the other VM's, even the VM's that had been abused in this horribly insensitive manner of being placed on intolerably slow iSCSI, developed this condition. There are dozens of other VM's running on these hosts, alongside the one that was exhibiting this behaviour. The VM continued to exhibit this behaviour even after having been moved onto a different ESXi platform and architecture (Opteron->Xeon). For the problem to "follow" the VM in this manner, and afflict *only* the one VM, strongly suggests that it is something that is contained within the VM files that constitute this VM. That is consistent with the observation that the problem arose at a point where the VM is known to have had all those files moved from one location to a dodgy location. That's why I believe the evidence points to corruption of some sort. Of course, your case makes this all interesting. ... JG -- Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net "We call it the 'one bite at the apple' rule. Give me one chance [and] then I won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN) With 24 million small businesses in the US alone, that's way too many apples. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 17:12:43 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 933B9106566B; Fri, 30 Mar 2012 17:12:43 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 574898FC08; Fri, 30 Mar 2012 17:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=HNh4+lFCp7YHA6nqBBsBT3YjTTPmBu3RxFmFbbgPmAU=; b=Ha/oAjvHKRwM0jiQ14d0MzyGWYYhEYJJxMidcVtX1HkJOdZ2uqxgfXJIsMGTQK/2OGFV3tL5w04Un0Dxnru5PxRgT/a/zW6vBV7CT6MWsH/+n9icuK0hhLQvYWIrDIxn; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDfNR-0008f8-5t; Fri, 30 Mar 2012 12:12:42 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333127555-20726-20725/5/37; Fri, 30 Mar 2012 17:12:35 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org References: <201203300027.q2U0RVZS085304@aurora.sol.net> <201203301444.q2UEilmj097567@aurora.sol.net> <201203301653.q2UGrAEY098765@aurora.sol.net> Date: Fri, 30 Mar 2012 12:12:35 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <201203301653.q2UGrAEY098765@aurora.sol.net> User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Joe Greco Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 17:12:43 -0000 On Fri, 30 Mar 2012 11:53:10 -0500, Joe Greco wrote: > On the same vmdk files? "Deleting the VM" makes it sound like not. Fresh new VMDK files every time, and always thick provisioned. > None of the other VM's, even the VM's that had been abused in this > horribly insensitive manner of being placed on intolerably slow iSCSI, > developed this condition. We've seen similar results. Baffling how VMs you know are worse off never develop this condition. > There are dozens of other VM's running on these hosts, alongside the > one that was exhibiting this behaviour. > The VM continued to exhibit this behaviour even after having been moved > onto a different ESXi platform and architecture (Opteron->Xeon). > For the problem to "follow" the VM in this manner, and afflict *only* > the one VM, strongly suggests that it is something that is contained > within the VM files that constitute this VM. That is consistent with > the observation that the problem arose at a point where the VM is > known to have had all those files moved from one location to a dodgy > location. We were hoping that was the explanation as well, but rebuilding the VM entirely from scratch on a new host and seeing the crash come back was a big blow to morale. :( > That's why I believe the evidence points to corruption of some sort. > Of course, your case makes this all interesting. For the last year I've been convinced it's something hidden inside ESXi's I/O virtualization layer that happens to trigger on only certain VMs. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 18:11:04 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0613106566B; Fri, 30 Mar 2012 18:11:04 +0000 (UTC) (envelope-from kc5vdj.freebsd@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 71EBB8FC0A; Fri, 30 Mar 2012 18:11:04 +0000 (UTC) Received: by yenl9 with SMTP id l9so639731yen.13 for ; Fri, 30 Mar 2012 11:11:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=JcvIZoKxuWZqLyCWgwKDXR3J1aisKNxb3SBIRtOQlmI=; b=WHsy+d/t0Gq6AHBxySJG5Fr0/mNa+G4A/+/RfTAqLhUzPO4otyGJd9+Y9sQFFCc+gQ RbGzmH5H5pLB0dkshEYLRMjN0XkWBnfrvPGasH4jnYD8MxFkrRqg0ATcFbbf1efn6NgC hGcnKrhDWoYglK1EK08HpxzAv3d80zUt/Y4UmjY01jwWUqecbXpLw0PGwFP/SGciilsM vhRunywk8YUdd5AKNoAT8EFMgSdb3gusAJjq6qmDRecmi2rLnrJ1ZWCPTDfYwqOqHrdn sVZbjzP92vd0rlJLGdmedsqb28ecacEFzvq9OQYJtKKH1jpuMey5WAQu2UpetKcNcb4G Ds0A== Received: by 10.50.184.166 with SMTP id ev6mr45058igc.63.1333131063460; Fri, 30 Mar 2012 11:11:03 -0700 (PDT) Received: from argus.electron-tube.net (173-28-218-168.client.mchsi.com. [173.28.218.168]) by mx.google.com with ESMTPS id vr4sm9946845igb.1.2012.03.30.11.10.57 (version=SSLv3 cipher=OTHER); Fri, 30 Mar 2012 11:11:02 -0700 (PDT) Message-ID: <4F75F732.30308@gmail.com> Date: Fri, 30 Mar 2012 13:10:58 -0500 From: Jim Bryant User-Agent: Thunderbird 2.0.0.24 (X11/20100911) MIME-Version: 1.0 To: Mark Felder References: <4F749141.8010109@gmail.com> <20120329132430.13dc08e7@scorpio> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, jerry@seibercom.net, FreeBSD Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 18:11:04 -0000 Mark Felder wrote: > On Thu, 29 Mar 2012 12:24:30 -0500, wrote: > >> >> I just started reading this tread, but I am wondering if I missed >> something here. What does this have to do with "Windows 7"? > > I emailed him off-list but I'm guessing he thought this was on VMWare > Workstation or another product that would virtualize FreeBSD on top of > Windows as the host OS. > _______________________________________________ > Correct...My bad. jim From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 21:17:24 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEB08106564A for ; Fri, 30 Mar 2012 21:17:24 +0000 (UTC) (envelope-from dieterbsd@engineer.com) Received: from mailout-us.gmx.com (mailout-us.gmx.com [74.208.5.67]) by mx1.freebsd.org (Postfix) with SMTP id 85BED8FC14 for ; Fri, 30 Mar 2012 21:17:24 +0000 (UTC) Received: (qmail 16147 invoked by uid 0); 30 Mar 2012 21:17:18 -0000 Received: from 67.206.186.20 by rms-us018 with HTTP Content-Type: text/plain; charset="utf-8" Date: Fri, 30 Mar 2012 17:17:15 -0400 From: "Dieter BSD" Message-ID: <20120330211716.155060@gmx.com> MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Authenticated: #74169980 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: i0cEb/Zd3zOlNR3dAHAhG/t+IGRvbwAV Subject: Re: mlock(2) man page errata X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 21:17:24 -0000 >> mlock(2) says: >> >> > A single process can mlock() the minimum of a system-wide >> > ``wired pages'' limit and the per-process RLIMIT_MEMLOCK >> > resource limit. >> >> Shouldn't this say maximum rather than minimum? > > I don't think so.  The minimum of the two would be the limit that you > will hit first, and presumably is the point at which you cannot mlock > any more pages. Ok, but "can mlock() the minimum of" is easy to misread as "can mlock() at least".  Perhaps it would be more clear to say something like The amount of memory that a process can mlock() is limited by the per-process RLIMIT_MEMLOCK resource limit, and by a system-wide ``wired pages'' limit. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 30 21:18:22 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65C8D106566B for ; Fri, 30 Mar 2012 21:18:22 +0000 (UTC) (envelope-from dieterbsd@engineer.com) Received: from mailout-us.gmx.com (mailout-us.gmx.com [74.208.5.67]) by mx1.freebsd.org (Postfix) with SMTP id 0B3188FC1F for ; Fri, 30 Mar 2012 21:18:21 +0000 (UTC) Received: (qmail 12276 invoked by uid 0); 30 Mar 2012 21:18:20 -0000 Received: from 67.206.186.20 by rms-us002.v300.gmx.net with HTTP Content-Type: text/plain; charset="utf-8" Date: Fri, 30 Mar 2012 17:18:18 -0400 From: "Dieter BSD" Message-ID: <20120330211819.155070@gmx.com> MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Authenticated: #74169980 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: TEYEb/dd3zOlNR3dAHAh+ft+IGRvb0AS Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 21:18:22 -0000 > Subsequent inspection suggested that it was happening during the > periodic daily, though we never managed to get it to happen by manually > forcing periodic daily, so that's only a theory. Perhaps due to a bunch of VMs all running periodic daily at the same time? > We had a perfectly functional, nearly zero-traffic VM, since Jabber > traffic averages no more than a few messages per hour.  It was working > for quite some time. > > We moved it from a local datastore to an iSCSI datastore that ended up > getting periodically crushed by the load (in particular during the > periodic daily load imposed by a bunch of VM's all running at once). > At this point, this one VM started hanging on I/O.  We expected that > this would clear up upon return to a host with a local datastore.  It > did not. > > This ended up as a broken VM, one that would hang up overnite, maybe > not every night, but several times a week at least. ... > For the problem to "follow" the VM in this manner, and afflict *only* > the one VM, strongly suggests that it is something that is contained > within the VM files that constitute this VM.  That is consistent with > the observation that the problem arose at a point where the VM is > known to have had all those files moved from one location to a dodgy > location. > > That's why I believe the evidence points to corruption of some sort. Compare a backup of the VM before it broke to a backup of the same VM after it broke.  Hopefully the haystack of insignificant differences isn't too large, or the significant difference needle might be a lot of "fun" to find. From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 31 00:49:55 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 184FF106566C for ; Sat, 31 Mar 2012 00:49:55 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id E04E18FC0C for ; Sat, 31 Mar 2012 00:49:54 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so2761195pbc.13 for ; Fri, 30 Mar 2012 17:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=btDWukcN2QQVB7oUqRopuZUA+WEkfz/4G398Njgkwlg=; b=K818E6rKLUjgdHOZsPXsFMssGwvf9IEDvv6msDpW89lufQ9hWqCOGQ8IoxqrF2phXT XC/njevMiF5h1forw94tDiPal2kDiCfBuj3XKsrVsGVrjuy7AmjhKd3YmUBZG2yGmzJX 8XQQiE3nrAvfw/Igta9XgueMYDiV5ErtDGRqJtOWa4E+ZYTRZcHzxBknrbNcTCCkIU0O 3TtUUeyhV/dUekaPg1+D4gHAEVRS4Z4FzJ0VP9miYgMI7KMe+XUf9M/1QbXiqyc8oO7V ecKremMOLiHD78KAtebSXwQS/i5a2AI9hO7vx1MuVmft8l485H0zmjPk8S17h4OJM7vc Mv2Q== MIME-Version: 1.0 Received: by 10.68.223.193 with SMTP id qw1mr1629788pbc.61.1333154994385; Fri, 30 Mar 2012 17:49:54 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.143.19.19 with HTTP; Fri, 30 Mar 2012 17:49:54 -0700 (PDT) In-Reply-To: <20120330211819.155070@gmx.com> References: <20120330211819.155070@gmx.com> Date: Fri, 30 Mar 2012 17:49:54 -0700 X-Google-Sender-Auth: tWjWlcTFOrBFzJoFDGSYV4gN53Q Message-ID: From: Adrian Chadd To: Dieter BSD Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2012 00:49:55 -0000 There's no guarantee that upgarding a VM or rebooting it won't change the config of said VM. Don't forget to diff the vm config file.. Adrian From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 31 08:07:17 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 688131065676; Sat, 31 Mar 2012 08:07:17 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2C5BA8FC12; Sat, 31 Mar 2012 08:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=dH8nxfWkodNxnIFa1kUYxWrA6L94W+nwEJSj6eYB6PA=; b=cxe/3w1OaiHXxRiMnQxWlE0ncQwx/TYsFzQsimDuc4aQAsvzNhe5uAMinePHvVUMsF9QidCH1egW9/GiQueZwhut/4cQsrKhF5OasRRYZHA85dfqRIteBlJUFDq/8KsP; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SDtL9-0006cG-Hr; Sat, 31 Mar 2012 03:07:16 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1333181229-20726-20725/5/39; Sat, 31 Mar 2012 08:07:09 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org References: <20120330211819.155070@gmx.com> Date: Sat, 31 Mar 2012 03:07:09 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: User-Agent: Opera Mail/11.62 (FreeBSD) X-SA-Score: -1.5 Cc: Adrian Chadd , Dieter BSD Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2012 08:07:17 -0000 On Fri, 30 Mar 2012 19:49:54 -0500, Adrian Chadd wrote: > There's no guarantee that upgarding a VM or rebooting it won't change > the config of said VM. Don't forget to diff the vm config file.. I'm not sure how this would be accomplished.... Am I supposed to be running backup software (rsync, etc?) on my ESX nodes now so I can capture these VM config files? How would I ever know what changed the VM files when? I'm sure if I called up VMWare and said "HEY YOU GUYS YOU BROKE THIS BY CHANGING THESE FILES" and then when they asked how I figured it out I told them I installed software that is definitely unsupported on their ESXi server to track it that they would certainly tell me to go pound sand. Working in a black box environment is never fun. :( From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 31 14:20:31 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D26F1065670; Sat, 31 Mar 2012 14:20:31 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from services.syscare.sk (services.syscare.sk [188.40.39.36]) by mx1.freebsd.org (Postfix) with ESMTP id D6CB18FC08; Sat, 31 Mar 2012 14:20:30 +0000 (UTC) Received: from services.syscare.sk (services [188.40.39.36]) by services.syscare.sk (Postfix) with ESMTP id 29DA3D3367; Sat, 31 Mar 2012 16:20:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at rulez.sk Received: from services.syscare.sk ([188.40.39.36]) by services.syscare.sk (services.rulez.sk [188.40.39.36]) (amavisd-new, port 10024) with ESMTP id Nq_e8xxLQTGg; Sat, 31 Mar 2012 16:20:27 +0200 (CEST) Received: from danger-mbp.local (adsl-dyn65.91-127-103.t-com.sk [91.127.103.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: danger@rulez.sk) by services.syscare.sk (Postfix) with ESMTPSA id D05D1D335D; Sat, 31 Mar 2012 16:20:27 +0200 (CEST) Message-ID: <4F7712B2.9010305@FreeBSD.org> Date: Sat, 31 Mar 2012 16:20:34 +0200 From: Daniel Gerzo Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-US; rv:1.9.2.29pre) Gecko/20120320 Lanikai/3.1.21pre MIME-Version: 1.0 To: current@freebsd.org, hackers@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: HEADSUP: Call for FreeBSD Status Reports - 1Q/2012 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2012 14:20:31 -0000 Dear all, I would like to remind you that the next round of status reports covering the first quarter of 2012 are due on April 15th, 2012. As this initiative is very popular among our users, I would like to ask you to submit your entry as soon as possible, so that we can compile the report in a timely fashion. Do not hesitate and write us a few lines; a short description about what you are working on, what your plans and goals are, or any other information that you may consider interesting is always welcome. This way we can inform our community about your great work! Check out the reports from the past to get some inspiration of how your submission might look like. If you know about a project that should be included in the status report, please let us know as well, so we can poke the responsible people to provide us with something useful. Updates to submissions from the previous reports are welcome too. Note that the submissions are accepted from anyone involved within the FreeBSD community, you do not have to be a FreeBSD committer. Anything related to FreeBSD can be covered. Please email us the filled-in XML template which can be found at http://www.freebsd.org/news/status/report-sample.xml to monthly@FreeBSD.org, or alternatively use our web based form located at http://www.freebsd.org/cgi/monthly.cgi. For more information, please visit http://www.freebsd.org/news/status/. We are looking forward to see your submissions! Thanks. -- Kind regards Daniel Gerzo From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 31 19:41:42 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFA39106566C for ; Sat, 31 Mar 2012 19:41:42 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id A0EB48FC12 for ; Sat, 31 Mar 2012 19:41:42 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id q2VJfgod091045 for ; Sat, 31 Mar 2012 12:41:42 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4F775DF5.1020704@rawbw.com> Date: Sat, 31 Mar 2012 12:41:41 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120316 Thunderbird/10.0.3 MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Is there any modern alternative to pstack? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2012 19:41:42 -0000 I look at seemingly abandoned sysutils/pstack, last modified upstream 2002-11-27. It doesn't really work on 9.0 i386, prints some errors. It's functions, though, is quite desirable if one wants to understand why some multithreaded program hangs or is not responsive. Since there were no updates, I wonder, is this because there is some alternative in FreeBSD that I don't know about, or it is primarily due to the lack of interest/resources? I don't take gdb as alternative since it is not single line, and also it has some threading issues of its own. Yuri From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 31 21:22:27 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7693B1065670 for ; Sat, 31 Mar 2012 21:22:27 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2B98FC08 for ; Sat, 31 Mar 2012 21:22:26 +0000 (UTC) Received: by iahk25 with SMTP id k25so3386106iah.13 for ; Sat, 31 Mar 2012 14:22:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=ne8VJ5NDSZ5zyxg4XgoH81vutOC163RnlFh9VvAin7I=; b=RCWOlrZrlNjccUHGJv2r+fj2dk5twNxWszebRxF9h1Z4/zXfCdYl7WtCg13Tf3PCkK 5NSzSO83biDEDC6XC79vXL1miR0/ZeSQAt63sJpPsoRi5Lhe9g1j3HMMAfj3KdVroTix 4AaR5xYMEbtUvpAJQ3mSpxUj7IyXf5MdEMdfc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-gm-message-state; bh=ne8VJ5NDSZ5zyxg4XgoH81vutOC163RnlFh9VvAin7I=; b=MCpYLN5grmbwqmZYWH4pmuB6BJ8sWC8Po7EuxBEGm4X4nz0WpgU+1KvhM11mF0QAgd 2VoN2n6n6pqvdEaV5bnHoN77DWh1RBngz2BI5sT/PvyYGQs5licYISH424abKzFp/XTW i9rhze8u7qQyvG1Bm6UcoObHMKiwNKifmk12iOg1iki/7qzROB08be5q5nEoQ1/HzT8f XBZCfvpFNKimcC7LEBq1E+vgvj9qhgxD6+NJsjggp5QBegoCwnJez9e+jrRYguL0vuJz 9BsIhMS8RAIIwm6is6ZD+LpGekrO+1SLxWdAoiD6g6U6MoeOWaaQdjm+QTPl4/TO3d4g 36dA== Received: by 10.50.184.131 with SMTP id eu3mr1999634igc.13.1333228946460; Sat, 31 Mar 2012 14:22:26 -0700 (PDT) Received: from DataIX.net ([99.181.151.192]) by mx.google.com with ESMTPS id nq4sm6647810igc.5.2012.03.31.14.22.25 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 31 Mar 2012 14:22:26 -0700 (PDT) Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id q2VLMM6g019417 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 31 Mar 2012 17:22:22 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jhellenthal@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id q2VLMK2n015749; Sat, 31 Mar 2012 17:22:20 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Sat, 31 Mar 2012 17:22:20 -0400 From: Jason Hellenthal To: Yuri Message-ID: <20120331212220.GA16306@DataIX.net> References: <4F775DF5.1020704@rawbw.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F775DF5.1020704@rawbw.com> X-Gm-Message-State: ALoCoQnKFHZQWm+8YesQEmayJ1BOuAaCYNEqi7RJ6+Nm5dDP6R3YBCTCFhWbBStAvIgy6QI5uXBw Cc: hackers@freebsd.org Subject: Re: Is there any modern alternative to pstack? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2012 21:22:27 -0000 procstat(1) On Sat, Mar 31, 2012 at 12:41:41PM -0700, Yuri wrote: > I look at seemingly abandoned sysutils/pstack, last modified upstream > 2002-11-27. > It doesn't really work on 9.0 i386, prints some errors. > > It's functions, though, is quite desirable if one wants to understand > why some multithreaded program hangs or is not responsive. > Since there were no updates, I wonder, is this because there is some > alternative in FreeBSD that I don't know about, or it is primarily due > to the lack of interest/resources? > > I don't take gdb as alternative since it is not single line, and also it > has some threading issues of its own. > > Yuri > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- ;s =; From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 31 21:40:57 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C8A51065670; Sat, 31 Mar 2012 21:40:57 +0000 (UTC) (envelope-from maninya@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id A9A1D8FC0A; Sat, 31 Mar 2012 21:40:56 +0000 (UTC) Received: by ggnk4 with SMTP id k4so968741ggn.13 for ; Sat, 31 Mar 2012 14:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Kq+k+QySsQ+xSHwY3i3NwtjeoUFV75hGIHThxhwYgI8=; b=iVq12rdLEFCz39WP8Dxb7kbKZql4V7UO44uKB2S12D6cc+rTCfOIu1q9qYURq4W2pH Q+wm9mS5fUtzMqb5YxlgAGatWM3cBb7P1ld5lPe3/ztFjCeyfWP4sthCuThXYatY0WPq lJ38cRYjEO5EEo67T7VS+HPzVAG01RnuDaSeoSeHri03nJdg7Jn+85VRq1mNtQ0ArqcO BvlNC8f7pIMX9pNeNiQGptD/bEILQDzJyUf9kpPD/XpRjH+ldTwxGQHW5YxLEAzIWl5k /RL27utuSqnBrvh/e7a7d3ijyNgegxiBtOg56eGRzlnZOtxmk6RALKGrOCvJMmJlAzH3 Gwow== MIME-Version: 1.0 Received: by 10.236.109.198 with SMTP id s46mr2699394yhg.43.1333230050507; Sat, 31 Mar 2012 14:40:50 -0700 (PDT) Received: by 10.146.238.13 with HTTP; Sat, 31 Mar 2012 14:40:50 -0700 (PDT) In-Reply-To: <201203290944.11446.jhb@freebsd.org> References: <201203270753.21534.jhb@freebsd.org> <201203290944.11446.jhb@freebsd.org> Date: Sun, 1 Apr 2012 03:10:50 +0530 Message-ID: From: Maninya M To: John Baldwin , freebsd-hackers@freebsd.org, Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: __NR_mmap2 in FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2012 21:40:57 -0000 Thanks. I've tried this. Still getting some allocation problems. if (temp_regs.r_eax != addr) warn("Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. This could be a problem.",addr,temp_regs.r_eax); What can I do? Please help. void map_memory(unsigned long addr, unsigned long size, int flags) { int status; struct reg regs,temp_regs; unsigned long int_instr = 0x000080cd; /* INT 0x80 */ printf("%x\n",addr); //addr=addr&0xffff0000; if (ptrace(PT_GETREGS,exec_pid,(caddr_t)®s,0) < 0) die_perror("ptrace(PTRACE_GETREGS,%d,(caddr_t)®s,0)",exec_pid); /* mmap2 system call seems to take arguments as follows: * eax = __NR_mmap2 * ebx = (unsigned long) page aligned address * ecx = (unsigned long) page aligned file size * edx = protection * esi = flags * Other arguments (fd and pgoff) are not required for anonymous mapping */ temp_regs = regs; //printf("temp=%u,\teip=%u\tregs=%u\teip=%u\n",&temp_regs,temp_regs.r_eip,®s,regs.r_eip); // temp_regs.r_eax = __NR_mmap2; temp_regs.r_eax=71; /*temp_regs.r_ebx = addr; temp_regs.r_ecx = size; temp_regs.r_edx = flags; temp_regs.r_esi = MAP_PRIVATE | MAP_ANONYMOUS;*/ //push size //temp_regs.r_eip = temp_regs.r_esp - 4; //printf("temp=%u,\teip=%u\tregs=%u\teip=%u\n",&temp_regs,temp_regs.r_eip,®s,regs.r_eip); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-4),addr) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,0x%.8x) failed ADDER",exec_pid,temp_regs.r_esp,addr); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-8),size) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed size",exec_pid,temp_regs.r_esp); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-12),flags) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed protections",exec_pid,temp_regs.r_esp); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-16),MAP_PRIVATE|MAP_ANON|MAP_FIXED) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed flags",exec_pid,temp_regs.r_esp); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-20),-1) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,0x%.8x) failed ADDER",exec_pid,temp_regs.r_esp,addr); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-24),0) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,0x%.8x) failed offset1",exec_pid,temp_regs.r_esp,addr); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-28),0) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,0x%.8x) failed offset1",exec_pid,temp_regs.r_esp,addr); /* if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x000080cd) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating memory",exec_pid,temp_regs.r_eip); */ if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x000080cd) < 0) die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating memory",exec_pid,temp_regs.r_eip); //temp_regs.r_eip = temp_regs.r_esp - 32; temp_regs.r_esp = temp_regs.r_esp - 28; if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { die_perror("ptrace(PT_SETREGS,%d,...) failed while allocating memory",exec_pid); } if (ptrace(PT_STEP,exec_pid,NULL,0) < 0) die_perror("ptrace(PT_STEP,...) failed while executing mmap2"); wait(&status); if (WIFEXITED(status)) die("Restarted process abrubtly (exited with value %d). Aborting Restart.",WEXITSTATUS(status)); else if (WIFSIGNALED(status)) die("Restarted process abrubtly exited because of uncaught signal (%d). Aborting Restart.",WTERMSIG(status)); if (ptrace(PT_GETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { die_perror("ptrace(PT_GETREGS,...) failed after executing mmap2 system call"); } //fprintf(stdout,"hello iam here \n"); if (temp_regs.r_eax != addr) warn("Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. This could be a problem.",addr,temp_regs.r_eax); else if (cr_options.verbose) fprintf(stdout,"Successfully allocated [0x%.8lx - 0x%.8lx]\n",addr,addr+size); /* Restore original registers */ if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { die_perror("ptrace(PT_SETREGS,...) when restoring registering after allocating memory (mmap2)"); } } On 29 March 2012 19:14, John Baldwin wrote: > On Thursday, March 29, 2012 9:15:43 am Maninya M wrote: > > Thanks a lot for replying! > > Ok I've tried this to push arguments onto stack. > > Is it right? > > I get an error at this line: > > > > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while > > dasfallocating memory",exec_pid,temp_regs.r_eip); > > > > > > Please tell me what to do. > > > > > > > > > > > > void map_memory(unsigned long addr, unsigned long size, int flags) > > { > > int status; > > struct reg regs,temp_regs; > > unsigned long int_instr = 0x000080cd; /* INT 0x80 */ > > > > if (ptrace(PT_GETREGS,exec_pid,(caddr_t)®s,0) < 0) > > die_perror("ptrace(PTRACE_GETREGS,%d,(caddr_t)®s,0)",exec_pid); > > > > /* mmap2 system call seems to take arguments as follows: > > * eax = __NR_mmap2 > > * ebx = (unsigned long) page aligned address > > * ecx = (unsigned long) page aligned file size > > * edx = protection > > * esi = flags > > * Other arguments (fd and pgoff) are not required for anonymous > mapping > > */ > > temp_regs = regs; > > > > //printf("temp=%u, > \teip=%u\tregs=%u\teip=%u\n",&temp_regs,temp_regs.r_eip,®s,regs.r_eip); > > // temp_regs.r_eax = __NR_mmap2; > > temp_regs.r_eax=71; > > /*temp_regs.r_ebx = addr; > > temp_regs.r_ecx = size; > > temp_regs.r_edx = flags; > > temp_regs.r_esi = MAP_PRIVATE | MAP_ANONYMOUS;*/ > > //push size > > > > //temp_regs.r_eip = temp_regs.r_esp - 4; > > You still want this, it is putting the instruction on the stack. However, > your stack layout is wrong I think. You actually want it to be something > like > this: > > r_esp - 4: > r_esp - 8: > r_esp - 12: > r_esp - 16: (MAP_FIXED?) > r_esp - 20: > r_esp - 24: > r_esp - 28: > r_esp - 32: > > Then you want to set: > > r_eip = r_esp - 32; > r_esp -= 28; > > I think you want MAP_FIXED since it complains if the returned address > doesn't > match 'addr' at the end of your routine. However, it might be best if you > just compiled a program that called mmap() and then looked at the > disassembly > and to make sure the stack layout is correct. > > > //printf("temp=%u, > \teip=%u\tregs=%u\teip=%u\n",&temp_regs,temp_regs.r_eip,®s,regs.r_eip); > > if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-4),MAP_PRIVATE | > > MAP_ANONYMOUS) < 0) > > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while > allocating > > memory",exec_pid,temp_regs.r_eip); > > > > if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-8),flags) < 0) > > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while > allocating > > memory",exec_pid,temp_regs.r_eip); > > > > if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-12),size) < 0) > > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while > allocating > > memory",exec_pid,temp_regs.r_eip); > > > > if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-16), addr) < 0); > > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while > > dasfallocating memory",exec_pid,temp_regs.r_eip); > > /* > > if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x000080cd) < 0) > > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while > allocating > > memory",exec_pid,temp_regs.r_eip); > > */ > > if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x000080cd) < > 0) > > die_perror("ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while > allocating > > memory",exec_pid,temp_regs.r_eip); > > if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { > > die_perror("ptrace(PT_SETREGS,%d,...) failed while allocating > > memory",exec_pid); > > } > > if (ptrace(PT_STEP,exec_pid,NULL,0) < 0) > > die_perror("ptrace(PT_STEP,...) failed while executing mmap2"); > > > > wait(&status); > > if (WIFEXITED(status)) > > die("Restarted process abrubtly (exited with value %d). Aborting > > Restart.",WEXITSTATUS(status)); > > else if (WIFSIGNALED(status)) > > die("Restarted process abrubtly exited because of uncaught signal > (%d). > > Aborting Restart.",WTERMSIG(status)); > > > > if (ptrace(PT_GETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { > > die_perror("ptrace(PT_GETREGS,...) failed after executing mmap2 > system > > call"); > > } > > //fprintf(stdout,"hello iam here \n"); > > if (temp_regs.r_eax != addr) > > warn("Wanted space at address 0x%.8x, mmap2 system call returned > > 0x%.8x. This could be a problem.",addr,temp_regs.r_eax); > > else if (cr_options.verbose) > > > > fprintf(stdout,"Successfully allocated [0x%.8lx - > > 0x%.8lx]\n",addr,addr+size); > > > > /* Restore original registers */ > > if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { > > die_perror("ptrace(PT_SETREGS,...) when restoring registering after > > allocating memory (mmap2)"); > > > > } > > } > > > > > > > > > > > > > > On 27 March 2012 17:23, John Baldwin wrote: > > > > > On Monday, March 26, 2012 1:56:08 pm Maninya M wrote: > > > > I am trying to convert a function written for Linux to FreeBSD. > > > > What is the equivalent of the __NR_mmap2 system call in FreeBSD? > > > > > > > > I keep getting the error because of this exception: > > > > warn("Wanted space at address 0x%.8x, mmap2 system call returned > 0x%.8x. > > > > This could be a problem.",addr,temp_regs.eax); > > > > > > I think you could just use plain mmap() for this? > > > > > > However, it seems that this is injecting a call into an existing > binary, > > > not calling mmap() directly. A few things will need to change. First, > > > FreeBSD system calls on i386 put their arguments on the stack, not in > > > registers, so you will need to do a bit more work to push the arguments > > > onto > > > the stack rather than just setting registers. > > > > > > > I changed > > > > temp_regs.eax = __NR_mmap2; > > > > to > > > > temp_regs.eax = 192; > > > > > > > > but it didn't work. I suppose I couldn't understand this function. > Please > > > > help. > > > > > > > > This is the function: > > > > > > > > void map_memory(unsigned long addr, unsigned long size, int flags) > > > > { > > > > int status; > > > > struct user_regs_struct regs,temp_regs; > > > > unsigned long int_instr = 0x000080cd; /* INT 0x80 */ > > > > > > > > if (ptrace(PTRACE_GETREGS,exec_pid,NULL,®s) < 0) > > > > die_perror("ptrace(PTRACE_GETREGS,%d,NULL,®s)",exec_pid); > > > > > > > > /* mmap2 system call seems to take arguments as follows: > > > > * eax = __NR_mmap2 > > > > * ebx = (unsigned long) page aligned address > > > > * ecx = (unsigned long) page aligned file size > > > > * edx = protection > > > > * esi = flags > > > > * Other arguments (fd and pgoff) are not required for anonymous > > > mapping > > > > */ > > > > temp_regs = regs; > > > > temp_regs.eax = __NR_mmap2; > > > > temp_regs.ebx = addr; > > > > temp_regs.ecx = size; > > > > temp_regs.edx = flags; > > > > temp_regs.esi = MAP_PRIVATE | MAP_ANONYMOUS; > > > > temp_regs.eip = temp_regs.esp - 4; > > > > > > > > if (ptrace(PTRACE_POKETEXT,exec_pid,(void > > > > *)(temp_regs.eip),(void*)int_instr) < 0) > > > > die_perror("ptrace(PTRACE_POKETEXT,%d,0x%.8x,INT 0x80) failed > while > > > > allocating memory",exec_pid,temp_regs.eip); > > > > if (ptrace(PTRACE_SETREGS,exec_pid,NULL,&temp_regs) < 0) { > > > > die_perror("ptrace(PTRACE_SETREGS,%d,...) failed while allocating > > > > memory",exec_pid); > > > > } > > > > if (ptrace(PTRACE_SINGLESTEP,exec_pid,NULL,NULL) < 0) > > > > die_perror("ptrace(PTRACE_SINGLESTEP,...) failed while executing > > > > mmap2"); > > > > > > > > wait(&status); > > > > if (WIFEXITED(status)) > > > > die("Restarted process abrubtly (exited with value %d). Aborting > > > > Restart.",WEXITSTATUS(status)); > > > > else if (WIFSIGNALED(status)) > > > > die("Restarted process abrubtly exited because of uncaught signal > > > (%d). > > > > Aborting Restart.",WTERMSIG(status)); > > > > > > > > if (ptrace(PTRACE_GETREGS,exec_pid,NULL,&temp_regs) < 0) { > > > > die_perror("ptrace(PTRACE_GETREGS,...) failed after executing > mmap2 > > > > system call"); > > > > } > > > > > > > > if (temp_regs.eax != addr) > > > > warn("Wanted space at address 0x%.8x, mmap2 system call returned > > > > 0x%.8x. This could be a problem.",addr,temp_regs.eax); > > > > else if (cr_options.verbose) > > > > fprintf(stdout,"Successfully allocated [0x%.8lx - > > > > 0x%.8lx]\n",addr,addr+size); > > > > > > > > /* Restore original registers */ > > > > if (ptrace(PTRACE_SETREGS,exec_pid,NULL,®s) < 0) { > > > > die_perror("ptrace(PTRACE_SETREGS,...) when restoring registering > > > after > > > > allocating memory (mmap2)"); > > > > } > > > > } > > > > > > > > -- > > > > Maninya > > > > _______________________________________________ > > > > freebsd-hackers@freebsd.org mailing list > > > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > > > To unsubscribe, send any mail to " > > > freebsd-hackers-unsubscribe@freebsd.org" > > > > > > > > > > -- > > > John Baldwin > > > > > > > > > > > -- > > Maninya > > > > -- > John Baldwin > -- Maninya