From owner-freebsd-emulation@FreeBSD.ORG Mon Aug 14 07:27:52 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2764D16A4DE for ; Mon, 14 Aug 2006 07:27:52 +0000 (UTC) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EEDC43D6E for ; Mon, 14 Aug 2006 07:27:48 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7E7Rlmu038414 for ; Mon, 14 Aug 2006 07:27:47 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7E7RkYE038410 for freebsd-emulation@FreeBSD.org; Mon, 14 Aug 2006 07:27:46 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 14 Aug 2006 07:27:46 GMT Message-Id: <200608140727.k7E7RkYE038410@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-emulation@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 07:27:52 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/21463 emulation [linux] Linux compatability mode should not allow setu f kern/45023 emulation [linux] [patch] flexlm does not run with linux-base-7, o kern/77710 emulation [linux] Linux page fault sigcontext information is wro 3 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 o kern/29698 emulation [linux] [patch] linux ipcs doesn'work o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/41543 emulation [patch] feature request: easier wine/w23 support o kern/55835 emulation [linux] [patch] Linux IPC emulation missing SETALL sys a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula 8 problems total. From owner-freebsd-emulation@FreeBSD.ORG Mon Aug 14 13:49:17 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0F7016A4DF for ; Mon, 14 Aug 2006 13:49:17 +0000 (UTC) (envelope-from apivovarov@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AB2843D46 for ; Mon, 14 Aug 2006 13:49:17 +0000 (GMT) (envelope-from apivovarov@gmail.com) Received: by nz-out-0102.google.com with SMTP id 13so363626nzn for ; Mon, 14 Aug 2006 06:49:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=iYVEDWX+d67OvW3dFaWP4ICAEDujfb0S/oMYstBVX7paRqTmVu7USv95m4Ej3XLOgCao4uMMsS7DtmCKeQc341QlB/wc7WT/PXD6WSrDdOJOpr4NPxMpeTznpBxmjR6pz6Y5D/M4fAEQtEJA/I51mS5EUHrOqfbXDJqS+uziSmY= Received: by 10.35.97.17 with SMTP id z17mr13293354pyl; Mon, 14 Aug 2006 06:49:16 -0700 (PDT) Received: by 10.35.18.11 with HTTP; Mon, 14 Aug 2006 06:49:16 -0700 (PDT) Message-ID: <426b510c0608140649o4c193daaq6f08264c64cc8b3f@mail.gmail.com> Date: Mon, 14 Aug 2006 17:49:16 +0400 From: "Alex Pivovarov" To: freebsd-emulation@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: fc4: compat-db-4.2.52-2.FC4.i386.rpm doesn't exist, correct name: compat-db-4.2.52-2.i386.rpm X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 13:49:18 -0000 linux_base_fc-4: error in port correct name of compat-db is compat-db-4.2.52-2.i386.rpm current name in Make file is ompat-db-4.2.52-2.FC4.i386.rpm From owner-freebsd-emulation@FreeBSD.ORG Mon Aug 14 16:55:59 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0057D16A5F7 for ; Mon, 14 Aug 2006 16:55:58 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id F37BE43D53 for ; Mon, 14 Aug 2006 16:55:57 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5D553.dip.t-dialin.net [84.165.213.83]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7EGdrot067948 for ; Mon, 14 Aug 2006 18:39:54 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7EGu0BV069567 for ; Mon, 14 Aug 2006 18:56:01 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Mon, 14 Aug 2006 18:57:57 +0200 From: Alexander Leidinger To: freebsd-emulation@freebsd.org Message-ID: <20060814185757.23c3467a@Magellan.Leidinger.net> In-Reply-To: <426b510c0608140649o4c193daaq6f08264c64cc8b3f@mail.gmail.com> References: <426b510c0608140649o4c193daaq6f08264c64cc8b3f@mail.gmail.com> X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Subject: Re: fc4: compat-db-4.2.52-2.FC4.i386.rpm doesn't exist, correct name: compat-db-4.2.52-2.i386.rpm X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 16:55:59 -0000 Quoting "Alex Pivovarov" (Mon, 14 Aug 2006 17:49:16 +0400): > linux_base_fc-4: > error in port > > correct name of compat-db is compat-db-4.2.52-2.i386.rpm > current name in Make file is ompat-db-4.2.52-2.FC4.i386.rpm Fixed. Thanks, Alexander. -- By pressing "Scroll Lock" you can use the arrow keys to scroll backward through the console output. Press "Scroll Lock" again to turn it off. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Mon Aug 14 17:04:28 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F87516A4E1; Mon, 14 Aug 2006 17:04:28 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD67843D45; Mon, 14 Aug 2006 17:04:24 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7EH4IQa094217 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 14 Aug 2006 19:04:18 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7EH4IBY094216; Mon, 14 Aug 2006 19:04:18 +0200 (CEST) Date: Mon, 14 Aug 2006 19:04:18 +0200 From: Divacky Roman To: current@freebsd.org Message-ID: <20060814170418.GA89686@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: emulation@freebsd.org Subject: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 17:04:28 -0000 Hi, I am a student doing SoC linuxolator update. The work involved updating linuxolator to be able to work with 2.6.x (2.6.16 in my case) kernel emulation. To be able to run 2.6.x emulation I had to implement NPTL, which means NPTL, futexes and thread area, pid mangling + various hacks to make it work. This is the first patch meant for public revision/testing: www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch What works/doesnt work is described here: http://wikitest.freebsd.org/linuxolator-patch-status This is not finished but its good enough to be commited. The plan now is to commit this soon to src (because of coverity testing and more public testing). How to test: you have to have i386 system (amd64 is WIP now) cd /sys fetch http://www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch patch < linuxolator26-diff.patch recompile kernel and boot this patch comes with compat.linux.osrelease=2.6.16 so you dont have to set anything. what will be commited to src will have 2.4.2 default so everything should work like now. please test with both 2.6.16 and 2.4.2. What I care about: - if you see any panics, LORs etc. please report - pls report if something doesnt work for other reason then sleeping on linuxfutex (this is being worked on) thnx Roman Divacky From owner-freebsd-emulation@FreeBSD.ORG Mon Aug 14 22:37:38 2006 Return-Path: X-Original-To: freebsd-emulation@hub.freebsd.org Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA4B216A4DD; Mon, 14 Aug 2006 22:37:38 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7764243D49; Mon, 14 Aug 2006 22:37:38 +0000 (GMT) (envelope-from edwin@FreeBSD.org) Received: from freefall.freebsd.org (edwin@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7EMbbLh035381; Mon, 14 Aug 2006 22:37:37 GMT (envelope-from edwin@freefall.freebsd.org) Received: (from edwin@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7EMbb8n035377; Mon, 14 Aug 2006 22:37:37 GMT (envelope-from edwin) Date: Mon, 14 Aug 2006 22:37:37 GMT From: Edwin Groothuis Message-Id: <200608142237.k7EMbb8n035377@freefall.freebsd.org> To: edwin@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org, freebsd-emulation@FreeBSD.org Cc: Subject: Re: ports/102034: linux_base-fc4 library problems with RELENG_6_1 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 22:37:38 -0000 Synopsis: linux_base-fc4 library problems with RELENG_6_1 Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-emulation Responsible-Changed-By: edwin Responsible-Changed-When: Mon Aug 14 22:37:37 UTC 2006 Responsible-Changed-Why: Over to maintainer http://www.freebsd.org/cgi/query-pr.cgi?pr=102034 From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 13:14:57 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82B8816A4E0; Tue, 15 Aug 2006 13:14:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D0E543D49; Tue, 15 Aug 2006 13:14:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7FDEp8h027268; Tue, 15 Aug 2006 09:14:51 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Tue, 15 Aug 2006 09:10:50 -0400 User-Agent: KMail/1.9.1 References: <20060814170418.GA89686@stud.fit.vutbr.cz> In-Reply-To: <20060814170418.GA89686@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608150910.51434.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Tue, 15 Aug 2006 09:14:52 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1662/Tue Aug 15 04:29:25 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: emulation@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 13:14:57 -0000 On Monday 14 August 2006 13:04, Divacky Roman wrote: > Hi, > > I am a student doing SoC linuxolator update. The work involved updating > linuxolator to be able to work with 2.6.x (2.6.16 in my case) kernel emulation. > > To be able to run 2.6.x emulation I had to implement NPTL, which means NPTL, futexes > and thread area, pid mangling + various hacks to make it work. > > This is the first patch meant for public revision/testing: > > www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch Some comments: - You shouldn't add new nested includes (such as in amd64/linux32/linux.h), especially sys/lock.h, sys/mutex.h, and sys/sx.h. (If you need to examine mutex internals you would include sys/_mutex.h in a header, but for normal API usage you need to include sys/mutex.h and sys/lock.h in the appropriate C files. sys/param.h is far too large of a header to be used in a nested include. - Check style(9). For example, block comments should look like this: /* * This is a really long comment that takes up * more than one line. */ rather than this: /* this is a really long comment that takes up * more than one line */ - You use the EMUL_LOCK in em_find() to look at p_emuldata but don't hold it when writing to p_emuldata in linux_proc_init(). There you only hold the proc lock. - You should probably hold the proc lock until after the wakeup() in linux_proc_init() since the pfind() / proc_unlock() is what holds a reference to keep the child from going away. - In linux_proc_init() you pass EMUL_LOCKED to em_find() in the CLONE_VM case when the lock isn't held. - Personal style: please use malloc() and free() rather than MALLOC() and FREE(). We haven't inlined malloc() in a long, long time and the macros are really there for older code. - You tsleep() in linux_schedtail() while holding one lock and do the wakeup() in linux_proc_init() while holding no locks. You've got lost wakeup races that way that you work around by having to use a goto and a sleep with a timeout. - You should include the appropriate header to get the declaration of 'hz' rather than just adding an 'extern' directly in your code. - In futex_get() you don't handle the race of two concurrent creates. - In futex_sleep(), you probably should be using an interlocked sleep such as msleep() or cv_wait() to avoid lost wakeups. - In futex_sleep(), you should probably loop rather than recurse to avoid blowing the stack. - In futex_atomic_op(), if you take a page fault on one of your operations it's going to blow up because of the page fault during a critical section. Your futex ops should be atomic (perhaps you can do them all using casuptr()?) and you shouldn't use a critical section here. - You should stick the sx locks in a header and not litter 'externs' in source files. - Should come up with a better name than 'schedtail' for the eventhandler in fork_exit(). Maybe 'process_fork_exit'? - You should probably ask Peter to review the link_elf_obj change. An alternative is to use linker_lookup_set() in your module load routine to lookup your linker set details. - Regarding the locking, I'm not sure why you have the two separate sx locks, and why you don't just merge them into a single lock instead. -- John Baldwin From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 13:36:34 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D0D216A4DF; Tue, 15 Aug 2006 13:36:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04C8843D68; Tue, 15 Aug 2006 13:36:22 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k7FDaI5L011074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Aug 2006 16:36:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k7FDaIUZ042125; Tue, 15 Aug 2006 16:36:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k7FDaH8Q042124; Tue, 15 Aug 2006 16:36:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 15 Aug 2006 16:36:17 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20060815133616.GA41562@deviant.kiev.zoral.com.ua> References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608150910.51434.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <200608150910.51434.jhb@freebsd.org> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, SPF_NEUTRAL,UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 13:36:34 -0000 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 15, 2006 at 09:10:50AM -0400, John Baldwin wrote: > - You should probably ask Peter to review the link_elf_obj change. An > alternative is to use linker_lookup_set() in your module load routine to > lookup your linker set details. I suppose that this is in fact my change. I'm not committing it exactly because I cannot obtain any review from Peter. And, it seems that this is not committed. --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE4c3QC3+MBN1Mb4gRAtByAJwOcBRGm6i5Z7eEBhPUzssWXmePZwCdGOeQ MUdgh128Tr6onu7P1F8CUUE= =pTLU -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 14:06:17 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41C7E16A4E0; Tue, 15 Aug 2006 14:06:17 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12CBA43D49; Tue, 15 Aug 2006 14:06:15 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5F490.dip.t-dialin.net [84.165.244.144]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7FDo1os072992; Tue, 15 Aug 2006 15:50:02 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7FE6JgJ050612; Tue, 15 Aug 2006 16:06:19 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Tue, 15 Aug 2006 16:08:18 +0200 From: Alexander Leidinger To: Kostik Belousov Message-ID: <20060815160818.68493418@Magellan.Leidinger.net> In-Reply-To: <20060815133616.GA41562@deviant.kiev.zoral.com.ua> References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608150910.51434.jhb@freebsd.org> <20060815133616.GA41562@deviant.kiev.zoral.com.ua> X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: emulation@freebsd.org, freebsd-current@freebsd.org, John Baldwin Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 14:06:17 -0000 Quoting Kostik Belousov (Tue, 15 Aug 2006 16:36:17 +0300): > On Tue, Aug 15, 2006 at 09:10:50AM -0400, John Baldwin wrote: > > - You should probably ask Peter to review the link_elf_obj change. An > > alternative is to use linker_lookup_set() in your module load routine to > > lookup your linker set details. > I suppose that this is in fact my change. I'm not committing it exactly because > I cannot obtain any review from Peter. > > And, it seems that this is not committed. Right. I didn't committed this part because jhb asked to do it differently or to ask Peter about it. Bye, Alexander. -- The wrong quarterback is the one that's in there. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 14:24:01 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23F4116A4E0; Tue, 15 Aug 2006 14:24:01 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF6DF43D49; Tue, 15 Aug 2006 14:24:00 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [172.30.10.238] (unknown [216.239.55.7]) by elvis.mu.org (Postfix) with ESMTP id 930771A3C20; Tue, 15 Aug 2006 07:23:59 -0700 (PDT) Message-ID: <44E1D8E2.9060200@FreeBSD.org> Date: Tue, 15 Aug 2006 16:23:30 +0200 From: Suleiman Souhlal User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Divacky Roman References: <20060814170418.GA89686@stud.fit.vutbr.cz> In-Reply-To: <20060814170418.GA89686@stud.fit.vutbr.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: emulation@freebsd.org, current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 14:24:01 -0000 Divacky Roman wrote: > Hi, > > I am a student doing SoC linuxolator update. The work involved updating > linuxolator to be able to work with 2.6.x (2.6.16 in my case) kernel emulation. > > To be able to run 2.6.x emulation I had to implement NPTL, which means NPTL, futexes > and thread area, pid mangling + various hacks to make it work. > > This is the first patch meant for public revision/testing: > > www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch Very nice work! You can find some comments below. --- amd64/linux32/linux.h.orig +++ amd64/linux32/linux.h ... + +struct l_desc_struct { + unsigned long a,b; +}; + Please change this so that the two fields are on separate lines. Also, is there a reason you're using "unsigned long" and not "l_ulong"? On amd64 long are 64bit long while on i386 they are 32 bits, so there might be problems, if you're trying to 'emulate' 32bit linux programs on amd64. + +#define LINUX_LOWERWORD 0x0000ffff + Technically, it's the lower half-word. --- amd64/linux32/linux32_machdep.c.orig +++ amd64/linux32/linux32_machdep.c ... - td2->td_frame->tf_rsp = PTROUT(args->stack); + /* in a case of stack = NULL we are supposed to COW calling process stack + * this is what normal fork() does so we just keep the tf_rsp arg intact + */ + if (args->stack) + td2->td_frame->tf_rsp = PTROUT(args->stack); style(9) says multi-line comments have to start with /* on a line of its own. Please fix all the instances of this. --- /dev/null Mon Aug 14 18:44:00 2006 +++ compat/linux/linux_emul.c Mon Aug 14 18:46:20 2006 + +struct sx emul_shared_lock; +struct sx emul_lock; Are you using sx instead of rwlocks because you need to sleep in linux_schedtail() while holding the lock? + +/* this returns locked reference to the emuldata entry (if found) */ +struct linux_emuldata * +em_find(struct proc *p, int locked) +{ + struct linux_emuldata *em; + + if (locked == EMUL_UNLOCKED) + EMUL_LOCK(&emul_lock); + + em = p->p_emuldata; + + if (em == NULL && locked == EMUL_UNLOCKED) + EMUL_UNLOCK(&emul_lock); + + return (em); +} + +int +linux_proc_init(struct thread *td, pid_t child, int flags) +{ + struct linux_emuldata *em, *p_em; + struct proc *p; + + if (child != 0) { + /* non-exec call */ + MALLOC(em, struct linux_emuldata *, sizeof *em, M_LINUX, M_WAITOK | M_ZERO); + em->pid = child; + if (flags & CLONE_VM) { + /* handled later in the code */ + } else { + struct linux_emuldata_shared *s; + + MALLOC(s, struct linux_emuldata_shared *, sizeof *s, M_LINUX, M_WAITOK | M_ZERO); + em->shared = s; + s->refs = 1; + s->group_pid = child; + + LIST_INIT(&s->threads); + } + p = pfind(child); + if (p == NULL) + panic("process not found in proc_init\n"); Why not use KASSERT(p != NULL, ("process not found in proc_init\n")); ? + p->p_emuldata = em; + PROC_UNLOCK(p); + } else { + /* lookup the old one */ + em = em_find(td->td_proc, EMUL_UNLOCKED); According to sys/proc.h you're supposed to hold the proc lock when accessing p->p_emuldata. + KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); + } + + em->child_clear_tid = NULL; + em->child_set_tid = NULL; + + /* allocate the shared struct only in clone()/fork cases + * in the case of clone() td = calling proc and child = pid of + * the newly created proc + */ + if (child != 0) { + if (flags & CLONE_VM) { + /* lookup the parent */ + p_em = em_find(td->td_proc, EMUL_LOCKED); + KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_VM\n")); + em->shared = p_em->shared; + em->shared->refs++; This is unsafe. Please use the functions in sys/refcount.h. + } else { + /* handled earlier to avoid malloc(M_WAITOK) with rwlock held */ + } + } + + + if (child != 0) { + EMUL_SHARED_WLOCK(&emul_shared_lock); + LIST_INSERT_HEAD(&em->shared->threads, em, threads); + EMUL_SHARED_WUNLOCK(&emul_shared_lock); + + p = pfind(child); + PROC_UNLOCK(p); + /* we might have a sleeping linux_schedtail */ + wakeup(&p->p_emuldata); Again, you need to hold the proc lock when accessing p->p_emuldata. + } else + EMUL_UNLOCK(&emul_lock); + + return (0); +} + +void +linux_proc_exit(void *arg __unused, struct proc *p) +{ + struct linux_emuldata *em; + int error; + struct thread *td = FIRST_THREAD_IN_PROC(p); Don't you need to hold sched_lock to access p->p_threads? + int *child_clear_tid; + + if (__predict_true(p->p_sysent != &elf_linux_sysvec)) + return; + + /* find the emuldata */ + em = em_find(p, EMUL_UNLOCKED); proc lock.. :-) + + KASSERT(em != NULL, ("proc_exit: emuldata not found.\n")); + + child_clear_tid = em->child_clear_tid; + + EMUL_UNLOCK(&emul_lock); + + EMUL_SHARED_WLOCK(&emul_shared_lock); Is this safe? + LIST_REMOVE(em, threads); + + PROC_LOCK(p); + p->p_emuldata = NULL; + PROC_UNLOCK(p); + + em->shared->refs--; + if (em->shared->refs == 0) sys/refcount.h + FREE(em->shared, M_LINUX); + EMUL_SHARED_WUNLOCK(&emul_shared_lock); + + if (child_clear_tid != NULL) { + struct linux_sys_futex_args cup; + int null = 0; + + error = copyout(&null, child_clear_tid, sizeof(null)); + if (error) + return; You're forgetting to free em before returning. + + /* futexes stuff */ + cup.uaddr = child_clear_tid; + cup.op = LINUX_FUTEX_WAKE; + cup.val = 0x7fffffff; /* Awake everyone */ + cup.timeout = NULL; + cup.uaddr2 = NULL; + cup.val3 = 0; + error = linux_sys_futex(FIRST_THREAD_IN_PROC(p), &cup); + /* this cannot happen at the moment and if this happens + * it probably mean there is a userspace bug + */ Wrong indentation. + if (error) + printf(LMSG("futex stuff in proc_exit failed.\n")); + } ... + +extern int hz; /* in subr_param.c */ + Why don't you include sys/time.h? + +void +linux_schedtail(void *arg __unused, struct proc *p) +{ + struct linux_emuldata *em; + int error = 0; +#ifdef DEBUG + struct thread *td = FIRST_THREAD_IN_PROC(p); +#endif + int *child_set_tid; + + if (p->p_sysent != &elf_linux_sysvec) + return; + +retry: + /* find the emuldata */ + em = em_find(p, EMUL_UNLOCKED); + + if (em == NULL) { + /* We might have been called before proc_init for this process so + * tsleep and be woken up by it. We use p->p_emuldata for this + */ + + error = tsleep(&p->p_emuldata, PLOCK, "linux_schedtail", hz); + if (error == 0) + goto retry; Why are you setting a timeout if you just retry when it expires? + panic("no emuldata found for userreting process.\n"); + } + child_set_tid = em->child_set_tid; + EMUL_UNLOCK(&emul_lock); + + if (child_set_tid != NULL) + error = copyout(&p->p_pid, (int *) child_set_tid, sizeof(p->p_pid)); + + return; +} --- compat/linux/linux_misc.c.orig +++ compat/linux/linux_misc.c @@ -93,6 +94,9 @@ #define BSD_TO_LINUX_SIGNAL(sig) \ (((sig) <= LINUX_SIGTBLSZ) ? bsd_to_linux_signal[_SIG_IDX(sig)] : sig) +extern struct sx emul_shared_lock; +extern struct sx emul_lock; + Please move these to compat/linux/linux_emul.h ... + + pp = p->p_pptr; /* switch to parent */ + PROC_LOCK(pp); + PROC_UNLOCK(p); + You might have to hold the proctree_lock here. --- compat/linux/linux_signal.c.orig +++ compat/linux/linux_signal.c + if (args->tgid == -1) + return linux_kill(td, &ka); + + if ((p = pfind(args->pid)) == NULL) + return ESRCH; + + if (p->p_sysent != &elf_linux_sysvec) + return ESRCH; Please use return (...); -- Suleiman From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 14:55:31 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BAE116A4DA; Tue, 15 Aug 2006 14:55:31 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8598843D72; Tue, 15 Aug 2006 14:55:25 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7FEtHwi058348 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 15 Aug 2006 16:55:17 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7FEtHhU058347; Tue, 15 Aug 2006 16:55:17 +0200 (CEST) Date: Tue, 15 Aug 2006 16:55:17 +0200 From: Divacky Roman To: John Baldwin Message-ID: <20060815145517.GA50007@stud.fit.vutbr.cz> References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608150910.51434.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200608150910.51434.jhb@freebsd.org> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 14:55:31 -0000 On Tue, Aug 15, 2006 at 09:10:50AM -0400, John Baldwin wrote: > On Monday 14 August 2006 13:04, Divacky Roman wrote: > > Hi, > > > > I am a student doing SoC linuxolator update. The work involved updating > > linuxolator to be able to work with 2.6.x (2.6.16 in my case) kernel emulation. > > > > To be able to run 2.6.x emulation I had to implement NPTL, which means NPTL, futexes > > and thread area, pid mangling + various hacks to make it work. > > > > This is the first patch meant for public revision/testing: > > > > www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch > > Some comments: > > - You shouldn't add new nested includes (such as in > amd64/linux32/linux.h), especially sys/lock.h, sys/mutex.h, and > sys/sx.h. (If you need to examine mutex internals you would include > sys/_mutex.h in a header, but for normal API usage you need to > include sys/mutex.h and sys/lock.h in the appropriate C files. > sys/param.h is far too large of a header to be used in a nested > include. 1) fixed. thnx! > - Check style(9). For example, block comments should look like this: > > /* > * This is a really long comment that takes up > * more than one line. > */ > > rather than this: > > /* this is a really long comment that takes up > * more than one line > */ 2) fixed. thnx! > - You use the EMUL_LOCK in em_find() to look at p_emuldata but don't > hold it when writing to p_emuldata in linux_proc_init(). There you > only hold the proc lock. 3) fixed. thnx! > - You should probably hold the proc lock until after the wakeup() > in linux_proc_init() since the pfind() / proc_unlock() is what holds > a reference to keep the child from going away. 4) fixed. thnx! > - In linux_proc_init() you pass EMUL_LOCKED to em_find() in the CLONE_VM > case when the lock isn't held. 5) fixed by fix #5, thnx! > - Personal style: please use malloc() and free() rather than MALLOC() and > FREE(). We haven't inlined malloc() in a long, long time and the macros > are really there for older code. 6) fixed. thnx! > - You tsleep() in linux_schedtail() while holding one lock and do the > wakeup() in linux_proc_init() while holding no locks. You've got lost > wakeup races that way that you work around by having to use a goto and > a sleep with a timeout. 7) I dont understand this. can you explain more? thnx > - You should include the appropriate header to get the declaration of 'hz' > rather than just adding an 'extern' directly in your code. 8) I didnt find such header. > - In futex_get() you don't handle the race of two concurrent creates. 9) hopefully fixed. > - In futex_sleep(), you probably should be using an interlocked sleep such > as msleep() or cv_wait() to avoid lost wakeups. 10) open issue, this is currently under investigation because we in fact happen to have problems with futexes > - In futex_sleep(), you should probably loop rather than recurse to avoid > blowing the stack. 11) I am not sure about the logic but I think the recursion is done exactly once I'll coordinate with manu@netbsd > - In futex_atomic_op(), if you take a page fault on one of your operations > it's going to blow up because of the page fault during a critical section. > Your futex ops should be atomic (perhaps you can do them all using > casuptr()?) and you shouldn't use a critical section here. 12) the operations should be atomic (the operation on shared data is atomic) so I just removed the crit section. > - You should stick the sx locks in a header and not litter 'externs' in > source files. 13) fixed. thnx! > - Should come up with a better name than 'schedtail' for the eventhandler > in fork_exit(). Maybe 'process_fork_exit'? 14) linux uses this name. I might change it but I think its ok to be in sync with linux. > - You should probably ask Peter to review the link_elf_obj change. An > alternative is to use linker_lookup_set() in your module load routine to > lookup your linker set details. 15) yes... when I start working on amd64 I will definitely do something about it > - Regarding the locking, I'm not sure why you have the two separate sx locks, > and why you don't just merge them into a single lock instead. 16) it makes the locking easier and they cover different things. I like it this way :) thnx for exhausting review! I commited some fixes to p4, you might want to check them roman From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 15:09:11 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF28E16A523; Tue, 15 Aug 2006 15:09:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50DA943E79; Tue, 15 Aug 2006 15:08:20 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7FF84WD028048; Tue, 15 Aug 2006 11:08:08 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Tue, 15 Aug 2006 11:01:30 -0400 User-Agent: KMail/1.9.1 References: <20060814170418.GA89686@stud.fit.vutbr.cz> <44E1D8E2.9060200@FreeBSD.org> In-Reply-To: <44E1D8E2.9060200@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608151101.30951.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 15 Aug 2006 11:08:09 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1663/Tue Aug 15 09:08:37 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: emulation@freebsd.org, Suleiman Souhlal Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 15:09:12 -0000 On Tuesday 15 August 2006 10:23, Suleiman Souhlal wrote: > > Why not use KASSERT(p != NULL, ("process not found in proc_init\n")); ? > > + p->p_emuldata = em; > + PROC_UNLOCK(p); > + } else { > + /* lookup the old one */ > + em = em_find(td->td_proc, EMUL_UNLOCKED); > > According to sys/proc.h you're supposed to hold the proc lock when > accessing p->p_emuldata. That is possibly sketchier as if an ABI always sets p_emuldata on fork/exec and only curthread accesses curproc->p_emuldata you can probably just not have to do any locking at all as it will actually be effectively read-only. The emuldata fields can have different strategies in different ABIs because they will be used differently. Note how so_emuldata is locked by SOCK_LOCK() in the Linux ABI, but isn't locked in the svr4/streams code because it's set on socket creation and static until socket close. > + KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); > + } > + > + em->child_clear_tid = NULL; > + em->child_set_tid = NULL; > + > + /* allocate the shared struct only in clone()/fork cases > + * in the case of clone() td = calling proc and child = pid of > + * the newly created proc > + */ > + if (child != 0) { > + if (flags & CLONE_VM) { > + /* lookup the parent */ > + p_em = em_find(td->td_proc, EMUL_LOCKED); > + KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for > CLONE_VM\n")); > + em->shared = p_em->shared; > + em->shared->refs++; > > This is unsafe. Please use the functions in sys/refcount.h. Well, in this case he's already holding a lock. If he always holds a lock when accessing and modifying refs, then refcount_*() would only add overhead. > + } else { > + /* handled earlier to avoid malloc(M_WAITOK) with rwlock held */ > + } > + } > + > + > + if (child != 0) { > + EMUL_SHARED_WLOCK(&emul_shared_lock); > + LIST_INSERT_HEAD(&em->shared->threads, em, threads); > + EMUL_SHARED_WUNLOCK(&emul_shared_lock); > + > + p = pfind(child); > + PROC_UNLOCK(p); > + /* we might have a sleeping linux_schedtail */ > + wakeup(&p->p_emuldata); > > Again, you need to hold the proc lock when accessing p->p_emuldata. See above, but there is another concern here in that once you drop the proc lock, the 'p' process might go away, be free'd, etc. (Especially if you are preempted right after the PROC_UNLOCK()) > + > +void > +linux_schedtail(void *arg __unused, struct proc *p) > +{ > + struct linux_emuldata *em; > + int error = 0; > +#ifdef DEBUG > + struct thread *td = FIRST_THREAD_IN_PROC(p); > +#endif > + int *child_set_tid; > + > + if (p->p_sysent != &elf_linux_sysvec) > + return; > + > +retry: > + /* find the emuldata */ > + em = em_find(p, EMUL_UNLOCKED); > + > + if (em == NULL) { > + /* We might have been called before proc_init for this process so > + * tsleep and be woken up by it. We use p->p_emuldata for this > + */ > + > + error = tsleep(&p->p_emuldata, PLOCK, "linux_schedtail", hz); > + if (error == 0) > + goto retry; > > Why are you setting a timeout if you just retry when it expires? In this case it is a workaround for lost wakeups since it's not an interlocked sleep and wakeup. :) > ... > + > + pp = p->p_pptr; /* switch to parent */ > + PROC_LOCK(pp); > + PROC_UNLOCK(p); > + > > You might have to hold the proctree_lock here. Actually, for this he is fine, as the proc lock is sufficient to access p->p_pptr, and the parent process can't go away w/o acquiring the child's lock and reparenting it to init. -- John Baldwin From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 15:21:15 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AFB616A4DD; Tue, 15 Aug 2006 15:21:15 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0164E43D73; Tue, 15 Aug 2006 15:21:14 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [172.30.10.238] (unknown [216.239.55.7]) by elvis.mu.org (Postfix) with ESMTP id 081E61A3C20; Tue, 15 Aug 2006 08:21:13 -0700 (PDT) Message-ID: <44E1E64F.6020205@FreeBSD.org> Date: Tue, 15 Aug 2006 17:20:47 +0200 From: Suleiman Souhlal User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <20060814170418.GA89686@stud.fit.vutbr.cz> <44E1D8E2.9060200@FreeBSD.org> <200608151101.30951.jhb@freebsd.org> In-Reply-To: <200608151101.30951.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 15:21:15 -0000 John Baldwin wrote: > >>+ KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); >>+ } >>+ >>+ em->child_clear_tid = NULL; >>+ em->child_set_tid = NULL; >>+ >>+ /* allocate the shared struct only in clone()/fork cases >>+ * in the case of clone() td = calling proc and child = pid of >>+ * the newly created proc >>+ */ >>+ if (child != 0) { >>+ if (flags & CLONE_VM) { >>+ /* lookup the parent */ >>+ p_em = em_find(td->td_proc, EMUL_LOCKED); >>+ KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for >>CLONE_VM\n")); >>+ em->shared = p_em->shared; >>+ em->shared->refs++; >> >>This is unsafe. Please use the functions in sys/refcount.h. > > > Well, in this case he's already holding a lock. If he always holds a lock > when accessing and modifying refs, then refcount_*() would only add overhead. Isn't he holding the wrong lock (emul_lock vs emul_shared_lock)? >>+ >>+void >>+linux_schedtail(void *arg __unused, struct proc *p) >>+{ >>+ struct linux_emuldata *em; >>+ int error = 0; >>+#ifdef DEBUG >>+ struct thread *td = FIRST_THREAD_IN_PROC(p); >>+#endif >>+ int *child_set_tid; >>+ >>+ if (p->p_sysent != &elf_linux_sysvec) >>+ return; >>+ >>+retry: >>+ /* find the emuldata */ >>+ em = em_find(p, EMUL_UNLOCKED); >>+ >>+ if (em == NULL) { >>+ /* We might have been called before proc_init for this process so >>+ * tsleep and be woken up by it. We use p->p_emuldata for this >>+ */ >>+ >>+ error = tsleep(&p->p_emuldata, PLOCK, "linux_schedtail", hz); >>+ if (error == 0) >>+ goto retry; >> >>Why are you setting a timeout if you just retry when it expires? > > > In this case it is a workaround for lost wakeups since it's not an interlocked > sleep and wakeup. :) Ew.. Thanks, -- Suleiman From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 16:00:05 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28EF616A4DA; Tue, 15 Aug 2006 16:00:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE9DB43D67; Tue, 15 Aug 2006 15:59:54 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7FFxnnk028428; Tue, 15 Aug 2006 11:59:50 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Divacky Roman Date: Tue, 15 Aug 2006 11:48:15 -0400 User-Agent: KMail/1.9.1 References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608150910.51434.jhb@freebsd.org> <20060815145517.GA50007@stud.fit.vutbr.cz> In-Reply-To: <20060815145517.GA50007@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608151148.16280.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 15 Aug 2006 11:59:50 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1664/Tue Aug 15 10:28:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 16:00:05 -0000 On Tuesday 15 August 2006 10:55, Divacky Roman wrote: > > - You tsleep() in linux_schedtail() while holding one lock and do the > > wakeup() in linux_proc_init() while holding no locks. You've got lost > > wakeup races that way that you work around by having to use a goto and > > a sleep with a timeout. > > 7) I dont understand this. can you explain more? thnx Suppose you have two threads like so: thread A thread B FOO_LOCK(); ... if (foo) ... FOO_UNLOCK() FOO_LOCK() ... foo = 1 ... wakeup(&foo); tsleep(&foo); ... ... FOO_UNLOCK() thread A isn't going to get the wakeup from B. The solution is an interlocked sleep where you release the lock and put the thread to sleep as an 'atomic operation'. If you are familiar with pthreads, this is why pthread condition variables take a mutex argument to their wait functions (and why in the kernel cv_wait* and msleep() both take a mutex arg), they use internal locking to atomically drop the lock and block to avoid that race. interlocked sleeps aren't likely to be implemented for sx locks, but I will need to add them for rwlocks before too long. For now, if you stick with mutexes you can use either condition variables or msleep() to avoid this. > > - You should include the appropriate header to get the declaration of 'hz' > > rather than just adding an 'extern' directly in your code. > > 8) I didnt find such header. [11:41:39] (ttyp7) jhb@mutex:~/work/cvs/sys > grep hz * ... kernel.h:extern int tick; /* usec per tick (1000000 / hz) */ kernel.h:extern int hz; /* system clock's frequency */ kernel.h:extern int stathz; /* statistics clock's frequency */ kernel.h:extern int profhz; /* profiling clock's frequency */ ... #include > > - In futex_get() you don't handle the race of two concurrent creates. > > 9) hopefully fixed. See my replies to your p4 submits.. > > - Should come up with a better name than 'schedtail' for the eventhandler > > in fork_exit(). Maybe 'process_fork_exit'? > > 14) linux uses this name. I might change it but I think its ok to be in sync > with linux. Yes, but this is FreeBSD, and all the other process related eventhandlers are called process_. :) A generic eventhandler might be used by more than just the Linux ABI. > > - You should probably ask Peter to review the link_elf_obj change. An > > alternative is to use linker_lookup_set() in your module load routine to > > lookup your linker set details. > > 15) yes... when I start working on amd64 I will definitely do something about it What I did for my debug kernel modules is something like this: struct crash_event { const char *ev_name; void (*ev_handler)(void); }; #define CRASH_EVENT(name, function) \ static struct crash_event function ## _crash_event = \ { name, function }; \ DATA_SET(crash_event_set, function ## _crash_event) #define MAX_EVENT event_max static int event_max; static struct crash_event **event_start, **event_stop; Then in my module event handler: switch (cmd) { case MOD_LOAD: error = linker_file_lookup_set(module_file(module), "crash_event_set", &event_start, &event_stop, &event_max); if (error) break; Here's a sample foreach loop: for (ev = event_start; ev < event_stop; ev++) { /* Skip null event 0. */ if ((*ev)->ev_name == NULL) continue; printf("%4td %s\n", ev - event_start, (*ev)->ev_name); } and here's a sample index operation: if (ev < 0 || ev >= MAX_EVENT) { printf("crash: event %d is not defined!\n", event); continue; } evp = event_start[ev]; printf("crash: %s\n", evp->ev_name); evp->ev_handler(); (If you want to see this specific module more, you can view it at //depot/projects/smpng/sys/modules/crash/crash.c. There's a crash2/crash2.c that is similar as well.) > > - Regarding the locking, I'm not sure why you have the two separate sx locks, > > and why you don't just merge them into a single lock instead. > > 16) it makes the locking easier and they cover different things. I like it this way :) I think it might be prone to races though. If you are almost always acquiring the same two locks in lockstep, then all you are doing is adding overhead. > thnx for exhausting review! I commited some fixes to p4, you might want to check them I am. :) -- John Baldwin From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 16:00:05 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0789716A4E5; Tue, 15 Aug 2006 16:00:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id D84CE43D78; Tue, 15 Aug 2006 15:59:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7FFxnnl028428; Tue, 15 Aug 2006 11:59:54 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Suleiman Souhlal Date: Tue, 15 Aug 2006 11:49:19 -0400 User-Agent: KMail/1.9.1 References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608151101.30951.jhb@freebsd.org> <44E1E64F.6020205@FreeBSD.org> In-Reply-To: <44E1E64F.6020205@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608151149.20338.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 15 Aug 2006 11:59:54 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1664/Tue Aug 15 10:28:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 16:00:05 -0000 On Tuesday 15 August 2006 11:20, Suleiman Souhlal wrote: > John Baldwin wrote: > > > >>+ KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); > >>+ } > >>+ > >>+ em->child_clear_tid = NULL; > >>+ em->child_set_tid = NULL; > >>+ > >>+ /* allocate the shared struct only in clone()/fork cases > >>+ * in the case of clone() td = calling proc and child = pid of > >>+ * the newly created proc > >>+ */ > >>+ if (child != 0) { > >>+ if (flags & CLONE_VM) { > >>+ /* lookup the parent */ > >>+ p_em = em_find(td->td_proc, EMUL_LOCKED); > >>+ KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for > >>CLONE_VM\n")); > >>+ em->shared = p_em->shared; > >>+ em->shared->refs++; > >> > >>This is unsafe. Please use the functions in sys/refcount.h. > > > > > > Well, in this case he's already holding a lock. If he always holds a lock > > when accessing and modifying refs, then refcount_*() would only add overhead. > > Isn't he holding the wrong lock (emul_lock vs emul_shared_lock)? Maybe. I think those should be merged into one lock anyway. :) -- John Baldwin From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 16:30:29 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08CBF16A589; Tue, 15 Aug 2006 16:30:29 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id D05B743E5F; Tue, 15 Aug 2006 16:27:58 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7FGRrSA062366 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 15 Aug 2006 18:27:53 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7FGRrr9062365; Tue, 15 Aug 2006 18:27:53 +0200 (CEST) Date: Tue, 15 Aug 2006 18:27:53 +0200 From: Divacky Roman To: John Baldwin Message-ID: <20060815162753.GA62266@stud.fit.vutbr.cz> References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608151101.30951.jhb@freebsd.org> <44E1E64F.6020205@FreeBSD.org> <200608151149.20338.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200608151149.20338.jhb@freebsd.org> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: emulation@freebsd.org, freebsd-current@freebsd.org, Suleiman Souhlal Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 16:30:29 -0000 On Tue, Aug 15, 2006 at 11:49:19AM -0400, John Baldwin wrote: > On Tuesday 15 August 2006 11:20, Suleiman Souhlal wrote: > > John Baldwin wrote: > > > > > >>+ KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); > > >>+ } > > >>+ > > >>+ em->child_clear_tid = NULL; > > >>+ em->child_set_tid = NULL; > > >>+ > > >>+ /* allocate the shared struct only in clone()/fork cases > > >>+ * in the case of clone() td = calling proc and child = pid of > > >>+ * the newly created proc > > >>+ */ > > >>+ if (child != 0) { > > >>+ if (flags & CLONE_VM) { > > >>+ /* lookup the parent */ > > >>+ p_em = em_find(td->td_proc, EMUL_LOCKED); > > >>+ KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for > > >>CLONE_VM\n")); > > >>+ em->shared = p_em->shared; > > >>+ em->shared->refs++; > > >> > > >>This is unsafe. Please use the functions in sys/refcount.h. > > > > > > > > > Well, in this case he's already holding a lock. If he always holds a lock > > > when accessing and modifying refs, then refcount_*() would only add > overhead. > > > > Isn't he holding the wrong lock (emul_lock vs emul_shared_lock)? > > Maybe. I think those should be merged into one lock anyway. :) it used to be one lock, but it caused more problems then now... pls, let me fix all the issue and then judge, ok? :) From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:32:21 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98BC416A53F for ; Tue, 15 Aug 2006 23:32:21 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CC9843D72 for ; Tue, 15 Aug 2006 23:31:50 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 2D413CDA30; Wed, 16 Aug 2006 01:31:45 +0200 (MEST) Received: (qmail 12917 invoked by uid 10); 16 Aug 2006 01:21:13 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Mon Aug 14 19:04:58 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id C954FCD841 for ; Mon, 14 Aug 2006 19:04:57 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 852DA645CC; Mon, 14 Aug 2006 17:04:41 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id D159F16A5B2; Mon, 14 Aug 2006 17:04:33 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F87516A4E1; Mon, 14 Aug 2006 17:04:28 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD67843D45; Mon, 14 Aug 2006 17:04:24 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7EH4IQa094217 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 14 Aug 2006 19:04:18 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7EH4IBY094216; Mon, 14 Aug 2006 19:04:18 +0200 (CEST) Date: Mon, 14 Aug 2006 19:04:18 +0200 From: Divacky Roman To: current@freebsd.org Message-ID: <20060814170418.GA89686@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org Subject: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:32:21 -0000 Hi, I am a student doing SoC linuxolator update. The work involved updating linuxolator to be able to work with 2.6.x (2.6.16 in my case) kernel emulation. To be able to run 2.6.x emulation I had to implement NPTL, which means NPTL, futexes and thread area, pid mangling + various hacks to make it work. This is the first patch meant for public revision/testing: www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch What works/doesnt work is described here: http://wikitest.freebsd.org/linuxolator-patch-status This is not finished but its good enough to be commited. The plan now is to commit this soon to src (because of coverity testing and more public testing). How to test: you have to have i386 system (amd64 is WIP now) cd /sys fetch http://www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch patch < linuxolator26-diff.patch recompile kernel and boot this patch comes with compat.linux.osrelease=2.6.16 so you dont have to set anything. what will be commited to src will have 2.4.2 default so everything should work like now. please test with both 2.6.16 and 2.4.2. What I care about: - if you see any panics, LORs etc. please report - pls report if something doesnt work for other reason then sleeping on linuxfutex (this is being worked on) thnx Roman Divacky _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:44:05 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD18B16A4DA for ; Tue, 15 Aug 2006 23:44:05 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EDDF43D55 for ; Tue, 15 Aug 2006 23:44:01 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 09330CDA37; Wed, 16 Aug 2006 01:43:58 +0200 (MEST) Received: (qmail 15964 invoked by uid 10); 16 Aug 2006 01:38:05 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 18:10:33 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id 5C016CD835 for ; Tue, 15 Aug 2006 18:10:33 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 0B58A92E89; Tue, 15 Aug 2006 16:01:09 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 59FCF16A661; Tue, 15 Aug 2006 16:00:41 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0789716A4E5; Tue, 15 Aug 2006 16:00:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id D84CE43D78; Tue, 15 Aug 2006 15:59:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7FFxnnl028428; Tue, 15 Aug 2006 11:59:54 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Suleiman Souhlal Date: Tue, 15 Aug 2006 11:49:19 -0400 User-Agent: KMail/1.9.1 References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608151101.30951.jhb@freebsd.org> <44E1E64F.6020205@FreeBSD.org> In-Reply-To: <44E1E64F.6020205@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608151149.20338.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 15 Aug 2006 11:59:54 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1664/Tue Aug 15 10:28:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:44:05 -0000 On Tuesday 15 August 2006 11:20, Suleiman Souhlal wrote: > John Baldwin wrote: > > > >>+ KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); > >>+ } > >>+ > >>+ em->child_clear_tid = NULL; > >>+ em->child_set_tid = NULL; > >>+ > >>+ /* allocate the shared struct only in clone()/fork cases > >>+ * in the case of clone() td = calling proc and child = pid of > >>+ * the newly created proc > >>+ */ > >>+ if (child != 0) { > >>+ if (flags & CLONE_VM) { > >>+ /* lookup the parent */ > >>+ p_em = em_find(td->td_proc, EMUL_LOCKED); > >>+ KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for > >>CLONE_VM\n")); > >>+ em->shared = p_em->shared; > >>+ em->shared->refs++; > >> > >>This is unsafe. Please use the functions in sys/refcount.h. > > > > > > Well, in this case he's already holding a lock. If he always holds a lock > > when accessing and modifying refs, then refcount_*() would only add overhead. > > Isn't he holding the wrong lock (emul_lock vs emul_shared_lock)? Maybe. I think those should be merged into one lock anyway. :) -- John Baldwin _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:44:08 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F62816A539 for ; Tue, 15 Aug 2006 23:44:08 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1F3843D5D for ; Tue, 15 Aug 2006 23:44:03 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 4F59ECDA38; Wed, 16 Aug 2006 01:44:00 +0200 (MEST) Received: (qmail 15951 invoked by uid 10); 16 Aug 2006 01:38:03 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 18:08:01 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id 2D032CD841 for ; Tue, 15 Aug 2006 18:08:01 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id C947692D85; Tue, 15 Aug 2006 16:00:47 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 527C916A574; Tue, 15 Aug 2006 16:00:35 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28EF616A4DA; Tue, 15 Aug 2006 16:00:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE9DB43D67; Tue, 15 Aug 2006 15:59:54 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7FFxnnk028428; Tue, 15 Aug 2006 11:59:50 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Divacky Roman Date: Tue, 15 Aug 2006 11:48:15 -0400 User-Agent: KMail/1.9.1 References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608150910.51434.jhb@freebsd.org> <20060815145517.GA50007@stud.fit.vutbr.cz> In-Reply-To: <20060815145517.GA50007@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608151148.16280.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 15 Aug 2006 11:59:50 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1664/Tue Aug 15 10:28:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:44:08 -0000 On Tuesday 15 August 2006 10:55, Divacky Roman wrote: > > - You tsleep() in linux_schedtail() while holding one lock and do the > > wakeup() in linux_proc_init() while holding no locks. You've got lost > > wakeup races that way that you work around by having to use a goto and > > a sleep with a timeout. > > 7) I dont understand this. can you explain more? thnx Suppose you have two threads like so: thread A thread B FOO_LOCK(); ... if (foo) ... FOO_UNLOCK() FOO_LOCK() ... foo = 1 ... wakeup(&foo); tsleep(&foo); ... ... FOO_UNLOCK() thread A isn't going to get the wakeup from B. The solution is an interlocked sleep where you release the lock and put the thread to sleep as an 'atomic operation'. If you are familiar with pthreads, this is why pthread condition variables take a mutex argument to their wait functions (and why in the kernel cv_wait* and msleep() both take a mutex arg), they use internal locking to atomically drop the lock and block to avoid that race. interlocked sleeps aren't likely to be implemented for sx locks, but I will need to add them for rwlocks before too long. For now, if you stick with mutexes you can use either condition variables or msleep() to avoid this. > > - You should include the appropriate header to get the declaration of 'hz' > > rather than just adding an 'extern' directly in your code. > > 8) I didnt find such header. [11:41:39] (ttyp7) jhb@mutex:~/work/cvs/sys > grep hz * ... kernel.h:extern int tick; /* usec per tick (1000000 / hz) */ kernel.h:extern int hz; /* system clock's frequency */ kernel.h:extern int stathz; /* statistics clock's frequency */ kernel.h:extern int profhz; /* profiling clock's frequency */ ... #include > > - In futex_get() you don't handle the race of two concurrent creates. > > 9) hopefully fixed. See my replies to your p4 submits.. > > - Should come up with a better name than 'schedtail' for the eventhandler > > in fork_exit(). Maybe 'process_fork_exit'? > > 14) linux uses this name. I might change it but I think its ok to be in sync > with linux. Yes, but this is FreeBSD, and all the other process related eventhandlers are called process_. :) A generic eventhandler might be used by more than just the Linux ABI. > > - You should probably ask Peter to review the link_elf_obj change. An > > alternative is to use linker_lookup_set() in your module load routine to > > lookup your linker set details. > > 15) yes... when I start working on amd64 I will definitely do something about it What I did for my debug kernel modules is something like this: struct crash_event { const char *ev_name; void (*ev_handler)(void); }; #define CRASH_EVENT(name, function) \ static struct crash_event function ## _crash_event = \ { name, function }; \ DATA_SET(crash_event_set, function ## _crash_event) #define MAX_EVENT event_max static int event_max; static struct crash_event **event_start, **event_stop; Then in my module event handler: switch (cmd) { case MOD_LOAD: error = linker_file_lookup_set(module_file(module), "crash_event_set", &event_start, &event_stop, &event_max); if (error) break; Here's a sample foreach loop: for (ev = event_start; ev < event_stop; ev++) { /* Skip null event 0. */ if ((*ev)->ev_name == NULL) continue; printf("%4td %s\n", ev - event_start, (*ev)->ev_name); } and here's a sample index operation: if (ev < 0 || ev >= MAX_EVENT) { printf("crash: event %d is not defined!\n", event); continue; } evp = event_start[ev]; printf("crash: %s\n", evp->ev_name); evp->ev_handler(); (If you want to see this specific module more, you can view it at //depot/projects/smpng/sys/modules/crash/crash.c. There's a crash2/crash2.c that is similar as well.) > > - Regarding the locking, I'm not sure why you have the two separate sx locks, > > and why you don't just merge them into a single lock instead. > > 16) it makes the locking easier and they cover different things. I like it this way :) I think it might be prone to races though. If you are almost always acquiring the same two locks in lockstep, then all you are doing is adding overhead. > thnx for exhausting review! I commited some fixes to p4, you might want to check them I am. :) -- John Baldwin _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:44:32 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7922816A4DD for ; Tue, 15 Aug 2006 23:44:32 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C101043D60 for ; Tue, 15 Aug 2006 23:44:20 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 51C0FCDA2D; Wed, 16 Aug 2006 01:44:17 +0200 (MEST) Received: (qmail 15441 invoked by uid 10); 16 Aug 2006 01:37:24 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 15:19:36 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id AA443CD835 for ; Tue, 15 Aug 2006 15:19:35 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id C461E924CC; Tue, 15 Aug 2006 13:15:53 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 0571B16A642; Tue, 15 Aug 2006 13:15:35 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82B8816A4E0; Tue, 15 Aug 2006 13:14:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D0E543D49; Tue, 15 Aug 2006 13:14:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7FDEp8h027268; Tue, 15 Aug 2006 09:14:51 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Tue, 15 Aug 2006 09:10:50 -0400 User-Agent: KMail/1.9.1 References: <20060814170418.GA89686@stud.fit.vutbr.cz> In-Reply-To: <20060814170418.GA89686@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608150910.51434.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Tue, 15 Aug 2006 09:14:52 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1662/Tue Aug 15 04:29:25 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:44:32 -0000 On Monday 14 August 2006 13:04, Divacky Roman wrote: > Hi, > > I am a student doing SoC linuxolator update. The work involved updating > linuxolator to be able to work with 2.6.x (2.6.16 in my case) kernel emulation. > > To be able to run 2.6.x emulation I had to implement NPTL, which means NPTL, futexes > and thread area, pid mangling + various hacks to make it work. > > This is the first patch meant for public revision/testing: > > www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch Some comments: - You shouldn't add new nested includes (such as in amd64/linux32/linux.h), especially sys/lock.h, sys/mutex.h, and sys/sx.h. (If you need to examine mutex internals you would include sys/_mutex.h in a header, but for normal API usage you need to include sys/mutex.h and sys/lock.h in the appropriate C files. sys/param.h is far too large of a header to be used in a nested include. - Check style(9). For example, block comments should look like this: /* * This is a really long comment that takes up * more than one line. */ rather than this: /* this is a really long comment that takes up * more than one line */ - You use the EMUL_LOCK in em_find() to look at p_emuldata but don't hold it when writing to p_emuldata in linux_proc_init(). There you only hold the proc lock. - You should probably hold the proc lock until after the wakeup() in linux_proc_init() since the pfind() / proc_unlock() is what holds a reference to keep the child from going away. - In linux_proc_init() you pass EMUL_LOCKED to em_find() in the CLONE_VM case when the lock isn't held. - Personal style: please use malloc() and free() rather than MALLOC() and FREE(). We haven't inlined malloc() in a long, long time and the macros are really there for older code. - You tsleep() in linux_schedtail() while holding one lock and do the wakeup() in linux_proc_init() while holding no locks. You've got lost wakeup races that way that you work around by having to use a goto and a sleep with a timeout. - You should include the appropriate header to get the declaration of 'hz' rather than just adding an 'extern' directly in your code. - In futex_get() you don't handle the race of two concurrent creates. - In futex_sleep(), you probably should be using an interlocked sleep such as msleep() or cv_wait() to avoid lost wakeups. - In futex_sleep(), you should probably loop rather than recurse to avoid blowing the stack. - In futex_atomic_op(), if you take a page fault on one of your operations it's going to blow up because of the page fault during a critical section. Your futex ops should be atomic (perhaps you can do them all using casuptr()?) and you shouldn't use a critical section here. - You should stick the sx locks in a header and not litter 'externs' in source files. - Should come up with a better name than 'schedtail' for the eventhandler in fork_exit(). Maybe 'process_fork_exit'? - You should probably ask Peter to review the link_elf_obj change. An alternative is to use linker_lookup_set() in your module load routine to lookup your linker set details. - Regarding the locking, I'm not sure why you have the two separate sx locks, and why you don't just merge them into a single lock instead. -- John Baldwin _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:44:44 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50BD116A4DE for ; Tue, 15 Aug 2006 23:44:44 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C13DC43D6D for ; Tue, 15 Aug 2006 23:44:24 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 608E2CDA31; Wed, 16 Aug 2006 01:44:21 +0200 (MEST) Received: (qmail 15505 invoked by uid 10); 16 Aug 2006 01:37:27 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 15:39:08 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id 1752FCD835 for ; Tue, 15 Aug 2006 15:39:08 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id D69A69252D; Tue, 15 Aug 2006 13:36:58 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 89FD616A5AB; Tue, 15 Aug 2006 13:36:44 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D0D216A4DF; Tue, 15 Aug 2006 13:36:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04C8843D68; Tue, 15 Aug 2006 13:36:22 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k7FDaI5L011074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Aug 2006 16:36:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k7FDaIUZ042125; Tue, 15 Aug 2006 16:36:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k7FDaH8Q042124; Tue, 15 Aug 2006 16:36:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 15 Aug 2006 16:36:17 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20060815133616.GA41562@deviant.kiev.zoral.com.ua> References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608150910.51434.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <200608150910.51434.jhb@freebsd.org> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, SPF_NEUTRAL,UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:44:44 -0000 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 15, 2006 at 09:10:50AM -0400, John Baldwin wrote: > - You should probably ask Peter to review the link_elf_obj change. An > alternative is to use linker_lookup_set() in your module load routine to > lookup your linker set details. I suppose that this is in fact my change. I'm not committing it exactly because I cannot obtain any review from Peter. And, it seems that this is not committed. --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE4c3QC3+MBN1Mb4gRAtByAJwOcBRGm6i5Z7eEBhPUzssWXmePZwCdGOeQ MUdgh128Tr6onu7P1F8CUUE= =pTLU -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:45:10 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E65D16A4EC for ; Tue, 15 Aug 2006 23:45:10 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24A6C43D64 for ; Tue, 15 Aug 2006 23:44:35 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 22B52CDA2D; Wed, 16 Aug 2006 01:44:31 +0200 (MEST) Received: (qmail 15712 invoked by uid 10); 16 Aug 2006 01:37:47 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 17:04:19 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id AEF7ECD835 for ; Tue, 15 Aug 2006 17:04:12 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id D45A4930A2; Tue, 15 Aug 2006 14:55:50 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9205216A5AD; Tue, 15 Aug 2006 14:55:39 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BAE116A4DA; Tue, 15 Aug 2006 14:55:31 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8598843D72; Tue, 15 Aug 2006 14:55:25 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7FEtHwi058348 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 15 Aug 2006 16:55:17 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7FEtHhU058347; Tue, 15 Aug 2006 16:55:17 +0200 (CEST) Date: Tue, 15 Aug 2006 16:55:17 +0200 From: Divacky Roman To: John Baldwin Message-ID: <20060815145517.GA50007@stud.fit.vutbr.cz> References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608150910.51434.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200608150910.51434.jhb@freebsd.org> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:45:10 -0000 On Tue, Aug 15, 2006 at 09:10:50AM -0400, John Baldwin wrote: > On Monday 14 August 2006 13:04, Divacky Roman wrote: > > Hi, > > > > I am a student doing SoC linuxolator update. The work involved updating > > linuxolator to be able to work with 2.6.x (2.6.16 in my case) kernel emulation. > > > > To be able to run 2.6.x emulation I had to implement NPTL, which means NPTL, futexes > > and thread area, pid mangling + various hacks to make it work. > > > > This is the first patch meant for public revision/testing: > > > > www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch > > Some comments: > > - You shouldn't add new nested includes (such as in > amd64/linux32/linux.h), especially sys/lock.h, sys/mutex.h, and > sys/sx.h. (If you need to examine mutex internals you would include > sys/_mutex.h in a header, but for normal API usage you need to > include sys/mutex.h and sys/lock.h in the appropriate C files. > sys/param.h is far too large of a header to be used in a nested > include. 1) fixed. thnx! > - Check style(9). For example, block comments should look like this: > > /* > * This is a really long comment that takes up > * more than one line. > */ > > rather than this: > > /* this is a really long comment that takes up > * more than one line > */ 2) fixed. thnx! > - You use the EMUL_LOCK in em_find() to look at p_emuldata but don't > hold it when writing to p_emuldata in linux_proc_init(). There you > only hold the proc lock. 3) fixed. thnx! > - You should probably hold the proc lock until after the wakeup() > in linux_proc_init() since the pfind() / proc_unlock() is what holds > a reference to keep the child from going away. 4) fixed. thnx! > - In linux_proc_init() you pass EMUL_LOCKED to em_find() in the CLONE_VM > case when the lock isn't held. 5) fixed by fix #5, thnx! > - Personal style: please use malloc() and free() rather than MALLOC() and > FREE(). We haven't inlined malloc() in a long, long time and the macros > are really there for older code. 6) fixed. thnx! > - You tsleep() in linux_schedtail() while holding one lock and do the > wakeup() in linux_proc_init() while holding no locks. You've got lost > wakeup races that way that you work around by having to use a goto and > a sleep with a timeout. 7) I dont understand this. can you explain more? thnx > - You should include the appropriate header to get the declaration of 'hz' > rather than just adding an 'extern' directly in your code. 8) I didnt find such header. > - In futex_get() you don't handle the race of two concurrent creates. 9) hopefully fixed. > - In futex_sleep(), you probably should be using an interlocked sleep such > as msleep() or cv_wait() to avoid lost wakeups. 10) open issue, this is currently under investigation because we in fact happen to have problems with futexes > - In futex_sleep(), you should probably loop rather than recurse to avoid > blowing the stack. 11) I am not sure about the logic but I think the recursion is done exactly once I'll coordinate with manu@netbsd > - In futex_atomic_op(), if you take a page fault on one of your operations > it's going to blow up because of the page fault during a critical section. > Your futex ops should be atomic (perhaps you can do them all using > casuptr()?) and you shouldn't use a critical section here. 12) the operations should be atomic (the operation on shared data is atomic) so I just removed the crit section. > - You should stick the sx locks in a header and not litter 'externs' in > source files. 13) fixed. thnx! > - Should come up with a better name than 'schedtail' for the eventhandler > in fork_exit(). Maybe 'process_fork_exit'? 14) linux uses this name. I might change it but I think its ok to be in sync with linux. > - You should probably ask Peter to review the link_elf_obj change. An > alternative is to use linker_lookup_set() in your module load routine to > lookup your linker set details. 15) yes... when I start working on amd64 I will definitely do something about it > - Regarding the locking, I'm not sure why you have the two separate sx locks, > and why you don't just merge them into a single lock instead. 16) it makes the locking easier and they cover different things. I like it this way :) thnx for exhausting review! I commited some fixes to p4, you might want to check them roman _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:45:35 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3187816A4DA for ; Tue, 15 Aug 2006 23:45:35 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADBC443D46 for ; Tue, 15 Aug 2006 23:44:45 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 88BF8CDA3C; Wed, 16 Aug 2006 01:44:35 +0200 (MEST) Received: (qmail 15824 invoked by uid 10); 16 Aug 2006 01:37:52 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 17:21:53 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id B34CDCD835 for ; Tue, 15 Aug 2006 17:21:52 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 2619B92B76; Tue, 15 Aug 2006 15:21:36 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id A15F916A565; Tue, 15 Aug 2006 15:21:20 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AFB616A4DD; Tue, 15 Aug 2006 15:21:15 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0164E43D73; Tue, 15 Aug 2006 15:21:14 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [172.30.10.238] (unknown [216.239.55.7]) by elvis.mu.org (Postfix) with ESMTP id 081E61A3C20; Tue, 15 Aug 2006 08:21:13 -0700 (PDT) Message-ID: <44E1E64F.6020205@FreeBSD.org> Date: Tue, 15 Aug 2006 17:20:47 +0200 From: Suleiman Souhlal User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <20060814170418.GA89686@stud.fit.vutbr.cz> <44E1D8E2.9060200@FreeBSD.org> <200608151101.30951.jhb@freebsd.org> In-Reply-To: <200608151101.30951.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:45:35 -0000 John Baldwin wrote: > >>+ KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); >>+ } >>+ >>+ em->child_clear_tid = NULL; >>+ em->child_set_tid = NULL; >>+ >>+ /* allocate the shared struct only in clone()/fork cases >>+ * in the case of clone() td = calling proc and child = pid of >>+ * the newly created proc >>+ */ >>+ if (child != 0) { >>+ if (flags & CLONE_VM) { >>+ /* lookup the parent */ >>+ p_em = em_find(td->td_proc, EMUL_LOCKED); >>+ KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for >>CLONE_VM\n")); >>+ em->shared = p_em->shared; >>+ em->shared->refs++; >> >>This is unsafe. Please use the functions in sys/refcount.h. > > > Well, in this case he's already holding a lock. If he always holds a lock > when accessing and modifying refs, then refcount_*() would only add overhead. Isn't he holding the wrong lock (emul_lock vs emul_shared_lock)? >>+ >>+void >>+linux_schedtail(void *arg __unused, struct proc *p) >>+{ >>+ struct linux_emuldata *em; >>+ int error = 0; >>+#ifdef DEBUG >>+ struct thread *td = FIRST_THREAD_IN_PROC(p); >>+#endif >>+ int *child_set_tid; >>+ >>+ if (p->p_sysent != &elf_linux_sysvec) >>+ return; >>+ >>+retry: >>+ /* find the emuldata */ >>+ em = em_find(p, EMUL_UNLOCKED); >>+ >>+ if (em == NULL) { >>+ /* We might have been called before proc_init for this process so >>+ * tsleep and be woken up by it. We use p->p_emuldata for this >>+ */ >>+ >>+ error = tsleep(&p->p_emuldata, PLOCK, "linux_schedtail", hz); >>+ if (error == 0) >>+ goto retry; >> >>Why are you setting a timeout if you just retry when it expires? > > > In this case it is a workaround for lost wakeups since it's not an interlocked > sleep and wakeup. :) Ew.. Thanks, -- Suleiman _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:46:07 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 120B216A4DF for ; Tue, 15 Aug 2006 23:46:07 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A747543D8C for ; Tue, 15 Aug 2006 23:44:51 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id EFD36CDA44; Wed, 16 Aug 2006 01:44:46 +0200 (MEST) Received: (qmail 16053 invoked by uid 10); 16 Aug 2006 01:38:14 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 18:31:35 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id 7E765CDA22 for ; Tue, 15 Aug 2006 18:31:34 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id DFC38728EE; Tue, 15 Aug 2006 16:30:51 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id D6A4716A632; Tue, 15 Aug 2006 16:30:39 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08CBF16A589; Tue, 15 Aug 2006 16:30:29 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id D05B743E5F; Tue, 15 Aug 2006 16:27:58 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7FGRrSA062366 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 15 Aug 2006 18:27:53 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7FGRrr9062365; Tue, 15 Aug 2006 18:27:53 +0200 (CEST) Date: Tue, 15 Aug 2006 18:27:53 +0200 From: Divacky Roman To: John Baldwin Message-ID: <20060815162753.GA62266@stud.fit.vutbr.cz> References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608151101.30951.jhb@freebsd.org> <44E1E64F.6020205@FreeBSD.org> <200608151149.20338.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200608151149.20338.jhb@freebsd.org> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org, freebsd-current@freebsd.org, Suleiman Souhlal Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:46:07 -0000 On Tue, Aug 15, 2006 at 11:49:19AM -0400, John Baldwin wrote: > On Tuesday 15 August 2006 11:20, Suleiman Souhlal wrote: > > John Baldwin wrote: > > > > > >>+ KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); > > >>+ } > > >>+ > > >>+ em->child_clear_tid = NULL; > > >>+ em->child_set_tid = NULL; > > >>+ > > >>+ /* allocate the shared struct only in clone()/fork cases > > >>+ * in the case of clone() td = calling proc and child = pid of > > >>+ * the newly created proc > > >>+ */ > > >>+ if (child != 0) { > > >>+ if (flags & CLONE_VM) { > > >>+ /* lookup the parent */ > > >>+ p_em = em_find(td->td_proc, EMUL_LOCKED); > > >>+ KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for > > >>CLONE_VM\n")); > > >>+ em->shared = p_em->shared; > > >>+ em->shared->refs++; > > >> > > >>This is unsafe. Please use the functions in sys/refcount.h. > > > > > > > > > Well, in this case he's already holding a lock. If he always holds a lock > > > when accessing and modifying refs, then refcount_*() would only add > overhead. > > > > Isn't he holding the wrong lock (emul_lock vs emul_shared_lock)? > > Maybe. I think those should be merged into one lock anyway. :) it used to be one lock, but it caused more problems then now... pls, let me fix all the issue and then judge, ok? :) _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:49:17 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40CF816A4DF for ; Tue, 15 Aug 2006 23:49:17 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2AB1943DC9 for ; Tue, 15 Aug 2006 23:47:45 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 10788CDA42; Wed, 16 Aug 2006 01:46:17 +0200 (MEST) Received: (qmail 15577 invoked by uid 10); 16 Aug 2006 01:37:30 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 16:07:13 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id 26F14CD835 for ; Tue, 15 Aug 2006 16:07:09 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id E4ADA72972; Tue, 15 Aug 2006 14:06:30 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id D1E9116A5A6; Tue, 15 Aug 2006 14:06:23 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41C7E16A4E0; Tue, 15 Aug 2006 14:06:17 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12CBA43D49; Tue, 15 Aug 2006 14:06:15 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5F490.dip.t-dialin.net [84.165.244.144]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7FDo1os072992; Tue, 15 Aug 2006 15:50:02 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7FE6JgJ050612; Tue, 15 Aug 2006 16:06:19 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Tue, 15 Aug 2006 16:08:18 +0200 From: Alexander Leidinger To: Kostik Belousov Message-ID: <20060815160818.68493418@Magellan.Leidinger.net> In-Reply-To: <20060815133616.GA41562@deviant.kiev.zoral.com.ua> References: <20060814170418.GA89686@stud.fit.vutbr.cz> <200608150910.51434.jhb@freebsd.org> <20060815133616.GA41562@deviant.kiev.zoral.com.ua> X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:49:17 -0000 Quoting Kostik Belousov (Tue, 15 Aug 2006 16:36:17 +0300): > On Tue, Aug 15, 2006 at 09:10:50AM -0400, John Baldwin wrote: > > - You should probably ask Peter to review the link_elf_obj change. An > > alternative is to use linker_lookup_set() in your module load routine to > > lookup your linker set details. > I suppose that this is in fact my change. I'm not committing it exactly because > I cannot obtain any review from Peter. > > And, it seems that this is not committed. Right. I didn't committed this part because jhb asked to do it differently or to ask Peter about it. Bye, Alexander. -- The wrong quarterback is the one that's in there. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:49:17 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42A0716A4E0 for ; Tue, 15 Aug 2006 23:49:17 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C36143E07 for ; Tue, 15 Aug 2006 23:47:45 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 6401DCD856; Wed, 16 Aug 2006 01:46:17 +0200 (MEST) Received: (qmail 15605 invoked by uid 10); 16 Aug 2006 01:37:32 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 16:25:41 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id 0A15FCD835 for ; Tue, 15 Aug 2006 16:25:36 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 4BD766470B; Tue, 15 Aug 2006 14:24:16 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 00FDC16A59C; Tue, 15 Aug 2006 14:24:07 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23F4116A4E0; Tue, 15 Aug 2006 14:24:01 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF6DF43D49; Tue, 15 Aug 2006 14:24:00 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [172.30.10.238] (unknown [216.239.55.7]) by elvis.mu.org (Postfix) with ESMTP id 930771A3C20; Tue, 15 Aug 2006 07:23:59 -0700 (PDT) Message-ID: <44E1D8E2.9060200@FreeBSD.org> Date: Tue, 15 Aug 2006 16:23:30 +0200 From: Suleiman Souhlal User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Divacky Roman References: <20060814170418.GA89686@stud.fit.vutbr.cz> In-Reply-To: <20060814170418.GA89686@stud.fit.vutbr.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org, current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:49:17 -0000 Divacky Roman wrote: > Hi, > > I am a student doing SoC linuxolator update. The work involved updating > linuxolator to be able to work with 2.6.x (2.6.16 in my case) kernel emulation. > > To be able to run 2.6.x emulation I had to implement NPTL, which means NPTL, futexes > and thread area, pid mangling + various hacks to make it work. > > This is the first patch meant for public revision/testing: > > www.stud.fit.vutbr.cz/~xdivac02/linuxolator26-diff.patch Very nice work! You can find some comments below. --- amd64/linux32/linux.h.orig +++ amd64/linux32/linux.h ... + +struct l_desc_struct { + unsigned long a,b; +}; + Please change this so that the two fields are on separate lines. Also, is there a reason you're using "unsigned long" and not "l_ulong"? On amd64 long are 64bit long while on i386 they are 32 bits, so there might be problems, if you're trying to 'emulate' 32bit linux programs on amd64. + +#define LINUX_LOWERWORD 0x0000ffff + Technically, it's the lower half-word. --- amd64/linux32/linux32_machdep.c.orig +++ amd64/linux32/linux32_machdep.c ... - td2->td_frame->tf_rsp = PTROUT(args->stack); + /* in a case of stack = NULL we are supposed to COW calling process stack + * this is what normal fork() does so we just keep the tf_rsp arg intact + */ + if (args->stack) + td2->td_frame->tf_rsp = PTROUT(args->stack); style(9) says multi-line comments have to start with /* on a line of its own. Please fix all the instances of this. --- /dev/null Mon Aug 14 18:44:00 2006 +++ compat/linux/linux_emul.c Mon Aug 14 18:46:20 2006 + +struct sx emul_shared_lock; +struct sx emul_lock; Are you using sx instead of rwlocks because you need to sleep in linux_schedtail() while holding the lock? + +/* this returns locked reference to the emuldata entry (if found) */ +struct linux_emuldata * +em_find(struct proc *p, int locked) +{ + struct linux_emuldata *em; + + if (locked == EMUL_UNLOCKED) + EMUL_LOCK(&emul_lock); + + em = p->p_emuldata; + + if (em == NULL && locked == EMUL_UNLOCKED) + EMUL_UNLOCK(&emul_lock); + + return (em); +} + +int +linux_proc_init(struct thread *td, pid_t child, int flags) +{ + struct linux_emuldata *em, *p_em; + struct proc *p; + + if (child != 0) { + /* non-exec call */ + MALLOC(em, struct linux_emuldata *, sizeof *em, M_LINUX, M_WAITOK | M_ZERO); + em->pid = child; + if (flags & CLONE_VM) { + /* handled later in the code */ + } else { + struct linux_emuldata_shared *s; + + MALLOC(s, struct linux_emuldata_shared *, sizeof *s, M_LINUX, M_WAITOK | M_ZERO); + em->shared = s; + s->refs = 1; + s->group_pid = child; + + LIST_INIT(&s->threads); + } + p = pfind(child); + if (p == NULL) + panic("process not found in proc_init\n"); Why not use KASSERT(p != NULL, ("process not found in proc_init\n")); ? + p->p_emuldata = em; + PROC_UNLOCK(p); + } else { + /* lookup the old one */ + em = em_find(td->td_proc, EMUL_UNLOCKED); According to sys/proc.h you're supposed to hold the proc lock when accessing p->p_emuldata. + KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); + } + + em->child_clear_tid = NULL; + em->child_set_tid = NULL; + + /* allocate the shared struct only in clone()/fork cases + * in the case of clone() td = calling proc and child = pid of + * the newly created proc + */ + if (child != 0) { + if (flags & CLONE_VM) { + /* lookup the parent */ + p_em = em_find(td->td_proc, EMUL_LOCKED); + KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_VM\n")); + em->shared = p_em->shared; + em->shared->refs++; This is unsafe. Please use the functions in sys/refcount.h. + } else { + /* handled earlier to avoid malloc(M_WAITOK) with rwlock held */ + } + } + + + if (child != 0) { + EMUL_SHARED_WLOCK(&emul_shared_lock); + LIST_INSERT_HEAD(&em->shared->threads, em, threads); + EMUL_SHARED_WUNLOCK(&emul_shared_lock); + + p = pfind(child); + PROC_UNLOCK(p); + /* we might have a sleeping linux_schedtail */ + wakeup(&p->p_emuldata); Again, you need to hold the proc lock when accessing p->p_emuldata. + } else + EMUL_UNLOCK(&emul_lock); + + return (0); +} + +void +linux_proc_exit(void *arg __unused, struct proc *p) +{ + struct linux_emuldata *em; + int error; + struct thread *td = FIRST_THREAD_IN_PROC(p); Don't you need to hold sched_lock to access p->p_threads? + int *child_clear_tid; + + if (__predict_true(p->p_sysent != &elf_linux_sysvec)) + return; + + /* find the emuldata */ + em = em_find(p, EMUL_UNLOCKED); proc lock.. :-) + + KASSERT(em != NULL, ("proc_exit: emuldata not found.\n")); + + child_clear_tid = em->child_clear_tid; + + EMUL_UNLOCK(&emul_lock); + + EMUL_SHARED_WLOCK(&emul_shared_lock); Is this safe? + LIST_REMOVE(em, threads); + + PROC_LOCK(p); + p->p_emuldata = NULL; + PROC_UNLOCK(p); + + em->shared->refs--; + if (em->shared->refs == 0) sys/refcount.h + FREE(em->shared, M_LINUX); + EMUL_SHARED_WUNLOCK(&emul_shared_lock); + + if (child_clear_tid != NULL) { + struct linux_sys_futex_args cup; + int null = 0; + + error = copyout(&null, child_clear_tid, sizeof(null)); + if (error) + return; You're forgetting to free em before returning. + + /* futexes stuff */ + cup.uaddr = child_clear_tid; + cup.op = LINUX_FUTEX_WAKE; + cup.val = 0x7fffffff; /* Awake everyone */ + cup.timeout = NULL; + cup.uaddr2 = NULL; + cup.val3 = 0; + error = linux_sys_futex(FIRST_THREAD_IN_PROC(p), &cup); + /* this cannot happen at the moment and if this happens + * it probably mean there is a userspace bug + */ Wrong indentation. + if (error) + printf(LMSG("futex stuff in proc_exit failed.\n")); + } ... + +extern int hz; /* in subr_param.c */ + Why don't you include sys/time.h? + +void +linux_schedtail(void *arg __unused, struct proc *p) +{ + struct linux_emuldata *em; + int error = 0; +#ifdef DEBUG + struct thread *td = FIRST_THREAD_IN_PROC(p); +#endif + int *child_set_tid; + + if (p->p_sysent != &elf_linux_sysvec) + return; + +retry: + /* find the emuldata */ + em = em_find(p, EMUL_UNLOCKED); + + if (em == NULL) { + /* We might have been called before proc_init for this process so + * tsleep and be woken up by it. We use p->p_emuldata for this + */ + + error = tsleep(&p->p_emuldata, PLOCK, "linux_schedtail", hz); + if (error == 0) + goto retry; Why are you setting a timeout if you just retry when it expires? + panic("no emuldata found for userreting process.\n"); + } + child_set_tid = em->child_set_tid; + EMUL_UNLOCK(&emul_lock); + + if (child_set_tid != NULL) + error = copyout(&p->p_pid, (int *) child_set_tid, sizeof(p->p_pid)); + + return; +} --- compat/linux/linux_misc.c.orig +++ compat/linux/linux_misc.c @@ -93,6 +94,9 @@ #define BSD_TO_LINUX_SIGNAL(sig) \ (((sig) <= LINUX_SIGTBLSZ) ? bsd_to_linux_signal[_SIG_IDX(sig)] : sig) +extern struct sx emul_shared_lock; +extern struct sx emul_lock; + Please move these to compat/linux/linux_emul.h ... + + pp = p->p_pptr; /* switch to parent */ + PROC_LOCK(pp); + PROC_UNLOCK(p); + You might have to hold the proctree_lock here. --- compat/linux/linux_signal.c.orig +++ compat/linux/linux_signal.c + if (args->tgid == -1) + return linux_kill(td, &ka); + + if ((p = pfind(args->pid)) == NULL) + return ESRCH; + + if (p->p_sysent != &elf_linux_sysvec) + return ESRCH; Please use return (...); -- Suleiman _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Tue Aug 15 23:49:20 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A30816A69F for ; Tue, 15 Aug 2006 23:49:20 +0000 (UTC) (envelope-from uucp@brian.han.de) Received: from baghira.han.de (baghira.han.de [62.48.90.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5411043D92 for ; Tue, 15 Aug 2006 23:47:59 +0000 (GMT) (envelope-from uucp@brian.han.de) Received: by baghira.han.de (Postfix, from userid 10) id 3FEF3CDA6A; Wed, 16 Aug 2006 01:46:24 +0200 (MEST) Received: (qmail 15776 invoked by uid 10); 16 Aug 2006 01:37:50 -0000 MBOX-Line: From owner-freebsd-current@freebsd.org Tue Aug 15 17:12:15 2006 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by baghira.han.de (Postfix) with ESMTP id 25B6ACD835 for ; Tue, 15 Aug 2006 17:12:14 +0200 (MEST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 072E092873; Tue, 15 Aug 2006 15:10:27 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 2B47C16A886; Tue, 15 Aug 2006 15:09:42 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF28E16A523; Tue, 15 Aug 2006 15:09:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50DA943E79; Tue, 15 Aug 2006 15:08:20 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7FF84WD028048; Tue, 15 Aug 2006 11:08:08 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Tue, 15 Aug 2006 11:01:30 -0400 User-Agent: KMail/1.9.1 References: <20060814170418.GA89686@stud.fit.vutbr.cz> <44E1D8E2.9060200@FreeBSD.org> In-Reply-To: <44E1D8E2.9060200@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608151101.30951.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 15 Aug 2006 11:08:09 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1663/Tue Aug 15 09:08:37 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org Cc: emulation@freebsd.org, Suleiman Souhlal Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 23:49:20 -0000 On Tuesday 15 August 2006 10:23, Suleiman Souhlal wrote: > > Why not use KASSERT(p != NULL, ("process not found in proc_init\n")); ? > > + p->p_emuldata = em; > + PROC_UNLOCK(p); > + } else { > + /* lookup the old one */ > + em = em_find(td->td_proc, EMUL_UNLOCKED); > > According to sys/proc.h you're supposed to hold the proc lock when > accessing p->p_emuldata. That is possibly sketchier as if an ABI always sets p_emuldata on fork/exec and only curthread accesses curproc->p_emuldata you can probably just not have to do any locking at all as it will actually be effectively read-only. The emuldata fields can have different strategies in different ABIs because they will be used differently. Note how so_emuldata is locked by SOCK_LOCK() in the Linux ABI, but isn't locked in the svr4/streams code because it's set on socket creation and static until socket close. > + KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); > + } > + > + em->child_clear_tid = NULL; > + em->child_set_tid = NULL; > + > + /* allocate the shared struct only in clone()/fork cases > + * in the case of clone() td = calling proc and child = pid of > + * the newly created proc > + */ > + if (child != 0) { > + if (flags & CLONE_VM) { > + /* lookup the parent */ > + p_em = em_find(td->td_proc, EMUL_LOCKED); > + KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for > CLONE_VM\n")); > + em->shared = p_em->shared; > + em->shared->refs++; > > This is unsafe. Please use the functions in sys/refcount.h. Well, in this case he's already holding a lock. If he always holds a lock when accessing and modifying refs, then refcount_*() would only add overhead. > + } else { > + /* handled earlier to avoid malloc(M_WAITOK) with rwlock held */ > + } > + } > + > + > + if (child != 0) { > + EMUL_SHARED_WLOCK(&emul_shared_lock); > + LIST_INSERT_HEAD(&em->shared->threads, em, threads); > + EMUL_SHARED_WUNLOCK(&emul_shared_lock); > + > + p = pfind(child); > + PROC_UNLOCK(p); > + /* we might have a sleeping linux_schedtail */ > + wakeup(&p->p_emuldata); > > Again, you need to hold the proc lock when accessing p->p_emuldata. See above, but there is another concern here in that once you drop the proc lock, the 'p' process might go away, be free'd, etc. (Especially if you are preempted right after the PROC_UNLOCK()) > + > +void > +linux_schedtail(void *arg __unused, struct proc *p) > +{ > + struct linux_emuldata *em; > + int error = 0; > +#ifdef DEBUG > + struct thread *td = FIRST_THREAD_IN_PROC(p); > +#endif > + int *child_set_tid; > + > + if (p->p_sysent != &elf_linux_sysvec) > + return; > + > +retry: > + /* find the emuldata */ > + em = em_find(p, EMUL_UNLOCKED); > + > + if (em == NULL) { > + /* We might have been called before proc_init for this process so > + * tsleep and be woken up by it. We use p->p_emuldata for this > + */ > + > + error = tsleep(&p->p_emuldata, PLOCK, "linux_schedtail", hz); > + if (error == 0) > + goto retry; > > Why are you setting a timeout if you just retry when it expires? In this case it is a workaround for lost wakeups since it's not an interlocked sleep and wakeup. :) > ... > + > + pp = p->p_pptr; /* switch to parent */ > + PROC_LOCK(pp); > + PROC_UNLOCK(p); > + > > You might have to hold the proctree_lock here. Actually, for this he is fine, as the proc lock is sufficient to access p->p_pptr, and the parent process can't go away w/o acquiring the child's lock and reparenting it to init. -- John Baldwin _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Wed Aug 16 02:51:16 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADAFF16A4DD; Wed, 16 Aug 2006 02:51:16 +0000 (UTC) (envelope-from dmk@ncf.ca) Received: from saruman.ncf.ca (saruman.ncf.ca [134.117.136.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6364D43D58; Wed, 16 Aug 2006 02:51:16 +0000 (GMT) (envelope-from dmk@ncf.ca) Received: from chiron.lan (206-248-151-69.dsl.ncf.ca [206.248.151.69]) by saruman.ncf.ca (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0J42008FIL9E7H@saruman.ncf.ca>; Tue, 15 Aug 2006 22:51:14 -0400 (EDT) Date: Tue, 15 Aug 2006 22:51:18 -0400 From: Dwayne MacKinnon To: freebsd-x11@freebsd.org Message-id: <200608152251.18779.dmk@ncf.ca> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: KMail/1.9.3 Cc: freebsd-emulation@freebsd.org Subject: ut2004 and linux x11 libs X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2006 02:51:16 -0000 Hi guys, I regularly play ut2004 on my FreeBSD box. Lately I've run into a problem: After upgrading from x11/linux-XFree86-libs to x11/linux-xorg-libs (at the same time that I up'ed to the fc4 linux base). After doing that, ut2004 became pretty much unplayable. Maps wouldn't render properly, movement was choppy, the works. Downgrading from x11/linux-xorg-libs to x11/linux-XFree86-libs solves the problem. Very irritating that for whatever reason the game needs the XFree86 libs. Fortunately switching between the two isn't exactly time consuming. I just thought that I should mention this to the community at large, hence the email. Although if someone has an alternative solution I wouldn't mind hearing about it. :-) Cheers, DMK -- I can't afford to make any exceptions. Once word leaks out that a pirate has gone soft people start to disobey him and it's nothing but work, work, work all the time. - The Man In Black, from the Princess Bride. From owner-freebsd-emulation@FreeBSD.ORG Wed Aug 16 15:18:03 2006 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF52116A4DD for ; Wed, 16 Aug 2006 15:18:03 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4677943D45 for ; Wed, 16 Aug 2006 15:18:02 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5F67B.dip.t-dialin.net [84.165.246.123]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7GF1YmY081764; Wed, 16 Aug 2006 17:01:36 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from localhost (localhost [127.0.0.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7GFI5Wn069822; Wed, 16 Aug 2006 17:18:05 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from psbru.cec.eu.int (psbru.cec.eu.int [158.169.131.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Wed, 16 Aug 2006 17:18:05 +0200 Message-ID: <20060816171805.11r3w2qea3488wc4@netchild.homeip.net> X-Priority: 3 (Normal) Date: Wed, 16 Aug 2006 17:18:05 +0200 From: Alexander Leidinger To: Dwayne MacKinnon References: <200608152251.18779.dmk@ncf.ca> In-Reply-To: <200608152251.18779.dmk@ncf.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.2) / FreeBSD-4.11 X-Virus-Scanned: by amavisd-new Cc: freebsd-emulation@FreeBSD.org Subject: Re: ut2004 and linux x11 libs X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2006 15:18:04 -0000 Quoting Dwayne MacKinnon (from Tue, 15 Aug 2006 22:51:18 -0400)= : > Hi guys, > > I regularly play ut2004 on my FreeBSD box. Lately I've run into a problem: > After upgrading from x11/linux-XFree86-libs to x11/linux-xorg-libs (at the > same time that I up'ed to the fc4 linux base). After doing that, =20 > ut2004 became > pretty much unplayable. Maps wouldn't render properly, movement was choppy= , > the works. > > Downgrading from x11/linux-xorg-libs to x11/linux-XFree86-libs solves the > problem. Did you updated the native dri port as well? Do you use an NVidia card =20 and reinstalled it after switching to the linux-xorg libs (it installs =20 a modified OpenGL lib if the linux support is enabled there)? Do other =20 3D apps exhibit a similar behavior? Bye, Alexander. --=20 God made the integers; all else is the work of Man. =09=09-- Kronecker http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-emulation@FreeBSD.ORG Wed Aug 16 15:44:59 2006 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A88E316A4E6 for ; Wed, 16 Aug 2006 15:44:59 +0000 (UTC) (envelope-from dmk@ncf.ca) Received: from saruman.ncf.ca (saruman.ncf.ca [134.117.136.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA31443D81 for ; Wed, 16 Aug 2006 15:44:52 +0000 (GMT) (envelope-from dmk@ncf.ca) Received: from ncf.ca (saruman.ncf.ca [134.117.136.37]) by saruman.ncf.ca (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0J43005SLL2OLO@saruman.ncf.ca> for freebsd-emulation@FreeBSD.org; Wed, 16 Aug 2006 11:44:48 -0400 (EDT) Received: from [24.235.117.242] by saruman.ncf.ca (mshttpd); Wed, 16 Aug 2006 11:44:48 -0400 Date: Wed, 16 Aug 2006 11:44:48 -0400 From: Dwayne MacKinnon To: Alexander Leidinger Message-id: <297712c002.2c00229771@ncf.ca> MIME-version: 1.0 X-Mailer: iPlanet Messenger Express 5.2 Patch 2 (built Jul 14 2004) Content-type: text/plain; charset=us-ascii Content-language: en Content-transfer-encoding: 7BIT Content-disposition: inline X-Accept-Language: en Priority: normal Cc: freebsd-emulation@FreeBSD.org Subject: Re: ut2004 and linux x11 libs X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2006 15:44:59 -0000 > Quoting Dwayne MacKinnon (from Tue, 15 Aug 2006 > 22:51:18 -0400): > > > Hi guys, > > > > I regularly play ut2004 on my FreeBSD box. Lately I've run into a > problem:> After upgrading from x11/linux-XFree86-libs to x11/linux- > xorg-libs (at the > > same time that I up'ed to the fc4 linux base). After doing that, > > > ut2004 became > > pretty much unplayable. Maps wouldn't render properly, movement > was choppy, > > the works. > > > > Downgrading from x11/linux-xorg-libs to x11/linux-XFree86-libs > solves the > > problem. > > Did you updated the native dri port as well? Do you use an NVidia > card > and reinstalled it after switching to the linux-xorg libs (it > installs > a modified OpenGL lib if the linux support is enabled there)? Do > other > 3D apps exhibit a similar behavior? Alexander, I've kept both the native and linux dri ports up to date. (I even tried linux_dri-devel). No difference. I'm also 99% sure that I reinstalled the nvidia driver after the upgrade. (I use a GeForce 6600GT card.) I'll double-check on the driver issue after I get off work tonight. Cheers, DMK From owner-freebsd-emulation@FreeBSD.ORG Wed Aug 16 16:25:39 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC76416A4DD for ; Wed, 16 Aug 2006 16:25:39 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 089FA43D49 for ; Wed, 16 Aug 2006 16:25:35 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k7GGPKKk072454; Wed, 16 Aug 2006 11:25:20 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44E34707.2070809@centtech.com> Date: Wed, 16 Aug 2006 11:25:43 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: Dwayne MacKinnon References: <297712c002.2c00229771@ncf.ca> In-Reply-To: <297712c002.2c00229771@ncf.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1670/Wed Aug 16 08:49:00 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: Alexander Leidinger , freebsd-emulation@freebsd.org Subject: Re: ut2004 and linux x11 libs X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2006 16:25:39 -0000 On 08/16/06 10:44, Dwayne MacKinnon wrote: >> Quoting Dwayne MacKinnon (from Tue, 15 Aug 2006 >> 22:51:18 -0400): >> >>> Hi guys, >>> >>> I regularly play ut2004 on my FreeBSD box. Lately I've run into a >> problem:> After upgrading from x11/linux-XFree86-libs to x11/linux- >> xorg-libs (at the >>> same time that I up'ed to the fc4 linux base). After doing that, >>> ut2004 became >>> pretty much unplayable. Maps wouldn't render properly, movement >> was choppy, >>> the works. >>> >>> Downgrading from x11/linux-xorg-libs to x11/linux-XFree86-libs >> solves the >>> problem. >> Did you updated the native dri port as well? Do you use an NVidia >> card >> and reinstalled it after switching to the linux-xorg libs (it >> installs >> a modified OpenGL lib if the linux support is enabled there)? Do >> other >> 3D apps exhibit a similar behavior? > > Alexander, > > I've kept both the native and linux dri ports up to date. (I even tried > linux_dri-devel). No difference. I'm also 99% sure that I reinstalled > the nvidia driver after the upgrade. (I use a GeForce 6600GT card.) I'll > double-check on the driver issue after I get off work tonight. FYI - after seeing this thread, I installed the ut2004-demo, and it too ran slowly. Then I saw Alexander's comments, so I reinstalled dri, nvidia driver, and restarted xorg. Now, it's snappy fast (at 1920x1200!). Now if I can only figure out how to get my purchased copy running, so I'm not in demo mode... Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-emulation@FreeBSD.ORG Wed Aug 16 22:26:44 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C13DB16A4DA for ; Wed, 16 Aug 2006 22:26:44 +0000 (UTC) (envelope-from dmk@ncf.ca) Received: from saruman.ncf.ca (saruman.ncf.ca [134.117.136.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D7EF43D53 for ; Wed, 16 Aug 2006 22:26:44 +0000 (GMT) (envelope-from dmk@ncf.ca) Received: from chiron.lan (206-248-151-69.dsl.ncf.ca [206.248.151.69]) by saruman.ncf.ca (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0J44002YL3OG72@saruman.ncf.ca> for freebsd-emulation@freebsd.org; Wed, 16 Aug 2006 18:26:40 -0400 (EDT) Date: Wed, 16 Aug 2006 18:26:44 -0400 From: Dwayne MacKinnon In-reply-to: <44E34707.2070809@centtech.com> To: Eric Anderson Message-id: <200608161826.45668.dmk@ncf.ca> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: KMail/1.9.3 References: <297712c002.2c00229771@ncf.ca> <44E34707.2070809@centtech.com> Cc: Alexander Leidinger , freebsd-emulation@freebsd.org Subject: Re: ut2004 and linux x11 libs X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2006 22:26:44 -0000 On Wednesday 16 August 2006 12:25, Eric Anderson wrote: > FYI - after seeing this thread, I installed the ut2004-demo, and it too > ran slowly. Then I saw Alexander's comments, so I reinstalled dri, > nvidia driver, and restarted xorg. Now, it's snappy fast (at 1920x1200!). > > Now if I can only figure out how to get my purchased copy running, so > I'm not in demo mode... Hi all, After reading Eric's post, I re-installed dri and nvidia-driver as soon as I got home. The combination seems to have done the trick... ut2004 now works just fine with x11/linux-xorg-libs. Perhaps a note should be put in ports/UPDATING about this situation? There was nothing about recompiling those two when the upgrade went out. Eric, if you're having problems installing ut2004, I found this thread extremely helpful: http://www.bsdforums.org/forums/archive/index.php/t-20854.html Don't forget to download the Megapack: It has the latest patches in it, not to mention a lot of nice bonus content. You can get it from http://www.beyondunreal.com/main/ut2004/ut2004essential.php Thanks for your help guys, DMK -- I can't afford to make any exceptions. Once word leaks out that a pirate has gone soft people start to disobey him and it's nothing but work, work, work all the time. - The Man In Black, from the Princess Bride. From owner-freebsd-emulation@FreeBSD.ORG Wed Aug 16 23:53:52 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7E5616A4E5; Wed, 16 Aug 2006 23:53:52 +0000 (UTC) (envelope-from admin@intron.ac) Received: from intron.ac (unknown [210.51.165.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7323543D45; Wed, 16 Aug 2006 23:53:52 +0000 (GMT) (envelope-from admin@intron.ac) Received: from localhost (localhost [127.0.0.1]) (uid 1003) by intron.ac with local; Thu, 17 Aug 2006 07:53:48 +0800 id 00102DF2.44E3B00C.000128B0 From: "Intron is my alias in the Internet" To: freebsd-emulation@freebsd.org, freebsd-current@freebsd.org Date: Thu, 17 Aug 2006 07:53:48 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Cc: Subject: Some Linux Applications Have Been on Strike X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2006 23:53:52 -0000 Some Linux applications have been on strike against new Linuxolator (sysctl compat.linux.osrelease=2.6.16) and new ports (linux_base-fc-4_7 and linux-xorg-libs-6.8.2_5). Mozilla 1.7.12 Firefox 1.0.7 Adobe Reader 7.0.8 At the same time, Firefox 1.5.0.6 goes out on strike from time to time. ------------------------------------------------------------------------ From Beijing, China From owner-freebsd-emulation@FreeBSD.ORG Thu Aug 17 06:47:15 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF4CB16A4E5; Thu, 17 Aug 2006 06:47:15 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C96043D4C; Thu, 17 Aug 2006 06:47:13 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5D87F.dip.t-dialin.net [84.165.216.127]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7H6UXT3085630; Thu, 17 Aug 2006 08:30:34 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from localhost (localhost [127.0.0.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7H6lC8Z002556; Thu, 17 Aug 2006 08:47:12 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from psbru.cec.eu.int (psbru.cec.eu.int [158.169.131.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Thu, 17 Aug 2006 08:47:12 +0200 Message-ID: <20060817084712.9fvimcaug848wkk0@netchild.homeip.net> X-Priority: 3 (Normal) Date: Thu, 17 Aug 2006 08:47:12 +0200 From: Alexander Leidinger To: Intron is my alias in the Internet References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.2) / FreeBSD-4.11 X-Virus-Scanned: by amavisd-new Cc: freebsd-emulation@freebsd.org, freebsd-current@freebsd.org, rdivacky@freebsd.org Subject: Re: Some Linux Applications Have Been on Strike X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 06:47:15 -0000 Quoting Intron is my alias in the Internet (from Thu, =20 17 Aug 2006 07:53:48 +0800): > Some Linux applications have been on strike against new Linuxolator > (sysctl compat.linux.osrelease=3D2.6.16) and new ports (linux_base-fc-4_7 > and linux-xorg-libs-6.8.2_5). > > Mozilla 1.7.12 > Firefox 1.0.7 Great! 2 Open Source applications which exhibit the bugs. Now Roman =20 can compile a debug version of one of them and try to track down where =20 it breaks. Thanks for the report! > Adobe Reader 7.0.8 But not for all PDF files. I have some files which work just fine, and =20 some files which immediatly trigger the bug. Starting acroread without =20 any filename on the command line worked just fine every time for me. > At the same time, Firefox 1.5.0.6 goes out on strike from time to time. Roman reported to me it works for him. Can you please provided use =20 cases where it doesn't work? Bye, Alexander. --=20 We are not loved by our friends for what we are; rather, we are loved in spite of what we are. =09=09-- Victor Hugo http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-emulation@FreeBSD.ORG Thu Aug 17 08:32:49 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 755D516A4DD for ; Thu, 17 Aug 2006 08:32:49 +0000 (UTC) (envelope-from admin@intron.ac) Received: from intron.ac (unknown [210.51.165.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBE9243D46 for ; Thu, 17 Aug 2006 08:32:48 +0000 (GMT) (envelope-from admin@intron.ac) Received: from localhost (localhost [127.0.0.1]) (uid 1003) by intron.ac with local; Thu, 17 Aug 2006 16:32:46 +0800 id 00102E30.44E429AE.000150D0 From: "Intron is my alias in the Internet" To: freebsd-emulation@freebsd.org Date: Thu, 17 Aug 2006 16:32:46 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Subject: [Updated on 2006-8-17] My Linux AIO Implementation Calling for Test (fwd) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 08:32:49 -0000 I'm sorry that I mis-sent this mail to -hackers@ last night. Download: http://ftp.intron.ac/tmp/linux_aio-20060817.tar.bz2 Let my patch set keep up with new Linuxolator. ------------------------------------------------------------------------ From Beijing, China Divacky Roman wrote: > On Wed, Aug 09, 2006 at 10:50:25PM +0800, Intron wrote: >> Boris Samorodov wrote: >> >> >On Wed, 09 Aug 2006 21:08:20 +0800 Intron wrote: >> > From owner-freebsd-emulation@FreeBSD.ORG Thu Aug 17 09:49:30 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 702C316A4E0; Thu, 17 Aug 2006 09:49:30 +0000 (UTC) (envelope-from admin@intron.ac) Received: from intron.ac (unknown [210.51.165.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id C35E243D66; Thu, 17 Aug 2006 09:49:25 +0000 (GMT) (envelope-from admin@intron.ac) Received: from localhost (localhost [127.0.0.1]) (uid 1003) by intron.ac with local; Thu, 17 Aug 2006 17:49:21 +0800 id 00102C04.44E43BA1.00015715 References: <20060817084712.9fvimcaug848wkk0@netchild.homeip.net> In-Reply-To: <20060817084712.9fvimcaug848wkk0@netchild.homeip.net> From: "Intron is my alias on the Internet" To: Alexander Leidinger Date: Thu, 17 Aug 2006 17:49:21 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Cc: freebsd-emulation@freebsd.org, freebsd-current@freebsd.org, rdivacky@freebsd.org Subject: Re: Some Linux Applications Have Been on Strike X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 09:49:30 -0000 Alexander Leidinger wrote: > Quoting Intron is my alias in the Internet (from Thu, 17 > Aug 2006 07:53:48 +0800): > >> Some Linux applications have been on strike against new Linuxolator >> (sysctl compat.linux.osrelease=2.6.16) and new ports (linux_base-fc-4_7 >> and linux-xorg-libs-6.8.2_5). >> >> Mozilla 1.7.12 >> Firefox 1.0.7 > > Great! 2 Open Source applications which exhibit the bugs. Now Roman can > compile a debug version of one of them and try to track down where it > breaks. Thanks for the report! > >> Adobe Reader 7.0.8 > > But not for all PDF files. I have some files which work just fine, and > some files which immediatly trigger the bug. Starting acroread without > any filename on the command line worked just fine every time for me. > >> At the same time, Firefox 1.5.0.6 goes out on strike from time to time. > > Roman reported to me it works for him. Can you please provided use cases > where it doesn't work? > > Bye, > Alexander. > > -- > We are not loved by our friends for what we are; > rather, we are loved in spite of what we are. > -- Victor Hugo > > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" My running environment: 1. CVSup-ed source tree and port tree on August 15th 12:20 (calculated for GMT) 2. sysctl compat.linux.osrelease=2.6.16 3. New ports: linux_base-fc-4_7, linux-xorg-libs-6.8.2_5, linux-gtk-1.2.10_4 and linux-gtk2-2.6.10 Here, Adobe Reader 7.0.8 doesn't work at all but its beautiful Adobe Logo. Mozilla 1.7.12 (GTK 1) and Firefox 1.0.7 (GTK 2) don't work at all but their corpse processes. Firefox 1.5.0.6 (GTK 2) works occasionally, so that I can write mail to you in it. I'm afraid that debugging those large programs is difficult. Their strike probably has something to do with userland runtime libraries such as GLIBC and XLib. I don't know the meaning of kernel messages: second wakeup second wakeup second wakeup second wakeup second wakeup second wakeup second wakeup second wakeup ------------------------------------------------------------------------ From Beijing, China From owner-freebsd-emulation@FreeBSD.ORG Thu Aug 17 12:23:00 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FBA716A4DA; Thu, 17 Aug 2006 12:23:00 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3952A43D64; Thu, 17 Aug 2006 12:22:57 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 9FE9520A7; Thu, 17 Aug 2006 14:22:52 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 8567C20A5; Thu, 17 Aug 2006 14:22:52 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id 6ACBE33C24; Thu, 17 Aug 2006 14:22:52 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Divacky Roman References: <20060814170418.GA89686@stud.fit.vutbr.cz> Date: Thu, 17 Aug 2006 14:22:52 +0200 In-Reply-To: <20060814170418.GA89686@stud.fit.vutbr.cz> (Divacky Roman's message of "Mon, 14 Aug 2006 19:04:18 +0200") Message-ID: <86odujlffn.fsf@xps.des.no> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: emulation@freebsd.org, current@freebsd.org Subject: Re: SoC: linuxolator update: first patch X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 12:23:00 -0000 Divacky Roman writes: > I am a student doing SoC linuxolator update. Just one nit: it's linux*u*lator (as in "linux em*u*lator") DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-emulation@FreeBSD.ORG Thu Aug 17 15:28:38 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA82E16A4E0 for ; Thu, 17 Aug 2006 15:28:38 +0000 (UTC) (envelope-from ndelmonico@sbcglobal.net) Received: from smtp108.sbc.mail.mud.yahoo.com (smtp108.sbc.mail.mud.yahoo.com [68.142.198.207]) by mx1.FreeBSD.org (Postfix) with SMTP id 3CB3043D76 for ; Thu, 17 Aug 2006 15:28:29 +0000 (GMT) (envelope-from ndelmonico@sbcglobal.net) Received: (qmail 30961 invoked from network); 17 Aug 2006 15:28:29 -0000 Received: from unknown (HELO ?192.168.1.108?) (ndelmonico@sbcglobal.net@66.142.231.109 with plain) by smtp108.sbc.mail.mud.yahoo.com with SMTP; 17 Aug 2006 15:28:29 -0000 Message-ID: <44E48B15.60805@sbcglobal.net> Date: Thu, 17 Aug 2006 10:28:21 -0500 From: Neal Delmonico User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.13) Gecko/20060424 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Intron is my alias on the Internet References: <20060817084712.9fvimcaug848wkk0@netchild.homeip.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Leidinger , freebsd-emulation@freebsd.org, freebsd-current@freebsd.org, rdivacky@freebsd.org Subject: Re: Some Linux Applications Have Been on Strike X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 15:28:39 -0000 Intron is my alias on the Internet wrote: > Alexander Leidinger wrote: > >> Quoting Intron is my alias in the Internet (from >> Thu, 17 Aug 2006 07:53:48 +0800): >> >>> Some Linux applications have been on strike against new Linuxolator >>> (sysctl compat.linux.osrelease=2.6.16) and new ports (linux_base-fc-4_7 >>> and linux-xorg-libs-6.8.2_5). >>> >>> Mozilla 1.7.12 >>> Firefox 1.0.7 >> >> >> Great! 2 Open Source applications which exhibit the bugs. Now Roman >> can compile a debug version of one of them and try to track down >> where it breaks. Thanks for the report! >> >>> Adobe Reader 7.0.8 >> >> >> But not for all PDF files. I have some files which work just fine, >> and some files which immediatly trigger the bug. Starting acroread >> without any filename on the command line worked just fine every time >> for me. >> >>> At the same time, Firefox 1.5.0.6 goes out on strike from time to time. >> >> >> Roman reported to me it works for him. Can you please provided use >> cases where it doesn't work? >> >> Bye, >> Alexander. >> >> -- >> We are not loved by our friends for what we are; >> rather, we are loved in spite of what we are. >> -- Victor Hugo >> >> http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 >> http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 >> >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to >> "freebsd-current-unsubscribe@freebsd.org" > > > My running environment: > 1. CVSup-ed source tree and port tree on August 15th 12:20 (calculated > for > GMT) > 2. sysctl compat.linux.osrelease=2.6.16 > 3. New ports: linux_base-fc-4_7, linux-xorg-libs-6.8.2_5, > linux-gtk-1.2.10_4 and linux-gtk2-2.6.10 > > Here, Adobe Reader 7.0.8 doesn't work at all but its beautiful Adobe > Logo. > Mozilla 1.7.12 (GTK 1) and Firefox 1.0.7 (GTK 2) don't work at all but > their corpse processes. Firefox 1.5.0.6 (GTK 2) works occasionally, so > that > I can write mail to you in it. > > I'm afraid that debugging those large programs is difficult. Their strike > probably has something to do with userland runtime libraries such as > GLIBC > and XLib. > > I don't know the meaning of kernel messages: > > second wakeup > second wakeup > second wakeup > second wakeup > second wakeup > second wakeup > second wakeup > second wakeup > These programs do not work on my system either. Same setup as Intron's. I don't even get the Adobe Logo. Someone mentioned before that the offending file was known, but that how it was offending wasn't known. I assume there has been no progress on that. Glad to help if I can. Best Neal From owner-freebsd-emulation@FreeBSD.ORG Thu Aug 17 16:40:42 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D000716A4DF; Thu, 17 Aug 2006 16:40:42 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 250F443D58; Thu, 17 Aug 2006 16:40:41 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7HGeZxF097194 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 17 Aug 2006 18:40:35 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7HGeZV2097193; Thu, 17 Aug 2006 18:40:35 +0200 (CEST) Date: Thu, 17 Aug 2006 18:40:35 +0200 From: Divacky Roman To: Intron is my alias on the Internet Message-ID: <20060817164035.GA96801@stud.fit.vutbr.cz> References: <20060817084712.9fvimcaug848wkk0@netchild.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: Alexander Leidinger , freebsd-emulation@freebsd.org, freebsd-current@freebsd.org, rdivacky@freebsd.org Subject: Re: Some Linux Applications Have Been on Strike X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 16:40:42 -0000 > I don't know the meaning of kernel messages: > > second wakeup > second wakeup > second wakeup > second wakeup > second wakeup > second wakeup > second wakeup > second wakeup is it the case that EVERY TIME you see this the program which emits this doesnt work? are there any other non-working programs that doesnt emit this? how you can help: if you can see any futex usage pattern that causes problems please tell me. or if oyu have some simple testing program which reproduces this behaviour. thnx roman From owner-freebsd-emulation@FreeBSD.ORG Fri Aug 18 02:06:41 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA5C616A4DD; Fri, 18 Aug 2006 02:06:41 +0000 (UTC) (envelope-from admin@intron.ac) Received: from intron.ac (unknown [210.51.165.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2DBF43D53; Fri, 18 Aug 2006 02:06:40 +0000 (GMT) (envelope-from admin@intron.ac) Received: from localhost (localhost [127.0.0.1]) (uid 1003) by intron.ac with local; Fri, 18 Aug 2006 10:06:36 +0800 id 00102DF1.44E520AC.00000514 References: <20060817084712.9fvimcaug848wkk0@netchild.homeip.net> <20060817164035.GA96801@stud.fit.vutbr.cz> In-Reply-To: <20060817164035.GA96801@stud.fit.vutbr.cz> From: "Intron is my alias on the Internet" To: rdivacky@freebsd.org Date: Fri, 18 Aug 2006 10:06:36 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Cc: Alexander Leidinger , freebsd-emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: Some Linux Applications Have Been on Strike X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2006 02:06:42 -0000 Divacky Roman wrote: >> I don't know the meaning of kernel messages: >> >> second wakeup >> second wakeup >> second wakeup >> second wakeup >> second wakeup >> second wakeup >> second wakeup >> second wakeup > > is it the case that EVERY TIME you see this the program which emits this doesnt work? > are there any other non-working programs that doesnt emit this? > > how you can help: if you can see any futex usage pattern that causes problems please tell me. > or if oyu have some simple testing program which reproduces this behaviour. > > thnx > > roman > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" 1. The kernel message "second wakeup" is produced when Firefox 1.5.0.6 is normally working. 2. With the help of top(1), I've known that both Mozilla 1.7.12 (GTK 1) and Firefox 1.0.7 (GTK 2) are stalled on the state "linuxf". 3. Adobe Reader 7.0.8 can work occasionally if its configuration files (in ~/.adobe/) are initialized for the first time with the help of Roman's patch. Well, I would do some hacking to find the problem. ------------------------------------------------------------------------ From Beijing, China From owner-freebsd-emulation@FreeBSD.ORG Fri Aug 18 12:50:21 2006 Return-Path: X-Original-To: freebsd-emulation@hub.freebsd.org Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76C4016A4DD for ; Fri, 18 Aug 2006 12:50:21 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F102C43D46 for ; Fri, 18 Aug 2006 12:50:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7ICoKD6042348 for ; Fri, 18 Aug 2006 12:50:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7ICoKTN042347; Fri, 18 Aug 2006 12:50:20 GMT (envelope-from gnats) Date: Fri, 18 Aug 2006 12:50:20 GMT Message-Id: <200608181250.k7ICoKTN042347@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: Boris Samorodov Cc: Subject: Re: ports/102034: linux_base-fc4 library problems with RELENG_6_1 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Boris Samorodov List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2006 12:50:21 -0000 The following reply was made to PR ports/102034; it has been noted by GNATS. From: Boris Samorodov To: bug-followup@FreeBSD.org, jes@jes-2.demon.nl Cc: Subject: Re: ports/102034: linux_base-fc4 library problems with RELENG_6_1 Date: Fri, 18 Aug 2006 16:44:54 +0400 From your kdump.out: ----- 13316 ls NAMI "/compat/linux/usr/lib/libpthread.so.0" 13316 ls NAMI "/usr/lib/libpthread.so.0" 13316 ls RET open 3 13316 ls CALL read(0x3,0xbfbfe42c,0x200) 13316 ls GIO fd 3 read 512 bytes ----- Can you tell me what is the file /usr/lib/libpthread.so.0? At my FreeBSD-6.1 I have only /usr/lib/libpthread.so.2. Is it a stale/old file or did you create a symlink for some purpose? What if you delete (or temporarily move away) this file? From owner-freebsd-emulation@FreeBSD.ORG Fri Aug 18 15:52:13 2006 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B53B416A4DD for ; Fri, 18 Aug 2006 15:52:13 +0000 (UTC) (envelope-from ndelmonico@sbcglobal.net) Received: from smtp104.sbc.mail.re2.yahoo.com (smtp104.sbc.mail.re2.yahoo.com [68.142.229.101]) by mx1.FreeBSD.org (Postfix) with SMTP id 3AE2143D7E for ; Fri, 18 Aug 2006 15:52:06 +0000 (GMT) (envelope-from ndelmonico@sbcglobal.net) Received: (qmail 3614 invoked from network); 18 Aug 2006 15:52:05 -0000 Received: from unknown (HELO ?192.168.1.108?) (ndelmonico@sbcglobal.net@66.142.231.109 with plain) by smtp104.sbc.mail.re2.yahoo.com with SMTP; 18 Aug 2006 15:52:05 -0000 Message-ID: <44E5E21F.4020004@sbcglobal.net> Date: Fri, 18 Aug 2006 10:51:59 -0500 From: Neal Delmonico User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.13) Gecko/20060424 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-emulation@FreeBSD.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Striking Linux programs: Acroread7, Opera, Foxfire X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2006 15:52:13 -0000 I thought I should update this list on my experiences with the Linux programs that have been on strike since the new Linux base was instituted. On one of my amd64 machines whose world was rebuilt from yesterday's current sources (17 Aug), I get a forced reboot when I try to start acroread7 and Opera. No questions asked, screen freezes, and the machine reboots. Before that I used to only get segmentation faults (with a bash.core left behind). Things have gone from bad to worse. But that is often a sign that a solution is just around the corner, right? Best Neal From owner-freebsd-emulation@FreeBSD.ORG Fri Aug 18 23:29:28 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 999D016A5E0 for ; Fri, 18 Aug 2006 23:29:19 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AF3C43D49 for ; Fri, 18 Aug 2006 23:29:19 +0000 (GMT) (envelope-from yuri.pankov@gmail.com) Received: by py-out-1112.google.com with SMTP id o67so1314673pye for ; Fri, 18 Aug 2006 16:29:18 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=iFxyT7IPzxYp+YfC2BBb4tqOlWYQyecvhbbMXOlzRUmv+AwlFN4d4yF0oUdzB9REdWFH/zzIkffzhk7CEobcOx4UynFvojE7DhOM1/yUJwicicnSk9epQ2N6xhShXyAR+x9CtzGR/f3CTxT4XtMWXa/dTqTpO75dte8TTFrr9n4= Received: by 10.65.114.11 with SMTP id r11mr2904085qbm; Fri, 18 Aug 2006 16:29:18 -0700 (PDT) Received: by 10.65.126.5 with HTTP; Fri, 18 Aug 2006 16:29:18 -0700 (PDT) Message-ID: Date: Sat, 19 Aug 2006 03:29:18 +0400 From: Yuri To: freebsd-emulation@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2006 23:29:28 -0000 Hi, After upgrading to -CURRENT/amd64 as of 18 August 2006, around 7PM GMT, I'm getting panics when running acroread, even without X. Ports were upgraded too. linux_base-fc-4_8 acroread7-7.0.8,1 If more information is needed, it's 100% reproducible here. --- Unread portion of the kernel message buffer: panic: no emuldata found for userreting process. KDB: enter: panic panic: from debugger Uptime: 3m32s Physical memory: 2040 MB Dumping 97 MB: 82 66 50 34 18 2 #0 doadump () at pcpu.h:172 172 pcpu.h: No such file or directory. in pcpu.h (kgdb) bt #0 doadump () at pcpu.h:172 #1 0xffffffff8025a3c3 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409 #2 0xffffffff8025a9f7 in panic (fmt=0xffffff00614c1000 "") at /usr/src/sys/kern/kern_shutdown.c:565 #3 0xffffffff80183997 in db_panic (addr=0, have_addr=0, count=0, modif=0x0) at /usr/src/sys/ddb/db_command.c:428 #4 0xffffffff80183e39 in db_command_loop () at /usr/src/sys/ddb/db_command.c:396 #5 0xffffffff80185d23 in db_trap (type=-1375823616, code=0) at /usr/src/sys/ddb/db_main.c:221 #6 0xffffffff8027c499 in kdb_trap (type=3, code=0, tf=0x0) at /usr/src/sys/kern/subr_kdb.c:502 #7 0xffffffff803acc82 in trap (frame= {tf_rdi = 0, tf_rsi = -2139025408, tf_rdx = 0, tf_rcx = 1090236, tf_r8 = 1048064, tf_r9 = 10, tf_rax = 18, tf_rbx = -2143017936, tf_rbp = -1375823056, tf_r10 = -1375823296, tf_r11 = 10, tf_r12 = 256, tf_r13 = -1097879252992, tf_r14 = -1097957538048, tf_r15 = 0, tf_trapno = 3, tf_addr = 0, tf_flags = -1097879252992, tf_err = 0, tf_rip = -2144878705, tf_cs = 8, tf_rflags = 646, tf_rsp = -1375823056, tf_ss = 16}) at /usr/src/sys/amd64/amd64/trap.c:471 #8 0xffffffff803996cb in calltrap () at /usr/src/sys/amd64/amd64/exception.S:168 #9 0xffffffff8027bf8f in kdb_enter (msg=0x0) at cpufunc.h:63 #10 0xffffffff8025aa7c in panic (fmt=0xffffffff80442430 "no emuldata found for userreting process.\n") at /usr/src/sys/kern/kern_shutdown.c:549 #11 0xffffffff803e8a30 in linux_schedtail (arg=0x0, p=0xffffff005ca18700) at /usr/src/sys/compat/linux/linux_emul.c:267 #12 0xffffffff8023fa7f in fork_exit (callout=0xffffff0000a4a700, arg=0x4, frame=0xffffff0000cf6500) at /usr/src/sys/kern/kern_fork.c:831 #13 0xffffffff80399a2e in fork_trampoline () at /usr/src/sys/amd64/amd64/exception.S:394 #14 0x00000000ffffd308 in ?? () #15 0x0000000000000000 in ?? () Previous frame identical to this frame (corrupt stack?) From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 00:01:24 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8E2316A4DD for ; Sat, 19 Aug 2006 00:01:24 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 190BF43D60 for ; Sat, 19 Aug 2006 00:01:23 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5DEEC.dip.t-dialin.net [84.165.222.236]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7INiScW096365; Sat, 19 Aug 2006 01:44:29 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7J01R4i056784; Sat, 19 Aug 2006 02:01:28 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 19 Aug 2006 02:03:31 +0200 From: Alexander Leidinger To: freebsd-emulation@freebsd.org Message-ID: <20060819020331.2a544a09@Magellan.Leidinger.net> In-Reply-To: <44E5E21F.4020004@sbcglobal.net> References: <44E5E21F.4020004@sbcglobal.net> X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: Subject: Re: Striking Linux programs: Acroread7, Opera, Foxfire X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 00:01:24 -0000 Quoting Neal Delmonico (Fri, 18 Aug 2006 10:51:59 -0500): > I thought I should update this list on my experiences with the Linux > programs that have been on strike since the new Linux base was > instituted. On one of my amd64 machines whose world was rebuilt from > yesterday's current sources (17 Aug), I get a forced reboot when I try I did commit a fix yesterday. At least it is supposed to fix it. If not: please send the panic message and a backtrace. If you don't know how to do this the handbook will tell you more. > to start acroread7 and Opera. No questions asked, screen freezes, and > the machine reboots. Before that I used to only get segmentation faults > (with a bash.core left behind). Things have gone from bad to worse. > But that is often a sign that a solution is just around the corner, right? No, jhb@ hasn't got enough debug output to fix this. If you know how to add some printf()s to the kernel, feel free to coordinate with him. Bye, Alexander. -- operators on strike due to broken coffee machine http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 00:04:21 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B13F16A4DE for ; Sat, 19 Aug 2006 00:04:21 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75BC343D60 for ; Sat, 19 Aug 2006 00:04:15 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5DEEC.dip.t-dialin.net [84.165.222.236]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7INlJJk096375; Sat, 19 Aug 2006 01:47:20 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7J04I0b057152; Sat, 19 Aug 2006 02:04:19 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 19 Aug 2006 02:06:22 +0200 From: Alexander Leidinger To: Yuri Message-ID: <20060819020622.6b371e23@Magellan.Leidinger.net> In-Reply-To: References: X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 00:04:21 -0000 Quoting Yuri (Sat, 19 Aug 2006 03:29:18 +0400): > Hi, > > After upgrading to -CURRENT/amd64 as of 18 August 2006, around 7PM > GMT, I'm getting panics when running acroread, even without X. Ports I did commit a fix for this a little bit later than 7 pm GMT. So update to a more recent -current. But don't expect a working acroread (it will segfault). If you know how to add some printf()s to the kernel, feel free to coordinate with jhb@ to get this issue fixed. Bye, Alexander. -- Darth Vader: When I left you, I was but the learner. Now I am the master. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 00:15:37 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F73316A4DF for ; Sat, 19 Aug 2006 00:15:37 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79E9043D4C for ; Sat, 19 Aug 2006 00:15:36 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5DEEC.dip.t-dialin.net [84.165.222.236]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7INwfS6096413; Sat, 19 Aug 2006 01:58:41 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7J0Fe5H058787; Sat, 19 Aug 2006 02:15:41 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 19 Aug 2006 02:06:22 +0200 From: Alexander Leidinger To: Yuri Message-ID: <20060819020622.6b371e23@Magellan.Leidinger.net> In-Reply-To: References: X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 00:15:37 -0000 Quoting Yuri (Sat, 19 Aug 2006 03:29:18 +0400): > Hi, > > After upgrading to -CURRENT/amd64 as of 18 August 2006, around 7PM > GMT, I'm getting panics when running acroread, even without X. Ports I did commit a fix for this a little bit later than 7 pm GMT. So update to a more recent -current. But don't expect a working acroread (it will segfault). If you know how to add some printf()s to the kernel, feel free to coordinate with jhb@ to get this issue fixed. Bye, Alexander. -- Darth Vader: When I left you, I was but the learner. Now I am the master. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 00:47:56 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7351216A4E1 for ; Sat, 19 Aug 2006 00:47:56 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id C93EA43D45 for ; Sat, 19 Aug 2006 00:47:55 +0000 (GMT) (envelope-from yuri.pankov@gmail.com) Received: by py-out-1112.google.com with SMTP id o67so1340043pye for ; Fri, 18 Aug 2006 17:47:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hUblxZvGDi8SVcwdqyw2fxqmhoEHPywy7BtTy1eeaD6tx5xYmkbzyjbEm5aRb0fJL9xRBvmVFXoCSdadVTtAI3NuwAO0hsr/xeY/sF+RjjLLQHsiCi+RgArELmzi5X28kgZPdRaG8yFAxtEVHgTHtIIMrg8GJAXi7M361fwZ7RY= Received: by 10.64.193.8 with SMTP id q8mr2967584qbf; Fri, 18 Aug 2006 17:47:54 -0700 (PDT) Received: by 10.65.126.5 with HTTP; Fri, 18 Aug 2006 17:47:54 -0700 (PDT) Message-ID: Date: Sat, 19 Aug 2006 04:47:54 +0400 From: "Yuri Pankov" To: "Alexander Leidinger" In-Reply-To: <20060819020622.6b371e23@Magellan.Leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060819020622.6b371e23@Magellan.Leidinger.net> Cc: freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 00:47:56 -0000 On 8/19/06, Alexander Leidinger wrote: > Quoting Yuri (Sat, 19 Aug 2006 03:29:18 +0400): > > > Hi, > > > > After upgrading to -CURRENT/amd64 as of 18 August 2006, around 7PM > > GMT, I'm getting panics when running acroread, even without X. Ports > > I did commit a fix for this a little bit later than 7 pm GMT. So update > to a more recent -current. But don't expect a working acroread (it will > segfault). If you know how to add some printf()s to the kernel, feel > free to coordinate with jhb@ to get this issue fixed. > > Bye, > Alexander. > > -- > Darth Vader: > When I left you, I was but the learner. > Now I am the master. > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > Thanks, Alexander. I've cvsup'ed source tree now, and I don't see your commit. As for acroread itself, I have to read all related threads on mailing list (missed it due to being busy lately), and I'll try to do whatever is required. Yuri From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 10:41:25 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8248B16A4DE for ; Sat, 19 Aug 2006 10:41:25 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9FAD43D46 for ; Sat, 19 Aug 2006 10:41:24 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7JAfIkx099776 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 19 Aug 2006 12:41:18 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7JAfILe099775; Sat, 19 Aug 2006 12:41:18 +0200 (CEST) Date: Sat, 19 Aug 2006 12:41:18 +0200 From: Divacky Roman To: Yuri Message-ID: <20060819104117.GA99504@stud.fit.vutbr.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 10:41:25 -0000 On Sat, Aug 19, 2006 at 03:29:18AM +0400, Yuri wrote: > Hi, > > After upgrading to -CURRENT/amd64 as of 18 August 2006, around 7PM > GMT, I'm getting panics when running acroread, even without X. Ports > were upgraded too. > > linux_base-fc-4_8 > acroread7-7.0.8,1 > > If more information is needed, it's 100% reproducible here. > > --- > Unread portion of the kernel message buffer: > panic: no emuldata found for userreting process. I know what causes it.. and netchild's fix wont fix it. but I dont know what to do with it... 1) I can fix this (its trivial) and wait what else will cause panic 2) I can port MI emuldata stuff to amd64 (but I cannot test it) and this should fix all these panics like the one you are seeing 3) I can say "amd64 linuxolator is broken now pls wait" now tell me which one I shoul do... roman From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 11:46:20 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 491DE16A4E5 for ; Sat, 19 Aug 2006 11:46:20 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EC5A43D5D for ; Sat, 19 Aug 2006 11:46:16 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5EAAE.dip.t-dialin.net [84.165.234.174]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7JBTE5K001339; Sat, 19 Aug 2006 13:29:15 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7JBkKO1056592; Sat, 19 Aug 2006 13:46:20 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 19 Aug 2006 13:48:25 +0200 From: Alexander Leidinger To: Divacky Roman Message-ID: <20060819134825.17a98fb1@Magellan.Leidinger.net> In-Reply-To: <20060819104117.GA99504@stud.fit.vutbr.cz> References: <20060819104117.GA99504@stud.fit.vutbr.cz> X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: Yuri , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 11:46:20 -0000 Quoting Divacky Roman (Sat, 19 Aug 2006 12:41:18 +0200): > On Sat, Aug 19, 2006 at 03:29:18AM +0400, Yuri wrote: > > Hi, > > > > After upgrading to -CURRENT/amd64 as of 18 August 2006, around 7PM > > GMT, I'm getting panics when running acroread, even without X. Ports > > were upgraded too. > > > > linux_base-fc-4_8 > > acroread7-7.0.8,1 > > > > If more information is needed, it's 100% reproducible here. > > > > --- > > Unread portion of the kernel message buffer: > > panic: no emuldata found for userreting process. > > I know what causes it.. and netchild's fix wont fix it. but I dont know what to do with it... Uhm... I thought the missing parts have no impact there! And didn't we protected the emuldata part with the osrelease sysctl? I will have a look at this in an hour and come back to you. > 1) I can fix this (its trivial) and wait what else will cause panic > > 2) I can port MI emuldata stuff to amd64 (but I cannot test it) and this > should fix all these panics like the one you are seeing > > 3) I can say "amd64 linuxolator is broken now pls wait" Forget about 3), either 2) or 1). Bye, Alexander. -- How come we never talk anymore? http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 11:53:35 2006 Return-Path: X-Original-To: freebsd-emulation@hub.freebsd.org Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB2F216A4E9; Sat, 19 Aug 2006 11:53:35 +0000 (UTC) (envelope-from bsam@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04FA243D58; Sat, 19 Aug 2006 11:53:35 +0000 (GMT) (envelope-from bsam@FreeBSD.org) Received: from freefall.freebsd.org (bsam@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7JBrY4t012602; Sat, 19 Aug 2006 11:53:34 GMT (envelope-from bsam@freefall.freebsd.org) Received: (from bsam@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7JBrY4s012598; Sat, 19 Aug 2006 11:53:34 GMT (envelope-from bsam) Date: Sat, 19 Aug 2006 11:53:34 GMT From: Boris Samorodov Message-Id: <200608191153.k7JBrY4s012598@freefall.freebsd.org> To: jes@jes-2.demon.nl, bsam@FreeBSD.org, freebsd-emulation@FreeBSD.org Cc: Subject: Re: ports/102034: linux_base-fc4 library problems with RELENG_6_1 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 11:53:35 -0000 Synopsis: linux_base-fc4 library problems with RELENG_6_1 State-Changed-From-To: open->feedback State-Changed-By: bsam State-Changed-When: Sat Aug 19 11:52:51 UTC 2006 State-Changed-Why: Awaiting for a feedback. http://www.freebsd.org/cgi/query-pr.cgi?pr=102034 From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 12:07:10 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9021A16A4DF for ; Sat, 19 Aug 2006 12:07:10 +0000 (UTC) (envelope-from bsam@bsam.ru) Received: from mail.kuban.ru (mail.kuban.ru [62.183.66.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A59743D49 for ; Sat, 19 Aug 2006 12:07:06 +0000 (GMT) (envelope-from bsam@bsam.ru) Received: from bsam.ru ([83.239.48.132]) by mail.kuban.ru (8.9.1/8.9.1) with ESMTP id k7JC6mP8027720; Sat, 19 Aug 2006 16:06:58 +0400 (MSD) Received: from bsam by bsam.ru with local (Exim 4.62 (FreeBSD)) (envelope-from ) id 1GEPZy-0000HQ-Ir; Sat, 19 Aug 2006 16:05:30 +0400 To: Alexander Leidinger References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> From: Boris Samorodov Date: Sat, 19 Aug 2006 16:05:30 +0400 In-Reply-To: <20060819134825.17a98fb1@Magellan.Leidinger.net> (Alexander Leidinger's message of "Sat, 19 Aug 2006 13:48:25 +0200") Message-ID: <16412869@bsam.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Boris Samorodov Cc: Yuri , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 12:07:10 -0000 On Sat, 19 Aug 2006 13:48:25 +0200 Alexander Leidinger wrote: > Quoting Divacky Roman (Sat, 19 Aug 2006 12:41:18 +0200): > > 1) I can fix this (its trivial) and wait what else will cause panic > > > > 2) I can port MI emuldata stuff to amd64 (but I cannot test it) and this > > should fix all these panics like the one you are seeing > > > > 3) I can say "amd64 linuxolator is broken now pls wait" > Forget about 3), either 2) or 1). I'd vote for 2). Roman, I have an amd64 machine to test your patches. WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 12:38:44 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C9A316A4DD for ; Sat, 19 Aug 2006 12:38:44 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 475E843D49 for ; Sat, 19 Aug 2006 12:38:43 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7JCcbS0003224 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 19 Aug 2006 14:38:37 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7JCcbMF003223; Sat, 19 Aug 2006 14:38:37 +0200 (CEST) Date: Sat, 19 Aug 2006 14:38:37 +0200 From: Divacky Roman To: Boris Samorodov Message-ID: <20060819123837.GA3211@stud.fit.vutbr.cz> References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> <16412869@bsam.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16412869@bsam.ru> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: Yuri , Alexander Leidinger , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 12:38:44 -0000 On Sat, Aug 19, 2006 at 04:05:30PM +0400, Boris Samorodov wrote: > On Sat, 19 Aug 2006 13:48:25 +0200 Alexander Leidinger wrote: > > Quoting Divacky Roman (Sat, 19 Aug 2006 12:41:18 +0200): > > > > 1) I can fix this (its trivial) and wait what else will cause panic > > > > > > 2) I can port MI emuldata stuff to amd64 (but I cannot test it) and this > > > should fix all these panics like the one you are seeing > > > > > > 3) I can say "amd64 linuxolator is broken now pls wait" > > > Forget about 3), either 2) or 1). > > I'd vote for 2). > > Roman, I have an amd64 machine to test your patches. www.stud.fit.vutbr.cz/~xdivac02/amd64.patch pls tell me if this works (it WONT work with 2.6 kernel because we lack the MD parts) From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 13:01:55 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63CA516A4DA for ; Sat, 19 Aug 2006 13:01:55 +0000 (UTC) (envelope-from bsam@bsam.ru) Received: from mail.kuban.ru (mail.kuban.ru [62.183.66.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC80943D72 for ; Sat, 19 Aug 2006 13:01:51 +0000 (GMT) (envelope-from bsam@bsam.ru) Received: from bsam.ru ([83.239.48.132]) by mail.kuban.ru (8.9.1/8.9.1) with ESMTP id k7JD1Z8Z032657 for ; Sat, 19 Aug 2006 17:01:45 +0400 (MSD) Received: from bsam by bsam.ru with local (Exim 4.62 (FreeBSD)) (envelope-from ) id 1GEQQy-0000Jy-Si; Sat, 19 Aug 2006 17:00:16 +0400 To: Divacky Roman References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> <16412869@bsam.ru> <20060819123837.GA3211@stud.fit.vutbr.cz> From: Boris Samorodov Date: Sat, 19 Aug 2006 17:00:16 +0400 In-Reply-To: <20060819123837.GA3211@stud.fit.vutbr.cz> (Divacky Roman's message of "Sat, 19 Aug 2006 14:38:37 +0200") Message-ID: <50325119@bsam.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Boris Samorodov Cc: Yuri , Alexander Leidinger , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 13:01:55 -0000 On Sat, 19 Aug 2006 14:38:37 +0200 Divacky Roman wrote: > On Sat, Aug 19, 2006 at 04:05:30PM +0400, Boris Samorodov wrote: > > Roman, I have an amd64 machine to test your patches. > www.stud.fit.vutbr.cz/~xdivac02/amd64.patch > pls tell me if this works (it WONT work with 2.6 kernel because we lack the MD parts) OK. I got the patch. Here is what I'm going to do: - cvsup sources to latest -current (amd64) and apply the patch; - rebuild/reinstall the world; - install acroread7 and test running. Any comments? WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 14:26:07 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E846D16A4E7 for ; Sat, 19 Aug 2006 14:26:07 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42C1243D58 for ; Sat, 19 Aug 2006 14:26:06 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5F524.dip.t-dialin.net [84.165.245.36]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7JE93uS002952; Sat, 19 Aug 2006 16:09:04 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7JEQ9CT079264; Sat, 19 Aug 2006 16:26:09 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 19 Aug 2006 16:28:14 +0200 From: Alexander Leidinger To: Boris Samorodov Message-ID: <20060819162814.62412bf8@Magellan.Leidinger.net> In-Reply-To: <50325119@bsam.ru> References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> <16412869@bsam.ru> <20060819123837.GA3211@stud.fit.vutbr.cz> <50325119@bsam.ru> X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: Yuri , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 14:26:08 -0000 Quoting Boris Samorodov (Sat, 19 Aug 2006 17:00:16 +0400): > On Sat, 19 Aug 2006 14:38:37 +0200 Divacky Roman wrote: > > On Sat, Aug 19, 2006 at 04:05:30PM +0400, Boris Samorodov wrote: > > > > Roman, I have an amd64 machine to test your patches. > > > www.stud.fit.vutbr.cz/~xdivac02/amd64.patch > > > pls tell me if this works (it WONT work with 2.6 kernel because we lack the MD parts) > > OK. I got the patch. > Here is what I'm going to do: > - cvsup sources to latest -current (amd64) and apply the patch; > - rebuild/reinstall the world; > - install acroread7 and test running. > > Any comments? Looks ok. Thanks, Alexander. -- Emotions are alien to me. I'm a scientist. -- Spock, "This Side of Paradise", stardate 3417.3 http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 14:44:45 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EFE816A4DA for ; Sat, 19 Aug 2006 14:44:45 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D2C743D62 for ; Sat, 19 Aug 2006 14:44:29 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7JEiNUP007545 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 19 Aug 2006 16:44:23 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7JEiLcg007542; Sat, 19 Aug 2006 16:44:21 +0200 (CEST) Date: Sat, 19 Aug 2006 16:44:21 +0200 From: Divacky Roman To: Alexander Leidinger Message-ID: <20060819144421.GA7096@stud.fit.vutbr.cz> References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> <16412869@bsam.ru> <20060819123837.GA3211@stud.fit.vutbr.cz> <50325119@bsam.ru> <20060819162814.62412bf8@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060819162814.62412bf8@Magellan.Leidinger.net> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: Yuri , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 14:44:45 -0000 On Sat, Aug 19, 2006 at 04:28:14PM +0200, Alexander Leidinger wrote: > Quoting Boris Samorodov (Sat, 19 Aug 2006 17:00:16 +0400): > > > On Sat, 19 Aug 2006 14:38:37 +0200 Divacky Roman wrote: > > > On Sat, Aug 19, 2006 at 04:05:30PM +0400, Boris Samorodov wrote: > > > > > > Roman, I have an amd64 machine to test your patches. > > > > > www.stud.fit.vutbr.cz/~xdivac02/amd64.patch > > > > > pls tell me if this works (it WONT work with 2.6 kernel because we lack the MD parts) > > > > OK. I got the patch. > > Here is what I'm going to do: > > - cvsup sources to latest -current (amd64) and apply the patch; > > - rebuild/reinstall the world; > > - install acroread7 and test running. > > > > Any comments? I am now a bit confused on whats the state of things, so to clear the situation what I am seeing on my machine (i386 UP) with linuxolator as in my p4 branch with 2.6: acroread - doesnt start, dies when starting realplay - running able to play video files linux-firefox - works (I am able to reach www.seznam.cz - didnt test much else) skype - runs upto login screen (I cannot test more because I forgot my login/pass) can someone tell me such state of things on his machine? with plain src + possibly www.stud.fit.vutbr.cz/~xdivac02/futex1.patch regarding the amd64 patch - running almost anything which does getpid() should be quite ok to test. roman From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 15:28:31 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 236F516A4E0 for ; Sat, 19 Aug 2006 15:28:31 +0000 (UTC) (envelope-from bsam@bsam.ru) Received: from mail.kuban.ru (mail.kuban.ru [62.183.66.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A61C43D53 for ; Sat, 19 Aug 2006 15:28:29 +0000 (GMT) (envelope-from bsam@bsam.ru) Received: from bsam.ru ([83.239.48.146]) by mail.kuban.ru (8.9.1/8.9.1) with ESMTP id k7JFSBI3047523; Sat, 19 Aug 2006 19:28:21 +0400 (MSD) Received: from bsam by bsam.ru with local (Exim 4.62 (FreeBSD)) (envelope-from ) id 1GESiw-0000BZ-WA; Sat, 19 Aug 2006 19:26:58 +0400 To: Alexander Leidinger References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> <16412869@bsam.ru> <20060819123837.GA3211@stud.fit.vutbr.cz> <50325119@bsam.ru> <20060819162814.62412bf8@Magellan.Leidinger.net> From: Boris Samorodov Date: Sat, 19 Aug 2006 19:26:58 +0400 In-Reply-To: <20060819162814.62412bf8@Magellan.Leidinger.net> (Alexander Leidinger's message of "Sat, 19 Aug 2006 16:28:14 +0200") Message-ID: <14640605@bsam.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Boris Samorodov Cc: Yuri , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 15:28:31 -0000 On Sat, 19 Aug 2006 16:28:14 +0200 Alexander Leidinger wrote: > Quoting Boris Samorodov (Sat, 19 Aug 2006 17:00:16 +0400): > > On Sat, 19 Aug 2006 14:38:37 +0200 Divacky Roman wrote: > > > On Sat, Aug 19, 2006 at 04:05:30PM +0400, Boris Samorodov wrote: > > > > > > Roman, I have an amd64 machine to test your patches. > > > > > www.stud.fit.vutbr.cz/~xdivac02/amd64.patch > > > > > pls tell me if this works (it WONT work with 2.6 kernel because we lack the MD parts) > > > > OK. I got the patch. > > Here is what I'm going to do: > > - cvsup sources to latest -current (amd64) and apply the patch; > > - rebuild/reinstall the world; > > - install acroread7 and test running. > > > > Any comments? > Looks ok. Hm, I have a -current amd64 from mid of July. Cvsupped, applied the patch. The machine freezed totally while buildworld (seems that the patch is not blame, though). WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 15:31:39 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0060616A4DD for ; Sat, 19 Aug 2006 15:31:38 +0000 (UTC) (envelope-from bsam@bsam.ru) Received: from mail.kuban.ru (mail.kuban.ru [62.183.66.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA0F943D6D for ; Sat, 19 Aug 2006 15:31:24 +0000 (GMT) (envelope-from bsam@bsam.ru) Received: from bsam.ru ([83.239.48.146]) by mail.kuban.ru (8.9.1/8.9.1) with ESMTP id k7JFV7n3047775; Sat, 19 Aug 2006 19:31:17 +0400 (MSD) Received: from bsam by bsam.ru with local (Exim 4.62 (FreeBSD)) (envelope-from ) id 1GESll-0000Bc-QF; Sat, 19 Aug 2006 19:29:53 +0400 To: Divacky Roman References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> <16412869@bsam.ru> <20060819123837.GA3211@stud.fit.vutbr.cz> <50325119@bsam.ru> <20060819162814.62412bf8@Magellan.Leidinger.net> <20060819144421.GA7096@stud.fit.vutbr.cz> From: Boris Samorodov Date: Sat, 19 Aug 2006 19:29:53 +0400 In-Reply-To: <20060819144421.GA7096@stud.fit.vutbr.cz> (Divacky Roman's message of "Sat, 19 Aug 2006 16:44:21 +0200") Message-ID: <48560430@bsam.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Boris Samorodov Cc: Yuri , Alexander Leidinger , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 15:31:39 -0000 On Sat, 19 Aug 2006 16:44:21 +0200 Divacky Roman wrote: > On Sat, Aug 19, 2006 at 04:28:14PM +0200, Alexander Leidinger wrote: > > Quoting Boris Samorodov (Sat, 19 Aug 2006 17:00:16 +0400): > > > > > On Sat, 19 Aug 2006 14:38:37 +0200 Divacky Roman wrote: > > > > On Sat, Aug 19, 2006 at 04:05:30PM +0400, Boris Samorodov wrote: > > > > > > > > Roman, I have an amd64 machine to test your patches. > > > > > > > www.stud.fit.vutbr.cz/~xdivac02/amd64.patch > > > > > > > pls tell me if this works (it WONT work with 2.6 kernel because we lack the MD parts) > > > > > > OK. I got the patch. > > > Here is what I'm going to do: > > > - cvsup sources to latest -current (amd64) and apply the patch; > > > - rebuild/reinstall the world; > > > - install acroread7 and test running. > > > > > > Any comments? > I am now a bit confused on whats the state of things, so to clear the situation > what I am seeing on my machine (i386 UP) with linuxolator as in my p4 branch with 2.6: > acroread - doesnt start, dies when starting > realplay - running able to play video files > linux-firefox - works (I am able to reach www.seznam.cz - didnt test much else) > skype - runs upto login screen (I cannot test more because I forgot my login/pass) > can someone tell me such state of things on his machine? with plain src + possibly > www.stud.fit.vutbr.cz/~xdivac02/futex1.patch Sorry, don't have -current i386 right now. But you question seems to be a different case. As I understand, we discuss here how to patch amd64 to work with 2.4. > regarding the amd64 patch - running almost anything which does getpid() should be quite ok > to test. OK. Thanks. WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 15:32:35 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A771C16A4DD for ; Sat, 19 Aug 2006 15:32:35 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CBDF43D7E for ; Sat, 19 Aug 2006 15:32:26 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7JFWKd5008789 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 19 Aug 2006 17:32:20 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7JFWKJM008788; Sat, 19 Aug 2006 17:32:20 +0200 (CEST) Date: Sat, 19 Aug 2006 17:32:20 +0200 From: Divacky Roman To: Boris Samorodov Message-ID: <20060819153220.GA8759@stud.fit.vutbr.cz> References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> <16412869@bsam.ru> <20060819123837.GA3211@stud.fit.vutbr.cz> <50325119@bsam.ru> <20060819162814.62412bf8@Magellan.Leidinger.net> <14640605@bsam.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14640605@bsam.ru> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: Yuri , Alexander Leidinger , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 15:32:35 -0000 On Sat, Aug 19, 2006 at 07:26:58PM +0400, Boris Samorodov wrote: > On Sat, 19 Aug 2006 16:28:14 +0200 Alexander Leidinger wrote: > > Quoting Boris Samorodov (Sat, 19 Aug 2006 17:00:16 +0400): > > > On Sat, 19 Aug 2006 14:38:37 +0200 Divacky Roman wrote: > > > > On Sat, Aug 19, 2006 at 04:05:30PM +0400, Boris Samorodov wrote: > > > > > > > > Roman, I have an amd64 machine to test your patches. > > > > > > > www.stud.fit.vutbr.cz/~xdivac02/amd64.patch > > > > > > > pls tell me if this works (it WONT work with 2.6 kernel because we lack the MD parts) > > > > > > OK. I got the patch. > > > Here is what I'm going to do: > > > - cvsup sources to latest -current (amd64) and apply the patch; > > > - rebuild/reinstall the world; > > > - install acroread7 and test running. > > > > > > Any comments? > > > Looks ok. > > Hm, I have a -current amd64 from mid of July. Cvsupped, applied the > patch. The machine freezed totally while buildworld (seems that the > patch is not blame, though). I dont think that my patches are THAT lethal that even having them on disk causes deadlocks :) From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 16:05:59 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ACEB516A4DE for ; Sat, 19 Aug 2006 16:05:59 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C1A143D45 for ; Sat, 19 Aug 2006 16:05:57 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5F524.dip.t-dialin.net [84.165.245.36]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7JFmrCo003289; Sat, 19 Aug 2006 17:48:54 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7JG60ne093418; Sat, 19 Aug 2006 18:06:01 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 19 Aug 2006 18:08:05 +0200 From: Alexander Leidinger To: Divacky Roman Message-ID: <20060819180805.2029581b@Magellan.Leidinger.net> In-Reply-To: <20060819144421.GA7096@stud.fit.vutbr.cz> References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> <16412869@bsam.ru> <20060819123837.GA3211@stud.fit.vutbr.cz> <50325119@bsam.ru> <20060819162814.62412bf8@Magellan.Leidinger.net> <20060819144421.GA7096@stud.fit.vutbr.cz> X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: Yuri , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 16:05:59 -0000 Quoting Divacky Roman (Sat, 19 Aug 2006 16:44:21 +0200): > I am now a bit confused on whats the state of things, so to clear the situation > > what I am seeing on my machine (i386 UP) with linuxolator as in my p4 branch with 2.6: > > acroread - doesnt start, dies when starting > realplay - running able to play video files > linux-firefox - works (I am able to reach www.seznam.cz - didnt test much else) > skype - runs upto login screen (I cannot test more because I forgot my login/pass) i386, UP machine, plain -current without any linux patches: - 2.4.2: acroread, realplay and skype (tested the skype echo service) work, I didn't tested linux-firefox realplay had a little problem displaying the video, it runs, but a large part of the picture isn't updated on the first run, after running it the second time, it played just fine - 2.6.16: with a populated ~/.acrobat/: + starting "acroread" works - trying to edit the preferences (edit->preferences) results in "exit 1" - "file->open" opens the file dialog, depending on the PDF it dies with "exit 1" or it displays the PDF - "help->about" works - "help->plugins" results in "exit 1" - "help->accessibility" results in "exit 1" + skype starts - shows the GUI, but hangs in the linuxfutex state + realplayer (10.0.6.776) starts - "help->about" works - "tools->plugins" works - "tools->preferences" works - "file->open" works - playing a mp3 works - displaying a jpeg works - connection problems when trying to play a .rm from http://... - downloading the video locally and trying to play doesn't work, "ps -axlwww | grep linux" shows it sitting in the linuxfutex state Bye, Alexander. -- BOFH excuse #394: Jupiter is aligned with Mars. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Sat Aug 19 16:52:56 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6444216A4DD for ; Sat, 19 Aug 2006 16:52:56 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F08043D45 for ; Sat, 19 Aug 2006 16:52:55 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5F524.dip.t-dialin.net [84.165.245.36]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k7JGZp8O003460; Sat, 19 Aug 2006 18:35:52 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k7JGqxOV000136; Sat, 19 Aug 2006 18:52:59 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 19 Aug 2006 18:55:05 +0200 From: Alexander Leidinger To: Divacky Roman Message-ID: <20060819185505.2a2fead5@Magellan.Leidinger.net> In-Reply-To: <20060819180805.2029581b@Magellan.Leidinger.net> References: <20060819104117.GA99504@stud.fit.vutbr.cz> <20060819134825.17a98fb1@Magellan.Leidinger.net> <16412869@bsam.ru> <20060819123837.GA3211@stud.fit.vutbr.cz> <50325119@bsam.ru> <20060819162814.62412bf8@Magellan.Leidinger.net> <20060819144421.GA7096@stud.fit.vutbr.cz> <20060819180805.2029581b@Magellan.Leidinger.net> X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: Yuri , freebsd-emulation@freebsd.org Subject: Re: panic when running acroread on recent -CURRENT/amd64 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2006 16:52:56 -0000 Quoting Alexander Leidinger (Sat, 19 Aug 2006 18:08:05 +0200): > Quoting Divacky Roman (Sat, 19 Aug 2006 16:44:21 +0200): > > > I am now a bit confused on whats the state of things, so to clear the situation > > > > what I am seeing on my machine (i386 UP) with linuxolator as in my p4 branch with 2.6: > > > > acroread - doesnt start, dies when starting > > realplay - running able to play video files > > linux-firefox - works (I am able to reach www.seznam.cz - didnt test much else) > > skype - runs upto login screen (I cannot test more because I forgot my login/pass) > > i386, UP machine, plain -current without any linux patches: Now with the most recent linux_futex.c from p4: - 2.6.16: with a populated ~/.acrobat/: + starting "acroread" works (may depend on the setting in ~/.acroread, they are different from the defaults) - trying to edit the preferences (edit->preferences) results in "exit 1" - "file->open" opens the file dialog, depending on the PDF it dies with "exit 1" or it displays the PDF - "help->about" works - "help->plugins" results in "exit 1" - "help->accessibility" results in "exit 1" + skype starts - shows the GUI, but hangs in the linuxfutex state + realplayer (10.0.6.776) starts - "help->about" works - "tools->plugins" works - "tools->preferences" works - "file->open" works - playing a mp3 works - displaying a jpeg works - connection problems when trying to play a .rm from http://... - downloading the video locally and trying to play doesn't work, "ps -axlwww | grep linux" shows it sitting in the linuxfutex state Summary: no change with the patch. Bye, Alexander. -- In these matters the only certainty is that there is nothing certain. -- Pliny the Elder http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137