From nobody@FreeBSD.org  Tue Jun 22 23:42:26 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C6163106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Jun 2010 23:42:26 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id B5B348FC1E
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Jun 2010 23:42:26 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o5MNgQJm069875
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Jun 2010 23:42:26 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o5MNgQ87069874;
	Tue, 22 Jun 2010 23:42:26 GMT
	(envelope-from nobody)
Message-Id: <201006222342.o5MNgQ87069874@www.freebsd.org>
Date: Tue, 22 Jun 2010 23:42:26 GMT
From: Andrea Magliano <masterblaster@tiscali.it>
To: freebsd-gnats-submit@FreeBSD.org
Subject: portage 'emerge' cmd stalls indefinitely
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         148076
>Category:       kern
>Synopsis:       [linux] linux_sys_futex: unknown op 265
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dchagin
>State:          patched
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 22 23:50:01 UTC 2010
>Closed-Date:    
>Last-Modified:  Thu Jul 21 10:04:04 UTC 2011
>Originator:     Andrea Magliano
>Release:        FreeBSD 8.1-RC1
>Organization:
none
>Environment:
FreeBSD 8.1-RC1 #0: Mon Jun 14 14:44:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
'emerge' stalls indefinitely, no network activity.

'top' shows stalled python:
  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
 1124 root        1  76    0 18852K 17764K ttyout   0:01  6.69% python2.6

'dmesg' (new line after emerge try):
linux_sys_futex: unknown op 265

Strangely 'emerge --sync' succeeds, but ping fails as well:
ping: recvmsg: Invalid argument
>How-To-Repeat:
install linux_dist-gentoo-stage3-20100601_1

mount following:
devfs           /usr/local/gentoo-stage3/dev devfs      rw 0 0
linproc         /usr/local/gentoo-stage3/proc     linprocfs       rw 0 0
linsys          /usr/local/gentoo-stage3/sys      linsysfs        rw 0 0

sudo /usr/sbin/chroot /usr/local/gentoo-stage3 su -

emerge <whatever>

'emerge' stalls indefinitely
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gabor 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jun 23 01:17:20 UTC 2010 
Responsible-Changed-Why:  
Fix synopsis and assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148076 
Responsible-Changed-From-To: gabor->dchagin 
Responsible-Changed-By: gabor 
Responsible-Changed-When: Mon Jul 12 21:15:16 UTC 2010 
Responsible-Changed-Why:  
This is not a problem in the port but in the underlying Linux emulation 
layer, thus it cannot be fixed in the port. Recategorize and change 
synopsis accordingly. Reassign to dchagin@, who agreed to take a look at it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148076 

From: Jung-uk Kim <jkim@FreeBSD.org>
To: bug-followup@FreeBSD.org,
 masterblaster@tiscali.it
Cc: dchagin@FreeBSD.org
Subject: Re: kern/148076: [linux] linux_sys_futex: unknown op 265
Date: Wed, 6 Oct 2010 16:12:02 -0400

 > linux_sys_futex: unknown op 265
 
 This is (FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME) and it is available 
 from Linux 2.6.28:
 
 http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6-stable.git;a=shortlog;h=1acdac104668a0834cfa267de9946fac7764d486
 
 In turn, FUTEX_WAIT_BITSET itself is available from Linux 2.6.25:
 
 http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6-stable.git;a=shortlog;h=cd689985cf49f6ff5c8eddc48d98b9d581d9475d
 
 I think we should suspend this PR until Linuxulator adds syscalls 
 beyond 2.6.16.
 
 FYI...
 
 Jung-uk Kim

From: Alexander Best <arundel@freebsd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/148076: [linux] linux_sys_futex: unknown op 265
Date: Fri, 19 Nov 2010 13:43:36 +0000

 please note that r215338 should reduce the output storm of such warnings,
 however the futex implementation is still missing support for FUTEX_WAIT_BITSET
 and a few others.
 
 cheers.
 alex
 
 -- 
 a13x
State-Changed-From-To: open->patched 
State-Changed-By: arundel 
State-Changed-When: Sun Jan 30 07:49:39 UTC 2011 
State-Changed-Why:  
For now we simply made FUTEX_CLOCK_REALTIME a no op. The linuxulator should no 
longer complain about it. A real implementation however is neded to fully 
support futex operators FUTEX_WAIT_BITSET and FUTEX_WAIT_REQUEUE_PI, which 
support switching between CLOCK_MONOTONIC and FUTEX_CLOCK_REALTIME. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148076 

From: "Steven Hartland" <killing@multiplay.co.uk>
To: <bug-followup@freebsd.org>, <masterblaster@tiscali.it>
Subject: Re: kern/148076: [linux] linux_sys_futex: unknown op 265
Date: Thu, 21 Jul 2011 09:30:50 +0100

This still stalls on 8.2-RELEASE, so doesn't look like the patch worked.
>Unformatted:
