From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 71C635A005E for ; Mon, 30 Jan 2023 19:08:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675102099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jUdAOsI+pLfG+ttkd8kZyVfON9JSAg2s1eqjaq93q0U=; b=Iq0AxUziXg9HPchLeC2vsCKl5EQS3bfRZbjX6aefmrp4N8WJkZiwP9/bYSxmEqy2rgNPCT b1UtvwGeme5sJBWE/c18o5D86NwwE/6RjWahOQOiYN6m6SMZxzsNmDK0JnV+NksgKvOe6y 6LTtJf53BzzevD6wHJRFarpC3cBLYug= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-517-qbyzCYIaO5K7I3O8SqDYLA-1; Mon, 30 Jan 2023 13:08:18 -0500 X-MC-Unique: qbyzCYIaO5K7I3O8SqDYLA-1 Received: by mail-qk1-f198.google.com with SMTP id bm30-20020a05620a199e00b007090f3c5ec0so7587236qkb.21 for ; Mon, 30 Jan 2023 10:08:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:from:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jUdAOsI+pLfG+ttkd8kZyVfON9JSAg2s1eqjaq93q0U=; b=AIKJUyt1PpIX0IaQJC+JSCLgaBLVEjE+PJZ1rDURiZ6peB8v2sHRkqsWdT6VGhZM97 11f6EvjQ1eqJPiOmwfLxjzUKkTiM8te8vJHDQGTJHmYee5s1HVDDxWAXEsGA3PiffVIw QcOGncSJMX5c11oQnGEuJvsgK0kia+DSM4hAUKyo8T0BXX/8/7HnNHqmSCSDGk2DonMi zGKVl/WhsvW+OheGrlKe2WonFG0mhh1hPhAvlq3IafMZyzTGcFlkTawVxQQj9fHmHb0N MBsMwqrEuxpNPlkYYbDmNV7LaGvz4OrDohwf0joxTmfW5ULL3DHqf2DuiZHBRBYeDGrI WsRA== X-Gm-Message-State: AO0yUKUdmbp54+qnmcqCEL/773ZTXKl8gopxDh1PIqAF+j57kWNZwUzy 55Gf4Oa6cRFElFMpoaZZdoKW4LdvY3D72Q1fV3/641jVkPYGiWZmCZXXL0BtyvBRh2fUfT9C2d2 NLQYYCVqXoEp18/9xnd52KI8treTCR4gjDyVMcMdQ40KFF7+XrCtMHCYXEByuDEMs X-Received: by 2002:ac8:57ce:0:b0:3b8:6043:db01 with SMTP id w14-20020ac857ce000000b003b86043db01mr9973358qta.57.1675102097356; Mon, 30 Jan 2023 10:08:17 -0800 (PST) X-Google-Smtp-Source: AK7set+llesSJNwNZeugzuJNcK9FgiVBGaqdES8bhB2MOOgV3UVoeayfoPBWxJosLE5i+dwo4N54Lw== X-Received: by 2002:ac8:57ce:0:b0:3b8:6043:db01 with SMTP id w14-20020ac857ce000000b003b86043db01mr9973322qta.57.1675102096981; Mon, 30 Jan 2023 10:08:16 -0800 (PST) Received: from [192.168.188.25] ([80.243.52.136]) by smtp.gmail.com with ESMTPSA id s15-20020ac85ccf000000b003b691385327sm6978626qta.6.2023.01.30.10.08.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Jan 2023 10:08:16 -0800 (PST) Message-ID: <984f4c24-8fe4-71db-1fa6-174a1f5b055f@redhat.com> Date: Mon, 30 Jan 2023 19:08:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 From: Paul Holzinger Subject: Race condition with pasta COMMAND... To: passt-dev@passt.top X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MailFrom: pholzing@redhat.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: X3DII23OGSSSEBM77UNXXJQI2NWRQMYO X-Message-ID-Hash: X3DII23OGSSSEBM77UNXXJQI2NWRQMYO X-Mailman-Approved-At: Tue, 31 Jan 2023 13:49:05 +0100 X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi all, while debugging some things I used `./pasta --config-net -- nslookup google.com 1.1.1.1` to test dns. The problem is that does not work because the nslookup process will be executed before pasta is ready with the netns setup, i.e. compare `./pasta --config-net -- ip a`. So a workaround is to spawn a shell and sleep: `sh -c "sleep 1; nslookup google.com 1.1.1.1"` However this is ugly and does not ensure that the netns is ready after one second. As a user I would expect pasta to wait until the setup is finished before it calls exec(). I can send a patch if you agree and I find some time. --- Paul