X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ECB943856DD9 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cornell.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cornell.edu ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KQLO+yhtO9/NpEvggmlnDN4J+EGTRW2rqnfup8K5cIP6WlfoNZa6MW9wTbEcuIVn8/WbV7UXzqGTW20buTX1FMVjCxeHGbrxJ+21pXrD7uI1zGgaha+1G8DG0lXb+x5rIjPu+5J+QJ42npFXQavVCD4VqhIWjZAXUdCxnTzJxDoGXAKdxk6KNw2xlcQzkzDDzBwHiEVRb9oE+0BMA6V0PsKfAS8PANWi4s/dvDT9r6It6MAET1oIfVDMteATGOSvlGKS+r6GsTfkHNy/V2gO4R3fFtP1hwx0WbIFw/64efOLxnBgfq4udNLfEoOHR8PpPsR1tlu9psEEnm5BWHa8eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MTfkwM48VVQINiGn57O92bEi542geljIGfbJC5pjCxU=; b=fKxmY3zWNQsUj/ixtbLdhX9o2okny6O2fCK8NeTo/gVcX7QD8K7+lEBOWwD3Vk438rCqldNBaIQlcTN80hUtOYUYbPU9JLXvHeTHSszoUM6kFEGPnkVmX4SxvObYbGVM3qMnUQbYiQgGpPwnaN89rY7MAGpnnPrwYWqW+LVxaQr2E/uPba291SlrlIIbIvAzB4M2GlZkFXgt4qq/I68KL3kvqg1k/l2dvHJ/W6PteSVjsRltEgwNd33XUjIIwK1r8O5DebeGEjCHf8tYyZCsdopaI1BkicwaLdrjQIZ8Ax67XHFLRhFpyzIXjKep3XJzf5REeuadQvOzdwdNcpcQ1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MTfkwM48VVQINiGn57O92bEi542geljIGfbJC5pjCxU=; b=cyvW0HjQvxXx2CaZd7Bg36cH0Njbd15KZr1RGvignuECSOEfS3XhKSmvVMJgpFd3yomArukrjK1hwZ532rC4L7qOR/NgMpzgKuTSUij63ossaxNzgGXraP2h3bs4P1SoLChM3AN9XhKqpntEsfqc6R3kdbv9Zr5Nc6FpSqeIgJg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cornell.edu; Message-ID: Date: Thu, 28 Apr 2022 09:42:46 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: GNU make losing jobserver tokens Content-Language: en-US To: cygwin AT cygwin DOT com References: <9b9da583-124d-9d5f-4c10-6622602ca8dc AT oracle DOT com> <20220401174551 DOT 820cbc148852554108397e03 AT nifty DOT ne DOT jp> <20220427231340 DOT 0bdab2d6d903dd4fb44bd12f AT nifty DOT ne DOT jp> From: Ken Brown In-Reply-To: <20220427231340.0bdab2d6d903dd4fb44bd12f@nifty.ne.jp> X-ClientProxiedBy: MN2PR10CA0031.namprd10.prod.outlook.com (2603:10b6:208:120::44) To BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b29740f9-4f5e-4aec-5b4f-08da291cfbaa X-MS-TrafficTypeDiagnostic: SJ0PR04MB8248:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XzprqC4Y4/HEQqznKwUokgqA+Vmf365JyPmSxIxpf8aYaX04v669zufZXLZGyRjoN/mWGXqNHQVTek5QRkaZ3GpOvWNWgjr7BxfLIVLEzgKV3IBEi9DPHQXSWS0SEVUdTZnQfJ/RB9NNkEikQuaGQkR+hCqvoZXNYWSWDVp2mb1pCST6ZlXkgebiTr0rnr4mMlZ6WW5YCR0HiQVBuRA0T0236ua7rjFxHUjSf/8ArnqZFh7j+RAEjZRjmF6L93uSXCRNn09Gapq1HtttZAD6BPxHgc3tngcgI2Fuw3N1PaIEKCCMRWnH+EiSaMlxvhBmfgkdLj+NEwwu2c34sVuatpkqrFeaLlbSHGBv01SjKF+D9VzPobC9J5/61qhzxDqJ4mhQqofFYs4kK/5kZnxf7F+wepowPHkwASyfj6QS/g3mS/vG9JicyREly4YyNifxCRmkniK4IkVp6M+yIxzkh7nu1Txj1qupVPhyDdAwtUc3mSid/9xvoQFIiRZk91fgEAPBFcpEtqeshXsVLZZAMQrDMp2QVE+7QjxzLXnPwg2ulJlJNkc6HQ9eS85sHJUpeAKepGToJZYkn5yEU9NuHU1/VTAV0su/vZ5jpQuUw3QtIr1NDmB9A/pkDytul/kWAYhjZ7IoSoWIEfwkU+SmWI6vEfyhgrGn5RM8tLKigJwBiQIJvpoChfHLKie1WSGPNwBKwMWAnwMkvWFzPUsv/n37NdgWbh42RMg1rY38abI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN7PR04MB4388.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(508600001)(75432002)(5660300002)(2616005)(6486002)(8936002)(6512007)(86362001)(66946007)(53546011)(26005)(66556008)(36756003)(66476007)(186003)(2906002)(786003)(31686004)(316002)(6506007)(8676002)(83380400001)(6916009)(38100700002)(31696002)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ODJqWXBGZEYzNWpkcVlaSDUrbnJ4MGlwTE5hNUlLU3ViVUpCTjZuYW8xVVBv?= =?utf-8?B?UjRCOXcwVmJGS210UytUL1hrbVZnL1puSndJRGNBeFh2bzZVRFNqSGJlbzVE?= =?utf-8?B?VkV1T1ZhWDkxU2VjcWcwWFBWcTdKR2c5NjZpM3JGL3hsWS9IZWR6SnhSYXVR?= =?utf-8?B?WjRLWERpbmY5d2o2RlhuN3EzSC9QRnQrOXljaU5meEl1MGRZUURRdXNDMStE?= =?utf-8?B?NFRldUhjeEpHZDc2cHllK1BGSkFGb05EU3Y1RkFlaU9uTk5ZK3BQbTJCdmc3?= =?utf-8?B?dEJNREJXRmM1VGRYOWhzVE52TTY3RDBPVWcrVXlLcnFBR1NrM2o0SGhKRnRK?= =?utf-8?B?SEFSZE52UVcyWFlIQm9tWDhCWVd3NjhLclBkblgxZnY2N0JXT244dVl6TC8r?= =?utf-8?B?RXlIUWNBWGYwS2xUOTM3cDVnZHYvUVYyUjJaM216c3FseG43UUwzcVFwV3Nm?= =?utf-8?B?UTVWditaQTZJMGN6WTBrRmY0dk41QzBmNURvM0V3YUxWbDdJZjA3Y296dCtW?= =?utf-8?B?a3hGcG5UZCtYOXpUOXFMT3JJWmxSOWRYeGhzckFHNTJYaFJxdXp3R2o5L0dJ?= =?utf-8?B?dzZHTnN6MlJSOTFocFFyRjRnSEQzRXZLL0g0UDlzSHlWZnI4QjRoM3RxbjYv?= =?utf-8?B?TW05U2ZRdGRVa2oydjlhcStNNWg5ODRGZXpZV3BRR2NQNEttN0FkWlRCZU13?= =?utf-8?B?RUZaa2U3N1BNcjA0d0V4eG9LNXZlYlU0SVJUcWVOVkFLd0hlZnBKVUJmOGRw?= =?utf-8?B?bTRQZk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?utf-8?B?Y3ZGQUFNVU1DRjZiTlRITDJPMWJ0Ly8vQ1hrK0QwYlhBazFvd3ZEZmtXV0tx?= =?utf-8?B?VVI3OU5Xam5BU1dFaUxVWVlCbzVzME5QZlUyNjhnZGM1cmlDWjFibU5TdTE2?= =?utf-8?B?V1Zmb1NGaE1lRVBld3ZPMVJiSkJWNWI1WFpzUTN3dlpxOWRyemhuK0gyQjFH?= =?utf-8?B?aGFOYk1ScDV1dUNUWkdaOSt5Q1puMzRabWU1Wm50RzNvM1k3NDlLZ1RXMDB3?= =?utf-8?B?ZlhaUi9pRXZsQ0U1RytRYVRxajUxNk9McUJOd0haSkNvOFZHR3FweFlpMnht?= =?utf-8?B?OEFQem5uZWtKTmRZbUJLK3BySEZ5Y3BhTkZEMUJKdHV4aGdKOWcyOWxIYzBN?= =?utf-8?B?dVJhVWpkR3hHODhvRm13SVlTc292Y0RvUzV2MmZHVTFTQ2txRTkzblBQeUkx?= =?utf-8?B?V2sxVnE5YkRZenRxRzE3L2lzckNnMTZxeFBUSDZ4R2kzVUZvMXNKV2xjVUFt?= =?utf-8?B?T3lKL2hYZmJxSGorT3hseDlva2FxbDltVTNpVHRpS0RLOHczMjBqZHBMb095?= =?utf-8?B?R0wxbmJ0KzNNYS9ySXdaNkh2WlBYT2hTWVNyL3Z4b3NCY0JtT1FXVCtjY2Q4?= =?utf-8?B?cTdibHAzZXg3ck5La3dCeUUzSHJOb1pBVG5iMjh1UmhCSGdDbjBldz09?= X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: b29740f9-4f5e-4aec-5b4f-08da291cfbaa X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2022 13:42:48.6133 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +Ww9sS3xHso6suKzF2Wn6KSNfEjoE7GdaJOxvpZnOFvbrPITGFFFAnv4iwRjHR1i3EANNxGEV+3nV20VZKTrBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR04MB8248 X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On 4/27/2022 10:13 AM, Takashi Yano wrote: > On Fri, 1 Apr 2022 17:45:51 +0900 > Takashi Yano wrote: >> I have tried to reproduce the issue by building OpenJDK >> from source, however, I could not. >> >> Instead, I encountered another issue. >> >> Building OpenJDK sometimes (rarely) failed with error such as: >> >> 0 [sig] make 5484 sig_send: error sending signal 11, pid 5484, pipe handle 0x118, nb 0, packsize 176, Win32 error 0 >> 124917 [main] make 5484 sig_send: error sending signal -72, pid 5484, pipe handle 0x118, nb 0, packsize 176, Win32 error 0 >> common/modules/GensrcModuleInfo.gmk:77: *** open: /home/yano/jdk/build/windows-x86-server-release/make-support/vardeps/make/common/modules/GensrcModuleInfo.gmk/jdk.accessibility/ALL_MODULES.vardeps: No such file or directory. Stop. >> make[2]: *** [make/Main.gmk:141: jdk.accessibility-gensrc-moduleinfo] Error 2 >> make[2]: *** Waiting for unfinished jobs.... >> >> >> I looked into this new problem and found that wait_sig() thread >> crashes with segfault. It seems that accessing _main_tls causes >> access violation if a signal is sent just after the process is >> started. >> >> static void WINAPI >> wait_sig (VOID *) >> { >> [...] >> if (!pack.mask) >> { >> tl_entry = cygheap->find_tls (_main_tls); >> dummy_mask = _main_tls->sigmask; // <--- Segfault here >> cygheap->unlock_tls (tl_entry); >> pack.mask = &dummy_mask; >> } >> >> I also found the following patch resolves the issue. >> >> diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc >> index 62df96652..3824af199 100644 >> --- a/winsup/cygwin/sigproc.cc >> +++ b/winsup/cygwin/sigproc.cc >> @@ -1325,6 +1325,10 @@ wait_sig (VOID *) >> _sig_tls = &_my_tls; >> bool sig_held = false; >> >> + /* Wait for _main_tls initialization. */ >> + while (!cygwin_finished_initializing) >> + Sleep (10); >> + >> sigproc_printf ("entering ReadFile loop, my_readsig %p, my_sendsig %p", >> my_readsig, my_sendsig); >> >> >> I guess _main_tls may not be initialized correctly until >> cygwin_finished_initializing is set. >> >> Any comments would be appreciated. This seems reasonable to me. Ken -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple