From owner-freebsd-current@freebsd.org Thu Feb 4 01:56:07 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08A27A9B37C for ; Thu, 4 Feb 2016 01:56:07 +0000 (UTC) (envelope-from ultima1252@gmail.com) Received: from mail-vk0-x22e.google.com (mail-vk0-x22e.google.com [IPv6:2607:f8b0:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCBB41BC1; Thu, 4 Feb 2016 01:56:06 +0000 (UTC) (envelope-from ultima1252@gmail.com) Received: by mail-vk0-x22e.google.com with SMTP id n1so27815963vkb.3; Wed, 03 Feb 2016 17:56:06 -0800 (PST) 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=ltGme6GEF6x9l2CBHne+FscH7Nc+YD3n2mj+bT0lzIk=; b=wdWgQovAXyddM9b4zk/QiDwkzBsjO9LX9B+B2liQ+fWNX8QO3MUv7GNEwBBfu7G0m8 bve3my/PTlPX9/MaF45Ss+HAn7X7+tVXFZiX4mYNh5U31j1zLV7D9TKYF5Oz+RQ6d7Yp RkL0QD6dxz35whTNKxp5hCCQTxAxmqWkWOenLfXNNaTM+/jVxr2gsOFj59w7UZmRZxFS twTplsvvgZl2B5E32oI2MtT410RhnDHUUjb0p12opXr71/KlZ9Ni2PV7w/llm0NqJ4Sk lL5ap0demAItpaKc8Hoe+RHyV2kM5fzNdVbf+p2GyHCzYJOLZw3AoH7fB++9wJyVSEw9 r/rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ltGme6GEF6x9l2CBHne+FscH7Nc+YD3n2mj+bT0lzIk=; b=N+uE2Ezmi8OPKWxIN67M+GyYqb+4Thst5CT1KxHY4U1lcmOHSvW8xkl2zT3bAxn3F0 cdC4plUsaJM//199ZEAxrAUmDQHYYFbESfwSADb/gbkCQMxEVYHfVDFDKFWMcuBJKZVO Th+Gff22fjzY3AzjPa4GayU9E+IEaPMYTkLydnlFLNTKr3wkS7fbMXEeCInnjIqTUpc7 7mI62Q32YCB0EjokcZ0MARU4OYoSWJk0F489mu8mhUckOTeRLRkPhCBDCR0T8cJafsnu tDUDtSjlYnS8bG716h8bin74AYzThpEHyRVah2Je03/gTS2nqB5enBcP/9FCMA8GnZ+A yuwA== X-Gm-Message-State: AG10YOT+2f8Np01PbE7VehxlC13L4ekw0JPU5aNk1qDAa3fbcfNOwev56NX7e4gk9//7B2aDad0DdxTdPd62ZA== MIME-Version: 1.0 X-Received: by 10.31.107.1 with SMTP id g1mr3966221vkc.15.1454550965704; Wed, 03 Feb 2016 17:56:05 -0800 (PST) Received: by 10.31.194.194 with HTTP; Wed, 3 Feb 2016 17:56:05 -0800 (PST) In-Reply-To: References: <56B230CB.3050600@FreeBSD.org> <56B257E1.9070000@FreeBSD.org> Date: Wed, 3 Feb 2016 20:56:05 -0500 Message-ID: Subject: Re: Kernel memory leak with x11/nvidia-driver From: Ultima To: Eric van Gyzen Cc: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 01:56:07 -0000 Just tested your script, there is definitely a memory leak. I also ran into really weird behavior. Running your script in tmux after starting and stopping an xorg session a few, tmux completely froze in the session. Creating a new window in the session was also completely frozen, however this is only visually as commands still worked, just showed a blank black screen. Also unloading the kernel modules for nvidia and nvidia-modeset (new as of 358.16ish) did not free the memory. On Wed, Feb 3, 2016 at 8:24 PM, Ultima wrote: > Apologies, this should have been in my initial reply. > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201340 > or here for attachment > https://bz-attachments.freebsd.org/attachment.cgi?id=165694 > > I haven't actually had a chance to do anything after upgrading > from stable other than see the corrupted console for myself. > Lack of time =/ > > On Wed, Feb 3, 2016 at 2:41 PM, Eric van Gyzen > wrote: > >> On 02/03/2016 10:54, Eric van Gyzen wrote: >> > I just set up a new desktop running head with x11/nvidia-driver. I've >> > discovered a memory leak where pages disappear from the queues, never to >> > return. Specifically, the total of >> > v_active_count >> > v_inactive_count >> > v_wire_count >> > v_cache_count >> > v_free_count >> > drops, eventually becoming /much/ less than v_page_count. >> >> Here is a script to log the data: >> >> #!/bin/sh >> >> readonly QUEUES="active inactive wire cache free total" >> readonly FORMAT="%s\t%s\t%s\t%s\t%s\t%s\n" >> >> vm_page_counts() { >> for queue in $QUEUES; do >> if [ "$queue" != "total" ]; then >> sysctl -n vm.stats.vm.v_${queue}_count >> fi >> done >> } >> >> sum() { >> s=0 >> while [ $# -gt 0 ]; do >> s=$((s + $1)) >> shift >> done >> echo $s >> } >> >> print_counts() { >> counts="`vm_page_counts`" >> printf "$FORMAT" $counts `sum $counts` >> } >> >> printf "$FORMAT" $QUEUES >> print_counts >> while sleep 60; do >> print_counts >> done >> >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org >> " >> > >