From owner-freebsd-current@freebsd.org Tue Mar 12 21:37:36 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C29D7153F613 for ; Tue, 12 Mar 2019 21:37:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A572873E4 for ; Tue, 12 Mar 2019 21:37:34 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f174.google.com with SMTP id v10so3694954lji.3 for ; Tue, 12 Mar 2019 14:37:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FxFjZwUuECFKmR6ytQWPZbRif++Ls7STaR+EXmvJhM4=; b=GR/gIc5lS7geOU8VwHM3I/q6PcFfmu37dSkFSXERpIPHSC/magWiQX+WB7m9WyBK42 A5zyhOeMiW+J7SqHFrC3TuqIxFuqFASfExudhBFgKTOfZrbXyBP9V0//YTFEn14zhjzB tb1M+vSfbB8yQpZAqFyX0WFiMRjEsRtlt/Znlm4s4gj1rkpIEmUI1ciFeex8pFq/HRkc Q6lY7GhnZWfA9wYe1Q1r4/W9SNUWWIftpBvGaY3RRLHSqp8TAx6pzxJej+a3Hb7fT1oP YnCuB0frWiO7nUQtBxpUtYmea204xcwsESCmn8304p9auP5rfafCPvSGn/KlQb/CqZP8 SeWw== X-Gm-Message-State: APjAAAUb82zfp4uPxgnIZrss/al75GUe1vCCmU7LULDHty+QbjF7Adft ASaZ1eq3qZclPcBXNit5birg4Y/7KgL5SITc/7YdU2ug X-Google-Smtp-Source: APXvYqyw4Dx4Th+sTqjyz9N5Xec1s+KODejx/z+TKVZxjG1S7mi8GlETMXr7bHb1iGriz3RrNTdZfIXOLbyQBuf6MIg= X-Received: by 2002:a2e:9889:: with SMTP id b9mr3626709ljj.29.1552426647359; Tue, 12 Mar 2019 14:37:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Tue, 12 Mar 2019 15:37:15 -0600 Message-ID: Subject: Re: kqueue send over unix socket? To: Larry Rosenman Cc: Freebsd current , Aki Tuomi Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 6A572873E4 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.174 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-3.24 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; IP_SCORE(-1.29)[ip: (-0.43), ipnet: 209.85.128.0/17(-3.89), asn: 15169(-2.08), country: US(-0.07)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_TRACE(0.00)[0:+]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[174.208.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.93)[-0.934,0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 21:37:36 -0000 Is he trying to send the kqueue file descriptor itself using sendmsg with SCM_RIGHTS? It sounds like kqueues cannot be sent over unix sockets; not every file type necessarily can. But if you want to know the nitty-gritty details, just run this: dtrace -i 'fbt:::return /arg1 == 45/ {stack();}' -c "my_program my_options" and that will usually tell you the exact function that set the error. If the output is too large, then you can filter it by writing a D program like this: #sendmsg.d fbt:kernel:sys_sendmsg:entry { this->trigger = 1; } fbt:::return / this->trigger == 1 && arg1 == 45 / { stack(); } fbt:kernel:sys_sendmsg:return { this->trigger = 0; } dtrace -s sendmsg.d -c "my_program my_options" Hope that helps. -Alan On Tue, Mar 12, 2019 at 3:22 PM Larry Rosenman wrote: > > I'm working with Aki Tuomi of Dovecot and he asks: > > I tried to ask if you could ask from some Kernel hacker why I cannot > send kqueue() fd over unix socket, I get "Operation not supported". > > Can anyone help me? > > > > -- > Larry Rosenman http://www.lerctr.org/~ler > Phone: +1 214-642-9640 E-Mail: ler@lerctr.org > US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106 > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"